public class LocalJobRunner extends Object
限定符和类型 | 字段和说明 |
---|---|
static String |
LOCAL_MAX_MAPS |
static org.apache.commons.logging.Log |
LOG |
static long |
versionID |
构造器和说明 |
---|
LocalJobRunner(JobConf conf) |
限定符和类型 | 方法和说明 |
---|---|
void |
cancelDelegationToken(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
|
Token<DelegationTokenIdentifier> |
getDelegationToken(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.
|
long |
getProtocolVersion(String protocol,
long clientVersion)
Return protocol version corresponding to protocol interface.
|
QueueAclsInfo[] |
getQueueAclsForCurrentUser()
Gets the Queue ACLs for current user
|
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(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,
Credentials credentials)
Submit a Job for execution.
|
public static final org.apache.commons.logging.Log LOG
public static final long versionID
public LocalJobRunner(JobConf conf) throws IOException
IOException
public long getProtocolVersion(String protocol, long clientVersion)
VersionedProtocol
protocol
- The classname of the protocol interfaceclientVersion
- The version of the protocol that the client speakspublic JobID getNewJobId()
public JobStatus submitJob(JobID jobid, String jobSubmitDir, Credentials credentials) throws IOException
IOException
public void killJob(JobID id)
public void setJobPriority(JobID id, String jp) throws IOException
id
- ID of the jobjp
- Priority to be set for the jobIOException
public 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.IOException
public 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
IOException
public 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 atIOException
public JobStatus[] getAllJobs()
public String[] getTaskDiagnostics(TaskAttemptID taskid) throws IOException
taskid
- the id of the taskIOException
public String getSystemDir()
JobSubmissionProtocol.getSystemDir()
public AccessControlList getQueueAdmins(String queueName) throws IOException
IOException
org.apache.hadoop.mapred.JobSubmissionProtocol#getQueueAdmins()
public String getStagingAreaDir() throws IOException
IOException
JobSubmissionProtocol.getStagingAreaDir()
public JobStatus[] getJobsFromQueue(String queue) throws IOException
queue
- Queue nameIOException
public JobQueueInfo[] getQueues() throws IOException
IOException
public JobQueueInfo getQueueInfo(String queue) throws IOException
queue
- Queue NameIOException
public QueueAclsInfo[] getQueueAclsForCurrentUser() throws IOException
IOException
public 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(Token<DelegationTokenIdentifier> token) throws IOException, InterruptedException
token
- the token to cancelIOException
InterruptedException
public Token<DelegationTokenIdentifier> getDelegationToken(Text renewer) throws IOException, InterruptedException
renewer
- the user other than the creator (if any) that can renew the
tokenIOException
InterruptedException
public long renewDelegationToken(Token<DelegationTokenIdentifier> token) throws IOException, InterruptedException
token
- the token to renewIOException
InterruptedException
Copyright © 2009 The Apache Software Foundation