org.apache.hadoop.yarn.server.api

## Class ContainerContext

- java.lang.Object
- - org.apache.hadoop.yarn.server.api.ContainerContext

- Direct Known Subclasses:
    ContainerInitializationContext, ContainerTerminationContext

      @InterfaceAudience.Public
       @InterfaceStability.Evolving
      public class ContainerContext
      extends Object

  Base context class for `AuxiliaryService` initializing and stopping a container.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ContainerContext(String user, ContainerId containerId, Resource resource)`
    `ContainerContext(String user, ContainerId containerId, Resource resource, ContainerType containerType)`
    `ContainerContext(String user, ContainerId containerId, Resource resource, ContainerType containerType, ExecutionType executionType)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ContainerId` | `getContainerId()` Get `ContainerId` of the container being initialized or stopped.
    `ContainerType` | `getContainerType()` Get `ContainerType` the type of the container being initialized or stopped.
    `ExecutionType` | `getExecutionType()` Get `ExecutionType` the execution type of the container being initialized or stopped.
    `Resource` | `getResource()` Get `Resource` the resource capability allocated to the container being initialized or stopped.
    `String` | `getUser()` Get user of the container being initialized or stopped.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ContainerContext

          @InterfaceAudience.Private
           @InterfaceStability.Unstable
          public ContainerContext(String user,
                                                                                           ContainerId containerId,
                                                                                           Resource resource)

    - #### ContainerContext

          @InterfaceAudience.Private
           @InterfaceStability.Unstable
          public ContainerContext(String user,
                                                                                           ContainerId containerId,
                                                                                           Resource resource,
                                                                                           ContainerType containerType)

    - #### ContainerContext

          @InterfaceAudience.Private
           @InterfaceStability.Unstable
          public ContainerContext(String user,
                                                                                           ContainerId containerId,
                                                                                           Resource resource,
                                                                                           ContainerType containerType,
                                                                                           ExecutionType executionType)

  - ### Method Detail

    - #### getUser

          public String getUser()

      Get user of the container being initialized or stopped.
      Returns:
        the user

    - #### getContainerId

          public ContainerId getContainerId()

      Get `ContainerId` of the container being initialized or stopped.
      Returns:
        the container ID

    - #### getResource

          public Resource getResource()

      Get `Resource` the resource capability allocated to the container being initialized or stopped.
      Returns:
        the resource capability.

    - #### getContainerType

          public ContainerType getContainerType()

      Get `ContainerType` the type of the container being initialized or stopped.
      Returns:
        the type of the container

    - #### getExecutionType

          public ExecutionType getExecutionType()

      Get `ExecutionType` the execution type of the container being initialized or stopped.
      Returns:
        the execution type of the container

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.