incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [13/20] git commit: Fixed BLUR-192
Date Mon, 05 Aug 2013 18:56:50 GMT
Fixed BLUR-192


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/9c02e5ed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/9c02e5ed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/9c02e5ed

Branch: refs/heads/0.2.0-newtypesystem
Commit: 9c02e5ed96015dcbb87dee029a59371d34c22285
Parents: 9ef8782
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sat Aug 3 17:04:35 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sat Aug 3 17:04:35 2013 -0400

----------------------------------------------------------------------
 .../blur/mapreduce/lib/BlurOutputFormat.java    | 24 ++++++++++++--------
 1 file changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/9c02e5ed/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
----------------------------------------------------------------------
diff --git a/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
b/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
index f8190b2..6a46e46 100644
--- a/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
+++ b/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
@@ -352,23 +352,22 @@ public class BlurOutputFormat extends OutputFormat<Text, BlurMutate>
{
     private final Path _newIndex;
     private final boolean _indexLocally;
     private final boolean _optimizeInFlight;
-    private Counter _fieldCount;
-    private Counter _recordCount;
-    private Counter _rowCount;
-    private Counter _recordDuplicateCount;
+    private Counter _fieldCount = emptyCounter();
+    private Counter _recordCount = emptyCounter();
+    private Counter _rowCount = emptyCounter();
+    private Counter _recordDuplicateCount = emptyCounter();
+    private Counter _rowOverFlowCount = emptyCounter();
+    private Counter _rowDeleteCount = emptyCounter();
+    private RateCounter _recordRateCounter = new RateCounter(emptyCounter());
+    private RateCounter _rowRateCounter = new RateCounter(emptyCounter());
+    private RateCounter _copyRateCounter = new RateCounter(emptyCounter());
     private boolean _countersSetup = false;
-    private RateCounter _recordRateCounter;
-    private RateCounter _rowRateCounter;
-    private RateCounter _copyRateCounter;
     private IndexWriter _localTmpWriter;
     private boolean _usingLocalTmpindex;
     private File _localTmpPath;
     private ProgressableDirectory _localTmpDir;
-    private Counter _rowOverFlowCount;
     private String _deletedRowId;
 
-    private Counter _rowDeleteCount;
-
     public BlurRecordWriter(Configuration configuration, BlurAnalyzer blurAnalyzer, int attemptId,
String tmpDirName)
         throws IOException {
 
@@ -405,6 +404,11 @@ public class BlurOutputFormat extends OutputFormat<Text, BlurMutate>
{
       }
     }
 
+    private Counter emptyCounter() {
+      return new Counter() {
+      };
+    }
+
     @Override
     public void write(Text key, BlurMutate value) throws IOException, InterruptedException
{
       if (!_countersSetup) {


Mime
View raw message