public final class ManagementGraph extends ManagementAttachment implements IOReadableWritable
This class is not thread-safe.
| Constructor and Description |
|---|
ManagementGraph()
Constructs a new management graph with a random job ID.
|
ManagementGraph(JobID jobID)
Constructs a new management graph with the given job ID.
|
| Modifier and Type | Method and Description |
|---|---|
ManagementGroupVertex |
getGroupVertexByID(ManagementGroupVertexID id)
Returns the group vertex with the given ID from the graph's internal group vertex map.
|
Collection<ManagementGroupVertex> |
getGroupVertices()
Returns an unmodifiable collection of all group vertices with no guarantees on their order.
|
List<ManagementGroupVertex> |
getGroupVerticesInReverseTopologicalOrder()
Returns a list of group vertices sorted in reverse topological order.
|
List<ManagementGroupVertex> |
getGroupVerticesInTopologicalOrder()
Returns a list of group vertices sorted in topological order.
|
ManagementGroupVertex |
getInputGroupVertex(int stage,
int index)
Returns the input group vertex at the given index in the given stage.
|
ManagementVertex |
getInputVertex(int stage,
int index)
Returns the input vertex with the specified index for the given stage.
|
JobID |
getJobID()
Returns the ID of the job this graph describes.
|
int |
getNumberOfInputGroupVertices(int stage)
Returns the number of input group vertices in the management stage with the given index.
|
int |
getNumberOfInputVertices(int stage)
Returns the number of input vertices for the given stage.
|
int |
getNumberOfOutputGroupVertices(int stage)
Returns the number of output group vertices in the management stage with the given index.
|
int |
getNumberOfOutputVertices(int stage)
Returns the number of output vertices for the given stage.
|
int |
getNumberOfStages()
Returns the number of stages in this management graph.
|
ManagementGroupVertex |
getOutputGroupVertex(int stage,
int index)
Returns the output group vertex at the given index in the given stage.
|
ManagementVertex |
getOutputVertex(int stage,
int index)
Returns the output vertex with the specified index for the given stage.
|
ManagementStage |
getStage(int index)
Returns the management stage with the given index.
|
ManagementVertex |
getVertexByID(ManagementVertexID id)
Returns the vertex with the given ID from the graph's internal vertex map.
|
void |
read(DataInputView in) |
void |
write(DataOutputView out) |
getAttachment, setAttachmentpublic ManagementGraph(JobID jobID)
jobID - the job ID of the graph.public ManagementGraph()
public JobID getJobID()
public ManagementVertex getVertexByID(ManagementVertexID id)
id - the ID of the vertex to be returnednull if no such vertex existspublic ManagementGroupVertex getGroupVertexByID(ManagementGroupVertexID id)
id - the ID of the group vertex to be returnednull if no such group vertex existspublic int getNumberOfStages()
public ManagementStage getStage(int index)
index - the index of the management stage to be returnednull if no such management stage existspublic int getNumberOfInputGroupVertices(int stage)
stage - the index to the management stagepublic int getNumberOfOutputGroupVertices(int stage)
stage - the index to the management stagepublic ManagementGroupVertex getInputGroupVertex(int stage, int index)
stage - the index to the management stageindex - the index to the input group vertexnull if either the stage
does not exists or the given index is invalid in this stagepublic ManagementGroupVertex getOutputGroupVertex(int stage, int index)
stage - the index to the management stageindex - the index to the output group vertexnull if either the stage
does not exists or the given index is invalid in this stagepublic int getNumberOfInputVertices(int stage)
stage - the index of the management stagepublic int getNumberOfOutputVertices(int stage)
stage - the index of the management stagepublic ManagementVertex getInputVertex(int stage, int index)
stage - the index of the stageindex - the index of the input vertex to returnnull if no input vertex with such an index
exists in that stagepublic ManagementVertex getOutputVertex(int stage, int index)
stage - the index of the stageindex - the index of the output vertex to returnnull if no output vertex with such an index
exists in that stagepublic Collection<ManagementGroupVertex> getGroupVertices()
public List<ManagementGroupVertex> getGroupVerticesInTopologicalOrder()
public List<ManagementGroupVertex> getGroupVerticesInReverseTopologicalOrder()
public void read(DataInputView in) throws IOException
read in interface IOReadableWritableIOExceptionpublic void write(DataOutputView out) throws IOException
write in interface IOReadableWritableIOExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.