@PublicEvolving public final class KeyedStateCheckpointOutputStream extends NonClosingCheckpointOutputStream<KeyGroupsStateHandle>
Modifier and Type | Field and Description |
---|---|
static int |
NO_CURRENT_KEY_GROUP |
static long |
NO_OFFSET_SET |
delegate
Constructor and Description |
---|
KeyedStateCheckpointOutputStream(CheckpointStateOutputStream delegate,
KeyGroupRange keyGroupRange) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
getCurrentKeyGroup()
Returns the key group that is currently being written.
|
KeyGroupsList |
getKeyGroupList()
Returns a list of all key-groups which can be written to this stream.
|
boolean |
isKeyGroupAlreadyFinished(int keyGroupId)
Returns true if the key group is already completely written and immutable.
|
boolean |
isKeyGroupAlreadyStarted(int keyGroupId)
Returns true, if the key group with the given id was already started.
|
void |
startNewKeyGroup(int keyGroupId)
User code can call this method to signal that it begins to write a new key group with the
given key group id.
|
acquireLease, flush, write, write, write
public static final long NO_OFFSET_SET
public static final int NO_CURRENT_KEY_GROUP
public KeyedStateCheckpointOutputStream(CheckpointStateOutputStream delegate, KeyGroupRange keyGroupRange)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class NonClosingCheckpointOutputStream<KeyGroupsStateHandle>
IOException
public KeyGroupsList getKeyGroupList()
public void startNewKeyGroup(int keyGroupId) throws IOException
KeyGroupsList
provided by the stream.
Each key-group can only be started once and is considered final/immutable as soon as this
method is called again.IOException
public boolean isKeyGroupAlreadyStarted(int keyGroupId)
getCurrentKeyGroup()
.public boolean isKeyGroupAlreadyFinished(int keyGroupId)
public int getCurrentKeyGroup()
NO_CURRENT_KEY_GROUP
.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.