public class RestartPipelinedRegionStrategy extends Object implements FailoverStrategy
FailoverStrategy.Factory
Constructor and Description |
---|
RestartPipelinedRegionStrategy(FailoverTopology topology)
Creates a new failover strategy to restart pipelined regions that works on the given topology.
|
RestartPipelinedRegionStrategy(FailoverTopology topology,
ResultPartitionAvailabilityChecker resultPartitionAvailabilityChecker)
Creates a new failover strategy to restart pipelined regions that works on the given topology.
|
Modifier and Type | Method and Description |
---|---|
FailoverRegion |
getFailoverRegion(ExecutionVertexID vertexID)
Returns the failover region that contains the given execution vertex.
|
Set<ExecutionVertexID> |
getTasksNeedingRestart(ExecutionVertexID executionVertexId,
Throwable cause)
Returns a set of IDs corresponding to the set of vertices that should be restarted.
|
@VisibleForTesting public RestartPipelinedRegionStrategy(FailoverTopology topology)
topology
- containing info about all the vertices and edgespublic RestartPipelinedRegionStrategy(FailoverTopology topology, ResultPartitionAvailabilityChecker resultPartitionAvailabilityChecker)
topology
- containing info about all the vertices and edgesresultPartitionAvailabilityChecker
- helps to query result partition availabilitypublic Set<ExecutionVertexID> getTasksNeedingRestart(ExecutionVertexID executionVertexId, Throwable cause)
getTasksNeedingRestart
in interface FailoverStrategy
executionVertexId
- ID of the failed taskcause
- cause of the failure@VisibleForTesting public FailoverRegion getFailoverRegion(ExecutionVertexID vertexID)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.