Search in sources :

Example 6 with SubtaskState

use of org.apache.flink.runtime.checkpoint.SubtaskState in project flink by apache.

the class CheckpointMessagesTest method testConfirmTaskCheckpointed.

@Test
public void testConfirmTaskCheckpointed() {
    try {
        AcknowledgeCheckpoint noState = new AcknowledgeCheckpoint(new JobID(), new ExecutionAttemptID(), 569345L);
        KeyGroupRange keyGroupRange = KeyGroupRange.of(42, 42);
        SubtaskState checkpointStateHandles = new SubtaskState(CheckpointCoordinatorTest.generateChainedStateHandle(new MyHandle()), CheckpointCoordinatorTest.generateChainedPartitionableStateHandle(new JobVertexID(), 0, 2, 8, false), null, CheckpointCoordinatorTest.generateKeyGroupState(keyGroupRange, Collections.singletonList(new MyHandle())), null);
        AcknowledgeCheckpoint withState = new AcknowledgeCheckpoint(new JobID(), new ExecutionAttemptID(), 87658976143L, new CheckpointMetrics(), checkpointStateHandles);
        testSerializabilityEqualsHashCode(noState);
        testSerializabilityEqualsHashCode(withState);
    } catch (Exception e) {
        e.printStackTrace();
        fail(e.getMessage());
    }
}
Also used : AcknowledgeCheckpoint(org.apache.flink.runtime.messages.checkpoint.AcknowledgeCheckpoint) ExecutionAttemptID(org.apache.flink.runtime.executiongraph.ExecutionAttemptID) SubtaskState(org.apache.flink.runtime.checkpoint.SubtaskState) JobVertexID(org.apache.flink.runtime.jobgraph.JobVertexID) KeyGroupRange(org.apache.flink.runtime.state.KeyGroupRange) CheckpointMetrics(org.apache.flink.runtime.checkpoint.CheckpointMetrics) JobID(org.apache.flink.api.common.JobID) IOException(java.io.IOException) Test(org.junit.Test) CheckpointCoordinatorTest(org.apache.flink.runtime.checkpoint.CheckpointCoordinatorTest)

Example 7 with SubtaskState

use of org.apache.flink.runtime.checkpoint.SubtaskState in project flink by apache.

the class StreamTaskTest method testAsyncCheckpointingConcurrentCloseBeforeAcknowledge.

/**
	 * FLINK-5667
	 *
	 * Tests that a concurrent cancel operation discards the state handles of a not yet
	 * acknowledged checkpoint and prevents sending an acknowledge message to the
	 * CheckpointCoordinator. The situation can only happen if the cancel call is executed
	 * before Environment.acknowledgeCheckpoint().
	 */
