Class DistributedSchedulingAMProtocolPBClientImpl

java.lang.Object
org.apache.hadoop.yarn.server.api.impl.pb.client.DistributedSchedulingAMProtocolPBClientImpl
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.yarn.api.ApplicationMasterProtocol, DistributedSchedulingAMProtocol

public class DistributedSchedulingAMProtocolPBClientImpl extends Object implements DistributedSchedulingAMProtocol, Closeable
Implementation of DistributedSchedulingAMProtocol, used when distributed scheduling is enabled.
  • Constructor Details

    • DistributedSchedulingAMProtocolPBClientImpl

      public DistributedSchedulingAMProtocolPBClientImpl(long clientVersion, InetSocketAddress addr, org.apache.hadoop.conf.Configuration conf) throws IOException
      Throws:
      IOException
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • registerApplicationMasterForDistributedScheduling

      public RegisterDistributedSchedulingAMResponse registerApplicationMasterForDistributedScheduling(org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Description copied from interface: DistributedSchedulingAMProtocol

      Extends the registerApplicationMaster to wrap the response with additional metadata.

      Specified by:
      registerApplicationMasterForDistributedScheduling in interface DistributedSchedulingAMProtocol
      Parameters:
      request - ApplicationMaster registration request
      Returns:
      A RegisterDistributedSchedulingAMResponse that contains a standard AM registration response along with additional information required for distributed scheduling
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - YarnException
      IOException - IOException
    • allocateForDistributedScheduling

      public DistributedSchedulingAllocateResponse allocateForDistributedScheduling(DistributedSchedulingAllocateRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Description copied from interface: DistributedSchedulingAMProtocol

      Extends the allocate to wrap the response with additional metadata.

      Specified by:
      allocateForDistributedScheduling in interface DistributedSchedulingAMProtocol
      Parameters:
      request - ApplicationMaster allocate request
      Returns:
      A DistributedSchedulingAllocateResponse that contains a standard AM allocate response along with additional information required for distributed scheduling
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - YarnException
      IOException - IOException
    • registerApplicationMaster

      public org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse registerApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Specified by:
      registerApplicationMaster in interface org.apache.hadoop.yarn.api.ApplicationMasterProtocol
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • finishApplicationMaster

      public org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterResponse finishApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Specified by:
      finishApplicationMaster in interface org.apache.hadoop.yarn.api.ApplicationMasterProtocol
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • allocate

      public org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse allocate(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Specified by:
      allocate in interface org.apache.hadoop.yarn.api.ApplicationMasterProtocol
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException