Class Component
java.lang.Object
org.apache.hadoop.yarn.service.component.Component
- All Implemented Interfaces:
org.apache.hadoop.yarn.event.EventHandler<ComponentEvent>
public class Component
extends Object
implements org.apache.hadoop.yarn.event.EventHandler<ComponentEvent>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancreateLaunchContext(Component compSpec, String version) voiddecContainersReady(boolean updateDefinition) voidlonggetComponentInstance(String componentInstanceName) org.apache.hadoop.yarn.service.ServiceContextgetName()intlongintintlongorg.apache.hadoop.yarn.api.records.PrioritygetProbe()static ComponentRestartPolicygetRestartPolicyHandler(Component.RestartPolicyEnum restartPolicyEnum) org.apache.hadoop.yarn.service.ServiceSchedulergetState()voidhandle(ComponentEvent event) voidincContainersReady(boolean updateDefinition) voidbooleanbooleanbooleanReturns whether a component is upgrading or not.voidmarkAsFailed(ComponentInstance instance) voidmarkAsSucceeded(ComponentInstance instance) voidreInsertPendingInstance(ComponentInstance instance) booleanvoidremovePendingInstance(ComponentInstance instance) booleanvoidrequestContainers(long count) voidvoidsetHealthThresholdMonitorEnabled(boolean healthThresholdMonitorEnabled)
-
Field Details
-
maxContainerFailurePerComp
public int maxContainerFailurePerComp -
currentContainerFailure
-
-
Constructor Details
-
Component
public Component(Component component, long allocateId, org.apache.hadoop.yarn.service.ServiceContext context)
-
-
Method Details
-
removePendingInstance
-
reInsertPendingInstance
-
createLaunchContext
public ContainerLaunchService.ComponentLaunchContext createLaunchContext(Component compSpec, String version) -
requestContainers
public void requestContainers(long count) -
areDependenciesReady
public boolean areDependenciesReady() -
getDependencyHostIpTokens
-
incRunningContainers
public void incRunningContainers() -
decRunningContainers
public void decRunningContainers() -
incContainersReady
public void incContainersReady(boolean updateDefinition) -
decContainersReady
public void decContainersReady(boolean updateDefinition) -
getNumReadyInstances
public int getNumReadyInstances() -
getNumRunningInstances
public int getNumRunningInstances() -
getNumDesiredInstances
public int getNumDesiredInstances() -
getComponentInstance
-
getAllComponentInstances
-
getComponentSpec
-
resetCompFailureCount
public void resetCompFailureCount() -
getProbe
-
getPriority
public org.apache.hadoop.yarn.api.records.Priority getPriority() -
getAllocateId
public long getAllocateId() -
getName
-
getState
-
isUpgrading
public boolean isUpgrading()Returns whether a component is upgrading or not. -
getUpgradeStatus
-
getCancelUpgradeStatus
-
getScheduler
public org.apache.hadoop.yarn.service.ServiceScheduler getScheduler() -
handle
- Specified by:
handlein interfaceorg.apache.hadoop.yarn.event.EventHandler<ComponentEvent>
-
getContext
public org.apache.hadoop.yarn.service.ServiceContext getContext() -
getPendingInstances
-
isHealthThresholdMonitorEnabled
public boolean isHealthThresholdMonitorEnabled() -
setHealthThresholdMonitorEnabled
public void setHealthThresholdMonitorEnabled(boolean healthThresholdMonitorEnabled) -
getSucceededInstances
-
getNumSucceededInstances
public long getNumSucceededInstances() -
getNumFailedInstances
public long getNumFailedInstances() -
getFailedInstances
-
markAsSucceeded
-
markAsFailed
-
removeFailedInstanceIfExists
-
removeSuccessfulInstanceIfExists
-
isReadyForDownstream
public boolean isReadyForDownstream() -
getRestartPolicyHandler
public static ComponentRestartPolicy getRestartPolicyHandler(Component.RestartPolicyEnum restartPolicyEnum) -
getRestartPolicyHandler
-
getHostnameSuffix
-