@InterfaceAudience.Public @InterfaceStability.Unstable public abstract class EdgeManagerPluginOnDemand extends EdgeManagerPlugin
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
EdgeManagerPluginOnDemand.EventRouteMetadata
Class to provide routing metadata for  
Events to be routed between
 producer and consumer tasks. | 
| Constructor and Description | 
|---|
EdgeManagerPluginOnDemand(EdgeManagerPluginContext context)
Create an instance of the  
EdgeManagerPluginOnDemand. | 
| Modifier and Type | Method and Description | 
|---|---|
EdgeManagerPluginContext | 
getContext()
Return the  
EdgeManagerPluginContext for this specific instance of
 the vertex manager. | 
abstract int | 
getNumDestinationConsumerTasks(int sourceTaskIndex)
Get the number of destination tasks that consume data from the source task 
 | 
abstract int | 
getNumDestinationTaskPhysicalInputs(int destinationTaskIndex)
Get the number of physical inputs on the destination task 
 | 
abstract int | 
getNumSourceTaskPhysicalOutputs(int sourceTaskIndex)
Get the number of physical outputs on the source task 
 | 
abstract void | 
initialize()
Initializes the EdgeManagerPlugin. 
 | 
abstract void | 
prepareForRouting()
This method will be invoked just before routing of events will begin. 
 | 
abstract EdgeManagerPluginOnDemand.EventRouteMetadata | 
routeCompositeDataMovementEventToDestination(int sourceTaskIndex,
                                            int destinationTaskIndex)
The method provides the  
EdgeManagerPluginOnDemand.EventRouteMetadata to route a
 CompositeDataMovementEvent produced by the given source task to the
 given destination task. | 
void | 
routeDataMovementEventToDestination(DataMovementEvent event,
                                   int sourceTaskIndex,
                                   int sourceOutputIndex,
                                   Map<Integer,List<Integer>> destinationTaskAndInputIndices)
Return the routing information to inform consumers about the source task
 output that is now available. 
 | 
abstract EdgeManagerPluginOnDemand.EventRouteMetadata | 
routeDataMovementEventToDestination(int sourceTaskIndex,
                                   int sourceOutputIndex,
                                   int destinationTaskIndex)
The method provides the  
EdgeManagerPluginOnDemand.EventRouteMetadata to route a
 DataMovementEvent produced by the given source task to the given
 destination task. | 
int | 
routeInputErrorEventToSource(InputReadErrorEvent event,
                            int destinationTaskIndex,
                            int destinationFailedInputIndex)
Return the source task index to which to send the input error event 
 | 
abstract int | 
routeInputErrorEventToSource(int destinationTaskIndex,
                            int destinationFailedInputIndex)
Return the source task index to which to send the input error event 
 | 
abstract EdgeManagerPluginOnDemand.EventRouteMetadata | 
routeInputSourceTaskFailedEventToDestination(int sourceTaskIndex,
                                            int destinationTaskIndex)
The method provides the  
EdgeManagerPluginOnDemand.EventRouteMetadata to route an
 InputFailedEvent produced by the given source task to the given
 destination task. | 
void | 
routeInputSourceTaskFailedEventToDestination(int sourceTaskIndex,
                                            Map<Integer,List<Integer>> destinationTaskAndInputIndices)
Return the routing information to inform consumers about the failure of a
 source task whose outputs have been potentially lost. 
 | 
public EdgeManagerPluginOnDemand(EdgeManagerPluginContext context)
EdgeManagerPluginOnDemand. Classes
 extending this to create a EdgeManagerPluginOnDemand, must provide
 the same constructor so that Tez can create an instance of the class at
 runtime.context - the context within which this EdgeManagerPluginOnDemand
          will run. Includes information like configuration which the user
          may have specified while setting up the edge.public abstract void initialize()
                         throws Exception
EdgeManagerPluginContext when the
 EdgeManagerPlugin is replaced.initialize in class EdgeManagerPluginExceptionpublic abstract void prepareForRouting()
                                throws Exception
Exceptionpublic abstract int getNumDestinationTaskPhysicalInputs(int destinationTaskIndex)
                                                 throws Exception
getNumDestinationTaskPhysicalInputs in class EdgeManagerPlugindestinationTaskIndex - Index of destination task for which number of 
 inputs is neededExceptionpublic abstract int getNumSourceTaskPhysicalOutputs(int sourceTaskIndex)
                                             throws Exception
getNumSourceTaskPhysicalOutputs in class EdgeManagerPluginsourceTaskIndex - Index of the source task for which number of outputs 
 is neededExceptionpublic abstract int getNumDestinationConsumerTasks(int sourceTaskIndex)
                                            throws Exception
