Class ComponentInstance

java.lang.Object
org.apache.hadoop.yarn.service.component.instance.ComponentInstance
All Implemented Interfaces:
Comparable<ComponentInstance>, org.apache.hadoop.yarn.event.EventHandler<ComponentInstanceEvent>

public class ComponentInstance extends Object implements org.apache.hadoop.yarn.event.EventHandler<ComponentInstanceEvent>, Comparable<ComponentInstance>
  • Constructor Details

  • Method Details

    • hasContainerFailed

      public static boolean hasContainerFailed(org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus)
    • isFinalState

      public static boolean isFinalState(ContainerState state)
    • getState

      public ComponentInstanceState getState()
    • getServiceVersion

      public String getServiceVersion()
      Returns the version of service at which the instance is at.
    • getContainerState

      public ContainerState getContainerState()
      Returns the state of the container in the container spec.
    • setContainerState

      public void setContainerState(ContainerState state)
      Sets the state of the container in the container spec. It is write protected.
      Parameters:
      state - container state
    • handle

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

      public void setContainer(org.apache.hadoop.yarn.api.records.Container container)
    • getCompInstanceName

      public String getCompInstanceName()
    • updateResolvedLaunchParams

      public void updateResolvedLaunchParams(Future<ProviderService.ResolvedLaunchParams> future)
    • getContainerStatus

      public org.apache.hadoop.yarn.api.records.ContainerStatus getContainerStatus()
    • updateContainerStatus

      public void updateContainerStatus(org.apache.hadoop.yarn.api.records.ContainerStatus status)
    • getCompName

      public String getCompName()
    • setCompInstanceDir

      public void setCompInstanceDir(org.apache.hadoop.fs.Path dir)
    • getComponent

      public Component getComponent()
    • getContainer

      public org.apache.hadoop.yarn.api.records.Container getContainer()
    • getCompInstanceId

      public ComponentInstanceId getCompInstanceId()
    • getNodeId

      public org.apache.hadoop.yarn.api.records.NodeId getNodeId()
    • ping

      public ProbeStatus ping()
    • destroy

      public void destroy()
    • cleanupRegistryAndCompHdfsDir

      public void cleanupRegistryAndCompHdfsDir(org.apache.hadoop.yarn.api.records.ContainerId containerId)
    • getHostname

      public String getHostname()
    • compareTo

      public int compareTo(ComponentInstance to)
      Specified by:
      compareTo in interface Comparable<ComponentInstance>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getContainerSpec

      public Container getContainerSpec()
      Returns container spec.