Re: Watermark not worked as expected in TimeCharacteristic.EvenTime setting.

2018-03-03 Thread sundy
Thanks a lot, use env.setParallelism(1) before the source define works (I set it before the env.execute, so it did not take effect). > On 3 Mar 2018, at 16:02, sundy <543950...@qq.com> wrote: > > Hi Hequn Cheng, > > Finally I got the problem and find the way to define the correct WaterMark

Re: Watermark not worked as expected in TimeCharacteristic.EvenTime setting.

2018-03-03 Thread Hequn Cheng
Hi sundy, It is strange that your configuration does not take effect. Do you set parallelism somewhere else? Maybe, you can refer to the kafka test case[1]. In this test case, line 229 set parallelism to 1 and works fine. Hope it helps you. [1]

Re: Watermark not worked as expected in TimeCharacteristic.EvenTime setting.

2018-03-03 Thread sundy
Hi Hequn Cheng, Finally I got the problem and find the way to define the correct WaterMark by your advice, thank you very much. The problem is that I set the watermark to the waterMark = maxEventTime - lag And the timeWindow is 10Seconds, But I generated the test records too quickly

Re: Watermark not worked as expected in TimeCharacteristic.EvenTime setting.

2018-03-02 Thread Hequn Cheng
Hi sundy, 1. Some partition of your input kafka don't have data. Since window watermark is the min value of all it's inputs, if there are no data from one of it's inputs, window will never be triggered. You can set parallelism of your job to 1 to avoid this problem(PS: Maybe this bug is fixed

Re: Watermark not worked as expected in TimeCharacteristic.EvenTime setting.

2018-03-02 Thread sundy
Hi, thanks for your reply. I have searched it in stackoverflow, and there is someone who has the some problem. https://stackoverflow.com/questions/40993753/flink-streaming-program-runs-correctly-with-processing-time-but-will-not-produc

Re: Watermark not worked as expected in TimeCharacteristic.EvenTime setting.

2018-03-02 Thread Xingcan Cui
Hi, for periodically generated watermarks, you should use `ExecutionConfig.setAutoWatermarkInterval()` to set an interval. Hope that helps. Best, Xingcan > On 3 Mar 2018, at 12:08 PM, sundy <543950...@qq.com> wrote: > > > > Hi, I got a problem in Flink and need your help. > > I tried to