Re: Conversion of Table (Blink/batch) to DataStream

2020-04-04 Thread Jark Wu
Hi Maciek, This will be supported in the future. Currently, you can create a `StreamTableEnvironmentImpl` by yourself using the constructor (the construct does'n restrict batch mode). SQL CLI also does in the same way [1] (even though it's a hack). Best, Jark [1]:

Re: 回复: 回复: 回复: Flink双流Join问题

2020-04-04 Thread Djeng Lee
给kafka吐数据时每条记录之间休眠1秒试试. 文档位置 https://ci.apache.org/projects/flink/flink-docs-release-1.10/zh/dev/event_timestamps_watermarks.html https://ci.apache.org/projects/flink/flink-docs-release-1.10/zh/dev/stream/operators/joining.html AssignerWithPeriodicWatermarks assigns timestamps and generates

回复: 回复: 回复: Flink双流Join问题

2020-04-04 Thread 忝忝向仧
Hi, 感觉有点不对,我试着用stream1输入: 1 tom1 1553503185000 1 tom2 1553503186000 1 tom3 1553503187000 1 tom4 1553503188000 1 tom_late 1553503185000 stream2输入: 1 jerry2 1553503186000 1 jerry3 1553503187000 1 jerry4 1553503188000 但是结果打印的是: currentTimeStamp:

Re: 回复: 回复: Flink双流Join问题

2020-04-04 Thread Benchao Li
嗯,可以这么理解。 忝忝向仧 <153488...@qq.com> 于2020年4月4日周六 下午11:20写道: > 额,明白了,意思是说两个流情况下 > 比如,stream1里面晚来的那条 > 1 tom_late 1553503185000的水印是1553503188000 > 但是stream2里面,这条1,jerry1,1553503185000的水印是1553503185000 > 所以取最小的,因此还是会被打印? > 是这么理解么? > > > > > > > --原始邮件-- >

Flink jackson conflict issue with aws-sdk dependency

2020-04-04 Thread aj
Hello, Please help me resolve this issue https://stackoverflow.com/questions/61012350/flink-reading-a-s3-file-causing-jackson-dependency-issue -- Thanks & Regards, Anuj Jain

Re: Dynamic Flink SQL

2020-04-04 Thread Maciek Próchniak
Hi Krzysiek, the idea is quite interesting - although maintaining some coordination to be able to handle checkpoints would probably pretty tricky. Did you figure out how to handle proper distribution of tasks between TMs? As far as I understand you have to guarantee that all sources reading

回复: 回复: 回复: Flink双流Join问题

2020-04-04 Thread 忝忝向仧
额,明白了,意思是说两个流情况下 比如,stream1里面晚来的那条 1 tom_late 1553503185000的水印是1553503188000 但是stream2里面,这条1,jerry1,1553503185000的水印是1553503185000 所以取最小的,因此还是会被打印? 是这么理解么? --原始邮件--

Re: 回复: 回复: Flink双流Join问题

2020-04-04 Thread Benchao Li
两个stream输入的场景,operator的watermark是取两者的最小值。 所以虽然这条数据在第一个流里面看起来已经是肯定迟到了,但是有可能看第二个流的watermark它还没有过期。 忝忝向仧 <153488...@qq.com> 于2020年4月4日周六 下午10:42写道: > Hi: > 还有个疑问,我特意构造了个乱序的消息,还是3秒一个窗口 > stream1: > 1 tom1 1553503185000 > 1 tom2 1553503186000 > 1 tom3 1553503187000 > 1 tom4 1553503188000 > 1

回复: 回复: 回复: Flink双流Join问题

2020-04-04 Thread 忝忝向仧
Hi: 还有个疑问,我特意构造了个乱序的消息,还是3秒一个窗口 stream1: 1 tom1 1553503185000 1 tom2 1553503186000 1 tom3 1553503187000 1 tom4 1553503188000 1 tom_late 1553503185000 stream2: 1 jerry1 1553503185000 1 jerry2 1553503186000 1 jerry3 1553503187000 1 jerry4 1553503188000 我代码还是之前的代码,定义水印都是maxDelayAllowed =

