public abstract class AbstractJobVertex extends Object implements IOReadableWritable
| Modifier and Type | Field and Description |
|---|---|
protected Class<? extends AbstractInvokable> |
invokableClass
The class of the invokable.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractJobVertex(String name,
JobGraph jobGraph)
Constructs a new job vertex and assigns it with the given name.
|
protected |
AbstractJobVertex(String name,
JobVertexID id,
JobGraph jobGraph)
Constructs a new job vertex and assigns it with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connectTo(AbstractJobVertex vertex)
Connects the job vertex to the specified job vertex.
|
void |
connectTo(AbstractJobVertex vertex,
ChannelType channelType)
Connects the job vertex to the specified job vertex.
|
void |
connectTo(AbstractJobVertex vertex,
ChannelType channelType,
DistributionPattern distributionPattern)
Connects the job vertex to the specified job vertex.
|
void |
connectTo(AbstractJobVertex vertex,
ChannelType channelType,
int indexOfOutputGate,
int indexOfInputGate,
DistributionPattern distributionPattern)
Connects the job vertex to the specified job vertex.
|
void |
connectTo(AbstractJobVertex vertex,
int indexOfOutputGate,
int indexOfInputGate)
Connects the job vertex to the specified job vertex.
|
JobEdge |
getBackwardConnection(int index)
Returns the backward edge with index
index. |
Configuration |
getConfiguration()
Returns the vertex's configuration object which can be used to pass custom settings to the task at runtime.
|
protected int |
getFirstFreeInputGateIndex()
Returns the index of this vertex's first free input gate.
|
protected int |
getFirstFreeOutputGateIndex()
Returns the index of this vertex's first free output gate.
|
JobEdge |
getForwardConnection(int index)
Returns the forward edge with index
index. |
JobVertexID |
getID()
Returns the ID of this job vertex.
|
Class<? extends AbstractInvokable> |
getInvokableClass()
Returns the invokable class which represents the task of this vertex
|
JobGraph |
getJobGraph()
Returns the job graph this job vertex belongs to.
|
String |
getName()
Returns the name of the vertex.
|
int |
getNumberOfBackwardConnections()
Returns the number of backward connections.
|
int |
getNumberOfExecutionRetries()
Returns the number of retries in case of an error before the task represented by this vertex is considered as
failed.
|
int |
getNumberOfForwardConnections()
Returns the number of forward connections.
|
int |
getNumberOfSubtasks()
Returns the number of subtasks the task this vertex represents should be split into at runtime.
|
AbstractJobVertex |
getVertexToShareInstancesWith()
Returns the vertex this vertex should share its instance with at runtime.
|
void |
read(DataInputView in) |
void |
setInvokableClass(Class<? extends AbstractInvokable> invokable) |
void |
setName(String name)
Sets the name of the vertex.
|
void |
setNumberOfExecutionRetries(int numberOfExecutionRetries)
Sets the number of retries in case of an error before the task represented by this vertex is considered as
failed.
|
void |
setNumberOfSubtasks(int numberOfSubtasks)
Sets the number of subtasks the task this vertex represents should be split into at runtime.
|
void |
setVertexToShareInstancesWith(AbstractJobVertex vertex)
Sets the vertex this vertex should share its instances with at runtime.
|
String |
toString() |
void |
write(DataOutputView out) |
protected Class<? extends AbstractInvokable> invokableClass
protected AbstractJobVertex(String name, JobGraph jobGraph)
name - the name of the new job vertexjobGraph - the job graph this vertex belongs toprotected AbstractJobVertex(String name, JobVertexID id, JobGraph jobGraph)
name - the name of the new job vertexjobGraph - the job graph this vertex belongs topublic void connectTo(AbstractJobVertex vertex) throws JobGraphDefinitionException
vertex - the vertex this vertex should connect toJobGraphDefinitionException - thrown if the given vertex cannot be connected to vertex in the requested mannerpublic void connectTo(AbstractJobVertex vertex, int indexOfOutputGate, int indexOfInputGate) throws JobGraphDefinitionException
vertex - the vertex this vertex should connect toindexOfOutputGate - index of the producing task's output gate to be used, -1 will determine the next free index
numberindexOfInputGate - index of the consuming task's input gate to be used, -1 will determine the next free index
numberJobGraphDefinitionException - thrown if the given vertex cannot be connected to vertex in the requested mannerpublic void connectTo(AbstractJobVertex vertex, ChannelType channelType) throws JobGraphDefinitionException
vertex - the vertex this vertex should connect tochannelType - the channel type the two vertices should be connected by at runtimeJobGraphDefinitionException - thrown if the given vertex cannot be connected to vertex in the requested mannerpublic void connectTo(AbstractJobVertex vertex, ChannelType channelType, DistributionPattern distributionPattern) throws JobGraphDefinitionException
vertex - the vertex this vertex should connect tochannelType - the channel type the two vertices should be connected by at runtimedistributionPattern - the distribution pattern between the two job verticesJobGraphDefinitionException - thrown if the given vertex cannot be connected to vertex in the requested mannerpublic void connectTo(AbstractJobVertex vertex, ChannelType channelType, int indexOfOutputGate, int indexOfInputGate, DistributionPattern distributionPattern) throws JobGraphDefinitionException
vertex - the vertex this vertex should connect tochannelType - the channel type the two vertices should be connected by at runtimeindexOfOutputGate - index of the producing task's output gate to be used, -1 will determine the next free index
numberindexOfInputGate - index of the consuming task's input gate to be used, -1 will determine the next free index
numberdistributionPattern - the distribution pattern between the two job verticesJobGraphDefinitionException - thrown if the given vertex cannot be connected to vertex in the requested mannerprotected int getFirstFreeOutputGateIndex()
protected int getFirstFreeInputGateIndex()
public void setName(String name)
name - The name of the vertex.public String getName()
null if no name is set.public int getNumberOfForwardConnections()
public int getNumberOfBackwardConnections()
public JobEdge getForwardConnection(int index)
index.index - the index of the edgenull if no edge exists at the specified index.public JobEdge getBackwardConnection(int index)
index.index - the index of the edgenull if no edge exists at the specified indexpublic JobVertexID getID()
public void read(DataInputView in) throws IOException
read in interface IOReadableWritableIOExceptionpublic void write(DataOutputView out) throws IOException
write in interface IOReadableWritableIOExceptionpublic JobGraph getJobGraph()
null if no job graph has been set yetpublic void setNumberOfSubtasks(int numberOfSubtasks)
numberOfSubtasks - the number of subtasks this vertex represents should be split into at runtimepublic int getNumberOfSubtasks()
-1 if
unspecifiedpublic void setNumberOfExecutionRetries(int numberOfExecutionRetries)
numberOfExecutionRetries - the number of retries in case of an error before the task represented by this vertex is considered as
failedpublic int getNumberOfExecutionRetries()
-1 if unspecifiedpublic void setVertexToShareInstancesWith(AbstractJobVertex vertex)
vertex - the vertex this vertex should share its instances with at runtimepublic AbstractJobVertex getVertexToShareInstancesWith()
null if undefinedpublic Configuration getConfiguration()
public void setInvokableClass(Class<? extends AbstractInvokable> invokable)
public Class<? extends AbstractInvokable> getInvokableClass()
null if it is not setCopyright © 2014 The Apache Software Foundation. All rights reserved.