Class OnFailureRestartPolicy
java.lang.Object
org.apache.hadoop.yarn.service.component.OnFailureRestartPolicy
- All Implemented Interfaces:
ComponentRestartPolicy
Policy for components that require restarts for instances on failure.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanallowContainerRetriesForInstance(ComponentInstance componentInstance) booleanstatic OnFailureRestartPolicybooleanhasCompleted(Component component) booleanhasCompletedSuccessfully(Component component) booleanbooleanisReadyForDownStream(Component dependentComponent) booleanshouldRelaunchInstance(ComponentInstance componentInstance, org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus) booleanshouldTerminate(Component component)
-
Method Details
-
getInstance
-
isLongLived
public boolean isLongLived()- Specified by:
isLongLivedin interfaceComponentRestartPolicy
-
hasCompleted
- Specified by:
hasCompletedin interfaceComponentRestartPolicy
-
hasCompletedSuccessfully
- Specified by:
hasCompletedSuccessfullyin interfaceComponentRestartPolicy
-
shouldRelaunchInstance
public boolean shouldRelaunchInstance(ComponentInstance componentInstance, org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus) - Specified by:
shouldRelaunchInstancein interfaceComponentRestartPolicy
-
isReadyForDownStream
- Specified by:
isReadyForDownStreamin interfaceComponentRestartPolicy
-
allowUpgrades
public boolean allowUpgrades()- Specified by:
allowUpgradesin interfaceComponentRestartPolicy
-
shouldTerminate
- Specified by:
shouldTerminatein interfaceComponentRestartPolicy
-
allowContainerRetriesForInstance
- Specified by:
allowContainerRetriesForInstancein interfaceComponentRestartPolicy
-