public class MemoryStateBackend extends AbstractStateBackend
AbstractStateBackend
that stores all its data and checkpoints in memory and has no
capabilities to spill to disk. Checkpoints are serialized and the serialized data is
transferredConstructor and Description |
---|
MemoryStateBackend()
Creates a new memory state backend that accepts states whose serialized forms are
up to the default state size (5 MB).
|
MemoryStateBackend(int maxStateSize)
Creates a new memory state backend that accepts states whose serialized forms are
up to the given number of bytes.
|
Modifier and Type | Method and Description |
---|---|
<K> AbstractKeyedStateBackend<K> |
createKeyedStateBackend(Environment env,
JobID jobID,
String operatorIdentifier,
TypeSerializer<K> keySerializer,
int numberOfKeyGroups,
KeyGroupRange keyGroupRange,
TaskKvStateRegistry kvStateRegistry)
Creates a new
AbstractKeyedStateBackend that is responsible for keeping keyed state
and can be checkpointed to checkpoint streams. |
CheckpointStreamFactory |
createStreamFactory(JobID jobId,
String operatorIdentifier)
Creates a
CheckpointStreamFactory that can be used to create streams
that should end up in a checkpoint. |
String |
toString() |
createOperatorStateBackend
public MemoryStateBackend()
public MemoryStateBackend(int maxStateSize)
maxStateSize
- The maximal size of the serialized statepublic CheckpointStreamFactory createStreamFactory(JobID jobId, String operatorIdentifier) throws IOException
AbstractStateBackend
CheckpointStreamFactory
that can be used to create streams
that should end up in a checkpoint.createStreamFactory
in class AbstractStateBackend
jobId
- The JobID
of the job for which we are creating checkpoint streams.operatorIdentifier
- An identifier of the operator for which we create streams.IOException
public <K> AbstractKeyedStateBackend<K> createKeyedStateBackend(Environment env, JobID jobID, String operatorIdentifier, TypeSerializer<K> keySerializer, int numberOfKeyGroups, KeyGroupRange keyGroupRange, TaskKvStateRegistry kvStateRegistry) throws IOException
AbstractStateBackend
AbstractKeyedStateBackend
that is responsible for keeping keyed state
and can be checkpointed to checkpoint streams.createKeyedStateBackend
in class AbstractStateBackend
IOException
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.