@Test
public void testAsyncCheckpointingConcurrentCloseBeforeAcknowledge() throws Exception {
    final long checkpointId = 42L;
    final long timestamp = 1L;
    final OneShotLatch createSubtask = new OneShotLatch();
    final OneShotLatch completeSubtask = new OneShotLatch();
    TaskInfo mockTaskInfo = mock(TaskInfo.class);
    when(mockTaskInfo.getTaskNameWithSubtasks()).thenReturn("foobar");
    when(mockTaskInfo.getIndexOfThisSubtask()).thenReturn(0);
    Environment mockEnvironment = mock(Environment.class);
    when(mockEnvironment.getTaskInfo()).thenReturn(mockTaskInfo);
    whenNew(SubtaskState.class).withAnyArguments().thenAnswer(new Answer<SubtaskState>() {

        @Override
        public SubtaskState answer(InvocationOnMock invocation) throws Throwable {
            createSubtask.trigger();
            completeSubtask.await();
            return new SubtaskState((ChainedStateHandle<StreamStateHandle>) invocation.getArguments()[0], (ChainedStateHandle<OperatorStateHandle>) invocation.getArguments()[1], (ChainedStateHandle<OperatorStateHandle>) invocation.getArguments()[2], (KeyGroupsStateHandle) invocation.getArguments()[3], (KeyGroupsStateHandle) invocation.getArguments()[4]);
        }
    });
    StreamTask<?, AbstractStreamOperator<?>> streamTask = mock(StreamTask.class, Mockito.CALLS_REAL_METHODS);
    CheckpointMetaData checkpointMetaData = new CheckpointMetaData(checkpointId, timestamp);
    streamTask.setEnvironment(mockEnvironment);
    StreamOperator<?> streamOperator = mock(StreamOperator.class, withSettings().extraInterfaces(StreamCheckpointedOperator.class));
    KeyGroupsStateHandle managedKeyedStateHandle = mock(KeyGroupsStateHandle.class);
    KeyGroupsStateHandle rawKeyedStateHandle = mock(KeyGroupsStateHandle.class);
    OperatorStateHandle managedOperatorStateHandle = mock(OperatorStateHandle.class);
    OperatorStateHandle rawOperatorStateHandle = mock(OperatorStateHandle.class);
    OperatorSnapshotResult operatorSnapshotResult = new OperatorSnapshotResult(new DoneFuture<>(managedKeyedStateHandle), new DoneFuture<>(rawKeyedStateHandle), new DoneFuture<>(managedOperatorStateHandle), new DoneFuture<>(rawOperatorStateHandle));
    when(streamOperator.snapshotState(anyLong(), anyLong(), any(CheckpointOptions.class))).thenReturn(operatorSnapshotResult);
    StreamOperator<?>[] streamOperators = { streamOperator };
    OperatorChain<Void, AbstractStreamOperator<Void>> operatorChain = mock(OperatorChain.class);
    when(operatorChain.getAllOperators()).thenReturn(streamOperators);
    StreamStateHandle streamStateHandle = mock(StreamStateHandle.class);
    CheckpointStreamFactory.CheckpointStateOutputStream outStream = mock(CheckpointStreamFactory.CheckpointStateOutputStream.class);
    when(outStream.closeAndGetHandle()).thenReturn(streamStateHandle);
    CheckpointStreamFactory mockStreamFactory = mock(CheckpointStreamFactory.class);
    when(mockStreamFactory.createCheckpointStateOutputStream(anyLong(), anyLong())).thenReturn(outStream);
    AbstractStateBackend mockStateBackend = mock(AbstractStateBackend.class);
    when(mockStateBackend.createStreamFactory(any(JobID.class), anyString())).thenReturn(mockStreamFactory);
    ExecutorService executor = Executors.newFixedThreadPool(1);
    Whitebox.setInternalState(streamTask, "isRunning", true);
    Whitebox.setInternalState(streamTask, "lock", new Object());
    Whitebox.setInternalState(streamTask, "operatorChain", operatorChain);
    Whitebox.setInternalState(streamTask, "cancelables", new CloseableRegistry());
    Whitebox.setInternalState(streamTask, "asyncOperationsThreadPool", executor);
    Whitebox.setInternalState(streamTask, "configuration", new StreamConfig(new Configuration()));
    Whitebox.setInternalState(streamTask, "stateBackend", mockStateBackend);
    streamTask.triggerCheckpoint(checkpointMetaData, CheckpointOptions.forFullCheckpoint());
    createSubtask.await();
    streamTask.cancel();
    completeSubtask.trigger();
    // wait for the completion of the async task
    executor.shutdown();
    if (!executor.awaitTermination(10000L, TimeUnit.MILLISECONDS)) {
        fail("Executor did not shut down within the given timeout. This indicates that the " + "checkpointing did not resume.");
    }
    // check that the checkpoint has not been acknowledged
    verify(mockEnvironment, never()).acknowledgeCheckpoint(eq(checkpointId), any(CheckpointMetrics.class), any(SubtaskState.class));
    // check that the state handles have been discarded
    verify(managedKeyedStateHandle).discardState();
    verify(rawKeyedStateHandle).discardState();
    verify(managedOperatorStateHandle).discardState();
    verify(rawOperatorStateHandle).discardState();
}
Also used : Configuration(org.apache.flink.configuration.Configuration) OperatorSnapshotResult(org.apache.flink.streaming.api.operators.OperatorSnapshotResult) CheckpointMetrics(org.apache.flink.runtime.checkpoint.CheckpointMetrics) CloseableRegistry(org.apache.flink.core.fs.CloseableRegistry) AbstractStreamOperator(org.apache.flink.streaming.api.operators.AbstractStreamOperator) ChainedStateHandle(org.apache.flink.runtime.state.ChainedStateHandle) KeyGroupsStateHandle(org.apache.flink.runtime.state.KeyGroupsStateHandle) TaskInfo(org.apache.flink.api.common.TaskInfo) StreamStateHandle(org.apache.flink.runtime.state.StreamStateHandle) CheckpointOptions(org.apache.flink.runtime.checkpoint.CheckpointOptions) OneShotLatch(org.apache.flink.core.testutils.OneShotLatch) AbstractStateBackend(org.apache.flink.runtime.state.AbstractStateBackend) CheckpointStreamFactory(org.apache.flink.runtime.state.CheckpointStreamFactory) StreamConfig(org.apache.flink.streaming.api.graph.StreamConfig) CheckpointMetaData(org.apache.flink.runtime.checkpoint.CheckpointMetaData) StreamCheckpointedOperator(org.apache.flink.streaming.api.operators.StreamCheckpointedOperator) SubtaskState(org.apache.flink.runtime.checkpoint.SubtaskState) InvocationOnMock(org.mockito.invocation.InvocationOnMock) DirectExecutorService(org.apache.flink.runtime.util.DirectExecutorService) ExecutorService(java.util.concurrent.ExecutorService) NetworkEnvironment(org.apache.flink.runtime.io.network.NetworkEnvironment) Environment(org.apache.flink.runtime.execution.Environment) OperatorStateHandle(org.apache.flink.runtime.state.OperatorStateHandle) AbstractStreamOperator(org.apache.flink.streaming.api.operators.AbstractStreamOperator) StreamOperator(org.apache.flink.streaming.api.operators.StreamOperator) JobID(org.apache.flink.api.common.JobID) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Example 8 with SubtaskState

