|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapred.LocalJobRunner
public class LocalJobRunner
Implements MapReduce locally, in-process, for debugging.
Field Summary | |
---|---|
static String |
LOCAL_MAX_MAPS
|
static org.apache.commons.logging.Log |
LOG
|
static long |
versionID
|
Constructor Summary | |
---|---|
LocalJobRunner(JobConf conf)
|
Method Summary | |
---|---|
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)
Throws UnsupportedOperationException |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log LOG
public static final String LOCAL_MAX_MAPS
public static final long versionID
Constructor Detail |
---|
public LocalJobRunner(JobConf conf) throws IOException
IOException
Method Detail |
---|
public long getProtocolVersion(String protocol, long clientVersion)
VersionedProtocol
protocol
- The classname of the protocol interfaceclientVersion
- The version of the protocol that the client speaks
public 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 job
IOException
public boolean killTask(TaskAttemptID taskId, boolean shouldFail) throws IOException
UnsupportedOperationException
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 Counters getJobCounters(JobID id)
public String getFilesystemName() throws IOException
IOException
public ClusterStatus getClusterStatus(boolean detailed)
detailed
- if true then report tracker names and memory usage
public 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 at
IOException
public JobStatus[] getAllJobs()
public String[] getTaskDiagnostics(TaskAttemptID taskid) throws IOException
taskid
- the id of the task
IOException
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 name
IOException
public JobQueueInfo[] getQueues() throws IOException
IOException
public JobQueueInfo getQueueInfo(String queue) throws IOException
queue
- Queue Name
IOException
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 cancel
IOException
InterruptedException
public Token<DelegationTokenIdentifier> getDelegationToken(Text renewer) throws IOException, InterruptedException
renewer
- the user other than the creator (if any) that can renew the
token
IOException
InterruptedException
public long renewDelegationToken(Token<DelegationTokenIdentifier> token) throws IOException, InterruptedException
token
- the token to renew
IOException
InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |