Hi Nikola

You could use codes below to get rid of the warnings.

StateBackend fsStateBackend = new 
FsStateBackend("hdfs://namenode:40010/flink/checkpoints");
env.setStateBackend(fsStateBackend);

In fact, this warning is actually no harmful.

Best
Yun Tang
________________________________
From: Nikola Hrusov <[email protected]>
Sent: Tuesday, August 11, 2020 13:32
To: KristoffSC <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: How to use FsBackBackend without getting deprecation warning

Hello,

That does seem to remove the warning, but I am not sure that's the way I would 
like to go about it.
Just casting it seems like hiding the issue. But I agree with you, it is not 
the most clean in that case.


Regards
,
Nikola Hrusov

On Mon, Aug 10, 2020 at 9:46 PM KristoffSC 
<[email protected]<mailto:[email protected]>> wrote:
Hi,
had the same problem.

Try this:
env.setStateBackend((StateBackend) new
FsStateBackend("hdfs://namenode:40010/flink/checkpoints"));

yeah... not the cleanest way... I guess the API is not that clean after all.



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Reply via email to