1
0
Prechádzať zdrojové kódy

HADOOP-198. Add more example programs to example driver. Also fix another WritableFactories-related error. Contributed by Mahadev.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@400104 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 19 rokov pred
rodič
commit
8c965c899d

+ 4 - 1
src/examples/org/apache/hadoop/examples/ExampleDriver.java

@@ -33,7 +33,10 @@ public class ExampleDriver {
 			 "A map/reduce program that counts the words in the input files.");
 	    pgd.addClass("grep", Grep.class, 
 			 "A map/reduce program that counts the matches of a regex in the input.");
-	    pgd.driver(argv);
+	    pgd.addClass("randomwriter", RandomWriter.class, 
+                        "A random writer benchmark that writes 10GB per node.");
+            pgd.addClass("sort", Sort.class, "A sort benchmark that sorts the data written by the random writer.");
+            pgd.driver(argv);
 	}
 	catch(Throwable e){
 	    e.printStackTrace();

+ 1 - 1
src/java/org/apache/hadoop/mapred/ClusterStatus.java

@@ -27,7 +27,7 @@ public class ClusterStatus implements Writable {
   private int reduce_tasks;
   private int max_tasks;
 
-  private ClusterStatus() {}
+  ClusterStatus() {}
   
   ClusterStatus(int trackers, int maps, int reduces, int max) {
     task_trackers = trackers;

+ 1 - 1
src/java/org/apache/hadoop/mapred/JobClient.java

@@ -39,7 +39,7 @@ public class JobClient implements MRConstants {
     static long MAX_JOBPROFILE_AGE = 1000 * 2;
 
     // required for unknown reason to make WritableFactories work distributed
-    static { new JobStatus(); new JobProfile(); }
+    static { new JobStatus(); new JobProfile(); new ClusterStatus(); }
 
     /**
      * A NetworkedJob is an implementation of RunningJob.  It holds