public class YARNRunner extends Object implements org.apache.hadoop.mapreduce.protocol.ClientProtocol
| Modifier and Type | Field and Description | 
|---|---|
| static org.apache.hadoop.yarn.api.records.Priority | AM_CONTAINER_PRIORITY | 
| Constructor and Description | 
|---|
| YARNRunner(org.apache.hadoop.conf.Configuration conf)Yarn runner incapsulates the client interface of
 yarn | 
| YARNRunner(org.apache.hadoop.conf.Configuration conf,
          ResourceMgrDelegate resMgrDelegate)Similar to  YARNRunner(Configuration)but allowing injectingResourceMgrDelegate. | 
| YARNRunner(org.apache.hadoop.conf.Configuration conf,
          ResourceMgrDelegate resMgrDelegate,
          ClientCache clientCache)Similar to  YARNRunner(Configuration, ResourceMgrDelegate)but allowing injectingClientCache. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | cancelDelegationToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> arg0) | 
| void | close() | 
| org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext | createApplicationSubmissionContext(org.apache.hadoop.conf.Configuration jobConf,
                                  String jobSubmitDir,
                                  org.apache.hadoop.security.Credentials ts)Constructs all the necessary information to start the MR AM. | 
| org.apache.hadoop.mapreduce.TaskTrackerInfo[] | getActiveTrackers() | 
| org.apache.hadoop.mapreduce.JobStatus[] | getAllJobs() | 
| org.apache.hadoop.mapreduce.TaskTrackerInfo[] | getBlacklistedTrackers() | 
| org.apache.hadoop.mapreduce.QueueInfo[] | getChildQueues(String parent) | 
| org.apache.hadoop.mapreduce.ClusterMetrics | getClusterMetrics() | 
| org.apache.hadoop.security.token.Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> | getDelegationToken(org.apache.hadoop.io.Text renewer) | 
| String | getFilesystemName() | 
| org.apache.hadoop.mapreduce.Counters | getJobCounters(org.apache.hadoop.mapreduce.JobID arg0) | 
| String | getJobHistoryDir() | 
| org.apache.hadoop.mapreduce.JobStatus | getJobStatus(org.apache.hadoop.mapreduce.JobID jobID) | 
| org.apache.hadoop.mapreduce.Cluster.JobTrackerStatus | getJobTrackerStatus() | 
| org.apache.hadoop.mapreduce.v2.LogParams | getLogFileParams(org.apache.hadoop.mapreduce.JobID jobID,
                org.apache.hadoop.mapreduce.TaskAttemptID taskAttemptID) | 
| org.apache.hadoop.mapreduce.JobID | getNewJobID() | 
| org.apache.hadoop.ipc.ProtocolSignature | getProtocolSignature(String protocol,
                    long clientVersion,
                    int clientMethodsHash) | 
| long | getProtocolVersion(String arg0,
                  long arg1) | 
| org.apache.hadoop.mapreduce.QueueInfo | getQueue(String queueName) | 
| org.apache.hadoop.mapreduce.QueueAclsInfo[] | getQueueAclsForCurrentUser() | 
| org.apache.hadoop.security.authorize.AccessControlList | getQueueAdmins(String arg0) | 
| org.apache.hadoop.mapreduce.QueueInfo[] | getQueues() | 
| org.apache.hadoop.mapreduce.QueueInfo[] | getRootQueues() | 
| String | getStagingAreaDir() | 
| String | getSystemDir() | 
| org.apache.hadoop.mapreduce.TaskCompletionEvent[] | getTaskCompletionEvents(org.apache.hadoop.mapreduce.JobID arg0,
                       int arg1,
                       int arg2) | 
| String[] | getTaskDiagnostics(org.apache.hadoop.mapreduce.TaskAttemptID arg0) | 
| org.apache.hadoop.mapreduce.TaskReport[] | getTaskReports(org.apache.hadoop.mapreduce.JobID jobID,
              org.apache.hadoop.mapreduce.TaskType taskType) | 
| long | getTaskTrackerExpiryInterval() | 
| void | killJob(org.apache.hadoop.mapreduce.JobID arg0) | 
| boolean | killTask(org.apache.hadoop.mapreduce.TaskAttemptID arg0,
        boolean arg1) | 
| long | renewDelegationToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> arg0) | 
| void | setJobPriority(org.apache.hadoop.mapreduce.JobID arg0,
              String arg1) | 
| void | setResourceMgrDelegate(ResourceMgrDelegate resMgrDelegate) | 
| org.apache.hadoop.mapreduce.JobStatus | submitJob(org.apache.hadoop.mapreduce.JobID jobId,
         String jobSubmitDir,
         org.apache.hadoop.security.Credentials ts) | 
public static final org.apache.hadoop.yarn.api.records.Priority AM_CONTAINER_PRIORITY
public YARNRunner(org.apache.hadoop.conf.Configuration conf)
conf - the configuration object for the clientpublic YARNRunner(org.apache.hadoop.conf.Configuration conf,
                  ResourceMgrDelegate resMgrDelegate)
YARNRunner(Configuration) but allowing injecting
 ResourceMgrDelegate. Enables mocking and testing.conf - the configuration object for the clientresMgrDelegate - the resourcemanager client handle.public YARNRunner(org.apache.hadoop.conf.Configuration conf,
                  ResourceMgrDelegate resMgrDelegate,
                  ClientCache clientCache)
YARNRunner(Configuration, ResourceMgrDelegate)
 but allowing injecting ClientCache. Enable mocking and testing.conf - the configuration objectresMgrDelegate - the resource manager delegateclientCache - the client cache object.@InterfaceAudience.Private public void setResourceMgrDelegate(ResourceMgrDelegate resMgrDelegate)
