hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r699092 - in /hadoop/core/trunk: CHANGES.txt bin/hadoop src/examples/org/apache/hadoop/examples/Sort.java src/mapred/org/apache/hadoop/mapred/lib/InputSampler.java src/tools/org/apache/hadoop/tools/InputSampler.java
Date Thu, 25 Sep 2008 21:11:03 GMT
Author: omalley
Date: Thu Sep 25 14:11:03 2008
New Revision: 699092

URL: http://svn.apache.org/viewvc?rev=699092&view=rev
Log:
HADOOP-4247. Move InputSampler into org.apache.hadoop.mapred.lib, so that
examples.jar doesn't depend on tools.jar. (omalley)

Added:
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/lib/InputSampler.java
      - copied, changed from r699090, hadoop/core/trunk/src/tools/org/apache/hadoop/tools/InputSampler.java
Removed:
    hadoop/core/trunk/src/tools/org/apache/hadoop/tools/InputSampler.java
Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/bin/hadoop
    hadoop/core/trunk/src/examples/org/apache/hadoop/examples/Sort.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=699092&r1=699091&r2=699092&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Sep 25 14:11:03 2008
@@ -746,6 +746,9 @@
     HADOOP-4249. Fix eclipse path to include the hsqldb.jar. (szetszwo via
     omalley)
 
+    HADOOP-4247. Move InputSampler into org.apache.hadoop.mapred.lib, so that
+    examples.jar doesn't depend on tools.jar. (omalley)
+
 Release 0.18.1 - 2008-09-17
 
   IMPROVEMENTS

Modified: hadoop/core/trunk/bin/hadoop
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/bin/hadoop?rev=699092&r1=699091&r2=699092&view=diff
==============================================================================
--- hadoop/core/trunk/bin/hadoop (original)
+++ hadoop/core/trunk/bin/hadoop Thu Sep 25 14:11:03 2008
@@ -224,8 +224,7 @@
   CLASSPATH=${CLASSPATH}:${TOOL_PATH}
   HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
 elif [ "$COMMAND" = "sampler" ] ; then
-  CLASS=org.apache.hadoop.tools.InputSampler
-  CLASSPATH=${CLASSPATH}:${TOOL_PATH}
+  CLASS=org.apache.hadoop.mapred.lib.InputSampler
   HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
 else
   CLASS=$COMMAND

Modified: hadoop/core/trunk/src/examples/org/apache/hadoop/examples/Sort.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/examples/org/apache/hadoop/examples/Sort.java?rev=699092&r1=699091&r2=699092&view=diff
==============================================================================
--- hadoop/core/trunk/src/examples/org/apache/hadoop/examples/Sort.java (original)
+++ hadoop/core/trunk/src/examples/org/apache/hadoop/examples/Sort.java Thu Sep 25 14:11:03
2008
@@ -32,8 +32,8 @@
 import org.apache.hadoop.mapred.*;
 import org.apache.hadoop.mapred.lib.IdentityMapper;
 import org.apache.hadoop.mapred.lib.IdentityReducer;
+import org.apache.hadoop.mapred.lib.InputSampler;
 import org.apache.hadoop.mapred.lib.TotalOrderPartitioner;
-import org.apache.hadoop.tools.InputSampler;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
 

Copied: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/lib/InputSampler.java (from
r699090, hadoop/core/trunk/src/tools/org/apache/hadoop/tools/InputSampler.java)
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/lib/InputSampler.java?p2=hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/lib/InputSampler.java&p1=hadoop/core/trunk/src/tools/org/apache/hadoop/tools/InputSampler.java&r1=699090&r2=699092&rev=699092&view=diff
==============================================================================
--- hadoop/core/trunk/src/tools/org/apache/hadoop/tools/InputSampler.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/lib/InputSampler.java Thu Sep 25
14:11:03 2008
@@ -16,10 +16,9 @@
  * limitations under the License.
  */
 
-package org.apache.hadoop.tools;
+package org.apache.hadoop.mapred.lib;
 
 import java.io.IOException;
-import java.lang.reflect.Array;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Random;
@@ -40,9 +39,6 @@
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.RecordReader;
 import org.apache.hadoop.mapred.Reporter;
-import org.apache.hadoop.mapred.SequenceFileInputFormat;
-import org.apache.hadoop.mapred.lib.TotalOrderPartitioner;
-import org.apache.hadoop.util.ReflectionUtils;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
 
@@ -405,7 +401,6 @@
 
     Path outf = new Path(otherArgs.remove(otherArgs.size() - 1));
     TotalOrderPartitioner.setPartitionFile(job, outf);
-    ArrayList<Path> plist = new ArrayList<Path>(otherArgs.size());
     for (String s : otherArgs) {
       FileInputFormat.addInputPath(job, new Path(s));
     }
@@ -416,7 +411,7 @@
 
   public static void main(String[] args) throws Exception {
     JobConf job = new JobConf(InputSampler.class);
-    InputSampler sampler = new InputSampler(job);
+    InputSampler<?,?> sampler = new InputSampler(job);
     int res = ToolRunner.run(sampler, args);
     System.exit(res);
   }



Mime
View raw message