use of org.apache.flink.runtime.checkpoint.SubtaskState in project flink by apache.

the class SavepointV1Serializer method deserialize.

@Override
public SavepointV1 deserialize(DataInputStream dis, ClassLoader cl) throws IOException {
    long checkpointId = dis.readLong();
    // Task states
    int numTaskStates = dis.readInt();
    List<TaskState> taskStates = new ArrayList<>(numTaskStates);
    for (int i = 0; i < numTaskStates; i++) {
        JobVertexID jobVertexId = new JobVertexID(dis.readLong(), dis.readLong());
        int parallelism = dis.readInt();
        int maxParallelism = dis.readInt();
        int chainLength = dis.readInt();
        // Add task state
        TaskState taskState = new TaskState(jobVertexId, parallelism, maxParallelism, chainLength);
        taskStates.add(taskState);
        // Sub task states
        int numSubTaskStates = dis.readInt();
        for (int j = 0; j < numSubTaskStates; j++) {
            int subtaskIndex = dis.readInt();
            SubtaskState subtaskState = deserializeSubtaskState(dis);
            taskState.putState(subtaskIndex, subtaskState);
        }
    }
    return new SavepointV1(checkpointId, taskStates);
}
Also used : SubtaskState(org.apache.flink.runtime.checkpoint.SubtaskState) JobVertexID(org.apache.flink.runtime.jobgraph.JobVertexID) ArrayList(java.util.ArrayList) TaskState(org.apache.flink.runtime.checkpoint.TaskState)

Example 9 with SubtaskState

use of org.apache.flink.runtime.checkpoint.SubtaskState in project flink by apache.

the class StreamTaskTest method testEmptySubtaskStateLeadsToStatelessAcknowledgment.

/**
	 * FLINK-5985
	 *
	 * This test ensures that empty snapshots (no op/keyed stated whatsoever) will be reported as stateless tasks. This
	 * happens by translating an empty {@link SubtaskState} into reporting 'null' to #acknowledgeCheckpoint.
	 */
