首页 > 代码库 > 从协议VersionedProtocol开始4——AdminOperationsProtocol、InterTrackerProtocol、JobSubmissionProtocol、TaskUmbilicalProtocol
从协议VersionedProtocol开始4——AdminOperationsProtocol、InterTrackerProtocol、JobSubmissionProtocol、TaskUmbilicalProtocol
1、package org.apache.hadoop.mapred这四个协议都在这个包下。
2、从最简单的AdminOperationsProtocol看,
void refreshQueues() throws IOException;
void refreshNodes() throws IOException;
boolean setSafeMode(JobTracker.SafeModeAction safeModeAction) throws IOException;
3、相对于hdfs里边那几个协议,这几个协议都经常修改,不是很稳定
InterTrackerProtocol
HeartbeatResponse heartbeat(TaskTrackerStatus status,
boolean restarted,
boolean initialContact,
boolean acceptNewTasks,
short responseId)
throws IOException;
public String getFilesystemName() throws IOException;
public void reportTaskTrackerError(String taskTracker,
String errorClass,
String errorMessage) throws IOException;
TaskCompletionEvent[] getTaskCompletionEvents(JobID jobid, int fromEventId
, int maxEvents) throws IOException;
public String getSystemDir();
public String getBuildVersion() throws IOException;
public String getVIVersion() throws IOException;
JobSubmissionProtocol
public JobID getNewJobId() throws IOException;
public JobStatus submitJob(JobID jobName, String jobSubmitDir, Credentials ts)
throws IOException;
public ClusterStatus getClusterStatus(boolean detailed) throws IOException;
public AccessControlList getQueueAdmins(String queueName) throws IOException;
public void killJob(JobID jobid) throws IOException;
public void setJobPriority(JobID jobid, String priority)
throws IOException;
public boolean killTask(TaskAttemptID taskId, boolean shouldFail) throws IOException;
public JobProfile getJobProfile(JobID jobid) throws IOException;
public JobStatus getJobStatus(JobID jobid) throws IOException;
public Counters getJobCounters(JobID jobid) throws IOException;
public TaskReport[] getMapTaskReports(JobID jobid) throws IOException;
public TaskReport[] getReduceTaskReports(JobID jobid) throws IOException;
public TaskReport[] getCleanupTaskReports(JobID jobid) throws IOException;
public TaskReport[] getSetupTaskReports(JobID jobid) throws IOException;
public String getFilesystemName() throws IOException;
public JobStatus[] jobsToComplete() throws IOException;
public JobStatus[] getAllJobs() throws IOException;
public TaskCompletionEvent[] getTaskCompletionEvents(JobID jobid
, int fromEventId, int maxEvents) throws IOException;
public String[] getTaskDiagnostics(TaskAttemptID taskId)
throws IOException;
public String getSystemDir();
public String getStagingAreaDir() throws IOException;
public JobQueueInfo[] getQueues() throws IOException;
public JobQueueInfo getQueueInfo(String queue) throws IOException;
public JobStatus[] getJobsFromQueue(String queue) throws IOException;
public QueueAclsInfo[] getQueueAclsForCurrentUser() throws IOException;
public
Token<DelegationTokenIdentifier> getDelegationToken(Text renewer
) throws IOException,
InterruptedException;
public long renewDelegationToken(Token<DelegationTokenIdentifier> token
) throws IOException,
InterruptedException;
public void cancelDelegationToken(Token<DelegationTokenIdentifier> token
) throws IOException,InterruptedException;
TaskUmbilicalProtocol
JvmTask getTask(JvmContext context) throws IOException;
boolean statusUpdate(TaskAttemptID taskId, TaskStatus taskStatus,
JvmContext jvmContext) throws IOException, InterruptedException;
void reportDiagnosticInfo(TaskAttemptID taskid, String trace,
JvmContext jvmContext) throws IOException;
void reportNextRecordRange(TaskAttemptID taskid, SortedRanges.Range range,
JvmContext jvmContext) throws IOException;
boolean ping(TaskAttemptID taskid, JvmContext jvmContext) throws IOException;
void done(TaskAttemptID taskid, JvmContext jvmContext) throws IOException;
void commitPending(TaskAttemptID taskId, TaskStatus taskStatus,
JvmContext jvmContext) throws IOException, InterruptedException;
boolean canCommit(TaskAttemptID taskid, JvmContext jvmContext) throws IOException;
void shuffleError(TaskAttemptID taskId, String message, JvmContext jvmContext)
throws IOException;
void fsError(TaskAttemptID taskId, String message, JvmContext jvmContext)
throws IOException;
void fatalError(TaskAttemptID taskId, String message, JvmContext jvmContext)
throws IOException;
MapTaskCompletionEventsUpdate getMapCompletionEvents(JobID jobId,
int fromIndex,
int maxLocs,
TaskAttemptID id,
JvmContext jvmContext)
throws IOException;
void updatePrivateDistributedCacheSizes(org.apache.hadoop.mapreduce.JobID jobId,
long[] sizes) throws IOException;
从协议VersionedProtocol开始4——AdminOperationsProtocol、InterTrackerProtocol、JobSubmissionProtocol、TaskUmbilicalProtocol