@InterfaceAudience.Public @InterfaceStability.Evolving public class Cluster extends Object
| Constructor and Description |
|---|
Cluster(Configuration conf) |
Cluster(InetSocketAddress jobTrackAddr,
Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelDelegationToken(Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> token)
Deprecated.
|
void |
close()
Close the
Cluster. |
TaskTrackerInfo[] |
getActiveTaskTrackers()
Get all active trackers in the cluster.
|
Job[] |
getAllJobs()
Deprecated.
Use
getAllJobStatuses() instead. |
JobStatus[] |
getAllJobStatuses()
Get job status for all jobs in the cluster.
|
TaskTrackerInfo[] |
getBlackListedTaskTrackers()
Get blacklisted trackers.
|
QueueInfo[] |
getChildQueues(String queueName)
Returns immediate children of queueName.
|
ClusterMetrics |
getClusterStatus()
Get current cluster status.
|
Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> |
getDelegationToken(Text renewer)
Get a delegation token for the user from the JobTracker.
|
FileSystem |
getFileSystem()
Get the file system where job-specific files are stored
|
Job |
getJob(JobID jobId)
Get job corresponding to jobid.
|
String |
getJobHistoryUrl(JobID jobId)
Get the job history file path for a given job id.
|
org.apache.hadoop.mapreduce.Cluster.JobTrackerStatus |
getJobTrackerStatus()
Get the JobTracker's status.
|
org.apache.hadoop.mapreduce.v2.LogParams |
getLogParams(JobID jobID,
TaskAttemptID taskAttemptID)
Get log parameters for the specified jobID or taskAttemptID
|
QueueInfo |
getQueue(String name)
Get queue information for the specified name.
|
QueueAclsInfo[] |
getQueueAclsForCurrentUser()
Gets the Queue ACLs for current user
|
QueueInfo[] |
getQueues()
Get all the queues in cluster.
|
QueueInfo[] |
getRootQueues()
Gets the root level queues.
|
Path |
getStagingAreaDir()
Grab the jobtracker's view of the staging directory path where
job-specific files will be placed.
|
Path |
getSystemDir()
Grab the jobtracker system directory path where
job-specific files will be placed.
|
long |
getTaskTrackerExpiryInterval()
Get the tasktracker expiry interval for the cluster
|
long |
renewDelegationToken(Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> token)
Deprecated.
|
public Cluster(Configuration conf) throws IOException
IOExceptionpublic Cluster(InetSocketAddress jobTrackAddr, Configuration conf) throws IOException
IOExceptionpublic void close()
throws IOException
Cluster.IOExceptionpublic FileSystem getFileSystem() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic Job getJob(JobID jobId) throws IOException, InterruptedException
jobId - JobIOExceptionInterruptedExceptionpublic QueueInfo[] getQueues() throws IOException, InterruptedException
QueueInfoIOExceptionInterruptedExceptionpublic QueueInfo getQueue(String name) throws IOException, InterruptedException
name - queuenameQueueInfoIOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.v2.LogParams getLogParams(JobID jobID, TaskAttemptID taskAttemptID) throws IOException, InterruptedException
jobID - the job id.taskAttemptID - the task attempt id. Optional.IOExceptionInterruptedExceptionpublic ClusterMetrics getClusterStatus() throws IOException, InterruptedException
ClusterMetricsIOExceptionInterruptedExceptionpublic TaskTrackerInfo[] getActiveTaskTrackers() throws IOException, InterruptedException
TaskTrackerInfoIOExceptionInterruptedExceptionpublic TaskTrackerInfo[] getBlackListedTaskTrackers() throws IOException, InterruptedException
TaskTrackerInfoIOExceptionInterruptedException@Deprecated public Job[] getAllJobs() throws IOException, InterruptedException
getAllJobStatuses() instead.JobIOExceptionInterruptedExceptionpublic JobStatus[] getAllJobStatuses() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic Path getSystemDir() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic Path getStagingAreaDir() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic String getJobHistoryUrl(JobID jobId) throws IOException, InterruptedException
jobId - the JobID of the job submitted by the current user.IOExceptionInterruptedExceptionpublic QueueAclsInfo[] getQueueAclsForCurrentUser() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic QueueInfo[] getRootQueues() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic QueueInfo[] getChildQueues(String queueName) throws IOException, InterruptedException
queueName - IOExceptionInterruptedExceptionpublic org.apache.hadoop.mapreduce.Cluster.JobTrackerStatus getJobTrackerStatus()
throws IOException,
InterruptedException
Cluster.JobTrackerStatus of the JobTrackerIOExceptionInterruptedExceptionpublic long getTaskTrackerExpiryInterval()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> getDelegationToken(Text renewer) throws IOException, InterruptedException
renewer - the user who can renew the tokenIOExceptionInterruptedExceptionpublic long renewDelegationToken(Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> token) throws org.apache.hadoop.security.token.SecretManager.InvalidToken, IOException, InterruptedException
Token.renew(org.apache.hadoop.conf.Configuration) insteadtoken - the token to reneworg.apache.hadoop.security.token.SecretManager.InvalidTokenIOExceptionInterruptedExceptionpublic void cancelDelegationToken(Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> token) throws IOException, InterruptedException
Token.cancel(org.apache.hadoop.conf.Configuration) insteadtoken - the token to cancelIOExceptionInterruptedExceptionCopyright © 2019 Apache Software Foundation. All rights reserved.