org.apache.hadoop.mapreduce.v2.app.local
Class LocalContainerAllocator
java.lang.Object
org.apache.hadoop.yarn.service.AbstractService
org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator
org.apache.hadoop.mapreduce.v2.app.local.LocalContainerAllocator
- All Implemented Interfaces:
- ContainerAllocator, RMHeartbeatHandler, org.apache.hadoop.yarn.event.EventHandler<ContainerAllocatorEvent>, org.apache.hadoop.yarn.service.Service
public class LocalContainerAllocator
- extends RMCommunicator
- implements ContainerAllocator
Allocates containers locally. Doesn't allocate a real container;
instead sends an allocated event for all requests.
| Nested classes/interfaces inherited from interface org.apache.hadoop.yarn.service.Service |
org.apache.hadoop.yarn.service.Service.STATE |
| Methods inherited from class org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator |
createSchedulerProxy, getApplicationProgress, getContext, getJob, getLastHeartbeatTime, getMaxContainerCapability, getMinContainerCapability, register, runOnNextHeartbeat, setShouldUnregister, setSignalled, start, startAllocatorThread, stop, 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 |
LocalContainerAllocator
public LocalContainerAllocator(ClientService clientService,
AppContext context,
String nmHost,
int nmPort,
int nmHttpPort,
org.apache.hadoop.yarn.api.records.ContainerId cId)
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 RMCommunicator
heartbeat
protected void heartbeat()
throws Exception
- Specified by:
heartbeat in class RMCommunicator
- Throws:
Exception
handle
public void handle(ContainerAllocatorEvent event)
- Specified by:
handle in interface org.apache.hadoop.yarn.event.EventHandler<ContainerAllocatorEvent>
Copyright © 2013 Apache Software Foundation. All Rights Reserved.