![](/img/trans.png)
[英]Why I got a NullPointerException when using initializeState() in Apache Flink?
[英]With a CheckPointed function in Flink, does the user call initializeState and snapshotState or is it handled behind the scenes
我正在嘗試使用擴展 RichParallelFunction 並實現 CheckpointedFunction 的 jdbc 連接來構建源,因為我希望能夠在重新啟動的情況下從源表中保存水印。
在使用 docker 進行本地測試時,我可以很好地調用我的 run() 方法並從我的源數據庫中讀取數據,但我不確定在哪里實際調用了 snapshotState 和 initializeState 方法。 我在那些方法中有邏輯,應該根據第一次啟動/恢復設置我的水印值 - 我只是從來沒有看到它被訪問,並且不確定我是否應該在外部調用這些方法?
我在這里先向您的幫助表示感謝
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.