From fe01f920a1479e37142bef5ec12ce8fe90868ebd Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 10 Mar 2010 20:06:07 +0000 Subject: [PATCH] HADOOP-6504. Invalid example in the documentation of org.apache.hadoop.util.Tool. Contributed by Benoit Sigoure. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@921542 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 7 +++++-- src/java/org/apache/hadoop/util/Tool.java | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d8957faf401..d4ffaa7ca1a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -264,8 +264,11 @@ Trunk (unreleased changes) HADOOP-6545. Changes the Key for the FileSystem cache to be UGI (ddas) - HADOOP-6609. Fixed deadlock in RPC by replacing shared static - DataOutputBuffer in the UTF8 class with a thread local variable. (omalley) + HADOOP-6609. Fixed deadlock in RPC by replacing shared static + DataOutputBuffer in the UTF8 class with a thread local variable. (omalley) + + HADOOP-6504. Invalid example in the documentation of + org.apache.hadoop.util.Tool. (Benoit Sigoure via tomwhite) Release 0.21.0 - Unreleased diff --git a/src/java/org/apache/hadoop/util/Tool.java b/src/java/org/apache/hadoop/util/Tool.java index 8cc9f47c20d..1c5d2bedb28 100644 --- a/src/java/org/apache/hadoop/util/Tool.java +++ b/src/java/org/apache/hadoop/util/Tool.java @@ -48,16 +48,17 @@ import org.apache.hadoop.conf.Configurable; * job.setJobName("my-app"); * job.setInputPath(in); * job.setOutputPath(out); - * job.setMapperClass(MyApp.MyMapper.class); - * job.setReducerClass(MyApp.MyReducer.class); + * job.setMapperClass(MyMapper.class); + * job.setReducerClass(MyReducer.class); * * // Submit the job, then poll for progress until the job is complete * JobClient.runJob(job); + * return 0; * } * * public static void main(String[] args) throws Exception { * // Let ToolRunner handle generic command-line options - * int res = ToolRunner.run(new Configuration(), new Sort(), args); + * int res = ToolRunner.run(new Configuration(), new MyApp(), args); * * System.exit(res); * }