public class StateSnapshotContextSynchronousImpl extends Object implements StateSnapshotContext
Constructor and Description |
---|
StateSnapshotContextSynchronousImpl(long checkpointId,
long checkpointTimestamp) |
StateSnapshotContextSynchronousImpl(long checkpointId,
long checkpointTimestamp,
CheckpointStreamFactory streamFactory,
KeyGroupRange keyGroupRange,
CloseableRegistry closableRegistry) |
Modifier and Type | Method and Description |
---|---|
void |
closeExceptionally() |
long |
getCheckpointId()
Returns the ID of the checkpoint for which the snapshot is taken.
|
long |
getCheckpointTimestamp()
Returns timestamp (wall clock time) when the master node triggered the checkpoint for which
the state snapshot is taken.
|
RunnableFuture<SnapshotResult<KeyedStateHandle>> |
getKeyedStateStreamFuture() |
RunnableFuture<SnapshotResult<OperatorStateHandle>> |
getOperatorStateStreamFuture() |
KeyedStateCheckpointOutputStream |
getRawKeyedOperatorStateOutput()
Returns an output stream for keyed state
|
OperatorStateCheckpointOutputStream |
getRawOperatorStateOutput()
Returns an output stream for operator state
|
@VisibleForTesting public StateSnapshotContextSynchronousImpl(long checkpointId, long checkpointTimestamp)
public StateSnapshotContextSynchronousImpl(long checkpointId, long checkpointTimestamp, CheckpointStreamFactory streamFactory, KeyGroupRange keyGroupRange, CloseableRegistry closableRegistry)
public long getCheckpointId()
ManagedSnapshotContext
The checkpoint ID is guaranteed to be strictly monotonously increasing across checkpoints.
For two completed checkpoints A and B, ID_B > ID_A
means that checkpoint
B subsumes checkpoint A, i.e., checkpoint B contains a later state
than checkpoint A.
getCheckpointId
in interface ManagedSnapshotContext
public long getCheckpointTimestamp()
ManagedSnapshotContext
getCheckpointTimestamp
in interface ManagedSnapshotContext
public KeyedStateCheckpointOutputStream getRawKeyedOperatorStateOutput() throws Exception
StateSnapshotContext
getRawKeyedOperatorStateOutput
in interface StateSnapshotContext
Exception
public OperatorStateCheckpointOutputStream getRawOperatorStateOutput() throws Exception
StateSnapshotContext
getRawOperatorStateOutput
in interface StateSnapshotContext
Exception
@Nonnull public RunnableFuture<SnapshotResult<KeyedStateHandle>> getKeyedStateStreamFuture() throws IOException
IOException
@Nonnull public RunnableFuture<SnapshotResult<OperatorStateHandle>> getOperatorStateStreamFuture() throws IOException
IOException
public void closeExceptionally() throws IOException
IOException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.