public class ContainerImpl extends Object implements Container
Constructor and Description |
---|
ContainerImpl(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.yarn.event.Dispatcher dispatcher,
org.apache.hadoop.yarn.api.records.ContainerLaunchContext launchContext,
org.apache.hadoop.security.Credentials creds,
NodeManagerMetrics metrics,
org.apache.hadoop.yarn.security.ContainerTokenIdentifier containerTokenIdentifier,
Context context) |
ContainerImpl(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.yarn.event.Dispatcher dispatcher,
org.apache.hadoop.yarn.api.records.ContainerLaunchContext launchContext,
org.apache.hadoop.security.Credentials creds,
NodeManagerMetrics metrics,
org.apache.hadoop.yarn.security.ContainerTokenIdentifier containerTokenIdentifier,
Context context,
long startTs) |
ContainerImpl(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.yarn.event.Dispatcher dispatcher,
org.apache.hadoop.yarn.api.records.ContainerLaunchContext launchContext,
org.apache.hadoop.security.Credentials creds,
NodeManagerMetrics metrics,
org.apache.hadoop.yarn.security.ContainerTokenIdentifier containerTokenIdentifier,
Context context,
NMStateStoreService.RecoveredContainerState rcs) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRollback() |
void |
cleanup() |
org.apache.hadoop.yarn.api.records.ContainerStatus |
cloneAndGetContainerStatus() |
void |
commitUpgrade() |
org.apache.hadoop.yarn.api.records.ContainerId |
getContainerId() |
long |
getContainerLaunchTime()
The timestamp when the container is allowed to be launched.
|
<T> T |
getContainerRuntimeData(Class<T> runtimeClass) |
long |
getContainerStartTime()
The timestamp when the container start request is received.
|
ContainerState |
getContainerState() |
org.apache.hadoop.yarn.security.ContainerTokenIdentifier |
getContainerTokenIdentifier() |
org.apache.hadoop.security.Credentials |
getCredentials() |
String |
getCsiVolumesRootDir() |
org.apache.hadoop.yarn.api.records.ContainerState |
getCurrentState() |
org.apache.hadoop.yarn.api.records.ContainerLaunchContext |
getLaunchContext() |
List<org.apache.hadoop.yarn.api.records.LocalizationStatus> |
getLocalizationStatuses()
Get the localization statuses.
|
Map<org.apache.hadoop.fs.Path,List<String>> |
getLocalizedResources() |
String |
getLogDir() |
org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus |
getNMContainerStatus() |
NMTimelinePublisher |
getNMTimelinePublisher() |
org.apache.hadoop.yarn.api.records.Priority |
getPriority() |
org.apache.hadoop.yarn.api.records.Resource |
getResource() |
ResourceMappings |
getResourceMappings()
Get assigned resource mappings to the container.
|
ResourceSet |
getResourceSet() |
String |
getUser() |
String |
getWorkDir() |
void |
handle(ContainerEvent event) |
boolean |
isContainerInFinalStates()
Verify container is in final states.
|
boolean |
isMarkedForKilling() |
boolean |
isRecovering() |
boolean |
isReInitializing() |
boolean |
isRetryContextSet() |
boolean |
isRunning() |
String |
localizationCountersAsString()
Vector of localization counters to be passed from NM to application
container via environment variable
$LOCALIZATION_COUNTERS . |
void |
sendKillEvent(int exitStatus,
String description) |
void |
sendLaunchEvent() |
void |
sendPauseEvent(String description) |
void |
setContainerRuntimeData(Object containerRuntimeData) |
void |
setContainerTokenIdentifier(org.apache.hadoop.yarn.security.ContainerTokenIdentifier token) |
void |
setCsiVolumesRootDir(String volumesRootDir) |
void |
setExposedPorts(String ports) |
void |
setIpAndHost(String[] ipAndHost) |
void |
setIsReInitializing(boolean isReInitializing) |
void |
setLogDir(String logDir) |
void |
setWorkDir(String workDir) |
boolean |
shouldRetry(int errorCode) |
String |
toString() |
public ContainerImpl(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.event.Dispatcher dispatcher, org.apache.hadoop.yarn.api.records.ContainerLaunchContext launchContext, org.apache.hadoop.security.Credentials creds, NodeManagerMetrics metrics, org.apache.hadoop.yarn.security.ContainerTokenIdentifier containerTokenIdentifier, Context context)
public ContainerImpl(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.event.Dispatcher dispatcher, org.apache.hadoop.yarn.api.records.ContainerLaunchContext launchContext, org.apache.hadoop.security.Credentials creds, NodeManagerMetrics metrics, org.apache.hadoop.yarn.security.ContainerTokenIdentifier containerTokenIdentifier, Context context, long startTs)
public ContainerImpl(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.event.Dispatcher dispatcher, org.apache.hadoop.yarn.api.records.ContainerLaunchContext launchContext, org.apache.hadoop.security.Credentials creds, NodeManagerMetrics metrics, org.apache.hadoop.yarn.security.ContainerTokenIdentifier containerTokenIdentifier, Context context, NMStateStoreService.RecoveredContainerState rcs)
public org.apache.hadoop.yarn.api.records.ContainerState getCurrentState()
public NMTimelinePublisher getNMTimelinePublisher()
public Map<org.apache.hadoop.fs.Path,List<String>> getLocalizedResources()
getLocalizedResources
in interface Container
public org.apache.hadoop.security.Credentials getCredentials()
getCredentials
in interface Container
public ContainerState getContainerState()
getContainerState
in interface Container
public org.apache.hadoop.yarn.api.records.ContainerLaunchContext getLaunchContext()
getLaunchContext
in interface Container
public org.apache.hadoop.yarn.api.records.ContainerStatus cloneAndGetContainerStatus()
cloneAndGetContainerStatus
in interface Container
public org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus getNMContainerStatus()
getNMContainerStatus
in interface Container
public org.apache.hadoop.yarn.api.records.ContainerId getContainerId()
getContainerId
in interface Container
public long getContainerStartTime()
Container
getContainerStartTime
in interface Container
public long getContainerLaunchTime()
Container
getContainerLaunchTime
in interface Container
public org.apache.hadoop.yarn.api.records.Resource getResource()
getResource
in interface Container
public org.apache.hadoop.yarn.security.ContainerTokenIdentifier getContainerTokenIdentifier()
getContainerTokenIdentifier
in interface Container
public void setContainerTokenIdentifier(org.apache.hadoop.yarn.security.ContainerTokenIdentifier token)
setContainerTokenIdentifier
in interface Container
public String getWorkDir()
getWorkDir
in interface Container
public void setWorkDir(String workDir)
setWorkDir
in interface Container
public String getCsiVolumesRootDir()
getCsiVolumesRootDir
in interface Container
public void setCsiVolumesRootDir(String volumesRootDir)
setCsiVolumesRootDir
in interface Container
public void setIpAndHost(String[] ipAndHost)
setIpAndHost
in interface Container
public ResourceSet getResourceSet()
getResourceSet
in interface Container
public void sendLaunchEvent()
sendLaunchEvent
in interface Container
public void sendKillEvent(int exitStatus, String description)
sendKillEvent
in interface Container
public void sendPauseEvent(String description)
sendPauseEvent
in interface Container
public void cleanup()
public boolean isRetryContextSet()
isRetryContextSet
in interface Container
public boolean shouldRetry(int errorCode)
shouldRetry
in interface Container
public void handle(ContainerEvent event)
handle
in interface org.apache.hadoop.yarn.event.EventHandler<ContainerEvent>
public String toString()
public org.apache.hadoop.yarn.api.records.Priority getPriority()
getPriority
in interface Container
public void setIsReInitializing(boolean isReInitializing)
setIsReInitializing
in interface Container
public boolean isReInitializing()
isReInitializing
in interface Container
public boolean isMarkedForKilling()
isMarkedForKilling
in interface Container
public boolean canRollback()
canRollback
in interface Container
public void commitUpgrade()
commitUpgrade
in interface Container
public boolean isRecovering()
isRecovering
in interface Container
public ResourceMappings getResourceMappings()
getResourceMappings
in interface Container
public boolean isContainerInFinalStates()
Container
isContainerInFinalStates
in interface Container
public void setExposedPorts(String ports)
setExposedPorts
in interface Container
public List<org.apache.hadoop.yarn.api.records.LocalizationStatus> getLocalizationStatuses()
Container
getLocalizationStatuses
in interface Container
public void setContainerRuntimeData(Object containerRuntimeData)
setContainerRuntimeData
in interface Container
public <T> T getContainerRuntimeData(Class<T> runtimeClass) throws ContainerExecutionException
getContainerRuntimeData
in interface Container
ContainerExecutionException
public String localizationCountersAsString()
Container
$LOCALIZATION_COUNTERS
. See
ApplicationConstants.Environment.LOCALIZATION_COUNTERS
localizationCountersAsString
in interface Container
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.