use of org.apache.flink.state.api.runtime.NeverFireProcessingTimeService in project flink by apache.
the class StreamOperatorContextBuilder method build.
StreamOperatorStateContext build(Logger logger) throws IOException {
final Environment environment = new SavepointEnvironment.Builder(ctx, maxParallelism).setConfiguration(configuration).setSubtaskIndex(split.getSplitNumber()).setPrioritizedOperatorSubtaskState(split.getPrioritizedOperatorSubtaskState()).build();
StateBackend stateBackend;
try {
stateBackend = StateBackendLoader.fromApplicationOrConfigOrDefault(applicationStateBackend, TernaryBoolean.FALSE, configuration, ctx.getUserCodeClassLoader(), logger);
} catch (DynamicCodeLoadingException e) {
throw new IOException("Failed to load state backend", e);
}
StreamTaskStateInitializer initializer = new StreamTaskStateInitializerImpl(environment, stateBackend);
try {
return initializer.streamOperatorStateContext(operatorState.getOperatorID(), operatorState.getOperatorID().toString(), new NeverFireProcessingTimeService(), keyContext, keySerializer, registry, ctx.getMetricGroup(), 1.0, false);
} catch (Exception e) {
throw new IOException("Failed to restore state backend", e);
}
}
use of org.apache.flink.state.api.runtime.NeverFireProcessingTimeService in project flink by apache.
the class StateBootstrapWrapperOperator method setup.
@Override
public void setup(StreamTask<?, ?> containingTask, StreamConfig config, Output<StreamRecord<TaggedOperatorSubtaskState>> output) {
((SetupableStreamOperator) operator).setup(containingTask, config, new VoidOutput<>());
operator.setProcessingTimeService(new NeverFireProcessingTimeService());
this.output = output;
}
Aggregations