Class AlwaysRestartPolicy
java.lang.Object
org.apache.hadoop.yarn.service.component.AlwaysRestartPolicy
- All Implemented Interfaces:
ComponentRestartPolicy
Always restart policy allows for restarts for long live components which
never terminate.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanallowContainerRetriesForInstance(ComponentInstance componentInstance) booleanstatic AlwaysRestartPolicybooleanhasCompleted(Component component) This is always false since these components never terminatebooleanhasCompletedSuccessfully(Component component) This is always false since these components never terminatebooleanbooleanisReadyForDownStream(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
This is always false since these components never terminate- Specified by:
hasCompletedin interfaceComponentRestartPolicy- Parameters:
component-- Returns:
-
hasCompletedSuccessfully
This is always false since these components never terminate- Specified by:
hasCompletedSuccessfullyin interfaceComponentRestartPolicy- Parameters:
component-- Returns:
-
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
-