@Test
public void testEmptySubtaskStateLeadsToStatelessAcknowledgment() throws Exception {
    final long checkpointId = 42L;
    final long timestamp = 1L;
    TaskInfo mockTaskInfo = mock(TaskInfo.class);
    when(mockTaskInfo.getTaskNameWithSubtasks()).thenReturn("foobar");
    when(mockTaskInfo.getIndexOfThisSubtask()).thenReturn(0);
    Environment mockEnvironment = mock(Environment.class);
    // latch blocks until the async checkpoint thread acknowledges
    final OneShotLatch checkpointCompletedLatch = new OneShotLatch();
    final List<SubtaskState> checkpointResult = new ArrayList<>(1);
    // we remember what is acknowledged (expected to be null as our task will snapshot empty states).
    doAnswer(new Answer() {

        @Override
        public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
            SubtaskState subtaskState = invocationOnMock.getArgumentAt(2, SubtaskState.class);
            checkpointResult.add(subtaskState);
            checkpointCompletedLatch.trigger();
            return null;
        }
    }).when(mockEnvironment).acknowledgeCheckpoint(anyLong(), any(CheckpointMetrics.class), any(SubtaskState.class));
    when(mockEnvironment.getTaskInfo()).thenReturn(mockTaskInfo);
    StreamTask<?, AbstractStreamOperator<?>> streamTask = mock(StreamTask.class, Mockito.CALLS_REAL_METHODS);
    CheckpointMetaData checkpointMetaData = new CheckpointMetaData(checkpointId, timestamp);
    streamTask.setEnvironment(mockEnvironment);
    // mock the operators
    StreamOperator<?> statelessOperator = mock(StreamOperator.class, withSettings().extraInterfaces(StreamCheckpointedOperator.class));
    // mock the returned empty snapshot result (all state handles are null)
    OperatorSnapshotResult statelessOperatorSnapshotResult = new OperatorSnapshotResult();
    when(statelessOperator.snapshotState(anyLong(), anyLong(), any(CheckpointOptions.class))).thenReturn(statelessOperatorSnapshotResult);
    // set up the task
    StreamOperator<?>[] streamOperators = { statelessOperator };
    OperatorChain<Void, AbstractStreamOperator<Void>> operatorChain = mock(OperatorChain.class);
    when(operatorChain.getAllOperators()).thenReturn(streamOperators);
    Whitebox.setInternalState(streamTask, "isRunning", true);
    Whitebox.setInternalState(streamTask, "lock", new Object());
    Whitebox.setInternalState(streamTask, "operatorChain", operatorChain);
    Whitebox.setInternalState(streamTask, "cancelables", new CloseableRegistry());
    Whitebox.setInternalState(streamTask, "configuration", new StreamConfig(new Configuration()));
    Whitebox.setInternalState(streamTask, "asyncOperationsThreadPool", Executors.newCachedThreadPool());
    streamTask.triggerCheckpoint(checkpointMetaData, CheckpointOptions.forFullCheckpoint());
    checkpointCompletedLatch.await(30, TimeUnit.SECONDS);
    streamTask.cancel();
    // ensure that 'null' was acknowledged as subtask state
    Assert.assertNull(checkpointResult.get(0));
}
Also used : Configuration(org.apache.flink.configuration.Configuration) OperatorSnapshotResult(org.apache.flink.streaming.api.operators.OperatorSnapshotResult) ArrayList(java.util.ArrayList) CheckpointMetrics(org.apache.flink.runtime.checkpoint.CheckpointMetrics) CloseableRegistry(org.apache.flink.core.fs.CloseableRegistry) AbstractStreamOperator(org.apache.flink.streaming.api.operators.AbstractStreamOperator) TaskInfo(org.apache.flink.api.common.TaskInfo) CheckpointOptions(org.apache.flink.runtime.checkpoint.CheckpointOptions) OneShotLatch(org.apache.flink.core.testutils.OneShotLatch) StreamConfig(org.apache.flink.streaming.api.graph.StreamConfig) CheckpointMetaData(org.apache.flink.runtime.checkpoint.CheckpointMetaData) StreamCheckpointedOperator(org.apache.flink.streaming.api.operators.StreamCheckpointedOperator) Mockito.doAnswer(org.mockito.Mockito.doAnswer) Answer(org.mockito.stubbing.Answer) SubtaskState(org.apache.flink.runtime.checkpoint.SubtaskState) InvocationOnMock(org.mockito.invocation.InvocationOnMock) NetworkEnvironment(org.apache.flink.runtime.io.network.NetworkEnvironment) Environment(org.apache.flink.runtime.execution.Environment) AbstractStreamOperator(org.apache.flink.streaming.api.operators.AbstractStreamOperator) StreamOperator(org.apache.flink.streaming.api.operators.StreamOperator) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Example 10 with SubtaskState

use of org.apache.flink.runtime.checkpoint.SubtaskState in project flink by apache.

the class StreamTaskTest method testAsyncCheckpointingConcurrentCloseAfterAcknowledge.

/**
	 * FLINK-5667
	 *
	 * Tests that a concurrent cancel operation does not discard the state handles of an
	 * acknowledged checkpoint. The situation can only happen if the cancel call is executed
	 * after Environment.acknowledgeCheckpoint() and before the
	 * CloseableRegistry.unregisterClosable() call.
	 */
