incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cr...@apache.org
Subject [17/50] [abbrv] git commit: Fixed BLUR-287
Date Wed, 13 Nov 2013 03:30:36 GMT
Fixed BLUR-287


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

Branch: refs/heads/blur-console-v2
Commit: b580497e294dfe0442507734a426f18f4c21cc79
Parents: e028145
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Thu Oct 31 13:42:11 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Thu Oct 31 13:42:29 2013 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/blur/thrift/ThriftBlurShardServer.java   | 3 ++-
 blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java  | 1 +
 blur-util/src/main/resources/blur-default.properties              | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b580497e/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
index 3d672c2..aff2fd9 100644
--- a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
+++ b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
@@ -28,6 +28,7 @@ import static org.apache.blur.utils.BlurConstants.BLUR_MAX_HEAP_PER_ROW_FETCH;
 import static org.apache.blur.utils.BlurConstants.BLUR_MAX_RECORDS_PER_ROW_FETCH_REQUEST;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BIND_ADDRESS;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BIND_PORT;
+import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BLOCK_CACHE_TOTAL_SIZE;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BLOCK_CACHE_VERSION;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_FETCHCOUNT;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_FILTER_CACHE_CLASS;
@@ -155,7 +156,7 @@ public class ThriftBlurShardServer extends ThriftServer {
     // Alternate BlockCacheDirectoryFactory support currently disabled in 0.2.0,
     // look for it in 0.2.1
     String blockCacheVersion = configuration.get(BLUR_SHARD_BLOCK_CACHE_VERSION, "v2");
-    long totalNumberOfBytes = VM.maxDirectMemory() - _64MB;
+    long totalNumberOfBytes = configuration.getLong(BLUR_SHARD_BLOCK_CACHE_TOTAL_SIZE, VM.maxDirectMemory()
- _64MB);
     if (blockCacheVersion.equals("v1")) {
       blockCacheDirectoryFactory = new BlockCacheDirectoryFactoryV1(configuration, totalNumberOfBytes);
     } else if (blockCacheVersion.equals("v2")) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b580497e/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 c0667d7..a7057ea 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
@@ -46,6 +46,7 @@ public class BlurConstants {
   public static final String BLUR_SHARD_BLOCKCACHE_DIRECT_MEMORY_ALLOCATION = "blur.shard.blockcache.direct.memory.allocation";
   public static final String BLUR_SHARD_BLOCKCACHE_SLAB_COUNT = "blur.shard.blockcache.slab.count";
   public static final String BLUR_SHARD_BLOCK_CACHE_VERSION = "blur.shard.block.cache.version";
+  public static final String BLUR_SHARD_BLOCK_CACHE_TOTAL_SIZE = "blur.shard.block.cache.total.size";
   public static final String BLUR_SHARD_SAFEMODEDELAY = "blur.shard.safemodedelay";
   public static final String BLUR_CONTROLLER_HOSTNAME = "blur.controller.hostname";
   public static final String BLUR_CONTROLLER_BIND_PORT = "blur.controller.bind.port";

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b580497e/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 ec58c78..280eded 100644
--- a/blur-util/src/main/resources/blur-default.properties
+++ b/blur-util/src/main/resources/blur-default.properties
@@ -75,6 +75,9 @@ blur.shard.index.warmup.throttle=30000000
 # By default the v2 version of the block cache is enabled
 blur.shard.block.cache.version=v2
 
+# By default the total amount of memory block cache will use is -XX:MaxDirectMemorySize -
64 MiB
+blur.shard.block.cache.total.size=
+
 # v1 version of block cache only. By default the block cache using off heap memory
 blur.shard.blockcache.direct.memory.allocation=true
 


Mime
View raw message