hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject [30/50] hadoop git commit: HADOOP-9729. The example code of org.apache.hadoop.util.Tool is incorrect. Contributed by hellojinjie
Date Sat, 09 May 2015 00:42:24 GMT
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/d894d6d7
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d894d6d7
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d894d6d7

Branch: refs/heads/YARN-2928
Commit: d894d6d7428f692be6c178172a68ea52f7f4c20b
Parents: bb58893
Author: Jason Lowe <jlowe@apache.org>
Authored: Fri May 8 21:28:38 2015 +0000
Committer: Zhijie Shen <zjshen@apache.org>
Committed: Fri May 8 17:32:51 2015 -0700

----------------------------------------------------------------------
 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/d894d6d7/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/d894d6d7/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 {


Mime
View raw message