MAPREDUCE-2971. ant build mapreduce fails protected access jc.displayJobList (jobs) (Thomas Graves via mahadev) - merging 1167383 from trunk

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1167384 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mahadev Konar 2011-09-09 22:45:41 +00:00
parent c3ea34e936
commit 5bb361cee4
4 changed files with 8 additions and 4 deletions

View File

@ -1248,6 +1248,9 @@ Release 0.23.0 - Unreleased
MAPREDUCE-2975. Fixed YARNRunner to use YarnConfiguration rather than MAPREDUCE-2975. Fixed YARNRunner to use YarnConfiguration rather than
Configuration. (mahadev via acmurthy) Configuration. (mahadev via acmurthy)
MAPREDUCE-2971. ant build mapreduce fails protected access jc.displayJobList
(jobs) (Thomas Graves via mahadev)
Release 0.22.0 - Unreleased Release 0.22.0 - Unreleased

View File

@ -523,7 +523,7 @@ public class CLI extends Configured implements Tool {
} }
} }
protected void displayJobList(JobStatus[] jobs) public void displayJobList(JobStatus[] jobs)
throws IOException, InterruptedException { throws IOException, InterruptedException {
System.out.println("Total jobs:" + jobs.length); System.out.println("Total jobs:" + jobs.length);
System.out.println("JobId\tState\tStartTime\t" + System.out.println("JobId\tState\tStartTime\t" +

View File

@ -248,10 +248,11 @@ public class YARNRunner implements ClientProtocol {
ApplicationReport appMaster = resMgrDelegate ApplicationReport appMaster = resMgrDelegate
.getApplicationReport(applicationId); .getApplicationReport(applicationId);
String diagnostics = (appMaster == null ? "application report is null" : appMaster.getDiagnostics());
if (appMaster == null || appMaster.getState() == ApplicationState.FAILED if (appMaster == null || appMaster.getState() == ApplicationState.FAILED
|| appMaster.getState() == ApplicationState.KILLED) { || appMaster.getState() == ApplicationState.KILLED) {
throw new IOException("Failed to run job : " + throw new IOException("Failed to run job : " +
appMaster.getDiagnostics()); diagnostics);
} }
return clientCache.getClient(jobId).getJobStatus(jobId); return clientCache.getClient(jobId).getJobStatus(jobId);
} }

View File

@ -170,10 +170,10 @@ class JobQueueClient extends Configured implements Tool {
* registered with the {@link QueueManager}. Display of the Jobs is determine * registered with the {@link QueueManager}. Display of the Jobs is determine
* by the boolean * by the boolean
* *
* @throws IOException * @throws IOException, InterruptedException
*/ */
private void displayQueueInfo(String queue, boolean showJobs) private void displayQueueInfo(String queue, boolean showJobs)
throws IOException { throws IOException, InterruptedException {
JobQueueInfo jobQueueInfo = jc.getQueueInfo(queue); JobQueueInfo jobQueueInfo = jc.getQueueInfo(queue);
if (jobQueueInfo == null) { if (jobQueueInfo == null) {