public class JobVertex extends Object implements Serializable
Constructor and Description |
---|
JobVertex(String name)
Constructs a new job vertex and assigns it with the given name.
|
JobVertex(String name,
JobVertexID id)
Constructs a new job vertex and assigns it with the given name.
|
Modifier and Type | Method and Description |
---|---|
JobEdge |
connectDataSetAsInput(IntermediateDataSet dataSet,
DistributionPattern distPattern) |
void |
connectIdInput(IntermediateDataSetID dataSetId,
DistributionPattern distPattern) |
JobEdge |
connectNewDataSetAsInput(JobVertex input,
DistributionPattern distPattern) |
JobEdge |
connectNewDataSetAsInput(JobVertex input,
DistributionPattern distPattern,
ResultPartitionType partitionType) |
JobEdge |
connectNewDataSetAsInput(JobVertex input,
DistributionPattern distPattern,
ResultPartitionType partitionType,
boolean eagerlyDeployConsumers) |
IntermediateDataSet |
createAndAddResultDataSet(IntermediateDataSetID id,
ResultPartitionType partitionType) |
IntermediateDataSet |
createAndAddResultDataSet(ResultPartitionType partitionType) |
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.
|
String |
getOperatorDescription() |
String |
getOperatorName() |
String |
getOperatorPrettyName() |
int |
getParallelism()
Gets the parallelism of the task.
|
List<IntermediateDataSet> |
getProducedDataSets() |
String |
getResultOptimizerProperties() |
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() |
boolean |
isStoppable() |
void |
setInputSplitSource(InputSplitSource<?> inputSplitSource) |
void |
setInvokableClass(Class<? extends AbstractInvokable> invokable) |
void |
setName(String name)
Sets the name of the vertex
|
void |
setOperatorDescription(String operatorDescription) |
void |
setOperatorName(String operatorName) |
void |
setOperatorPrettyName(String operatorPrettyName) |
void |
setParallelism(int parallelism)
Sets the parallelism for the task.
|
void |
setResultOptimizerProperties(String resultOptimizerProperties) |
void |
setSlotSharingGroup(SlotSharingGroup grp)
Associates this vertex with a slot sharing group for scheduling.
|
void |
setStrictlyCoLocatedWith(JobVertex strictlyCoLocatedWith)
Tells this vertex to strictly co locate its subtasks with the subtasks of the given vertex.
|
String |
toString() |
void |
updateCoLocationGroup(CoLocationGroup group) |
public JobVertex(String name)
name
- The name of the new job vertex.public JobVertex(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 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(JobVertex 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(ResultPartitionType partitionType)
public IntermediateDataSet createAndAddResultDataSet(IntermediateDataSetID id, ResultPartitionType partitionType)
public JobEdge connectDataSetAsInput(IntermediateDataSet dataSet, DistributionPattern distPattern)
public JobEdge connectNewDataSetAsInput(JobVertex input, DistributionPattern distPattern)
public JobEdge connectNewDataSetAsInput(JobVertex input, DistributionPattern distPattern, ResultPartitionType partitionType)
public JobEdge connectNewDataSetAsInput(JobVertex input, DistributionPattern distPattern, ResultPartitionType partitionType, boolean eagerlyDeployConsumers)
public void connectIdInput(IntermediateDataSetID dataSetId, DistributionPattern distPattern)
public boolean isInputVertex()
public boolean isStoppable()
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.public String getOperatorName()
public void setOperatorName(String operatorName)
public String getOperatorDescription()
public void setOperatorDescription(String operatorDescription)
public void setOperatorPrettyName(String operatorPrettyName)
public String getOperatorPrettyName()
public String getResultOptimizerProperties()
public void setResultOptimizerProperties(String resultOptimizerProperties)
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.