incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject git commit: Fixing an issue with the output committer.
Date Tue, 24 Jun 2014 12:30:37 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/apache-blur-0.2 b44ebeb46 -> 33ef68b16


Fixing an issue with the output committer.


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

Branch: refs/heads/apache-blur-0.2
Commit: 33ef68b16bcc3465b087321b9b2564991abbda0c
Parents: b44ebeb
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue Jun 24 08:30:52 2014 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Jun 24 08:30:52 2014 -0400

----------------------------------------------------------------------
 .../apache/blur/mapreduce/lib/BlurOutputCommitter.java | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/33ef68b1/blur-mapred-hadoop1/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputCommitter.java
----------------------------------------------------------------------
diff --git a/blur-mapred-hadoop1/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputCommitter.java
b/blur-mapred-hadoop1/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputCommitter.java
index 6b485a9..5e15962 100644
--- a/blur-mapred-hadoop1/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputCommitter.java
+++ b/blur-mapred-hadoop1/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputCommitter.java
@@ -38,20 +38,13 @@ public class BlurOutputCommitter extends AbstractOutputCommitter {
   private Configuration _configuration;
   private TaskAttemptID _taskAttemptID;
   private Path _indexPath;
-  private final boolean _runTaskCommit;
   private TableDescriptor _tableDescriptor;
 
-  public BlurOutputCommitter() {
-    _runTaskCommit = true;
-  }
-
-  public BlurOutputCommitter(boolean isMap, int numberOfReducers) {
-    _runTaskCommit = isMap && numberOfReducers != 0 ? false : true;
-  }
-
   @Override
   public boolean needsTaskCommit(TaskAttemptContext context) throws IOException {
-    return _runTaskCommit;
+    int numReduceTasks = context.getNumReduceTasks();
+    TaskAttemptID taskAttemptID = context.getTaskAttemptID();
+    return taskAttemptID.isMap() && numReduceTasks != 0 ? false : true;
   }
 
   @Override


Mime
View raw message