public class RestartPipelinedRegionStrategy extends FailoverStrategy
Modifier and Type | Class and Description |
---|---|
static class |
RestartPipelinedRegionStrategy.Factory
Factory that instantiates the RestartPipelinedRegionStrategy.
|
Constructor and Description |
---|
RestartPipelinedRegionStrategy(ExecutionGraph executionGraph)
Creates a new failover strategy to restart pipelined regions that works on the given
execution graph and uses the execution graph's future executor to call restart actions.
|
RestartPipelinedRegionStrategy(ExecutionGraph executionGraph,
Executor executor)
Creates a new failover strategy to restart pipelined regions that works on the given
execution graph and uses the given executor to call restart actions.
|
Modifier and Type | Method and Description |
---|---|
FailoverRegion |
getFailoverRegion(ExecutionVertex ev)
Finds the failover region that contains the given execution vertex.
|
String |
getStrategyName()
Gets the name of the failover strategy, for logging purposes.
|
void |
notifyNewVertices(List<ExecutionJobVertex> newJobVerticesTopological)
Called whenever new vertices are added to the ExecutionGraph.
|
void |
onTaskFailure(Execution taskExecution,
Throwable cause)
Called by the execution graph when a task failure occurs.
|
registerMetrics
public RestartPipelinedRegionStrategy(ExecutionGraph executionGraph)
executionGraph
- The execution graph on which this FailoverStrategy will workpublic RestartPipelinedRegionStrategy(ExecutionGraph executionGraph, Executor executor)
executionGraph
- The execution graph on which this FailoverStrategy will workexecutor
- The executor used for future actionspublic void onTaskFailure(Execution taskExecution, Throwable cause)
FailoverStrategy
onTaskFailure
in class FailoverStrategy
taskExecution
- The execution attempt of the failed task.cause
- The exception that caused the task failure.public void notifyNewVertices(List<ExecutionJobVertex> newJobVerticesTopological)
FailoverStrategy
notifyNewVertices
in class FailoverStrategy
newJobVerticesTopological
- The newly added vertices, in topological order.public String getStrategyName()
FailoverStrategy
getStrategyName
in class FailoverStrategy
@VisibleForTesting public FailoverRegion getFailoverRegion(ExecutionVertex ev)
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.