Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify default configuration #48

Merged
merged 2 commits into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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