public void cancelDelegationToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> arg0)
                           throws IOException,
                                  InterruptedException
cancelDelegationToken in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.TaskTrackerInfo[] getActiveTrackers()
                                                                throws IOException,
                                                                       InterruptedException
getActiveTrackers in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.JobStatus[] getAllJobs()
                                                   throws IOException,
                                                          InterruptedException
getAllJobs in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.TaskTrackerInfo[] getBlacklistedTrackers()
                                                                     throws IOException,
                                                                            InterruptedException
getBlacklistedTrackers in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.ClusterMetrics getClusterMetrics()
                                                             throws IOException,
                                                                    InterruptedException
getClusterMetrics in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.security.token.Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> getDelegationToken(org.apache.hadoop.io.Text renewer)
                                                                                                                                           throws IOException,
                                                                                                                                                  InterruptedException
getDelegationToken in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic String getFilesystemName() throws IOException, InterruptedException
getFilesystemName in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.JobID getNewJobID()
                                              throws IOException,
                                                     InterruptedException
getNewJobID in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.QueueInfo getQueue(String queueName) throws IOException, InterruptedException
getQueue in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.QueueAclsInfo[] getQueueAclsForCurrentUser()
                                                                       throws IOException,
                                                                              InterruptedException
getQueueAclsForCurrentUser in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.QueueInfo[] getQueues()
                                                  throws IOException,
                                                         InterruptedException
getQueues in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.QueueInfo[] getRootQueues()
                                                      throws IOException,
                                                             InterruptedException
getRootQueues in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.QueueInfo[] getChildQueues(String parent) throws IOException, InterruptedException
getChildQueues in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic String getStagingAreaDir() throws IOException, InterruptedException
getStagingAreaDir in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic String getSystemDir() throws IOException, InterruptedException
getSystemDir in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic long getTaskTrackerExpiryInterval()
                                  throws IOException,
                                         InterruptedException
getTaskTrackerExpiryInterval in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.JobStatus submitJob(org.apache.hadoop.mapreduce.JobID jobId,
                                                       String jobSubmitDir,
                                                       org.apache.hadoop.security.Credentials ts)
                                                throws IOException,
                                                       InterruptedException
submitJob in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext createApplicationSubmissionContext(org.apache.hadoop.conf.Configuration jobConf,
                                                                                                          String jobSubmitDir,
                                                                                                          org.apache.hadoop.security.Credentials ts)
                                                                                                   throws IOException
jobConf - the configuration for the MR jobjobSubmitDir - the directory path for the jobts - the security credentials for the jobIOException - on IO error (e.g. path resolution)public void setJobPriority(org.apache.hadoop.mapreduce.JobID arg0,
                           String arg1)
                    throws IOException,
                           InterruptedException
setJobPriority in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic long getProtocolVersion(String arg0, long arg1) throws IOException
getProtocolVersion in interface org.apache.hadoop.ipc.VersionedProtocolIOExceptionpublic long renewDelegationToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> arg0)
                          throws IOException,
                                 InterruptedException
renewDelegationToken in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.Counters getJobCounters(org.apache.hadoop.mapreduce.JobID arg0)
                                                    throws IOException,
                                                           InterruptedException
getJobCounters in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic String getJobHistoryDir() throws IOException, InterruptedException
getJobHistoryDir in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.JobStatus getJobStatus(org.apache.hadoop.mapreduce.JobID jobID)
                                                   throws IOException,
                                                          InterruptedException
getJobStatus in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.TaskCompletionEvent[] getTaskCompletionEvents(org.apache.hadoop.mapreduce.JobID arg0,
                                                                                 int arg1,
                                                                                 int arg2)
                                                                          throws IOException,
                                                                                 InterruptedException
getTaskCompletionEvents in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic String[] getTaskDiagnostics(org.apache.hadoop.mapreduce.TaskAttemptID arg0) throws IOException, InterruptedException
getTaskDiagnostics in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.TaskReport[] getTaskReports(org.apache.hadoop.mapreduce.JobID jobID,
                                                               org.apache.hadoop.mapreduce.TaskType taskType)
                                                        throws IOException,
                                                               InterruptedException
getTaskReports in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic void killJob(org.apache.hadoop.mapreduce.JobID arg0)
             throws IOException,
                    InterruptedException
killJob in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic boolean killTask(org.apache.hadoop.mapreduce.TaskAttemptID arg0,
                        boolean arg1)
                 throws IOException,
                        InterruptedException
killTask in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.security.authorize.AccessControlList getQueueAdmins(String arg0) throws IOException
getQueueAdmins in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionpublic org.apache.hadoop.mapreduce.Cluster.JobTrackerStatus getJobTrackerStatus()
                                                                         throws IOException,
                                                                                InterruptedException
getJobTrackerStatus in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionInterruptedExceptionpublic org.apache.hadoop.ipc.ProtocolSignature getProtocolSignature(String protocol, long clientVersion, int clientMethodsHash) throws IOException
getProtocolSignature in interface org.apache.hadoop.ipc.VersionedProtocolIOExceptionpublic org.apache.hadoop.mapreduce.v2.LogParams getLogFileParams(org.apache.hadoop.mapreduce.JobID jobID,
                                                                 org.apache.hadoop.mapreduce.TaskAttemptID taskAttemptID)
                                                          throws IOException
getLogFileParams in interface org.apache.hadoop.mapreduce.protocol.ClientProtocolIOExceptionpublic void close()
           throws IOException
IOExceptionCopyright © 2008–2023 Apache Software Foundation. All rights reserved.