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 a setting that will allow the fast key value store to be disabled.
Date Sat, 11 Apr 2015 21:18:24 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/master ec4b5260e -> aeec8959a


Adding a setting that will allow the fast key value store to be disabled.


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

Branch: refs/heads/master
Commit: aeec8959a6d8a0cf99db301457890fa172ea41ef
Parents: ec4b526
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sat Apr 11 17:18:18 2015 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sat Apr 11 17:18:18 2015 -0400

----------------------------------------------------------------------
 .../blur/manager/indexserver/DistributedIndexServer.java    | 9 +++++++--
 .../src/main/java/org/apache/blur/utils/BlurConstants.java  | 1 +
 blur-util/src/main/resources/blur-default.properties        | 3 +++
 3 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/aeec8959/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
b/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
index addc1b0..a956331 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
@@ -16,6 +16,8 @@ package org.apache.blur.manager.indexserver;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+import static org.apache.blur.utils.BlurConstants.BLUR_TABLE_DISABLE_FAST_DIR;
+
 import java.io.IOException;
 import java.net.URI;
 import java.util.ArrayList;
@@ -512,12 +514,16 @@ public class DistributedIndexServer extends AbstractDistributedIndexServer
{
     Directory directory;
     URI uri = hdfsDirPath.toUri();
     String scheme = uri.getScheme();
-    if (scheme != null && scheme.equals("hdfs")) {
+
+    boolean disableFast = tableContext.getBlurConfiguration().getBoolean(BLUR_TABLE_DISABLE_FAST_DIR,
false);
+
+    if (scheme != null && scheme.equals("hdfs") && !disableFast) {
       LOG.info("Using Fast HDFS directory implementation on shard [{0}] for table [{1}]",
shard, table);
       FastHdfsKeyValueDirectory shortTermStorage = new FastHdfsKeyValueDirectory(_hdfsKeyValueTimer,
_configuration,
           new Path(hdfsDirPath, "fast"));
       directory = new JoinDirectory(longTermStorage, shortTermStorage);
     } else {
+      LOG.info("Using regular HDFS directory.");
       directory = longTermStorage;
     }
 
@@ -661,5 +667,4 @@ public class DistributedIndexServer extends AbstractDistributedIndexServer
{
     }
   }
 
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/aeec8959/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 ba22d7e..40db852 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
@@ -78,6 +78,7 @@ public class BlurConstants {
   public static final String BLUR_SHARD_INTERNAL_SEARCH_THREAD_COUNT = "blur.shard.internal.search.thread.count";
   public static final String BLUR_SHARD_INDEX_WRITER_SORT_MEMORY = "blur.shard.index.writer.sort.memory";
   public static final String BLUR_SHARD_INDEX_WRITER_SORT_FACTOR = "blur.shard.index.writer.sort.factor";
+  public static final String BLUR_TABLE_DISABLE_FAST_DIR = "blur.table.disable.fast.dir";
 
   public static final String BLUR_SHARD_SERVER_THRIFT_THREAD_COUNT = "blur.shard.server.thrift.thread.count";
   public static final String BLUR_SHARD_CACHE_MAX_TIMETOLIVE = "blur.shard.cache.max.timetolive";

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/aeec8959/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 aa9ab7b..8f5f620 100644
--- a/blur-util/src/main/resources/blur-default.properties
+++ b/blur-util/src/main/resources/blur-default.properties
@@ -123,6 +123,9 @@ blur.shard.cache.max.timetolive=60000
 # Default implementation of the blur cache filter, which is a pass through filter that does
nothing
 blur.shard.filter.cache.class=org.apache.blur.manager.DefaultBlurFilterCache
 
+# By default the fast key value store is used with the HDFS directory.  Set to true to disable.
+blur.table.disable.fast.dir=false
+
 # By default the v2 version of the block cache is enabled
 blur.shard.block.cache.version=v2
 


Mime
View raw message