@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
IOException
public long getProtocolVersion(String protocol, long clientVersion)
VersionedProtocol
getProtocolVersion
in interface VersionedProtocol
protocol
- 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
VersionedProtocol
getProtocolSignature
in interface VersionedProtocol
protocol
- The classname of the protocol interfaceclientVersion
- The version of the protocol that the client speaksclientMethodsHash
- the hashcode of client protocol methodsIOException
for a default implementation
public JobID getNewJobID()
ClientProtocol
getNewJobID
in interface ClientProtocol
public JobStatus submitJob(JobID jobid, String jobSubmitDir, Credentials credentials) throws IOException
ClientProtocol
submitJob
in interface ClientProtocol
IOException
public void killJob(JobID id)
ClientProtocol
killJob
in interface ClientProtocol
public void setJobPriority(JobID id, String jp) throws IOException
ClientProtocol
setJobPriority
in interface ClientProtocol
id
- ID of the jobjp
- Priority to be set for the jobIOException
public boolean killTask(TaskAttemptID taskId, boolean shouldFail) throws IOException
killTask
in interface ClientProtocol
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 TaskReport[] getTaskReports(JobID id, TaskType type)
ClientProtocol
getTaskReports
in interface ClientProtocol
public JobStatus getJobStatus(JobID id)
ClientProtocol
getJobStatus
in interface ClientProtocol
public Counters getJobCounters(JobID id)
ClientProtocol
getJobCounters
in interface ClientProtocol
public String getFilesystemName() throws IOException
ClientProtocol
getFilesystemName
in interface ClientProtocol
IOException
public ClusterMetrics getClusterMetrics()
ClientProtocol
getClusterMetrics
in interface ClientProtocol
public Cluster.JobTrackerStatus getJobTrackerStatus()
ClientProtocol
getJobTrackerStatus
in interface ClientProtocol
Cluster.JobTrackerStatus
of the JobTrackerpublic long getTaskTrackerExpiryInterval() throws IOException, InterruptedException
getTaskTrackerExpiryInterval
in interface ClientProtocol
IOException
InterruptedException
public TaskTrackerInfo[] getActiveTrackers() throws IOException, InterruptedException
getActiveTrackers
in interface ClientProtocol
IOException
InterruptedException
public TaskTrackerInfo[] getBlacklistedTrackers() throws IOException, InterruptedException
getBlacklistedTrackers
in interface ClientProtocol
IOException
InterruptedException
public TaskCompletionEvent[] getTaskCompletionEvents(JobID jobid, int fromEventId, int maxEvents) throws IOException
ClientProtocol
getTaskCompletionEvents
in interface ClientProtocol
jobid
- job idfromEventId
- event id to start from.maxEvents
- the max number of events we want to look atIOException
public JobStatus[] getAllJobs()
ClientProtocol
getAllJobs
in interface ClientProtocol
public String[] getTaskDiagnostics(TaskAttemptID taskid) throws IOException
getTaskDiagnostics
in interface ClientProtocol
taskid
- the id of the taskIOException
public String getSystemDir()
ClientProtocol
getSystemDir
in interface ClientProtocol
ClientProtocol.getSystemDir()
public AccessControlList getQueueAdmins(String queueName) throws IOException
ClientProtocol
getQueueAdmins
in interface ClientProtocol
IOException
ClientProtocol.getQueueAdmins(String)
public String getStagingAreaDir() throws IOException
ClientProtocol
getStagingAreaDir
in interface ClientProtocol
IOException
ClientProtocol.getStagingAreaDir()
public String getJobHistoryDir()
ClientProtocol
getJobHistoryDir
in interface ClientProtocol
public QueueInfo[] getChildQueues(String queueName) throws IOException
ClientProtocol
getChildQueues
in interface ClientProtocol
IOException
public QueueInfo[] getRootQueues() throws IOException
ClientProtocol
getRootQueues
in interface ClientProtocol
IOException
public QueueInfo[] getQueues() throws IOException
ClientProtocol
getQueues
in interface ClientProtocol
IOException
public QueueInfo getQueue(String queue) throws IOException
ClientProtocol
getQueue
in interface ClientProtocol
queue
- Queue NameIOException
public QueueAclsInfo[] getQueueAclsForCurrentUser() throws IOException
ClientProtocol
getQueueAclsForCurrentUser
in interface ClientProtocol
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
ClientProtocol
cancelDelegationToken
in interface ClientProtocol
token
- the token to cancelIOException
InterruptedException
public Token<DelegationTokenIdentifier> getDelegationToken(Text renewer) throws IOException, InterruptedException
ClientProtocol
getDelegationToken
in interface ClientProtocol
renewer
- the user other than the creator (if any) that can renew the
tokenIOException
InterruptedException
public long renewDelegationToken(Token<DelegationTokenIdentifier> token) throws IOException, InterruptedException
ClientProtocol
renewDelegationToken
in interface ClientProtocol
token
- the token to renewIOException
InterruptedException
public LogParams getLogFileParams(JobID jobID, TaskAttemptID taskAttemptID) throws IOException, InterruptedException
ClientProtocol
getLogFileParams
in interface ClientProtocol
jobID
- the jobId.taskAttemptID
- the taskAttemptId.IOException
InterruptedException
Copyright © 2013 Apache Software Foundation. All rights reserved.