Hi Smile, Thank you for your reply.
I read [1] according to the last email. I will have to add implements SourceFunction <Long> CheckpointedFunction with the main class. Then calling run() and cancel() inside the main class. Is it correct? I just run the sample code from apache flink. I can not understand everything. In this case, could you please inform me where I will have to change in my code (it is in the first email) and which one to replace? If you can answer, it will be really helpful for me as a newbie. Thank you in advance! On Tue, Mar 9, 2021 at 4:07 AM Abdullah bin Omar < abdullahbinoma...@gmail.com> wrote: > Hi Smile, > > Thank you for your reply. > > I read [1] according to the last email. I will have to add implements > SourceFunction <Long> CheckpointedFunction with the main class. Then > calling run() and cancel() inside the main class. Is it correct? > > I just run the sample code from apache flink. I can not understand > everything. > > In this case, could you please inform me where I will have to change in my > code (it is in the first email) and which one to replace? If you can > answer, it will be really helpful for me as a newbie. > > Thank you in advance! > > > > On Mon, Mar 8, 2021 at 10:21 PM Smile <letters_sm...@163.com> wrote: > >> Hi, >> >> Could you please change the source to an endless one? For example a Kafka >> source or a custom source that implements SourceFunction([1])? >> env.readTextFile() won't wait for all data to be finished, but exit >> immediately after telling readers what to read. So it may exit before the >> first checkpoint being triggered. See [2] for more information. >> >> [1]. >> >> https://ci.apache.org/projects/flink/flink-docs-release-1.12/api/java/org/apache/flink/streaming/api/functions/source/SourceFunction.html >> [2]. >> >> https://ci.apache.org/projects/flink/flink-docs-release-1.12/api/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.html#readTextFile-java.lang.String- >> >> Regards, >> Smile >> >> >> >> -- >> Sent from: >> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/ >> >