@InterfaceStability.Unstable
@InterfaceAudience.Public
public interface VertexManagerPluginContext
Modifier and Type | Method and Description |
---|---|
void |
addRootInputEvents(String inputName,
Collection<InputDataInformationEvent> events)
Allows a VertexManagerPlugin to assign Events for Root Inputs
For regular Event Routing changes - the EdgeManager should be configured
via the setVertexParallelism method
|
int |
getDAGAttemptNumber() |
Map<String,EdgeProperty> |
getInputVertexEdgeProperties()
Get the edge properties on the input edges of this vertex.
|
int |
getNumClusterNodes()
Get the number of nodes in the cluster
|
org.apache.hadoop.yarn.api.records.Container |
getTaskContainer(String vertexName,
Integer taskIndex)
Get the container for the successful attempt of the task
|
org.apache.hadoop.yarn.api.records.Resource |
getTotalAvailableResource()
Get the total resource allocated to this vertex.
|
UserPayload |
getUserPayload()
Get the payload set for the plugin
|
Set<String> |
getVertexInputNames()
Get the names of the non-vertex inputs of this vertex.
|
String |
getVertexName()
Get the name of the vertex
|
int |
getVertexNumTasks(String vertexName)
Get the number of tasks in the given vertex
|
org.apache.hadoop.yarn.api.records.Resource |
getVertexTaskResource()
Get the resource allocated to a task of this vertex
|
void |
scheduleVertexTasks(List<org.apache.tez.dag.api.VertexManagerPluginContext.TaskWithLocationHint> tasks)
Notify the vertex to start the given tasks
|
void |
setVertexLocationHint(VertexLocationHint locationHint)
Set the placement hint for tasks in this vertex
|
boolean |
setVertexParallelism(int parallelism,
VertexLocationHint locationHint,
Map<String,EdgeManagerPluginDescriptor> sourceEdgeManagers,
Map<String,InputSpecUpdate> rootInputSpecUpdate)
Set the new parallelism (number of tasks) of this vertex,
Map of source (input) vertices and edge managers to change the event routing
between the source tasks and the new destination tasks and the number of physical inputs for root inputs.
|
Map<String,EdgeProperty> getInputVertexEdgeProperties()
String getVertexName()
UserPayload getUserPayload()
int getVertexNumTasks(String vertexName)
vertexName
- org.apache.hadoop.yarn.api.records.Resource getVertexTaskResource()
org.apache.hadoop.yarn.api.records.Container getTaskContainer(String vertexName, Integer taskIndex)
org.apache.hadoop.yarn.api.records.Resource getTotalAvailableResource()
int getNumClusterNodes()
boolean setVertexParallelism(int parallelism, @Nullable VertexLocationHint locationHint, @Nullable Map<String,EdgeManagerPluginDescriptor> sourceEdgeManagers, @Nullable Map<String,InputSpecUpdate> rootInputSpecUpdate)
parallelism
- New number of tasks in the vertexlocationHint
- the placement policy for tasks.sourceEdgeManagers
- Edge Managers to be updatedrootInputSpecUpdate
- Updated Root Input specifications, if any.
If none specified, a default of 1 physical input is usedvoid addRootInputEvents(String inputName, Collection<InputDataInformationEvent> events)
inputName
- The input name associated with the eventevents
- The list of Events to be assigned to various tasks belonging to
the Vertex. The target index on individual events represents the
task to which events need to be sent.void scheduleVertexTasks(List<org.apache.tez.dag.api.VertexManagerPluginContext.TaskWithLocationHint> tasks)
tasks
- Indices of the tasks to be started@Nullable Set<String> getVertexInputNames()
void setVertexLocationHint(VertexLocationHint locationHint)
locationHint
- int getDAGAttemptNumber()
Copyright © 2014 Apache Software Foundation. All rights reserved.