Is it possible to configure a flink application at runtime? For example, I have a streaming application that reads the input, does some transformations and then filters out all the elements below a certain threshold. However, I want this threshold to be configurable at runtime, meaning I'm able to change this without having to restart my flink job. Example code:
DataStream<MyModel> myModelDataStream = // get input ...
// do some stuff ...
.filter(new RichFilterFunction<MyModel>() {
@Override
public boolean filter(MyModel value) throws Exception {
return value.someValue() > someGlobalState.getThreshold();
}
})
// write to some sink ...
DataStream<MyConfig> myConfigDataStream = // get input ...
// ...
.process(new RichProcessFunction<MyConfig>() {
someGlobalState.setThreshold(MyConfig.getThreshold());
})
// ...
Is there some possibility to achive this? Like a global state that can be changed through a configuration stream for example.