public class AbstractJobVertex extends Object implements Serializable
| Constructor and Description |
|---|
AbstractJobVertex(String name)
Constructs a new job vertex and assigns it with the given name.
|
AbstractJobVertex(String name,
JobVertexID id)
Constructs a new job vertex and assigns it with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connectDataSetAsInput(IntermediateDataSet dataSet,
DistributionPattern distPattern) |
void |
connectIdInput(IntermediateDataSetID dataSetId,
DistributionPattern distPattern) |
void |
connectNewDataSetAsInput(AbstractJobVertex input,
DistributionPattern distPattern) |
IntermediateDataSet |
createAndAddResultDataSet() |
IntermediateDataSet |
createAndAddResultDataSet(IntermediateDataSetID id) |
void |
finalizeOnMaster(ClassLoader loader)
A hook that can be overwritten by sub classes to implement logic that is called by the
master after the job completed.
|
CoLocationGroup |
getCoLocationGroup() |
Configuration |
getConfiguration()
Returns the vertex's configuration object which can be used to pass custom settings to the task at runtime.
|
JobVertexID |
getID()
Returns the ID of this job vertex.
|
List<JobEdge> |
getInputs() |
InputSplitSource<?> |
getInputSplitSource() |
Class<? extends AbstractInvokable> |
getInvokableClass(ClassLoader cl)
Returns the invokable class which represents the task of this vertex
|
String |
getInvokableClassName()
Returns the name of the invokable class which represents the task of this vertex.
|
String |
getName()
Returns the name of the vertex.
|
int |
getNumberOfInputs()
Returns the number of inputs.
|
int |
getNumberOfProducedIntermediateDataSets()
Returns the number of produced intermediate data sets.
|
int |
getParallelism()
Gets the degree of parallelism of the task.
|
List<IntermediateDataSet> |
getProducedDataSets() |
SlotSharingGroup |
getSlotSharingGroup()
Gets the slot sharing group that this vertex is associated with.
|
boolean |
hasNoConnectedInputs() |
void |
initializeOnMaster(ClassLoader loader)
A hook that can be overwritten by sub classes to implement logic that is called by the
master when the job starts.
|
boolean |
isInputVertex() |
boolean |
isOutputVertex() |
void |
setInputSplitSource(InputSplitSource<?> inputSplitSource) |
void |
setInvokableClass(Class<? extends AbstractInvokable> invokable) |
void |
setName(String name)
Sets the name of the vertex
|
void |
setParallelism(int parallelism)
Sets the degree of parallelism for the task.
|
void |
setSlotSharingGroup(SlotSharingGroup grp)
Associates this vertex with a slot sharing group for scheduling.
|
void |
setStrictlyCoLocatedWith(AbstractJobVertex strictlyCoLocatedWith)
Tells this vertex to strictly co locate its subtasks with the subtasks of the given vertex.
|
String |
toString() |
void |
updateCoLocationGroup(CoLocationGroup group) |
public AbstractJobVertex(String name)
name - The name of the new job vertex.public AbstractJobVertex(String name, JobVertexID id)
name - The name of the new job vertex.id - The id of the job vertex.public JobVertexID getID()
public String getName()
public void setName(String name)
name - The new name.public int getNumberOfProducedIntermediateDataSets()
public int getNumberOfInputs()
public Configuration getConfiguration()
public void setInvokableClass(Class<? extends AbstractInvokable> invokable)
public String getInvokableClassName()
null if not set.public Class<? extends AbstractInvokable> getInvokableClass(ClassLoader cl)
cl - The classloader used to resolve user-defined classesnull if it is not setpublic int getParallelism()
public void setParallelism(int parallelism)
parallelism - The degree of parallelism for the task.public InputSplitSource<?> getInputSplitSource()
public void setInputSplitSource(InputSplitSource<?> inputSplitSource)
public List<IntermediateDataSet> getProducedDataSets()
public void setSlotSharingGroup(SlotSharingGroup grp)
grp - The slot sharing group to associate the vertex with.public SlotSharingGroup getSlotSharingGroup()
null.null, if not associated with one.public void setStrictlyCoLocatedWith(AbstractJobVertex strictlyCoLocatedWith)
strictlyCoLocatedWith - The vertex whose subtasks to co-locate this vertex's subtasks with.IllegalArgumentException - Thrown, if this vertex and the vertex to co-locate with are not in a common
slot sharing group.setSlotSharingGroup(SlotSharingGroup)public CoLocationGroup getCoLocationGroup()
public void updateCoLocationGroup(CoLocationGroup group)
public IntermediateDataSet createAndAddResultDataSet()
public IntermediateDataSet createAndAddResultDataSet(IntermediateDataSetID id)
public void connectDataSetAsInput(IntermediateDataSet dataSet, DistributionPattern distPattern)
public void connectNewDataSetAsInput(AbstractJobVertex input, DistributionPattern distPattern)
public void connectIdInput(IntermediateDataSetID dataSetId, DistributionPattern distPattern)
public boolean isInputVertex()
public boolean isOutputVertex()
public boolean hasNoConnectedInputs()
public void initializeOnMaster(ClassLoader loader) throws Exception
loader - The class loader for user defined code.Exception - The method may throw exceptions which cause the job to fail immediately.public void finalizeOnMaster(ClassLoader loader) throws Exception
loader - The class loader for user defined code.Exception - The method may throw exceptions which cause the job to fail immediately.Copyright © 2015 The Apache Software Foundation. All rights reserved.