incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1196054 - /incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/FileCountMR.java
Date Tue, 01 Nov 2011 15:25:23 GMT
Author: ecn
Date: Tue Nov  1 15:25:23 2011
New Revision: 1196054

URL: http://svn.apache.org/viewvc?rev=1196054&view=rev
Log:
ACCUMULO-86: example is getting NPE

Modified:
    incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/FileCountMR.java

Modified: incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/FileCountMR.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/FileCountMR.java?rev=1196054&r1=1196053&r2=1196054&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/FileCountMR.java
(original)
+++ incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/FileCountMR.java
Tue Nov  1 15:25:23 2011
@@ -36,6 +36,7 @@ import org.apache.hadoop.util.ToolRunner
 
 public class FileCountMR extends Configured implements Tool {
   private static final String OUTPUT_VIS = FileCountMR.class.getSimpleName() + ".output.vis";
+  private static final Text EMPTY = new Text();
   
   public static class FileCountMapper extends Mapper<Key,Value,Key,Value> {
     long dirCount = 0;
@@ -114,7 +115,7 @@ public class FileCountMR extends Configu
       }
       Mutation m = new Mutation(QueryUtil.getRow(key.getRow().toString()));
       m.put(QueryUtil.DIR_COLF, QueryUtil.COUNTS_COLQ, colvis, sas.aggregate());
-      context.write(null, m);
+      context.write(EMPTY, m);
     }
     
     @Override



Mime
View raw message