getNumDestinationConsumerTasks in class EdgeManagerPluginsourceTaskIndex - Source task indexExceptionpublic abstract int routeInputErrorEventToSource(int destinationTaskIndex,
                               int destinationFailedInputIndex)
                                          throws Exception
destinationTaskIndex - Destination task that reported the errordestinationFailedInputIndex - Index of the physical input on the destination task that reported 
          the errorException@Nullable public abstract EdgeManagerPluginOnDemand.EventRouteMetadata routeDataMovementEventToDestination(int sourceTaskIndex, int sourceOutputIndex, int destinationTaskIndex) throws Exception
EdgeManagerPluginOnDemand.EventRouteMetadata to route a
 DataMovementEvent produced by the given source task to the given
 destination task. The returned EdgeManagerPluginOnDemand.EventRouteMetadata should have the
 target input indices set to enable the routing. If the routing metadata is
 common across different events then the plugin can cache and reuse the same
 object.sourceTaskIndex - The index of the task in the source vertex of this edge that
          produced a DataMovementEventsourceOutputIndex - Index of the physical output on the source task that produced the
          eventdestinationTaskIndex - EdgeManagerPluginOnDemand.EventRouteMetadata with target indices set. Maybe null if
         the given destination task does not read input from the given
         source task.Exception@Nullable public abstract EdgeManagerPluginOnDemand.EventRouteMetadata routeCompositeDataMovementEventToDestination(int sourceTaskIndex, int destinationTaskIndex) throws Exception
EdgeManagerPluginOnDemand.EventRouteMetadata to route a
 CompositeDataMovementEvent produced by the given source task to the
 given destination task. The returned EdgeManagerPluginOnDemand.EventRouteMetadata should have
 the target input indices and source output indices set to enable the
 routing. If the routing metadata is common across different events then the
 plugin can cache and reuse the same object.sourceTaskIndex - The index of the task in the source vertex of this edge that
          produced a CompositeDataMovementEventdestinationTaskIndex - The index of the task in the destination vertex of this edgeEdgeManagerPluginOnDemand.EventRouteMetadata with source and target indices set. This
         may be null if the destination task does not read data from the
         source task.Exception@Nullable public abstract EdgeManagerPluginOnDemand.EventRouteMetadata routeInputSourceTaskFailedEventToDestination(int sourceTaskIndex, int destinationTaskIndex) throws Exception
EdgeManagerPluginOnDemand.EventRouteMetadata to route an
 InputFailedEvent produced by the given source task to the given
 destination task. The returned EdgeManagerPluginOnDemand.EventRouteMetadata should have the
 target input indices set to enable the routing. If the routing metadata is
 common across different events then the plugin can cache and reuse the same
 object.sourceTaskIndex - The index of the failed task in the source vertex of this edge.destinationTaskIndex - The index of a task in the destination vertex of this edge.EdgeManagerPluginOnDemand.EventRouteMetadata with target indices set. Maybe null if
         the given destination task does not read input from the given
         source task.Exceptionpublic EdgeManagerPluginContext getContext()
EdgeManagerPluginContext for this specific instance of
 the vertex manager.getContext in class EdgeManagerPluginEdgeManagerPluginContext for the inputpublic void routeDataMovementEventToDestination(DataMovementEvent event, int sourceTaskIndex, int sourceOutputIndex, Map<Integer,List<Integer>> destinationTaskAndInputIndices) throws Exception
routeDataMovementEventToDestination in class EdgeManagerPluginevent - Data movement event that contains the output informationsourceTaskIndex - Source task that produced the eventsourceOutputIndex - Index of the physical output on the source task that produced the
          eventdestinationTaskAndInputIndices - Map via which the routing information is returnedExceptionpublic void routeInputSourceTaskFailedEventToDestination(int sourceTaskIndex,
                                                Map<Integer,List<Integer>> destinationTaskAndInputIndices)
                                                  throws Exception
routeInputSourceTaskFailedEventToDestination in class EdgeManagerPluginsourceTaskIndex - Source taskdestinationTaskAndInputIndices - Map via which the routing information is returnedExceptionpublic int routeInputErrorEventToSource(InputReadErrorEvent event, int destinationTaskIndex, int destinationFailedInputIndex) throws Exception
routeInputErrorEventToSource in class EdgeManagerPluginevent - Input read error event. Has more information about the errordestinationTaskIndex - Destination task that reported the errordestinationFailedInputIndex - Index of the physical input on the destination task that reported 
          the errorExceptionCopyright © 2016 Apache Software Foundation. All rights reserved.