@InterfaceAudience.Private @InterfaceStability.Unstable public class LocalJobRunner extends Object implements ClientProtocol
| Modifier and Type | Field and Description |
|---|---|
static String |
LOCAL_MAX_MAPS
The maximum number of map tasks to run in parallel in LocalJobRunner
|
static org.apache.commons.logging.Log |
LOG |
versionID| Constructor and Description |
|---|
LocalJobRunner(Configuration conf) |
LocalJobRunner(JobConf conf)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelDelegationToken(Token<DelegationTokenIdentifier> token)
Cancel a delegation token.
|
TaskTrackerInfo[] |
getActiveTrackers()
Get all active trackers in cluster.
|
JobStatus[] |
getAllJobs()
Get all the jobs submitted.
|
TaskTrackerInfo[] |
getBlacklistedTrackers()
Get all blacklisted trackers in cluster.
|
QueueInfo[] |
getChildQueues(String queueName)
Returns immediate children of queueName.
|
ClusterMetrics |
getClusterMetrics()
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
|
String |
getJobHistoryDir()
Gets the directory location of the completed job history files.
|
JobStatus |
getJobStatus(JobID id)
Grab a handle to a job that is already known to the JobTracker.
|
Cluster.JobTrackerStatus |
getJobTrackerStatus()
Get the JobTracker's status.
|
static int |
getLocalMaxRunningMaps(JobContext job) |
LogParams |
getLogFileParams(JobID jobID,
TaskAttemptID taskAttemptID)
Gets the location of the log file for a job if no taskAttemptId is
specified, otherwise gets the log location for the taskAttemptId.
|
JobID |
getNewJobID()
Allocate a name for the job.
|
ProtocolSignature |
getProtocolSignature(String protocol,
long clientVersion,
int clientMethodsHash)
Return protocol version corresponding to protocol interface.
|
long |
getProtocolVersion(String protocol,
long clientVersion)
Return protocol version corresponding to protocol interface.
|
QueueInfo |
getQueue(String queue)
Gets scheduling information associated with the particular Job queue
|
QueueAclsInfo[] |
getQueueAclsForCurrentUser()
Gets the Queue ACLs for current user
|
AccessControlList |
getQueueAdmins(String queueName)
Get the administrators of the given job-queue.
|
QueueInfo[] |
getQueues()
Gets set of Queues associated with the Job Tracker
|
QueueInfo[] |
getRootQueues()
Gets the root level queues.
|
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.
|
TaskReport[] |
getTaskReports(JobID id,
TaskType type)
Grab a bunch of info on the tasks that make up the job
|
long |
getTaskTrackerExpiryInterval() |
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 String LOCAL_MAX_MAPS
public LocalJobRunner(Configuration conf) throws IOException
IOException@Deprecated public LocalJobRunner(JobConf conf) throws IOException
IOExceptionpublic long getProtocolVersion(String protocol, long clientVersion)
VersionedProtocolgetProtocolVersion in interface VersionedProtocolprotocol - The classname of the protocol interfaceclientVersion - The version of the protocol that the client speakspublic ProtocolSignature getProtocolSignature(String protocol, long clientVersion, int clientMethodsHash) throws IOException
VersionedProtocolgetProtocolSignature in interface VersionedProtocolprotocol - The classname of the protocol interfaceclientVersion - The version of the protocol that the client speaksclientMethodsHash - the hashcode of client protocol methodsIOExceptionfor a default implementationpublic JobID getNewJobID()
ClientProtocolgetNewJobID in interface ClientProtocolpublic JobStatus submitJob(JobID jobid, String jobSubmitDir, Credentials credentials) throws IOException
ClientProtocolsubmitJob in interface ClientProtocolIOExceptionpublic void killJob(JobID id)
ClientProtocolkillJob in interface ClientProtocolpublic void setJobPriority(JobID id, String jp) throws IOException
ClientProtocolsetJobPriority in interface ClientProtocolid - ID of the jobjp - Priority to be set for the jobIOExceptionpublic boolean killTask(TaskAttemptID taskId, boolean shouldFail) throws IOException
killTask in interface ClientProtocoltaskId - 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 TaskReport[] getTaskReports(JobID id, TaskType type)
ClientProtocolgetTaskReports in interface ClientProtocolpublic JobStatus getJobStatus(JobID id)
ClientProtocolgetJobStatus in interface ClientProtocolpublic Counters getJobCounters(JobID id)
ClientProtocolgetJobCounters in interface ClientProtocolpublic String getFilesystemName() throws IOException
ClientProtocolgetFilesystemName in interface ClientProtocolIOExceptionpublic ClusterMetrics getClusterMetrics()
ClientProtocolgetClusterMetrics in interface ClientProtocolpublic Cluster.JobTrackerStatus getJobTrackerStatus()
ClientProtocolgetJobTrackerStatus in interface ClientProtocolCluster.JobTrackerStatus of the JobTrackerpublic long getTaskTrackerExpiryInterval()
throws IOException,
InterruptedException
getTaskTrackerExpiryInterval in interface ClientProtocolIOExceptionInterruptedExceptionpublic TaskTrackerInfo[] getActiveTrackers() throws IOException, InterruptedException
getActiveTrackers in interface ClientProtocolIOExceptionInterruptedExceptionpublic TaskTrackerInfo[] getBlacklistedTrackers() throws IOException, InterruptedException
getBlacklistedTrackers in interface ClientProtocolIOExceptionInterruptedExceptionpublic TaskCompletionEvent[] getTaskCompletionEvents(JobID jobid, int fromEventId, int maxEvents) throws IOException
ClientProtocolgetTaskCompletionEvents in interface ClientProtocoljobid - job idfromEventId - event id to start from.maxEvents - the max number of events we want to look atIOExceptionpublic JobStatus[] getAllJobs()
ClientProtocolgetAllJobs in interface ClientProtocolpublic String[] getTaskDiagnostics(TaskAttemptID taskid) throws IOException
getTaskDiagnostics in interface ClientProtocoltaskid - the id of the taskIOExceptionpublic String getSystemDir()
ClientProtocolgetSystemDir in interface ClientProtocolClientProtocol.getSystemDir()public AccessControlList getQueueAdmins(String queueName) throws IOException
ClientProtocolgetQueueAdmins in interface ClientProtocolIOExceptionClientProtocol.getQueueAdmins(String)public String getStagingAreaDir() throws IOException
ClientProtocolgetStagingAreaDir in interface ClientProtocolIOExceptionClientProtocol.getStagingAreaDir()public String getJobHistoryDir()
ClientProtocolgetJobHistoryDir in interface ClientProtocolpublic QueueInfo[] getChildQueues(String queueName) throws IOException
ClientProtocolgetChildQueues in interface ClientProtocolIOExceptionpublic QueueInfo[] getRootQueues() throws IOException
ClientProtocolgetRootQueues in interface ClientProtocolIOExceptionpublic QueueInfo[] getQueues() throws IOException
ClientProtocolgetQueues in interface ClientProtocolIOExceptionpublic QueueInfo getQueue(String queue) throws IOException
ClientProtocolgetQueue in interface ClientProtocolqueue - Queue NameIOExceptionpublic QueueAclsInfo[] getQueueAclsForCurrentUser() throws IOException
ClientProtocolgetQueueAclsForCurrentUser in interface ClientProtocolIOExceptionpublic 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
ClientProtocolcancelDelegationToken in interface ClientProtocoltoken - the token to cancelIOExceptionInterruptedExceptionpublic Token<DelegationTokenIdentifier> getDelegationToken(Text renewer) throws IOException, InterruptedException
ClientProtocolgetDelegationToken in interface ClientProtocolrenewer - the user other than the creator (if any) that can renew the
tokenIOExceptionInterruptedExceptionpublic long renewDelegationToken(Token<DelegationTokenIdentifier> token) throws IOException, InterruptedException
ClientProtocolrenewDelegationToken in interface ClientProtocoltoken - the token to renewIOExceptionInterruptedExceptionpublic LogParams getLogFileParams(JobID jobID, TaskAttemptID taskAttemptID) throws IOException, InterruptedException
ClientProtocolgetLogFileParams in interface ClientProtocoljobID - the jobId.taskAttemptID - the taskAttemptId.IOExceptionInterruptedExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.