回复: 回复: 回复: Flink双流Join问题

2020-04-04 Thread 忝忝向仧
文档说明: https://ci.apache.org/projects/flink/flink-docs-release-1.10/zh/dev/event_timestamps_watermarks.html 这个网页我打不开,有其他的地址么? 谢谢 --原始邮件-- 发件人:"Djeng Lee"https://ci.apache.org/projects/flink/flink-docs-release-1.10/zh/dev/event_timestamps_watermarks.html 相关代码

“feedback loop” and checkpoints in itearative streams

2020-04-04 Thread Sharipov, Rinat
Hi mates, for some reason, it's necessary to create a feedback look in my streaming application. The best choice to implement it was iterative stream, but at the moment of job implementation (flink version is 1.6.1) it wasn't checkpointed. So I decided to write this output into kafka. As I see,

Re: 回复: 回复: Flink双流Join问题

2020-04-04 Thread Djeng Lee
刚刚我说的不严谨 Start = 100055000 - (100055000 - 0 + 3000) % 3000 = 100053000 End = 100053000 + 3000 //源码位置,所以窗口开端并不是你传入首条记录的作为开端。窗口划分是从0时间戳切过来的。 文档说明: https://ci.apache.org/projects/flink/flink-docs-release-1.10/zh/dev/event_timestamps_watermarks.html 相关代码 public static long

回复: 回复: Flink双流Join问题

2020-04-04 Thread 忝忝向仧
额,你的意思是滚动3秒的窗口开始和结束应该是 100055000 % 3 得出结果再拿到[start,end). 比如100055000 % 3 的结果是100053000,那么窗口是[100053000,100056000) 是这么理解吧 --原始邮件-- 发件人:"lee.roval"

Re: 回复: Flink双流Join问题

2020-04-04 Thread Djeng Lee
public static long getWindowStartWithOffset(long timestamp, long offset, long windowSize) { return timestamp - (timestamp - offset + windowSize) % windowSize; } 在 2020/4/4 下午6:23,“忝忝向仧”<153488...@qq.com> 写入: 对,我只是回复把前面那串省略了,没写.

Re: 回复: Flink双流Join问题

2020-04-04 Thread Djeng Lee
55000的窗口分配,是对windowSize 求模然后拿到start 和 end。 不是从你首条记录开始算。 在 2020/4/4 下午6:23,“忝忝向仧”<153488...@qq.com> 写入: 对,我只是回复把前面那串省略了,没写. [100053000,100056000),为什么是100053000开始? 我第一条输入的是 1,tom1,100055000 --原始邮件-- 发件人:"libenchao"

回复: Flink双流Join问题

2020-04-04 Thread 忝忝向仧
对,我只是回复把前面那串省略了,没写. [100053000,100056000),为什么是100053000开始? 我第一条输入的是 1,tom1,100055000 --原始邮件-- 发件人:"libenchao"

Re: Flink双流Join问题

2020-04-04 Thread Djeng Lee
https://ci.apache.org/projects/flink/flink-docs-release-1.10/zh/dev/event_timestamps_watermarks.html ```Both timestamps and watermarks are specified as milliseconds since the Java epoch of 1970-01-01T00:00:00Z.``` 看一下这个, 从0 timestamp开始切分 在 2020/4/4 下午6:20,“Benchao Li” 写入:

Re: Flink双流Join问题

2020-04-04 Thread Benchao Li
你的watermark不是56000,而是100056000吧。所以应该是[100053000, 100056000)是一个窗口吧。 忝忝向仧 <153488...@qq.com> 于2020年4月4日周六 下午6:16写道: > 下发新的? > > > 4是一个kafka的source,3是另外一个kafka的source. > 如果按照3秒的一个窗口 > watermark触发窗口的条件是watermark_time=window_endtime > > > 也就是说[55000,57000)应该是一个窗口的. > > >

Flink keyby数据倾斜问题

2020-04-04 Thread chanamper
Dear All, 大家好,请教一下。目前针对Java Api的方式,对于Flink keyby情况存在key数据倾斜有啥实现优化思路吗?看官方文档目前在table api和sql层面,有Minibatch Aggregation和Local Global Aggregation方式的实现,针对Java Api的方式有啥办法可以达到local global aggregation的效果吗? 多谢!

