diff --git a/rsqldb-disk/conf/rsqldb.conf b/rsqldb-disk/conf/rsqldb.conf index bff3d34..03ee644 100644 --- a/rsqldb-disk/conf/rsqldb.conf +++ b/rsqldb-disk/conf/rsqldb.conf @@ -1,4 +1,6 @@ +#RocketMQ集群中namesrv地址 NAMESRV_ADDR=127.0.0.1:9876 +#流处理任务命名空间 namespace=test ## 流计算经过任务解析器(rsqldb-server)解析后保存位置,可以是memory, DB 或者file @@ -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= diff --git a/rsqldb-parser/src/main/java/com/alibaba/rsqldb/parser/parser/function/HopParser.java b/rsqldb-parser/src/main/java/com/alibaba/rsqldb/parser/parser/function/HopParser.java index bbdf294..1053efe 100644 --- a/rsqldb-parser/src/main/java/com/alibaba/rsqldb/parser/parser/function/HopParser.java +++ b/rsqldb-parser/src/main/java/com/alibaba/rsqldb/parser/parser/function/HopParser.java @@ -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);