use of org.apache.flink.state.api.input.splits.PrioritizedOperatorSubtaskStateInputSplit in project flink by apache.
the class StreamOperatorContextBuilderTest method testStateBackendLoading.
@Test(expected = CustomStateBackendFactory.ExpectedException.class)
public void testStateBackendLoading() throws Exception {
Configuration configuration = new Configuration();
configuration.set(StateBackendOptions.STATE_BACKEND, CustomStateBackendFactory.class.getCanonicalName());
StreamOperatorContextBuilder builder = new StreamOperatorContextBuilder(new MockStreamingRuntimeContext(true, 1, 0), configuration, new OperatorState(new OperatorID(), 1, 128), new PrioritizedOperatorSubtaskStateInputSplit() {
@Override
public PrioritizedOperatorSubtaskState getPrioritizedOperatorSubtaskState() {
return PrioritizedOperatorSubtaskState.emptyNotRestored();
}
@Override
public int getSplitNumber() {
return 0;
}
}, new CloseableRegistry(), null);
builder.build(LOG);
}
Aggregations