@InterfaceAudience.Public @InterfaceStability.Evolving public class Cluster extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Cluster.JobTrackerStatus |
Constructor and Description |
---|
Cluster(org.apache.hadoop.conf.Configuration conf) |
Cluster(InetSocketAddress jobTrackAddr,
org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
void |
cancelDelegationToken(org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> token)
Deprecated.
Use
Token.cancel(org.apache.hadoop.conf.Configuration) instead |
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.
|
org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> |
getDelegationToken(org.apache.hadoop.io.Text renewer)
Get a delegation token for the user from the JobTracker.
|
org.apache.hadoop.fs.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.
|
Cluster.JobTrackerStatus |
getJobTrackerStatus()
Get the JobTracker's status.
|
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.
|
org.apache.hadoop.fs.Path |
getStagingAreaDir()
Grab the jobtracker's view of the staging directory path where
job-specific files will be placed.
|
org.apache.hadoop.fs.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(org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> token)
Deprecated.
Use
Token.renew(org.apache.hadoop.conf.Configuration) instead |
public Cluster(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public Cluster(InetSocketAddress jobTrackAddr, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public void close() throws IOException
Cluster
.IOException
public org.apache.hadoop.fs.FileSystem getFileSystem() throws IOException, InterruptedException
IOException
InterruptedException
public Job getJob(JobID jobId) throws IOException, InterruptedException
jobId
- Job
IOException
InterruptedException
public QueueInfo[] getQueues() throws IOException, InterruptedException
QueueInfo
IOException
InterruptedException
public QueueInfo getQueue(String name) throws IOException, InterruptedException
name
- queuenameQueueInfo
IOException
InterruptedException
public LogParams getLogParams(JobID jobID, TaskAttemptID taskAttemptID) throws IOException, InterruptedException
jobID
- the job id.taskAttemptID
- the task attempt id. Optional.IOException
InterruptedException
public ClusterMetrics getClusterStatus() throws IOException, InterruptedException
ClusterMetrics
IOException
InterruptedException
public TaskTrackerInfo[] getActiveTaskTrackers() throws IOException, InterruptedException
TaskTrackerInfo
IOException
InterruptedException
public TaskTrackerInfo[] getBlackListedTaskTrackers() throws IOException, InterruptedException
TaskTrackerInfo
IOException
InterruptedException
@Deprecated public Job[] getAllJobs() throws IOException, InterruptedException
getAllJobStatuses()
instead.Job
IOException
InterruptedException
public JobStatus[] getAllJobStatuses() throws IOException, InterruptedException
IOException
InterruptedException
public org.apache.hadoop.fs.Path getSystemDir() throws IOException, InterruptedException
IOException
InterruptedException
public org.apache.hadoop.fs.Path getStagingAreaDir() throws IOException, InterruptedException
IOException
InterruptedException
public String getJobHistoryUrl(JobID jobId) throws IOException, InterruptedException
jobId
- the JobID of the job submitted by the current user.IOException
InterruptedException
public QueueAclsInfo[] getQueueAclsForCurrentUser() throws IOException, InterruptedException
IOException
InterruptedException
public QueueInfo[] getRootQueues() throws IOException, InterruptedException
IOException
InterruptedException
public QueueInfo[] getChildQueues(String queueName) throws IOException, InterruptedException
queueName
- IOException
InterruptedException
public Cluster.JobTrackerStatus getJobTrackerStatus() throws IOException, InterruptedException
Cluster.JobTrackerStatus
of the JobTrackerIOException
InterruptedException
public long getTaskTrackerExpiryInterval() throws IOException, InterruptedException
IOException
InterruptedException
public org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> getDelegationToken(org.apache.hadoop.io.Text renewer) throws IOException, InterruptedException
renewer
- the user who can renew the tokenIOException
InterruptedException
public long renewDelegationToken(org.apache.hadoop.security.token.Token<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.InvalidToken
IOException
InterruptedException
public void cancelDelegationToken(org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> token) throws IOException, InterruptedException
Token.cancel(org.apache.hadoop.conf.Configuration)
insteadtoken
- the token to cancelIOException
InterruptedException
Copyright © 2014 Apache Software Foundation. All Rights Reserved.