org.apache.hadoop.mapreduce.v2.app.rm
Class RMCommunicator

java.lang.Object
  extended by org.apache.hadoop.yarn.service.AbstractService
      extended by org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator
All Implemented Interfaces:
org.apache.hadoop.yarn.service.Service
Direct Known Subclasses:
LocalContainerAllocator, RMContainerRequestor

public abstract class RMCommunicator
extends org.apache.hadoop.yarn.service.AbstractService

Registers/unregisters to RM and sends heartbeats to RM.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.yarn.service.Service
org.apache.hadoop.yarn.service.Service.STATE
 
Field Summary
protected  Thread allocatorThread
           
protected  Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> applicationACLs
           
protected  org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId
           
protected  org.apache.hadoop.yarn.api.records.ApplicationId applicationId
           
protected  org.apache.hadoop.yarn.event.EventHandler eventHandler
           
protected  boolean isSignalled
           
protected  int lastResponseID
           
protected  org.apache.hadoop.yarn.api.AMRMProtocol scheduler
           
 
Constructor Summary
RMCommunicator(ClientService clientService, AppContext context)
           
 
Method Summary
protected  org.apache.hadoop.yarn.api.AMRMProtocol createSchedulerProxy()
           
protected  float getApplicationProgress()
          Get the appProgress.
protected  AppContext getContext()
           
protected  Job getJob()
           
protected  org.apache.hadoop.yarn.api.records.Resource getMaxContainerCapability()
           
protected  org.apache.hadoop.yarn.api.records.Resource getMinContainerCapability()
           
protected abstract  void heartbeat()
           
 void init(org.apache.hadoop.conf.Configuration conf)
           
protected  void register()
           
 void setShouldUnregister(boolean shouldUnregister)
           
 void setSignalled(boolean isSignalled)
           
 void start()
           
protected  void startAllocatorThread()
           
 void stop()
           
protected  void unregister()
           
 
Methods inherited from class org.apache.hadoop.yarn.service.AbstractService
getConfig, getName, getServiceState, getStartTime, register, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

applicationId

protected org.apache.hadoop.yarn.api.records.ApplicationId applicationId

applicationAttemptId

protected org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId

allocatorThread

protected Thread allocatorThread

eventHandler

protected org.apache.hadoop.yarn.event.EventHandler eventHandler

scheduler

protected org.apache.hadoop.yarn.api.AMRMProtocol scheduler

lastResponseID

protected int lastResponseID

applicationACLs

protected Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> applicationACLs

isSignalled

protected volatile boolean isSignalled
Constructor Detail

RMCommunicator

public RMCommunicator(ClientService clientService,
                      AppContext context)
Method Detail

init

public void init(org.apache.hadoop.conf.Configuration conf)
Specified by:
init in interface org.apache.hadoop.yarn.service.Service
Overrides:
init in class org.apache.hadoop.yarn.service.AbstractService

start

public void start()
Specified by:
start in interface org.apache.hadoop.yarn.service.Service
Overrides:
start in class org.apache.hadoop.yarn.service.AbstractService

getContext

protected AppContext getContext()

getJob

protected Job getJob()

getApplicationProgress

protected float getApplicationProgress()
Get the appProgress. Can be used only after this component is started.

Returns:
the appProgress.

register

protected void register()

unregister

protected void unregister()

getMinContainerCapability

protected org.apache.hadoop.yarn.api.records.Resource getMinContainerCapability()

getMaxContainerCapability

protected org.apache.hadoop.yarn.api.records.Resource getMaxContainerCapability()

stop

public void stop()
Specified by:
stop in interface org.apache.hadoop.yarn.service.Service
Overrides:
stop in class org.apache.hadoop.yarn.service.AbstractService

startAllocatorThread

protected void startAllocatorThread()

createSchedulerProxy

protected org.apache.hadoop.yarn.api.AMRMProtocol createSchedulerProxy()

heartbeat

protected abstract void heartbeat()
                           throws Exception
Throws:
Exception

setShouldUnregister

public void setShouldUnregister(boolean shouldUnregister)

setSignalled

public void setSignalled(boolean isSignalled)


Copyright © 2012 Apache Software Foundation. All Rights Reserved.