You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ji...@apache.org on 2015/05/12 00:54:40 UTC

[06/50] [abbrv] hadoop git commit: HADOOP-9729. The example code of org.apache.hadoop.util.Tool is incorrect. Contributed by hellojinjie

HADOOP-9729. The example code of org.apache.hadoop.util.Tool is incorrect. Contributed by hellojinjie


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/ec2748de
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/ec2748de
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/ec2748de

Branch: refs/heads/HDFS-7240
Commit: ec2748dedbc500bd554aa62ca76ccab593129966
Parents: f523e96
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:28:38 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/ec2748de/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 e693018..c6e22d5 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -638,6 +638,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/ec2748de/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 {