@Test
public void testAsyncCheckpointingConcurrentCloseAfterAcknowledge() throws Exception {
    final long checkpointId = 42L;
    final long timestamp = 1L;
    final OneShotLatch acknowledgeCheckpointLatch = new OneShotLatch();
    final OneShotLatch completeAcknowledge = new OneShotLatch();
    TaskInfo mockTaskInfo = mock(TaskInfo.class);
    when(mockTaskInfo.getTaskNameWithSubtasks()).thenReturn("foobar");
    when(mockTaskInfo.getIndexOfThisSubtask()).thenReturn(0);
    Environment mockEnvironment = mock(Environment.class);
    when(mockEnvironment.getTaskInfo()).thenReturn(mockTaskInfo);
    doAnswer(new Answer() {

        @Override
        public Object answer(InvocationOnMock invocation) throws Throwable {
            acknowledgeCheckpointLatch.trigger();
            // block here so that we can issue the concurrent cancel call
            completeAcknowledge.await();
            return null;
        }
    }).when(mockEnvironment).acknowledgeCheckpoint(anyLong(), any(CheckpointMetrics.class), any(SubtaskState.class));
    StreamTask<?, AbstractStreamOperator<?>> streamTask = mock(StreamTask.class, Mockito.CALLS_REAL_METHODS);
    CheckpointMetaData checkpointMetaData = new CheckpointMetaData(checkpointId, timestamp);
    streamTask.setEnvironment(mockEnvironment);
    StreamOperator<?> streamOperator = mock(StreamOperator.class, withSettings().extraInterfaces(StreamCheckpointedOperator.class));
    KeyGroupsStateHandle managedKeyedStateHandle = mock(KeyGroupsStateHandle.class);
    KeyGroupsStateHandle rawKeyedStateHandle = mock(KeyGroupsStateHandle.class);
    OperatorStateHandle managedOperatorStateHandle = mock(OperatorStateHandle.class);
    OperatorStateHandle rawOperatorStateHandle = mock(OperatorStateHandle.class);
    OperatorSnapshotResult operatorSnapshotResult = new OperatorSnapshotResult(new DoneFuture<>(managedKeyedStateHandle), new DoneFuture<>(rawKeyedStateHandle), new DoneFuture<>(managedOperatorStateHandle), new DoneFuture<>(rawOperatorStateHandle));
    when(streamOperator.snapshotState(anyLong(), anyLong(), any(CheckpointOptions.class))).thenReturn(operatorSnapshotResult);
    StreamOperator<?>[] streamOperators = { streamOperator };
    OperatorChain<Void, AbstractStreamOperator<Void>> operatorChain = mock(OperatorChain.class);
    when(operatorChain.getAllOperators()).thenReturn(streamOperators);
    StreamStateHandle streamStateHandle = mock(StreamStateHandle.class);
    CheckpointStreamFactory.CheckpointStateOutputStream outStream = mock(CheckpointStreamFactory.CheckpointStateOutputStream.class);
    when(outStream.closeAndGetHandle()).thenReturn(streamStateHandle);
    CheckpointStreamFactory mockStreamFactory = mock(CheckpointStreamFactory.class);
    when(mockStreamFactory.createCheckpointStateOutputStream(anyLong(), anyLong())).thenReturn(outStream);
    AbstractStateBackend mockStateBackend = mock(AbstractStateBackend.class);
    when(mockStateBackend.createStreamFactory(any(JobID.class), anyString())).thenReturn(mockStreamFactory);
    Whitebox.setInternalState(streamTask, "isRunning", true);
    Whitebox.setInternalState(streamTask, "lock", new Object());
    Whitebox.setInternalState(streamTask, "operatorChain", operatorChain);
    Whitebox.setInternalState(streamTask, "cancelables", new CloseableRegistry());
    Whitebox.setInternalState(streamTask, "asyncOperationsThreadPool", Executors.newFixedThreadPool(1));
    Whitebox.setInternalState(streamTask, "configuration", new StreamConfig(new Configuration()));
    Whitebox.setInternalState(streamTask, "stateBackend", mockStateBackend);
    streamTask.triggerCheckpoint(checkpointMetaData, CheckpointOptions.forFullCheckpoint());
    acknowledgeCheckpointLatch.await();
    ArgumentCaptor<SubtaskState> subtaskStateCaptor = ArgumentCaptor.forClass(SubtaskState.class);
    // check that the checkpoint has been completed
    verify(mockEnvironment).acknowledgeCheckpoint(eq(checkpointId), any(CheckpointMetrics.class), subtaskStateCaptor.capture());
    SubtaskState subtaskState = subtaskStateCaptor.getValue();
    // check that the subtask state contains the expected state handles
    assertEquals(managedKeyedStateHandle, subtaskState.getManagedKeyedState());
    assertEquals(rawKeyedStateHandle, subtaskState.getRawKeyedState());
    assertEquals(new ChainedStateHandle<>(Collections.singletonList(managedOperatorStateHandle)), subtaskState.getManagedOperatorState());
    assertEquals(new ChainedStateHandle<>(Collections.singletonList(rawOperatorStateHandle)), subtaskState.getRawOperatorState());
    // check that the state handles have not been discarded
    verify(managedKeyedStateHandle, never()).discardState();
    verify(rawKeyedStateHandle, never()).discardState();
    verify(managedOperatorStateHandle, never()).discardState();
    verify(rawOperatorStateHandle, never()).discardState();
    streamTask.cancel();
    completeAcknowledge.trigger();
    // canceling the stream task after it has acknowledged the checkpoint should not discard
    // the state handles
    verify(managedKeyedStateHandle, never()).discardState();
    verify(rawKeyedStateHandle, never()).discardState();
    verify(managedOperatorStateHandle, never()).discardState();
    verify(rawOperatorStateHandle, never()).discardState();
}
Also used : Configuration(org.apache.flink.configuration.Configuration) OperatorSnapshotResult(org.apache.flink.streaming.api.operators.OperatorSnapshotResult) CheckpointMetrics(org.apache.flink.runtime.checkpoint.CheckpointMetrics) CloseableRegistry(org.apache.flink.core.fs.CloseableRegistry) AbstractStreamOperator(org.apache.flink.streaming.api.operators.AbstractStreamOperator) KeyGroupsStateHandle(org.apache.flink.runtime.state.KeyGroupsStateHandle) TaskInfo(org.apache.flink.api.common.TaskInfo) StreamStateHandle(org.apache.flink.runtime.state.StreamStateHandle) CheckpointOptions(org.apache.flink.runtime.checkpoint.CheckpointOptions) OneShotLatch(org.apache.flink.core.testutils.OneShotLatch) AbstractStateBackend(org.apache.flink.runtime.state.AbstractStateBackend) CheckpointStreamFactory(org.apache.flink.runtime.state.CheckpointStreamFactory) StreamConfig(org.apache.flink.streaming.api.graph.StreamConfig) CheckpointMetaData(org.apache.flink.runtime.checkpoint.CheckpointMetaData) StreamCheckpointedOperator(org.apache.flink.streaming.api.operators.StreamCheckpointedOperator) Mockito.doAnswer(org.mockito.Mockito.doAnswer) Answer(org.mockito.stubbing.Answer) InvocationOnMock(org.mockito.invocation.InvocationOnMock) SubtaskState(org.apache.flink.runtime.checkpoint.SubtaskState) NetworkEnvironment(org.apache.flink.runtime.io.network.NetworkEnvironment) Environment(org.apache.flink.runtime.execution.Environment) OperatorStateHandle(org.apache.flink.runtime.state.OperatorStateHandle) AbstractStreamOperator(org.apache.flink.streaming.api.operators.AbstractStreamOperator) StreamOperator(org.apache.flink.streaming.api.operators.StreamOperator) JobID(org.apache.flink.api.common.JobID) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Aggregations

