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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanupRegistryAndCompHdfsDir(org.apache.hadoop.yarn.api.records.ContainerId containerId) intvoiddestroy()booleanorg.apache.hadoop.yarn.api.records.ContainerReturns container spec.Returns the state of the container in the container spec.org.apache.hadoop.yarn.api.records.ContainerStatusorg.apache.hadoop.yarn.api.records.NodeIdReturns the version of service at which the instance is at.getState()voidhandle(ComponentInstanceEvent event) static booleanhasContainerFailed(org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus) inthashCode()static booleanisFinalState(ContainerState state) ping()voidsetCompInstanceDir(org.apache.hadoop.fs.Path dir) voidsetContainer(org.apache.hadoop.yarn.api.records.Container container) voidsetContainerState(ContainerState state) Sets the state of the container in the container spec.voidupdateContainerStatus(org.apache.hadoop.yarn.api.records.ContainerStatus status) void
-
Constructor Details
-
ComponentInstance
-
-
Method Details
-
hasContainerFailed
public static boolean hasContainerFailed(org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus) -
isFinalState
-
getState
-
getServiceVersion
Returns the version of service at which the instance is at. -
getContainerState
Returns the state of the container in the container spec. -
setContainerState
Sets the state of the container in the container spec. It is write protected.- Parameters:
state- container state
-
handle
- Specified by:
handlein interfaceorg.apache.hadoop.yarn.event.EventHandler<ComponentInstanceEvent>
-
setContainer
public void setContainer(org.apache.hadoop.yarn.api.records.Container container) -
getCompInstanceName
-
updateResolvedLaunchParams
-
getContainerStatus
public org.apache.hadoop.yarn.api.records.ContainerStatus getContainerStatus() -
updateContainerStatus
public void updateContainerStatus(org.apache.hadoop.yarn.api.records.ContainerStatus status) -
getCompName
-
setCompInstanceDir
public void setCompInstanceDir(org.apache.hadoop.fs.Path dir) -
getComponent
-
getContainer
public org.apache.hadoop.yarn.api.records.Container getContainer() -
getCompInstanceId
-
getNodeId
public org.apache.hadoop.yarn.api.records.NodeId getNodeId() -
ping
-
destroy
public void destroy() -
cleanupRegistryAndCompHdfsDir
public void cleanupRegistryAndCompHdfsDir(org.apache.hadoop.yarn.api.records.ContainerId containerId) -
getHostname
-
compareTo
- Specified by:
compareToin interfaceComparable<ComponentInstance>
-
equals
-
hashCode
public int hashCode() -
getContainerSpec
Returns container spec.
-