I upgraded from Flink 1.4 to 1.5 and now this call is being flagged as deprecated. What should I change this code to for 1.5 to get rid of the deprecation warning? Thanks // deprecated env.setStateBackend(new FsStateBackend("hdfs://myhdfsmachine:9000/flink/checkpoints")); -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/ |
At the moment, it seems you can not. Because FsStateBackend extends AbstructFileStateBackend then extend AbstructStateBackend which is deprecated in setStateBackend parameter.. I think you can do what you want like below now but it is very bad. env.setStateBackend(new StateBackend() { Cheers Minglei
|
Hmm. If you have a wrapper function like this, it will not report deprecated warning. def getFsStateBackend(path: String): StateBackend = return new FsStateBackend(path) Since AbstractStateBackend implements StateBackend and def setStateBackend(backend: StateBackend): StreamExecutionEnvironment is not deprecated. This seems like a bug to me though. -- Rong On Tue, Jun 26, 2018 at 7:40 PM zhangminglei <[hidden email]> wrote:
|
Hi, You can just add a cast to StateBackend to get rid of the deprecation warning: env.setStateBackend((StateBackend) new FsStateBackend("hdfs://myhdfsmachine:9000/flink/checkpoints")); Best, Fabian 2018-06-27 5:47 GMT+02:00 Rong Rong <[hidden email]>:
|
Free forum by Nabble | Edit this page |