public class TaskState extends Object implements StateObject
JobVertex
.
This class basically groups all non-partitioned state and key-group state belonging to the same job vertex together.Constructor and Description |
---|
TaskState(JobVertexID jobVertexID,
int parallelism,
int maxParallelism,
int chainLength) |
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 obj) |
int |
getChainLength() |
JobVertexID |
getJobVertexID() |
int |
getMaxParallelism() |
int |
getNumberCollectedStates() |
int |
getParallelism() |
SubtaskState |
getState(int subtaskIndex) |
Collection<SubtaskState> |
getStates() |
long |
getStateSize()
Returns the size of the state in bytes.
|
Map<Integer,SubtaskState> |
getSubtaskStates() |
int |
hashCode() |
boolean |
hasNonPartitionedState() |
void |
putState(int subtaskIndex,
SubtaskState subtaskState) |
String |
toString() |
public TaskState(JobVertexID jobVertexID, int parallelism, int maxParallelism, int chainLength)
public JobVertexID getJobVertexID()
public void putState(int subtaskIndex, SubtaskState subtaskState)
public SubtaskState getState(int subtaskIndex)
public Collection<SubtaskState> getStates()
public int getNumberCollectedStates()
public int getParallelism()
public int getMaxParallelism()
public int getChainLength()
public boolean hasNonPartitionedState()
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 Map<Integer,SubtaskState> getSubtaskStates()
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.