I notice that there is some DeserializationSchema in org.apache.flink.api.common.serialization which has a function isEndOfStream but I am not sure if I can use it in my use case.
-------------------------------------------------- Dhruv Kumar PhD Candidate Department of Computer Science and Engineering University of Minnesota www.dhruvkumar.me > On May 7, 2018, at 06:18, Dhruv Kumar <gargdhru...@gmail.com> wrote: > > Hi > > Is there a way I can capture the end of stream signal for streams which are > replayed from historical data? I need the end of stream signal to tell the > Flink program to finish its execution. > > Below is the use case in detail: > 1. An independent log replayer program sends the records to a socket > (identified by ip address and port). > 2. Flink program reads the incoming records via socketTextStream from the > above mentioned socket, applies a KeyBy operator on the incoming records and > then does some processing, finally writing them to another socket. > > How do I tell the Flink program to finish its execution? Is there any > information which I can add to the records while they are sent from the > replayer program and which can be parsed when the records arrive inside the > Flink program? > > Let me know if anything is not clear. > > Thanks > > -------------------------------------------------- > Dhruv Kumar > PhD Candidate > Department of Computer Science and Engineering > University of Minnesota > www.dhruvkumar.me <http://www.dhruvkumar.me/>