@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
IOException
public Cluster(InetSocketAddress jobTrackAddr, Configuration conf) throws IOException
IOException
public void close() throws IOException
Cluster
.IOException
public 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 org.apache.hadoop.mapreduce.v2.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 Path getSystemDir() throws IOException, InterruptedException
IOException
InterruptedException
public 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 org.apache.hadoop.mapreduce.Cluster.JobTrackerStatus getJobTrackerStatus() throws IOException, InterruptedException
Cluster.JobTrackerStatus
of the JobTrackerIOException
InterruptedException
public long getTaskTrackerExpiryInterval() throws IOException, InterruptedException
IOException
InterruptedException
public Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> getDelegationToken(Text renewer) throws IOException, InterruptedException
renewer
- the user who can renew the tokenIOException
InterruptedException
public 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.InvalidToken
IOException
InterruptedException
public 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 cancelIOException
InterruptedException
Copyright © 2024 Apache Software Foundation. All rights reserved.