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>
  • Field Details

    • maxContainerFailurePerComp

      public int maxContainerFailurePerComp
    • currentContainerFailure

      public AtomicInteger currentContainerFailure
  • Constructor Details

    • Component

      public Component(Component component, long allocateId, org.apache.hadoop.yarn.service.ServiceContext context)
  • Method Details

    • removePendingInstance

      public void removePendingInstance(ComponentInstance instance)
    • reInsertPendingInstance

      public void reInsertPendingInstance(ComponentInstance instance)
    • createLaunchContext

      public ContainerLaunchService.ComponentLaunchContext createLaunchContext(Component compSpec, String version)
    • requestContainers

      public void requestContainers(long count)
    • areDependenciesReady

      public boolean areDependenciesReady()
    • getDependencyHostIpTokens

      public Map<String,String> 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

      public ComponentInstance getComponentInstance(String componentInstanceName)
    • getAllComponentInstances

      public Collection<ComponentInstance> getAllComponentInstances()
    • getComponentSpec

      public Component getComponentSpec()
    • resetCompFailureCount

      public void resetCompFailureCount()
    • getProbe

      public Probe getProbe()
    • getPriority

      public org.apache.hadoop.yarn.api.records.Priority getPriority()
    • getAllocateId

      public long getAllocateId()
    • getName

      public String getName()
    • getState

      public ComponentState getState()
    • isUpgrading

      public boolean isUpgrading()
      Returns whether a component is upgrading or not.
    • getUpgradeStatus

      public Component.UpgradeStatus getUpgradeStatus()
    • getCancelUpgradeStatus

      public Component.UpgradeStatus getCancelUpgradeStatus()
    • getScheduler

      public org.apache.hadoop.yarn.service.ServiceScheduler getScheduler()
    • handle

      public void handle(ComponentEvent event)
      Specified by:
      handle in interface org.apache.hadoop.yarn.event.EventHandler<ComponentEvent>
    • getContext

      public org.apache.hadoop.yarn.service.ServiceContext getContext()
    • getPendingInstances

      public List<ComponentInstance> getPendingInstances()
    • isHealthThresholdMonitorEnabled

      public boolean isHealthThresholdMonitorEnabled()
    • setHealthThresholdMonitorEnabled

      public void setHealthThresholdMonitorEnabled(boolean healthThresholdMonitorEnabled)
    • getSucceededInstances

      public Collection<ComponentInstance> getSucceededInstances()
    • getNumSucceededInstances

      public long getNumSucceededInstances()
    • getNumFailedInstances

      public long getNumFailedInstances()
    • getFailedInstances

      public Collection<ComponentInstance> getFailedInstances()
    • markAsSucceeded

      public void markAsSucceeded(ComponentInstance instance)
    • markAsFailed

      public void markAsFailed(ComponentInstance instance)
    • removeFailedInstanceIfExists

      public boolean removeFailedInstanceIfExists(ComponentInstance instance)
    • removeSuccessfulInstanceIfExists

      public boolean removeSuccessfulInstanceIfExists(ComponentInstance instance)
    • isReadyForDownstream

      public boolean isReadyForDownstream()
    • getRestartPolicyHandler

      public static ComponentRestartPolicy getRestartPolicyHandler(Component.RestartPolicyEnum restartPolicyEnum)
    • getRestartPolicyHandler

      public ComponentRestartPolicy getRestartPolicyHandler()
    • getHostnameSuffix

      public String getHostnameSuffix()