Re: Use Single Sink For All windows

2017-06-13 Thread Aljoscha Krettek
Yes, CheckpointListener will enable you to listen for completed checkpoints. I think that you should put the the values in state before returning from the snapshot method, though, to prevent data loss. And regarding your other question: yes, when a snapshot is ongoing the invoke() method will n

Re: Use Single Sink For All windows

2017-06-12 Thread rhashmi
I think CheckpointListener? -- View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Use-Single-Sink-For-All-windows-tp13475p13653.html Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.

Re: Use Single Sink For All windows

2017-06-12 Thread rhashmi
Thanks Aljoscha for your response. I would give a try.. 1- flink call *invoke* method of SinkFunction to dispatch aggregated information. My follow up question here is .. while snapshotState method is in process, if sink received another update then we might have mix records, however per doc

Re: Use Single Sink For All windows

2017-06-12 Thread Aljoscha Krettek
Ah, I think now I get your problem. You could manually implement batching inside your SinkFunction, The SinkFunction would batch values in memory and periodically (based on the count of values and on a timeout) send these values as a single batch to MySQL. To ensure that data is not lost you can

Re: Use Single Sink For All windows

2017-06-08 Thread Nico Kruber
How about using asynchronous I/O operations? https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/stream/ asyncio.html Nico On Tuesday, 6 June 2017 16:22:31 CEST rhashmi wrote: > because of parallelism i am seeing db contention. Wondering if i can merge > sink of multiple windows and

Re: Use Single Sink For All windows

2017-06-06 Thread rhashmi
because of parallelism i am seeing db contention. Wondering if i can merge sink of multiple windows and insert in batch. -- View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Use-Single-Sink-For-All-windows-tp13475p13525.html Sent from the Apache

Re: Use Single Sink For All windows

2017-06-06 Thread Aljoscha Krettek
Hi, Do you mean to write all the windows to the sink (MySQL) at the same time or simply that you want to write windows, as they come, using the one single sink instance? Best, Aljoscha > On 4. Jun 2017, at 08:47, rhashmi wrote: > > Is it possible to return all windows update to single Sink (