org.apache.ignite.yarn

## Class ApplicationMaster

- java.lang.Object
- - org.apache.ignite.yarn.ApplicationMaster

- All Implemented Interfaces:
    org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler

      public class ApplicationMaster
      extends Object
      implements org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler

  Application master request containers from Yarn and decides how many resources will be occupied.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_PORT` Default port range.
    `static String` | `DELIM` Delimiter char.
    `static Logger` | `log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ApplicationMaster(String ignitePath, ClusterProperties props)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<org.apache.hadoop.yarn.api.records.ContainerId,IgniteContainer>` | `getContainers()` Deprecated.
    `float` | `getProgress()`
    `void` | `init()`
    `static void` | `main(String[] args)`
    `void` | `onContainersAllocated(List<org.apache.hadoop.yarn.api.records.Container> conts)`
    `void` | `onContainersCompleted(List<org.apache.hadoop.yarn.api.records.ContainerStatus> statuses)`
    `void` | `onError(Throwable t)`
    `void` | `onNodesUpdated(List<org.apache.hadoop.yarn.api.records.NodeReport> updated)`
    `void` | `onShutdownRequest()`
    `void` | `run()` Runs application master.
    `void` | `setFs(org.apache.hadoop.fs.FileSystem fs)` Sets file system.
    `void` | `setNmClient(org.apache.hadoop.yarn.client.api.NMClient nmClient)` Sets NMClient.
    `void` | `setRmClient(org.apache.hadoop.yarn.client.api.async.AMRMClientAsync<org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest> rmClient)` Sets RMClient
    `void` | `setSchedulerTimeout(long schedulerTimeout)` Sets scheduler timeout.

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

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

- - ### Field Detail

    - #### log

          public static final Logger log

    - #### DEFAULT_PORT

          public static final String DEFAULT_PORT

      Default port range.
      See Also:
        Constant Field Values

    - #### DELIM

          public static final String DELIM

      Delimiter char.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ApplicationMaster

          public ApplicationMaster(String ignitePath,
                                   ClusterProperties props)
                            throws Exception

      Parameters:
        `ignitePath` - Hdfs path to ignite.
        `props` - Cluster properties.
      Throws:
        `Exception`

  - ### Method Detail

    - #### onContainersAllocated

          public void onContainersAllocated(List<org.apache.hadoop.yarn.api.records.Container> conts)

      Specified by:
        `onContainersAllocated` in interface `org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler`

    - #### onContainersCompleted

          public void onContainersCompleted(List<org.apache.hadoop.yarn.api.records.ContainerStatus> statuses)

      Specified by:
        `onContainersCompleted` in interface `org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler`

    - #### onNodesUpdated

          public void onNodesUpdated(List<org.apache.hadoop.yarn.api.records.NodeReport> updated)

      Specified by:
        `onNodesUpdated` in interface `org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler`

    - #### onShutdownRequest

          public void onShutdownRequest()

      Specified by:
        `onShutdownRequest` in interface `org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler`

    - #### onError

          public void onError(Throwable t)

      Specified by:
        `onError` in interface `org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler`

    - #### getProgress

          public float getProgress()

      Specified by:
        `getProgress` in interface `org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler`

    - #### main

          public static void main(String[] args)
                           throws Exception

      Parameters:
        `args` - Args.
      Throws:
        `Exception` - If failed.

    - #### run

          public void run()
                   throws Exception

      Runs application master.
      Throws:
        `Exception` - If failed.

    - #### init

          public void init()
                    throws IOException

      Throws:
        `IOException`

    - #### setNmClient

          public void setNmClient(org.apache.hadoop.yarn.client.api.NMClient nmClient)

      Sets NMClient.
      Parameters:
        `nmClient` - NMClient.

    - #### setRmClient

          public void setRmClient(org.apache.hadoop.yarn.client.api.async.AMRMClientAsync<org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest> rmClient)

      Sets RMClient
      Parameters:
        `rmClient` - AMRMClientAsync.

    - #### setSchedulerTimeout

          public void setSchedulerTimeout(long schedulerTimeout)

      Sets scheduler timeout.
      Parameters:
        `schedulerTimeout` - Scheduler timeout.

    - #### setFs

          public void setFs(org.apache.hadoop.fs.FileSystem fs)

      Sets file system.
      Parameters:
        `fs` - File system.

    - #### getContainers

          @Deprecated
          public Map<org.apache.hadoop.yarn.api.records.ContainerId,IgniteContainer> getContainers()

      Deprecated.
      JUST FOR TESTING!!!
      Returns:
        Running containers.

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021