Skip to content

Commit

Permalink
Merge pull request #48 from ni-ze/cloudP
Browse files Browse the repository at this point in the history
modify default configuration
  • Loading branch information
ni-ze authored Sep 22, 2022
2 parents 51d2b5b + 889e568 commit 018813f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
8 changes: 5 additions & 3 deletions rsqldb-disk/conf/rsqldb.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#RocketMQ集群中namesrv地址
NAMESRV_ADDR=127.0.0.1:9876
#流处理任务命名空间
namespace=test

## 流计算经过任务解析器(rsqldb-server)解析后保存位置,可以是memory, DB 或者file
Expand All @@ -11,9 +13,9 @@ jdbc.password=


## 窗口配置
#group by 时窗口大小,单位s,sql中不配置或者这里不指定的话默认600s
dipper.window.default.iterval.size.time=10
#group by 时窗口大小,单位s,默认为10s
window.default.iterval.size.time=

#client产生的流计算任务位置,目前需要填绝对路径,client生成后,runner从该位置读取流计算任务。配置形式为:
#filePathAndName=/Users/rsqldb/rsqldb-disk/server/rsqldb.cs
filePathAndName=/Users/nize/code/github/rsqldb/rsqldb-disk/server/rsqldb.cs
filePathAndName=
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,20 @@ public static com.alibaba.rsqldb.parser.parser.builder.WindowBuilder createWindo
/**
* 如果只有group by,没有指定窗口,则通过配置获取默认窗口大小,如果未指定,默认1个小时
*/
int interval = WindowBuilder.getIntValue(ConfigureFileKey.DIPPER_WINDOW_DEFAULT_INERVAL_SIZE, 60 * 10);
int interval = WindowBuilder.getIntValue(ConfigureFileKey.DIPPER_WINDOW_DEFAULT_INERVAL_SIZE, 10);
com.alibaba.rsqldb.parser.parser.builder.WindowBuilder windowBuilder = new com.alibaba.rsqldb.parser.parser.builder.WindowBuilder();

SqlWatermark sqlWatermark = ThreadLocalUtil.watermarkHolder.get().get(builder.getSourceTable());
int watermarkOffset;
try {
watermarkOffset = (int)sqlWatermark.getWatermarkOffset();
} catch (Throwable e) {
throw new RuntimeException(e);

if (sqlWatermark !=null) {
int watermarkOffset;
try {
watermarkOffset = (int)sqlWatermark.getWatermarkOffset();
} catch (Throwable e) {
throw new RuntimeException(e);
}
windowBuilder.setWatermark(watermarkOffset);
}
windowBuilder.setWatermark(watermarkOffset);

windowBuilder.setType(IWindow.HOP_WINDOW);
windowBuilder.setOwner(builder);
Expand Down

0 comments on commit 018813f

Please sign in to comment.