ApplicationMasterServiceProcessor (Apache Hadoop YARN API 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.ams, interface: ApplicationMasterServiceProcessor

Package 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

  Modifier and Type
  Method
  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 Details

  - ### 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.