incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject git commit: Adding the reducer multipler to the config so that validation can be done on it.
Date Sat, 25 May 2013 18:06:04 GMT
Updated Branches:
  refs/heads/0.1.5 8eaca7c10 -> a18bce613


Adding the reducer multipler to the config so that validation can be done on it.


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

Branch: refs/heads/0.1.5
Commit: a18bce6136dc3b0668418bfdae0bba0210299526
Parents: 8eaca7c
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sat May 25 14:05:29 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sat May 25 14:05:29 2013 -0400

----------------------------------------------------------------------
 .../blur/mapreduce/lib/BlurOutputFormat.java       |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a18bce61/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
b/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
index d759eed..fc6820f 100644
--- a/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
+++ b/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/lib/BlurOutputFormat.java
@@ -93,6 +93,7 @@ import org.apache.lucene.store.NoLockFactory;
  */
 public class BlurOutputFormat extends OutputFormat<Text, BlurMutate> {
 
+  public static final String BLUR_OUTPUT_REDUCER_MULTIPLIER = "blur.output.reducer.multiplier";
   public static final String BLUR_OUTPUT_OPTIMIZEINFLIGHT = "blur.output.optimizeinflight";
   public static final String BLUR_OUTPUT_INDEXLOCALLY = "blur.output.indexlocally";
   public static final String BLUR_OUTPUT_MAX_DOCUMENT_BUFFER_SIZE = "blur.output.max.document.buffer.size";
@@ -174,6 +175,12 @@ public class BlurOutputFormat extends OutputFormat<Text, BlurMutate>
{
       throw new IOException("setTableDescriptor needs to be called first.");
     }
     job.setNumReduceTasks(tableDescriptor.getShardCount() * multiple);
+    Configuration configuration = job.getConfiguration();
+    configuration.setInt(BLUR_OUTPUT_REDUCER_MULTIPLIER, multiple);
+  }
+  
+  public static int getReducerMultiplier(Configuration configuration) {
+    return configuration.getInt(BLUR_OUTPUT_REDUCER_MULTIPLIER, 1);
   }
 
   /**


Mime
View raw message