Repository: hadoop Updated Branches: refs/heads/branch-2 dfc4a62f7 -> 1523ed5a7
HADOOP-9729. The example code of org.apache.hadoop.util.Tool is incorrect. Contributed by hellojinjie (cherry picked from commit ec2748dedbc500bd554aa62ca76ccab593129966) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/1523ed5a Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/1523ed5a Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/1523ed5a Branch: refs/heads/branch-2 Commit: 1523ed5a760e4caf901cf5789f7c142e642fb136 Parents: dfc4a62 Author: Jason Lowe <jl...@apache.org> Authored: Fri May 8 21:28:38 2015 +0000 Committer: Jason Lowe <jl...@apache.org> Committed: Fri May 8 21:29:18 2015 +0000 ---------------------------------------------------------------------- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/util/Tool.java | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/1523ed5a/hadoop-common-project/hadoop-common/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index cb5e144..96aa3cc 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -185,6 +185,9 @@ Release 2.8.0 - UNRELEASED HADOOP-7165. listLocatedStatus(path, filter) is not redefined in FilterFs (Hairong Kuang via jlowe) + HADOOP-9729. The example code of org.apache.hadoop.util.Tool is incorrect + (hellojinjie via jlowe) + Release 2.7.1 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/1523ed5a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Tool.java ---------------------------------------------------------------------- diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Tool.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Tool.java index 3ff8e52..b6e3d7d 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Tool.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Tool.java @@ -54,8 +54,12 @@ import org.apache.hadoop.conf.Configurable; * job.setReducerClass(MyReducer.class); * * // Submit the job, then poll for progress until the job is complete - * JobClient.runJob(job); - * return 0; + * RunningJob runningJob = JobClient.runJob(job); + * if (runningJob.isSuccessful()) { + * return 0; + * } else { + * return 1; + * } * } * * public static void main(String[] args) throws Exception {