diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 1f6c6684340..d602ceb0afb 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -1248,6 +1248,9 @@ Release 0.23.0 - Unreleased MAPREDUCE-2975. Fixed YARNRunner to use YarnConfiguration rather than Configuration. (mahadev via acmurthy) + + MAPREDUCE-2971. ant build mapreduce fails protected access jc.displayJobList + (jobs) (Thomas Graves via mahadev) Release 0.22.0 - Unreleased diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/tools/CLI.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/tools/CLI.java index 0ac7053cbac..518bc4025d8 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/tools/CLI.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/tools/CLI.java @@ -523,7 +523,7 @@ public class CLI extends Configured implements Tool { } } - protected void displayJobList(JobStatus[] jobs) + public void displayJobList(JobStatus[] jobs) throws IOException, InterruptedException { System.out.println("Total jobs:" + jobs.length); System.out.println("JobId\tState\tStartTime\t" + diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java index dc65659966d..d3cab19822e 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java @@ -248,10 +248,11 @@ public class YARNRunner implements ClientProtocol { ApplicationReport appMaster = resMgrDelegate .getApplicationReport(applicationId); + String diagnostics = (appMaster == null ? "application report is null" : appMaster.getDiagnostics()); if (appMaster == null || appMaster.getState() == ApplicationState.FAILED || appMaster.getState() == ApplicationState.KILLED) { throw new IOException("Failed to run job : " + - appMaster.getDiagnostics()); + diagnostics); } return clientCache.getClient(jobId).getJobStatus(jobId); } diff --git a/hadoop-mapreduce-project/src/java/org/apache/hadoop/mapred/JobQueueClient.java b/hadoop-mapreduce-project/src/java/org/apache/hadoop/mapred/JobQueueClient.java index 68f5fc4366b..e4dc3100778 100644 --- a/hadoop-mapreduce-project/src/java/org/apache/hadoop/mapred/JobQueueClient.java +++ b/hadoop-mapreduce-project/src/java/org/apache/hadoop/mapred/JobQueueClient.java @@ -170,10 +170,10 @@ class JobQueueClient extends Configured implements Tool { * registered with the {@link QueueManager}. Display of the Jobs is determine * by the boolean * - * @throws IOException + * @throws IOException, InterruptedException */ private void displayQueueInfo(String queue, boolean showJobs) - throws IOException { + throws IOException, InterruptedException { JobQueueInfo jobQueueInfo = jc.getQueueInfo(queue); if (jobQueueInfo == null) {