Hi Eleanore,
Good question. I think the easiest way is to configure this in the Flink
configuration file, i.e. flink-conf.yaml. Then you don't need to set
anything in Beam.
If you want to go with your approach, then just use
getClass().getClassLoader() unless you have some custom classloader for
loading your state backend.
Cheers,
Max
On 04.03.20 01:39, Jin Yi wrote:
Hi Experts,
I am running Beam application with Flink Runner. I would like to set
State Backend to be FsStateBackend instead of MemoryStateBackend.
in FlinkPipelineOptions.java
I should be able to call setStateBackendFactory(), but I did not find
any provided implementations for FlinkStateBackendFactory interface, so
that means I have to implement my own?
Thanks a lot!
Eleanore
/**
* State backend to store Beam's state during computation. Note: Only
applicable when executing in
* streaming mode.
*/
@Description(
"Sets the state backend factory to use in streaming mode. "
+"Defaults to the flink cluster's state.backend configuration.")
Class<?extends FlinkStateBackendFactory> getStateBackendFactory();
void setStateBackendFactory(Class<?extends FlinkStateBackendFactory>
stateBackendFactory);