use of org.apache.flink.runtime.checkpoint.JobManagerTaskRestore in project flink by apache.
the class StatefulOperatorChainedTaskTest method testMultipleStatefulOperatorChainedSnapshotAndRestore.
@Test
public void testMultipleStatefulOperatorChainedSnapshotAndRestore() throws Exception {
OperatorID headOperatorID = new OperatorID(42L, 42L);
OperatorID tailOperatorID = new OperatorID(44L, 44L);
JobManagerTaskRestore restore = createRunAndCheckpointOperatorChain(headOperatorID, new CounterOperator("head"), tailOperatorID, new CounterOperator("tail"), Optional.empty());
TaskStateSnapshot stateHandles = restore.getTaskStateSnapshot();
assertEquals(2, stateHandles.getSubtaskStateMappings().size());
createRunAndCheckpointOperatorChain(headOperatorID, new CounterOperator("head"), tailOperatorID, new CounterOperator("tail"), Optional.of(restore));
assertEquals(new HashSet<>(Arrays.asList(headOperatorID, tailOperatorID)), RESTORED_OPERATORS);
}
Aggregations