incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/2] git commit: Adding a way to disable quiet merge reads.
Date Tue, 11 Aug 2015 19:26:44 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/master fea0b3b89 -> bd60b0772


Adding a way to disable quiet merge reads.


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

Branch: refs/heads/master
Commit: 1806f22ab2895179005b827c1655073f7cd3889b
Parents: fea0b3b
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue Aug 11 15:11:42 2015 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Aug 11 15:11:42 2015 -0400

----------------------------------------------------------------------
 .../blur/store/BlockCacheDirectoryFactoryV2.java     | 15 +++++++++++----
 .../java/org/apache/blur/utils/BlurConstants.java    |  1 +
 blur-util/src/main/resources/blur-default.properties |  3 +++
 3 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1806f22a/blur-store/src/main/java/org/apache/blur/store/BlockCacheDirectoryFactoryV2.java
----------------------------------------------------------------------
diff --git a/blur-store/src/main/java/org/apache/blur/store/BlockCacheDirectoryFactoryV2.java
b/blur-store/src/main/java/org/apache/blur/store/BlockCacheDirectoryFactoryV2.java
index a700b37..8a907a3 100644
--- a/blur-store/src/main/java/org/apache/blur/store/BlockCacheDirectoryFactoryV2.java
+++ b/blur-store/src/main/java/org/apache/blur/store/BlockCacheDirectoryFactoryV2.java
@@ -22,6 +22,7 @@ import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BLOCK_CACHE_V2_DIRE
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BLOCK_CACHE_V2_DIRECT_REF_LIMIT_PREFIX;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BLOCK_CACHE_V2_FILE_BUFFER_SIZE;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BLOCK_CACHE_V2_POOL_CACHE_SIZE;
+import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BLOCK_CACHE_V2_QUIET_MERGES;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BLOCK_CACHE_V2_READ_CACHE_EXT;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BLOCK_CACHE_V2_READ_DEFAULT;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BLOCK_CACHE_V2_READ_NOCACHE_EXT;
@@ -64,6 +65,8 @@ import org.apache.lucene.store.Directory;
 
 public class BlockCacheDirectoryFactoryV2 extends BlockCacheDirectoryFactory {
 
+  
+
   private static final Log LOG = LogFactory.getLog(BlockCacheDirectoryFactoryV2.class);
 
   private final Cache _cache;
@@ -165,13 +168,17 @@ public class BlockCacheDirectoryFactoryV2 extends BlockCacheDirectoryFactory
{
       }
     };
 
+    final boolean quietMerges = configuration.getBoolean(BLUR_SHARD_BLOCK_CACHE_V2_QUIET_MERGES,
true);
+
     Quiet quiet = new Quiet() {
       @Override
       public boolean shouldBeQuiet(CacheDirectory directory, String fileName) {
-        Thread thread = Thread.currentThread();
-        String name = thread.getName();
-        if (name.startsWith(SHARED_MERGE_SCHEDULER_PREFIX)) {
-          return true;
+        if (quietMerges) {
+          Thread thread = Thread.currentThread();
+          String name = thread.getName();
+          if (name.startsWith(SHARED_MERGE_SCHEDULER_PREFIX)) {
+            return true;
+          }
         }
         return false;
       }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1806f22a/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
----------------------------------------------------------------------
diff --git a/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java b/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
index 08fb745..fa6b185 100644
--- a/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
+++ b/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
@@ -123,6 +123,7 @@ public class BlurConstants {
   public static final String BLUR_SHARD_SMALL_MERGE_THRESHOLD = "blur.shard.small.merge.threshold";
   public static final String BLUR_SHARD_REQUEST_CACHE_SIZE = "blur.shard.request.cache.size";
   public static final String BLUR_GC_BACK_PRESSURE_HEAP_RATIO = "blur.gc.back.pressure.heap.ratio";
+  public static final String BLUR_SHARD_BLOCK_CACHE_V2_QUIET_MERGES = "blur.shard.block.cache.v2.quiet.merges";
 
   public static final String BLUR_SHARD_DEFAULT_READ_SEQUENTIAL_SKIP_THRESHOLD = "blur.shard.default.read.sequential.skip.threshold";
   public static final String BLUR_SHARD_DEFAULT_READ_SEQUENTIAL_THRESHOLD = "blur.shard.default.read.sequential.threshold";

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1806f22a/blur-util/src/main/resources/blur-default.properties
----------------------------------------------------------------------
diff --git a/blur-util/src/main/resources/blur-default.properties b/blur-util/src/main/resources/blur-default.properties
index 209ffdf..19bdac8 100644
--- a/blur-util/src/main/resources/blur-default.properties
+++ b/blur-util/src/main/resources/blur-default.properties
@@ -191,6 +191,9 @@ blur.shard.block.cache.v2.slab.chunk.size=8192
 # v2 version of block cache only. This specifies the slab size for the cache is slab are
enabled.
 blur.shard.block.cache.v2.slab.size=134217728
 
+# v2 version of block cache only. This specifies whether or not the act of merging indexes
will cause the block cache to be updated.  Larger caches should consider disabling so that
merging performance can be improved.  This comes at the cost of potentially pushing active
index data out of the block cache.
+blur.shard.block.cache.v2.quiet.merges=true
+
 # Sets the compression of used in the storing of the fields. Valid entries are FAST FAST_DECOMPRESSION
HIGH_COMPRESSION
 blur.shard.index.compressionmode=FAST
 


Mime
View raw message