org.apache.hadoop.yarn.server.resourcemanager
Class ApplicationMasterService

java.lang.Object
  extended by org.apache.hadoop.service.AbstractService
      extended by org.apache.hadoop.yarn.server.resourcemanager.ApplicationMasterService
All Implemented Interfaces:
Closeable, org.apache.hadoop.service.Service, org.apache.hadoop.yarn.api.ApplicationMasterProtocol

@InterfaceAudience.Private
public class ApplicationMasterService
extends org.apache.hadoop.service.AbstractService
implements org.apache.hadoop.yarn.api.ApplicationMasterProtocol


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE
 
Constructor Summary
ApplicationMasterService(RMContext rmContext, YarnScheduler scheduler)
           
 
Method Summary
 org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse allocate(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest request)
           
 org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterResponse finishApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterRequest request)
           
 InetSocketAddress getBindAddress()
           
 boolean hasApplicationMasterRegistered(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
           
 void refreshServiceAcls(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.security.authorize.PolicyProvider policyProvider)
           
 void registerAppAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
           
 org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse registerApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest request)
           
protected  void serviceStart()
           
protected  void serviceStop()
           
 void unregisterAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
           
 
Methods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplicationMasterService

public ApplicationMasterService(RMContext rmContext,
                                YarnScheduler scheduler)
Method Detail

serviceStart

protected void serviceStart()
                     throws Exception
Overrides:
serviceStart in class org.apache.hadoop.service.AbstractService
Throws:
Exception

getBindAddress

@InterfaceAudience.Private
public InetSocketAddress getBindAddress()

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

hasApplicationMasterRegistered

public boolean hasApplicationMasterRegistered(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
Parameters:
appAttemptId -
Returns:
true if application is registered for the respective attemptid

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

registerAppAttempt

public void registerAppAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)

unregisterAttempt

public void unregisterAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)

refreshServiceAcls

public void refreshServiceAcls(org.apache.hadoop.conf.Configuration configuration,
                               org.apache.hadoop.security.authorize.PolicyProvider policyProvider)

serviceStop

protected void serviceStop()
                    throws Exception
Overrides:
serviceStop in class org.apache.hadoop.service.AbstractService
Throws:
Exception


Copyright © 2014 Apache Software Foundation. All Rights Reserved.