public class LocalJobRunner extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
LOCAL_MAX_MAPS |
static org.apache.commons.logging.Log |
LOG |
static long |
versionID |
| Constructor and Description |
|---|
LocalJobRunner(JobConf conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelDelegationToken(org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> token)
Cancel a delegation token.
|
JobStatus[] |
getAllJobs()
Get all the jobs submitted.
|
TaskReport[] |
getCleanupTaskReports(JobID id)
Grab a bunch of info on the cleanup tasks that make up the job
|
ClusterStatus |
getClusterStatus(boolean detailed)
Get the current status of the cluster
|
org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> |
getDelegationToken(org.apache.hadoop.io.Text renewer)
Get a new delegation token.
|
String |
getFilesystemName()
A MapReduce system always operates on a single filesystem.
|
Counters |
getJobCounters(JobID id)
Grab the current job counters
|
JobProfile |
getJobProfile(JobID id)
Grab a handle to a job that is already known to the JobTracker.
|
JobStatus[] |
getJobsFromQueue(String queue)
Gets all the jobs submitted to the particular Queue
|
JobStatus |
getJobStatus(JobID id)
Grab a handle to a job that is already known to the JobTracker.
|
static int |
getLocalMaxRunningMaps(JobContext job) |
TaskReport[] |
getMapTaskReports(JobID id)
Grab a bunch of info on the map tasks that make up the job
|
JobID |
getNewJobId()
Allocate a name for the job.
|
org.apache.hadoop.ipc.ProtocolSignature |
getProtocolSignature(String protocol,
long clientVersion,
int clientMethodsHash) |
long |
getProtocolVersion(String protocol,
long clientVersion) |
org.apache.hadoop.mapred.QueueAclsInfo[] |
getQueueAclsForCurrentUser()
Gets the Queue ACLs for current user
|
org.apache.hadoop.security.authorize.AccessControlList |
getQueueAdmins(String queueName)
Get the administrators of the given job-queue.
|
JobQueueInfo |
getQueueInfo(String queue)
Gets scheduling information associated with the particular Job queue
|
JobQueueInfo[] |
getQueues()
Gets set of Job Queues associated with the Job Tracker
|
TaskReport[] |
getReduceTaskReports(JobID id)
Grab a bunch of info on the reduce tasks that make up the job
|
TaskReport[] |
getSetupTaskReports(JobID id)
Grab a bunch of info on the setup tasks that make up the job
|
String |
getStagingAreaDir()
Get a hint from the JobTracker
where job-specific files are to be placed.
|
String |
getSystemDir()
Grab the jobtracker system directory path where job-specific files are to be placed.
|
TaskCompletionEvent[] |
getTaskCompletionEvents(JobID jobid,
int fromEventId,
int maxEvents)
Get task completion events for the jobid, starting from fromEventId.
|
String[] |
getTaskDiagnostics(TaskAttemptID taskid)
Returns the diagnostic information for a particular task in the given job.
|
JobStatus[] |
jobsToComplete()
Get the jobs that are not completed and not failed
|
void |
killJob(JobID id)
Kill the indicated job
|
boolean |
killTask(TaskAttemptID taskId,
boolean shouldFail)
|
long |
renewDelegationToken(org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> token)
Renew an existing delegation token
|
void |
setJobPriority(JobID id,
String jp)
Set the priority of the specified job
|
static void |
setLocalMaxRunningMaps(JobContext job,
int maxMaps)
Set the max number of map tasks to run concurrently in the LocalJobRunner.
|
JobStatus |
submitJob(JobID jobid,
String jobSubmitDir,
org.apache.hadoop.security.Credentials credentials)
Submit a Job for execution.
|
public static final org.apache.commons.logging.Log LOG
public static final String LOCAL_MAX_MAPS
public static final long versionID
public LocalJobRunner(JobConf conf) throws IOException
IOExceptionpublic long getProtocolVersion(String protocol, long clientVersion)
public org.apache.hadoop.ipc.ProtocolSignature getProtocolSignature(String protocol, long clientVersion, int clientMethodsHash) throws IOException
IOExceptionpublic JobID getNewJobId()
public JobStatus submitJob(JobID jobid, String jobSubmitDir, org.apache.hadoop.security.Credentials credentials) throws IOException
IOExceptionpublic void killJob(JobID id)
public void setJobPriority(JobID id, String jp) throws IOException
id - ID of the jobjp - Priority to be set for the jobIOExceptionpublic boolean killTask(TaskAttemptID taskId, boolean shouldFail) throws IOException
taskId - the id of the task to kill.shouldFail - if true the task is failed and added to failed tasks list, otherwise
it is just killed, w/o affecting job failure status.IOExceptionpublic JobProfile getJobProfile(JobID id)
public TaskReport[] getMapTaskReports(JobID id)
public TaskReport[] getReduceTaskReports(JobID id)
public TaskReport[] getCleanupTaskReports(JobID id)
public TaskReport[] getSetupTaskReports(JobID id)
public JobStatus getJobStatus(JobID id)
public String getFilesystemName() throws IOException
IOExceptionpublic ClusterStatus getClusterStatus(boolean detailed)
detailed - if true then report tracker names and memory usagepublic JobStatus[] jobsToComplete()
public TaskCompletionEvent[] getTaskCompletionEvents(JobID jobid, int fromEventId, int maxEvents) throws IOException
jobid - job idfromEventId - event id to start from.maxEvents - the max number of events we want to look atIOExceptionpublic JobStatus[] getAllJobs()
public String[] getTaskDiagnostics(TaskAttemptID taskid) throws IOException
taskid - the id of the taskIOExceptionpublic String getSystemDir()
JobSubmissionProtocol.getSystemDir()public org.apache.hadoop.security.authorize.AccessControlList getQueueAdmins(String queueName) throws IOException
IOExceptionorg.apache.hadoop.mapred.JobSubmissionProtocol#getQueueAdmins()public String getStagingAreaDir() throws IOException
IOExceptionJobSubmissionProtocol.getStagingAreaDir()public JobStatus[] getJobsFromQueue(String queue) throws IOException
queue - Queue nameIOExceptionpublic JobQueueInfo[] getQueues() throws IOException
IOExceptionpublic JobQueueInfo getQueueInfo(String queue) throws IOException
queue - Queue NameIOExceptionpublic org.apache.hadoop.mapred.QueueAclsInfo[] getQueueAclsForCurrentUser()
throws IOException
IOExceptionpublic static void setLocalMaxRunningMaps(JobContext job, int maxMaps)
job - the job to configuremaxMaps - the maximum number of map tasks to allow.public static int getLocalMaxRunningMaps(JobContext job)
public void cancelDelegationToken(org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> token) throws IOException, InterruptedException
token - the token to cancelIOExceptionInterruptedExceptionpublic org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> getDelegationToken(org.apache.hadoop.io.Text renewer) throws IOException, InterruptedException
renewer - the user other than the creator (if any) that can renew the
tokenIOExceptionInterruptedExceptionpublic long renewDelegationToken(org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> token) throws IOException, InterruptedException
token - the token to renewIOExceptionInterruptedExceptionCopyright © 2009 The Apache Software Foundation