SubtaskState (org.apache.flink.runtime.checkpoint.SubtaskState)11 Test (org.junit.Test)7 StreamStateHandle (org.apache.flink.runtime.state.StreamStateHandle)6 ArrayList (java.util.ArrayList)5 CheckpointMetrics (org.apache.flink.runtime.checkpoint.CheckpointMetrics)5 TaskState (org.apache.flink.runtime.checkpoint.TaskState)5 IOException (java.io.IOException)4 JobID (org.apache.flink.api.common.JobID)4 Configuration (org.apache.flink.configuration.Configuration)4 OneShotLatch (org.apache.flink.core.testutils.OneShotLatch)4 CheckpointMetaData (org.apache.flink.runtime.checkpoint.CheckpointMetaData)4 JobVertexID (org.apache.flink.runtime.jobgraph.JobVertexID)4 KeyGroupsStateHandle (org.apache.flink.runtime.state.KeyGroupsStateHandle)4 StreamConfig (org.apache.flink.streaming.api.graph.StreamConfig)4 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)4 TaskInfo (org.apache.flink.api.common.TaskInfo)3 CloseableRegistry (org.apache.flink.core.fs.CloseableRegistry)3 ChainedStateHandle (org.apache.flink.runtime.state.ChainedStateHandle)3 OperatorStateHandle (org.apache.flink.runtime.state.OperatorStateHandle)3 File (java.io.File)2