Re: Flink双流Join问题

2020-04-04 Thread Djeng Lee
56000后不是下发新的watermark了嘛 在 2020/4/4 下午5:57,“忝忝向仧”<153488...@qq.com> 写入: 各位好:Flink双流Join遇到一个问题,能否解释下,谢谢. ds1和ds2分别读取kafka两个流数据,使用event time和watermark特性,3s的一个翻滚窗口,定义如下: 最后,join输出的时候,为什么触发窗口的数据第二条就触发了?

Flink????Join????

2020-04-04 Thread ????????
??:FlinkJoin??. ds1??ds2kafkaevent time??watermark??3s: ??join???

Re: 回复: 1585972779129_EWCE6K_[]R%C3V)5C{NJE)K

2020-04-04 Thread Djeng Lee
依旧看不到 发件人: 忝忝向�� <153488...@qq.com> 答复: "user-zh@flink.apache.org" 日期: 2020年4月4日 星期六 下午5:45 收件人: libenchao 主题: 回复: 1585972779129_EWCE6K_[]R%C3V)5C{NJE)K 还没有么? 我这里邮件是附上附件了的 [cid:C747E283@6D082D3C.0F57885E.jpg] 那我图片该怎么发送? -- 原始邮件 -- 发件人: "libenchao"; 发送时间:

Re: Sync two DataStreams

2020-04-04 Thread David Anderson
There are a few ways to pre-ingest data from a side input before beginning to process another stream. One is to use the State Processor API [1] to create a savepoint that has the data from that side input in its state. For a simple example of bootstrapping state into a savepoint, see [2]. Another

?????? 1585972779129_EWCE6K_[]R%C3V)5C{NJE)K

2020-04-04 Thread ????????
? ??? ---- ??:"libenchao"

Re: 1585972779129_EWCE6K_[]R%C3V)5C{NJE)K

2020-04-04 Thread Benchao Li
Hi,这里还是没有看到你的附件呢~ 忝忝向仧 <153488...@qq.com> 于2020年4月4日周六 下午5:32写道: > 各位好: > Flink双流Join遇到一个问题,能否解释下,图如附件所示,谢谢. > ds1和ds2分别读取kafka两个流数据,使用event time和watermark特性,3s的一个翻滚窗口,定义如下: > 最后,join输出的时候,为什么触发窗口的数据第二条就触发了? >

1585972779129_EWCE6K_[]R%C3V)5C{NJE)K

2020-04-04 Thread ????????
??: FlinkJoin. ds1??ds2kafkaevent time??watermark??3s: ??join???

Re: Flink双流Join问题

2020-04-04 Thread Benchao Li
Hi 你的图片在邮件中显示不了。可以先把图片上传到第三方图床再把链接放到这里,或者直接以文本的形式发送。 忝忝向仧 <153488...@qq.com> 于2020年4月4日周六 下午4:47写道: > 各位好: > Flink双流Join遇到一个问题,能否解释下,谢谢. > ds1和ds2分别读取kafka两个流数据,使用event time和watermark特性,3s的一个翻滚窗口,定义如下: > 最后,join输出的时候,为什么触发窗口的数据第二条就触发了? > >

Flink????Join????

2020-04-04 Thread ????????
??:FlinkJoin??. ds1??ds2kafkaevent time??watermark??3s: ??join???

Conversion of Table (Blink/batch) to DataStream

2020-04-04 Thread Maciek Próchniak
Hello, I'm playing around with Table/SQL API (Flink 1.9/1.10) and I was wondering how I can do the following: 1. read batch data (e.g. from files) 2. sort them using Table/SQL SortOperator 3. perform further operations using "normal" DataStream API (treating my batch as finite stream) - to

Re: Anomaly detection Apache Flink

2020-04-04 Thread Salvador Vigo
Thanks for answer. @Marta, First answer videos [1], [2]. It was interesting to see this two different approaches, although I was looking for some more specific implementation. Link number [3], I didn't know the existence of Kinesis, so maybe could be good for benchmarking and comparing my results