public class OperatorStateHandle extends Object implements StreamStateHandle
StreamStateHandle
, this also provides a
map that contains the offsets to the partitions of named states in the stream.Modifier and Type | Class and Description |
---|---|
static class |
OperatorStateHandle.Mode |
static class |
OperatorStateHandle.StateMetaInfo |
Constructor and Description |
---|
OperatorStateHandle(Map<String,OperatorStateHandle.StateMetaInfo> stateNameToPartitionOffsets,
StreamStateHandle delegateStateHandle) |
Modifier and Type | Method and Description |
---|---|
void |
discardState()
Discards the state referred to by this handle, to free up resources in
the persistent storage.
|
boolean |
equals(Object o) |
StreamStateHandle |
getDelegateStateHandle() |
Map<String,OperatorStateHandle.StateMetaInfo> |
getStateNameToPartitionOffsets() |
long |
getStateSize()
Returns the size of the state in bytes.
|
int |
hashCode() |
FSDataInputStream |
openInputStream()
Returns an
FSDataInputStream that can be used to read back the data that
was previously written to the stream. |
String |
toString() |
public OperatorStateHandle(Map<String,OperatorStateHandle.StateMetaInfo> stateNameToPartitionOffsets, StreamStateHandle delegateStateHandle)
public Map<String,OperatorStateHandle.StateMetaInfo> getStateNameToPartitionOffsets()
public void discardState() throws Exception
StateObject
discardState
in interface StateObject
Exception
public long getStateSize()
StateObject
If the the size is not known, return 0
.
getStateSize
in interface StateObject
public FSDataInputStream openInputStream() throws IOException
StreamStateHandle
FSDataInputStream
that can be used to read back the data that
was previously written to the stream.openInputStream
in interface StreamStateHandle
IOException
public StreamStateHandle getDelegateStateHandle()
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.