public class LocalContainerAllocator extends RMCommunicator implements ContainerAllocator
ContainerAllocator.EventType
Service.STATE
allocatorThread, applicationACLs, applicationId, isSignalled, lastResponseID, scheduler
Constructor and Description |
---|
LocalContainerAllocator(ClientService clientService,
AppContext context,
String nmHost,
int nmPort,
int nmHttpPort,
ContainerId cId) |
Modifier and Type | Method and Description |
---|---|
void |
handle(ContainerAllocatorEvent event) |
protected void |
heartbeat() |
protected void |
serviceInit(Configuration conf)
All initialization code needed by a service.
|
createSchedulerProxy, doUnregistration, getApplicationProgress, getContext, getJob, getLastHeartbeatTime, getMaxContainerCapability, register, runOnNextHeartbeat, serviceStart, serviceStop, setShouldUnregister, setSignalled, startAllocatorThread, unregister
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
public LocalContainerAllocator(ClientService clientService, AppContext context, String nmHost, int nmPort, int nmHttpPort, ContainerId cId)
protected void serviceInit(Configuration conf) throws Exception
AbstractService
AbstractService.init(Configuration)
prevents re-entrancy.
The base implementation checks to see if the subclass has created
a new configuration instance, and if so, updates the base class valueserviceInit
in class RMCommunicator
conf
- configurationException
- on a failure -these will be caught,
possibly wrapped, and wil; trigger a service stopprotected void heartbeat() throws Exception
heartbeat
in class RMCommunicator
Exception
public void handle(ContainerAllocatorEvent event)
handle
in interface EventHandler<ContainerAllocatorEvent>
Copyright © 2013 Apache Software Foundation. All rights reserved.