org.apache.hadoop.yarn.ams

## Interface ApplicationMasterServiceProcessor

-     public interface ApplicationMasterServiceProcessor

  Interface to abstract out the the actual processing logic of the Application Master Service.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `allocate(ApplicationAttemptId appAttemptId, AllocateRequest request, AllocateResponse response)` Allocate call.
    `void` | `finishApplicationMaster(ApplicationAttemptId applicationAttemptId, FinishApplicationMasterRequest request, FinishApplicationMasterResponse response)` Finish AM.
    `void` | `init(ApplicationMasterServiceContext amsContext, ApplicationMasterServiceProcessor nextProcessor)` Initialize with and ApplicationMasterService Context as well as the next processor in the chain.
    `void` | `registerApplicationMaster(ApplicationAttemptId applicationAttemptId, RegisterApplicationMasterRequest request, RegisterApplicationMasterResponse response)` Register AM attempt.

- - ### Method Detail

    - #### init

          void init(ApplicationMasterServiceContext amsContext,
                    ApplicationMasterServiceProcessor nextProcessor)

      Initialize with and ApplicationMasterService Context as well as the next processor in the chain.
      Parameters:
        `amsContext` - AMSContext.
        `nextProcessor` - next ApplicationMasterServiceProcessor

    - #### registerApplicationMaster

          void registerApplicationMaster(ApplicationAttemptId applicationAttemptId,
                                         RegisterApplicationMasterRequest request,
                                         RegisterApplicationMasterResponse response)
                                  throws IOException,
                                         YarnException

      Register AM attempt.
      Parameters:
        `applicationAttemptId` - applicationAttemptId.
        `request` - Register Request.
        `response` - Register Response.
      Throws:
        `IOException` - IOException.
        `YarnException` - in critical situation where invalid profiles/resources are added.

    - #### allocate

          void allocate(ApplicationAttemptId appAttemptId,
                        AllocateRequest request,
                        AllocateResponse response)
                 throws YarnException

      Allocate call.
      Parameters:
        `appAttemptId` - appAttemptId.
        `request` - Allocate Request.
        `response` - Allocate Response.
      Throws:
        `YarnException` - YarnException.

    - #### finishApplicationMaster

          void finishApplicationMaster(ApplicationAttemptId applicationAttemptId,
                                       FinishApplicationMasterRequest request,
                                       FinishApplicationMasterResponse response)

      Finish AM.
      Parameters:
        `applicationAttemptId` - applicationAttemptId.
        `request` - Finish AM Request.
        `response` - Finish AM Response.

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