public class MRAppMaster extends CompositeService
| Modifier and Type | Class and Description |
|---|---|
class |
MRAppMaster.RunningAppContext |
CompositeService.CompositeServiceShutdownHookService.STATE| Modifier and Type | Field and Description |
|---|---|
protected UserGroupInformation |
currentUser |
static String |
INTERMEDIATE_DATA_ENCRYPTION_ALGO |
protected boolean |
isLastAMRetry |
protected MRAppMetrics |
metrics |
static int |
SHUTDOWN_HOOK_PRIORITY
Priority of the MRAppMaster shutdown hook.
|
protected AtomicBoolean |
successfullyUnregistered |
STOP_ONLY_STARTED_SERVICES| Constructor and Description |
|---|
MRAppMaster(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
org.apache.hadoop.yarn.api.records.ContainerId containerId,
String nmHost,
int nmPort,
int nmHttpPort,
org.apache.hadoop.yarn.util.Clock clock,
long appSubmitTime) |
MRAppMaster(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
org.apache.hadoop.yarn.api.records.ContainerId containerId,
String nmHost,
int nmPort,
int nmHttpPort,
long appSubmitTime) |
addIfService, addService, getServices, removeServiceclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic static final int SHUTDOWN_HOOK_PRIORITY
public static final String INTERMEDIATE_DATA_ENCRYPTION_ALGO
protected final MRAppMetrics metrics
protected UserGroupInformation currentUser
protected volatile boolean isLastAMRetry
protected AtomicBoolean successfullyUnregistered
public MRAppMaster(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId, org.apache.hadoop.yarn.api.records.ContainerId containerId, String nmHost, int nmPort, int nmHttpPort, long appSubmitTime)
public MRAppMaster(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId, org.apache.hadoop.yarn.api.records.ContainerId containerId, String nmHost, int nmPort, int nmHttpPort, org.apache.hadoop.yarn.util.Clock clock, long appSubmitTime)
protected void serviceInit(Configuration conf) throws Exception
serviceInit in class CompositeServiceExceptionprotected org.apache.hadoop.yarn.event.Dispatcher createDispatcher()
protected boolean keepJobFiles(JobConf conf)
protected FileSystem getFileSystem(Configuration conf) throws IOException
conf - the conf objectIOExceptionprotected Credentials getCredentials()
public void cleanupStagingDir()
throws IOException
IOExceptionprotected void sysexit()
public void shutDownJob()
protected org.apache.hadoop.yarn.event.EventHandler<JobFinishEvent> createJobFinishEventHandler()
protected Job createJob(Configuration conf, JobStateInternal forcedState, String diagnostic)
forcedState - a state to force the job into or null for normal operation.diagnostic - a diagnostic message to include with the job.protected void initJobCredentialsAndUGI(Configuration conf)
conf - protected org.apache.hadoop.yarn.event.EventHandler<JobHistoryEvent> createJobHistoryHandler(AppContext context)
protected AbstractService createStagingDirCleaningService()
protected Speculator createSpeculator(Configuration conf, AppContext context)
protected TaskAttemptListener createTaskAttemptListener(AppContext context)
protected org.apache.hadoop.yarn.event.EventHandler<CommitterEvent> createCommitterEventHandler(AppContext context, OutputCommitter committer)
protected ContainerAllocator createContainerAllocator(ClientService clientService, AppContext context)
protected RMHeartbeatHandler getRMHeartbeatHandler()
protected ContainerLauncher createContainerLauncher(AppContext context)
protected ClientService createClientService(AppContext context)
public org.apache.hadoop.yarn.api.records.ApplicationId getAppID()
public org.apache.hadoop.yarn.api.records.ApplicationAttemptId getAttemptID()
public JobId getJobId()
public OutputCommitter getCommitter()
public boolean isNewApiCommitter()
public int getStartCount()
public AppContext getContext()
public org.apache.hadoop.yarn.event.Dispatcher getDispatcher()
public Map<TaskId,org.apache.hadoop.mapreduce.jobhistory.JobHistoryParser.TaskInfo> getCompletedTaskFromPreviousRun()
public ContainerAllocator getContainerAllocator()
public ContainerLauncher getContainerLauncher()
public TaskAttemptListener getTaskAttemptListener()
public Boolean isLastAMRetry()
protected void serviceStart()
throws Exception
serviceStart in class CompositeServiceExceptionpublic void stop()
stop in interface Servicestop in class AbstractServiceprotected void startJobs()
public static void main(String[] args)
public void notifyIsLastAMRetry(boolean isLastAMRetry)
protected static void initAndStartAppMaster(MRAppMaster appMaster, JobConf conf, String jobUserName) throws IOException, InterruptedException
IOExceptionInterruptedExceptionprotected void serviceStop()
throws Exception
serviceStop in class CompositeServiceExceptionpublic ClientService getClientService()
Copyright © 2018 CERN. All Rights Reserved.