incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cr...@apache.org
Subject [31/50] [abbrv] git commit: Adding a minimum shard server feature when a shard cluster starts.
Date Sun, 18 May 2014 21:42:06 GMT
Adding a minimum shard server feature when a shard cluster starts.


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

Branch: refs/heads/console-v2
Commit: 6101aacdcdea6f9dfd738496e5ea7cb01993f18a
Parents: 5d18449
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sat May 3 11:20:37 2014 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sat May 3 11:20:37 2014 -0400

----------------------------------------------------------------------
 .../indexserver/DistributedIndexServer.java     |  7 +-
 .../blur/manager/indexserver/SafeMode.java      | 49 ++++++-------
 .../blur/thrift/ThriftBlurShardServer.java      |  7 +-
 .../blur/manager/indexserver/SafeModeTest.java  | 76 +++++++++++++++++---
 .../org/apache/blur/utils/BlurConstants.java    | 10 ++-
 .../src/main/resources/blur-default.properties  |  5 +-
 docs/cluster-setup.html                         |  4 +-
 7 files changed, 117 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/6101aacd/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 516941e..59d3f68 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
@@ -119,13 +119,16 @@ public class DistributedIndexServer extends AbstractDistributedIndexServer {
   private final Closer _closer;
   private final boolean _warmupDisabled;
   private long _shortDelay = 250;
+  private final int _minimumNumberOfNodes;
 
   public DistributedIndexServer(Configuration configuration, ZooKeeper zookeeper, ClusterStatus clusterStatus,
       BlurIndexWarmup warmup, BlurFilterCache filterCache, BlockCacheDirectoryFactory blockCacheDirectoryFactory,
       DistributedLayoutFactory distributedLayoutFactory, String cluster, String nodeName, long safeModeDelay,
       int shardOpenerThreadCount, int internalSearchThreads, int warmupThreads, int maxMergeThreads,
-      boolean warmupDisabled) throws KeeperException, InterruptedException {
+      boolean warmupDisabled, int minimumNumberOfNodesBeforeExitingSafeMode) throws KeeperException,
+      InterruptedException {
     super(clusterStatus, configuration, nodeName, cluster);
+    _minimumNumberOfNodes = minimumNumberOfNodesBeforeExitingSafeMode;
     _running.set(true);
     _warmupDisabled = warmupDisabled;
     _closer = Closer.create();
@@ -165,7 +168,7 @@ public class DistributedIndexServer extends AbstractDistributedIndexServer {
     int registerNodeTimeOut = _zookeeper.getSessionTimeout() / 1000 + 4;
 
     SafeMode safeMode = new SafeMode(_zookeeper, safemodePath, onlineShardsPath, TimeUnit.MILLISECONDS, _safeModeDelay,
-        TimeUnit.SECONDS, registerNodeTimeOut);
+        TimeUnit.SECONDS, registerNodeTimeOut, _minimumNumberOfNodes);
     safeMode.registerNode(getNodeName(), BlurUtil.getVersion().getBytes());
 
     _timerTableWarmer = setupTableWarmer();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/6101aacd/blur-core/src/main/java/org/apache/blur/manager/indexserver/SafeMode.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/indexserver/SafeMode.java b/blur-core/src/main/java/org/apache/blur/manager/indexserver/SafeMode.java
index 3648be0..31af8f6 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/indexserver/SafeMode.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/indexserver/SafeMode.java
@@ -46,20 +46,20 @@ public class SafeMode extends ZooKeeperLockManager {
   public static final String STARTUP = "STARTUP";
   public static final String SETUP = "SETUP";
 
-  private final ZooKeeper zooKeeper;
-  
-  private final long waitTime;
-  
-  private final String nodePath;
-  private final long duplicateNodeTimeout;
+  private final ZooKeeper _zooKeeper;
+  private final long _waitTime;
+  private final String _nodePath;
+  private final long _duplicateNodeTimeout;
+  private final int _minimumNumberOfNodes;
 
   public SafeMode(ZooKeeper zooKeeper, String lockPath, String nodePath, TimeUnit waitTimeUnit, long waitTime,
-      TimeUnit duplicateNodeTimeoutTimeUnit, long duplicateNodeTimeout) {
-    super(zooKeeper,lockPath);
-    this.zooKeeper = zooKeeper;
-    this.waitTime = waitTimeUnit.toMillis(waitTime);
-    this.duplicateNodeTimeout = duplicateNodeTimeoutTimeUnit.toNanos(duplicateNodeTimeout);
-    this.nodePath = nodePath;
+      TimeUnit duplicateNodeTimeoutTimeUnit, long duplicateNodeTimeout, int minimumNumberOfNodes) {
+    super(zooKeeper, lockPath);
+    _zooKeeper = zooKeeper;
+    _waitTime = waitTimeUnit.toMillis(waitTime);
+    _duplicateNodeTimeout = duplicateNodeTimeoutTimeUnit.toNanos(duplicateNodeTimeout);
+    _nodePath = nodePath;
+    _minimumNumberOfNodes = minimumNumberOfNodes;
     ZkUtils.mkNodesStr(zooKeeper, nodePath);
     ZkUtils.mkNodesStr(zooKeeper, lockPath);
   }
@@ -90,23 +90,24 @@ public class SafeMode extends ZooKeeperLockManager {
     List<String> prev = null;
     while (true) {
       synchronized (_lock) {
-        List<String> children = new ArrayList<String>(zooKeeper.getChildren(nodePath, _watcher));
+        List<String> children = new ArrayList<String>(_zooKeeper.getChildren(_nodePath, _watcher));
         Collections.sort(children);
-        if (children.equals(prev)) {
+        if (children.equals(prev) && children.size() >= _minimumNumberOfNodes) {
           LOG.info("Clustered has settled.");
           return;
         } else {
           prev = children;
-          LOG.info("Waiting for cluster to settle, current size [" + children.size() + "] total time waited so far ["
-              + (System.currentTimeMillis() - startingWaitTime) + " ms] waiting another [" + waitTime + " ms].");
-          _lock.wait(waitTime);
+          LOG.info(
+              "Waiting for cluster to settle, current size [{0}] min [{1}] total time waited so far [{2} ms] waiting another [{3} ms].",
+              children.size(), _minimumNumberOfNodes, (System.currentTimeMillis() - startingWaitTime), _waitTime);
+          _lock.wait(_waitTime);
         }
       }
     }
   }
 
   private boolean isLeader(String node) throws KeeperException, InterruptedException {
-    List<String> children = zooKeeper.getChildren(nodePath, false);
+    List<String> children = _zooKeeper.getChildren(_nodePath, false);
     if (children.size() == 1) {
       String n = children.get(0);
       if (!n.equals(node)) {
@@ -119,20 +120,20 @@ public class SafeMode extends ZooKeeperLockManager {
   }
 
   private void register(String node, byte[] data) throws KeeperException, InterruptedException {
-    String p = nodePath + "/" + node;
+    String p = _nodePath + "/" + node;
     long start = System.nanoTime();
-    while (zooKeeper.exists(p, false) != null) {
-      if (start + duplicateNodeTimeout < System.nanoTime()) {
+    while (_zooKeeper.exists(p, false) != null) {
+      if (start + _duplicateNodeTimeout < System.nanoTime()) {
         throw new RuntimeException("Node [" + node + "] cannot be registered, check to make sure a "
             + "process has not already been started or that server" + " names have not been duplicated.");
       }
       LOG.info("Node [{0}] already registered, waiting for path [{1}] to be released", node, p);
       String tmpPath = p + "_" + UUID.randomUUID();
-      zooKeeper.create(tmpPath, null, Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL);
+      _zooKeeper.create(tmpPath, null, Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL);
       Thread.sleep(1000);
-      zooKeeper.delete(tmpPath, -1);
+      _zooKeeper.delete(tmpPath, -1);
     }
-    zooKeeper.create(p, data, Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL);
+    _zooKeeper.create(p, data, Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL);
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/6101aacd/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 975f5c8..a46c1b5 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
@@ -39,6 +39,7 @@ import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_HOSTNAME;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_MERGE_THREAD_COUNT;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_OPENER_THREAD_COUNT;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_SAFEMODEDELAY;
+import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_SERVER_MINIMUM_BEFORE_SAFEMODE_EXIT;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_SERVER_THRIFT_THREAD_COUNT;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_THRIFT_ACCEPT_QUEUE_SIZE_PER_THREAD;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_THRIFT_MAX_READ_BUFFER_BYTES;
@@ -105,6 +106,7 @@ import sun.misc.VM;
 
 public class ThriftBlurShardServer extends ThriftServer {
 
+  
   private static final Log LOG = LogFactory.getLog(ThriftBlurShardServer.class);
   private static final boolean enableJsonReporter = false;
   private static final long _64MB = 64 * 1024 * 1024;
@@ -215,9 +217,12 @@ public class ThriftBlurShardServer extends ThriftServer {
     int warmupThreads = configuration.getInt(BLUR_SHARD_WARMUP_THREAD_COUNT, 16);
     int maxMergeThreads = configuration.getInt(BLUR_SHARD_MERGE_THREAD_COUNT, 3);
     boolean warmupDisabled = configuration.getBoolean(BLUR_SHARD_WARMUP_DISABLED, false);
+    int minimumNumberOfNodesBeforeExitingSafeMode = configuration.getInt(
+        BLUR_SHARD_SERVER_MINIMUM_BEFORE_SAFEMODE_EXIT, 0);
     final DistributedIndexServer indexServer = new DistributedIndexServer(config, zooKeeper, clusterStatus,
         indexWarmup, filterCache, blockCacheDirectoryFactory, distributedLayoutFactory, cluster, nodeName,
-        safeModeDelay, shardOpenerThreadCount, internalSearchThreads, warmupThreads, maxMergeThreads, warmupDisabled);
+        safeModeDelay, shardOpenerThreadCount, internalSearchThreads, warmupThreads, maxMergeThreads, warmupDisabled,
+        minimumNumberOfNodesBeforeExitingSafeMode);
 
     BooleanQuery.setMaxClauseCount(configuration.getInt(BLUR_MAX_CLAUSE_COUNT, 1024));
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/6101aacd/blur-core/src/test/java/org/apache/blur/manager/indexserver/SafeModeTest.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/manager/indexserver/SafeModeTest.java b/blur-core/src/test/java/org/apache/blur/manager/indexserver/SafeModeTest.java
index 540ad34..eeae856 100644
--- a/blur-core/src/test/java/org/apache/blur/manager/indexserver/SafeModeTest.java
+++ b/blur-core/src/test/java/org/apache/blur/manager/indexserver/SafeModeTest.java
@@ -57,7 +57,7 @@ public class SafeModeTest {
   public static void stopZooKeeper() throws InterruptedException {
     miniCluster.shutdownZooKeeper();
   }
-  
+
   private ZooKeeper zk;
 
   @Before
@@ -125,6 +125,60 @@ public class SafeModeTest {
   }
 
   @Test
+  public void testBasicStartupWithMinimum() throws IOException, InterruptedException, KeeperException {
+    List<AtomicReference<Throwable>> errors = new ArrayList<AtomicReference<Throwable>>();
+    List<AtomicLong> timeRegisteredLst = new ArrayList<AtomicLong>();
+    List<Thread> threads = new ArrayList<Thread>();
+    int nodesThatStart = 10;
+    int minimumNodeBeforeStarting = 16;
+    for (int i = 0; i < 32; i++) {
+      AtomicReference<Throwable> ref = new AtomicReference<Throwable>();
+      AtomicLong timeRegistered = new AtomicLong();
+      errors.add(ref);
+      timeRegisteredLst.add(timeRegistered);
+      if (i < nodesThatStart) {
+        threads.add(startThread(zk, "node" + i, ref, timeRegistered, 0L, minimumNodeBeforeStarting));
+      } else {
+        threads.add(startThread(zk, "node" + i, ref, timeRegistered, 10000L, minimumNodeBeforeStarting));
+      }
+      Thread.sleep(100);
+    }
+
+    boolean alive = true;
+    while (alive) {
+      alive = false;
+      for (Thread t : threads) {
+        t.join(1000);
+        if (t.isAlive()) {
+          System.out.println("Thread [" + t + "] has not finished.");
+          alive = true;
+        }
+      }
+    }
+
+    for (AtomicReference<Throwable> t : errors) {
+      Throwable throwable = t.get();
+      assertNull(throwable == null ? null : throwable.getMessage(), throwable);
+    }
+
+    long oldest = -1;
+    long newest = -1;
+    for (AtomicLong time : timeRegisteredLst) {
+      long l = time.get();
+      if (oldest == -1 || l < oldest) {
+        oldest = l;
+      }
+      if (newest == -1 || l > newest) {
+        newest = l;
+      }
+    }
+    assertTrue("newest [" + newest + "] oldest [" + oldest + "]", (newest - oldest) < TimeUnit.SECONDS.toMillis(5));
+    ZooKeeperLockManager zooKeeperLockManager = new ZooKeeperLockManager(zk, "/testing/safemode");
+    Thread.sleep(5000);
+    assertEquals(0, zooKeeperLockManager.getNumberOfLockNodesPresent(SafeMode.STARTUP));
+  }
+
+  @Test
   public void testExtraNodeStartup() throws IOException, InterruptedException, KeeperException {
     ZooKeeper zk = new ZooKeeper(miniCluster.getZkConnectionString(), 20000, new Watcher() {
       @Override
@@ -132,13 +186,13 @@ public class SafeModeTest {
 
       }
     });
-    
+
     SafeMode setupSafeMode = new SafeMode(zk, "/testing/safemode", "/testing/nodepath", TimeUnit.SECONDS, 5,
-        TimeUnit.SECONDS, 60);
+        TimeUnit.SECONDS, 60, 0);
     setupSafeMode.registerNode("node1", null);
 
     SafeMode safeMode = new SafeMode(zk, "/testing/safemode", "/testing/nodepath", TimeUnit.SECONDS, 5,
-        TimeUnit.SECONDS, 60);
+        TimeUnit.SECONDS, 60, 0);
     long s = System.nanoTime();
     safeMode.registerNode("node101", null);
     long e = System.nanoTime();
@@ -155,13 +209,13 @@ public class SafeModeTest {
 
       }
     });
-    
+
     SafeMode setupSafeMode = new SafeMode(zk, "/testing/safemode", "/testing/nodepath", TimeUnit.SECONDS, 5,
-        TimeUnit.SECONDS, 60);
+        TimeUnit.SECONDS, 60, 0);
     setupSafeMode.registerNode("node10", null);
 
     SafeMode safeMode = new SafeMode(zk, "/testing/safemode", "/testing/nodepath", TimeUnit.SECONDS, 5,
-        TimeUnit.SECONDS, 15);
+        TimeUnit.SECONDS, 15, 0);
     try {
       safeMode.registerNode("node10", null);
       fail("should throw exception.");
@@ -172,12 +226,18 @@ public class SafeModeTest {
 
   private Thread startThread(final ZooKeeper zk, final String node, final AtomicReference<Throwable> errorRef,
       final AtomicLong timeRegistered) {
+    return startThread(zk, node, errorRef, timeRegistered, 0L, 0);
+  }
+
+  private Thread startThread(final ZooKeeper zk, final String node, final AtomicReference<Throwable> errorRef,
+      final AtomicLong timeRegistered, final long waitTime, final int minimumNumberOfNodes) {
     Runnable runnable = new Runnable() {
       @Override
       public void run() {
         try {
+          Thread.sleep(waitTime);
           SafeMode safeMode = new SafeMode(zk, "/testing/safemode", "/testing/nodepath", TimeUnit.SECONDS, 5,
-              TimeUnit.SECONDS, 60);
+              TimeUnit.SECONDS, 60, minimumNumberOfNodes);
           safeMode.registerNode(node, null);
           timeRegistered.set(System.currentTimeMillis());
         } catch (Throwable t) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/6101aacd/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 6936265..197b89f 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
@@ -42,9 +42,12 @@ public class BlurConstants {
   public static final String BLUR_SHARD_QUEUE_MAX_QUEUE_BATCH_SIZE = "blur.shard.queue.max.queue.batch.size";
   public static final String BLUR_SHARD_QUEUE_MAX_INMEMORY_LENGTH = "blur.shard.queue.max.inmemory.length";
 
-//  public static final String BLUR_TABLE_INDEX_QUEUE_READER_CLASS = "blur.table.index.queue.reader.class";
-//  public static final String BLUR_TABLE_INDEX_QUEUE_READER_BACKOFF = "blur.table.index.queue.reader.backoff";
-//  public static final String BLUR_TABLE_INDEX_QUEUE_READER_MAX = "blur.table.index.queue.reader.max";
+  // public static final String BLUR_TABLE_INDEX_QUEUE_READER_CLASS =
+  // "blur.table.index.queue.reader.class";
+  // public static final String BLUR_TABLE_INDEX_QUEUE_READER_BACKOFF =
+  // "blur.table.index.queue.reader.backoff";
+  // public static final String BLUR_TABLE_INDEX_QUEUE_READER_MAX =
+  // "blur.table.index.queue.reader.max";
 
   public static final String FAST_DECOMPRESSION = "FAST_DECOMPRESSION";
   public static final String FAST = "FAST";
@@ -113,6 +116,7 @@ public class BlurConstants {
   public static final String BLUR_SHARD_BLOCK_CACHE_V2_FILE_BUFFER_SIZE = "blur.shard.block.cache.v2.fileBufferSize";
   public static final String BLUR_SHARD_BLOCK_CACHE_V2_CACHE_BLOCK_SIZE = "blur.shard.block.cache.v2.cacheBlockSize";
   public static final String BLUR_SHARD_BLURINDEX_CLASS = "blur.shard.blurindex.class";
+  public static final String BLUR_SHARD_SERVER_MINIMUM_BEFORE_SAFEMODE_EXIT = "blur.shard.server.minimum.before.safemode.exit";
 
   public static final String BLUR_FIELDTYPE = "blur.fieldtype.";
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/6101aacd/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 023858a..739f49e 100644
--- a/blur-util/src/main/resources/blur-default.properties
+++ b/blur-util/src/main/resources/blur-default.properties
@@ -136,9 +136,12 @@ blur.shard.buffercache.8192=67108864
 # The amount of memory to be used by 1K byte buffers.  Note if you change the "blur.shard.block.cache.v2.cacheBlockSize" or "blur.shard.block.cache.v2.fileBufferSize" you should adjust the buffer sizes as well as the total memory allocated.
 blur.shard.buffercache.1024=8388608
 
-# The number of milliseconds to wait for the cluster to settle once changes have ceased
+# The number of milliseconds to wait for the cluster to settle once changes have ceased.
 blur.shard.safemodedelay=5000
 
+# The number of shard servers in a cluster that have to be registered before the cluster will exit safemode.
+blur.shard.server.minimum.before.safemode.exit=0
+
 # The default time between index commits
 blur.shard.time.between.commits=30000
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/6101aacd/docs/cluster-setup.html
----------------------------------------------------------------------
diff --git a/docs/cluster-setup.html b/docs/cluster-setup.html
index ce14104..c2c345b 100644
--- a/docs/cluster-setup.html
+++ b/docs/cluster-setup.html
@@ -157,7 +157,7 @@ export HADOOP_HOME=&lt;path to your Hadoop install directory&gt;</code>
 <h4>Default Properties</h4>
 <table class="table-bordered table-striped table-condensed">
 <tr><td>Property</td><td>Description</td></tr>
-<tr><td>blur.controller.hostname</td><td>Sets the hostname for the controller, if blank the hostname is automatically detected</td></tr><tr><td>blur.controller.bind.address (0.0.0.0)</td><td>The binding address of the controller</td></tr><tr><td>blur.controller.bind.port (40010)</td><td>The default binding port of the controller server</td></tr><tr><td>blur.controller.shard.connection.timeout (60000)</td><td>The connection timeout, NOTE: this will be the maximum amount of time you can wait for a query.</td></tr><tr><td>blur.controller.server.thrift.thread.count (32)</td><td>The number of threads used for thrift requests</td></tr><tr><td>blur.controller.server.remote.thread.count (64)</td><td>The number of threads used for remote thrift requests to the shards server.  This should be a large number.</td></tr><tr><td>blur.controller.thrift.selector.threads (2)</td><td>The number of threads used for selector processing inside the thrift server.</td></tr><tr><td>blur.controller.thrift.ma
 x.read.buffer.bytes (9223372036854775807)</td><td>The maximum number of bytes used for reading requests in the thrift server.</td></tr><tr><td>blur.controller.thrift.accept.queue.size.per.thread (4)</td><td>The size of the blocking queue per selector thread for passing accepted connections to the selector thread.</td></tr><tr><td>blur.controller.remote.fetch.count (100)</td><td>The number of hits to fetch per request to the shard servers</td></tr><tr><td>blur.controller.retry.max.fetch.retries (3)</td><td>The max number of retries to the shard server when there is an error during fetch</td></tr><tr><td>blur.controller.retry.max.mutate.retries (3)</td><td>The max number of retries to the shard server when there is an error during mutate</td></tr><tr><td>blur.controller.retry.max.default.retries (3)</td><td>The max number of retries to the shard server when there is an error during all other request</td></tr><tr><td>blur.controller.retry.fetch.delay (500)</td><td>The starting backoff 
 delay for the first retry for a fetch errors</td></tr><tr><td>blur.controller.retry.mutate.delay (500)</td><td>The starting backoff delay for the first retry for a mutate errors</td></tr><tr><td>blur.controller.retry.default.delay (500)</td><td>The starting backoff delay for the first retry for a all other request errors</td></tr><tr><td>blur.controller.retry.max.fetch.delay (2000)</td><td>The ending backoff delay for the last retry for a fetch errors</td></tr><tr><td>blur.controller.retry.max.mutate.delay (2000)</td><td>The ending backoff delay for the last retry for a mutate errors</td></tr><tr><td>blur.controller.retry.max.default.delay (2000)</td><td>The ending backoff delay for the last retry for a all other request errors</td></tr><tr><td>blur.gui.controller.port (40080)</td><td>The http status page port for the controller server</td></tr><tr><td>blur.controller.filtered.server.class</td><td>To intercept the calls made to the controller server and perform server side changes t
 o the calls extend org.apache.blur.server.FilteredBlurServer.</td></tr>
+<tr><td>blur.controller.hostname</td><td>Sets the hostname for the controller, if blank the hostname is automatically detected</td></tr><tr><td>blur.controller.bind.address (0.0.0.0)</td><td>The binding address of the controller</td></tr><tr><td>blur.controller.bind.port (40010)</td><td>The default binding port of the controller server</td></tr><tr><td>blur.controller.shard.connection.timeout (60000)</td><td>The connection timeout, NOTE: this will be the maximum amount of time you can wait for a query.</td></tr><tr><td>blur.controller.server.thrift.thread.count (32)</td><td>The number of threads used for thrift requests</td></tr><tr><td>blur.controller.server.remote.thread.count (64)</td><td>The number of threads used for remote thrift requests to the shards server.  This should be a large number.</td></tr><tr><td>blur.controller.thrift.selector.threads (2)</td><td>The number of threads used for selector processing inside the thrift server.</td></tr><tr><td>blur.controller.thrift.ma
 x.read.buffer.bytes (9223372036854775807)</td><td>The maximum number of bytes used for reading requests in the thrift server.</td></tr><tr><td>blur.controller.thrift.accept.queue.size.per.thread (4)</td><td>The size of the blocking queue per selector thread for passing accepted connections to the selector thread.</td></tr><tr><td>blur.controller.remote.fetch.count (150)</td><td>The number of hits to fetch per request to the shard servers</td></tr><tr><td>blur.controller.retry.max.fetch.retries (3)</td><td>The max number of retries to the shard server when there is an error during fetch</td></tr><tr><td>blur.controller.retry.max.mutate.retries (3)</td><td>The max number of retries to the shard server when there is an error during mutate</td></tr><tr><td>blur.controller.retry.max.default.retries (3)</td><td>The max number of retries to the shard server when there is an error during all other request</td></tr><tr><td>blur.controller.retry.fetch.delay (500)</td><td>The starting backoff 
 delay for the first retry for a fetch errors</td></tr><tr><td>blur.controller.retry.mutate.delay (500)</td><td>The starting backoff delay for the first retry for a mutate errors</td></tr><tr><td>blur.controller.retry.default.delay (500)</td><td>The starting backoff delay for the first retry for a all other request errors</td></tr><tr><td>blur.controller.retry.max.fetch.delay (2000)</td><td>The ending backoff delay for the last retry for a fetch errors</td></tr><tr><td>blur.controller.retry.max.mutate.delay (2000)</td><td>The ending backoff delay for the last retry for a mutate errors</td></tr><tr><td>blur.controller.retry.max.default.delay (2000)</td><td>The ending backoff delay for the last retry for a all other request errors</td></tr><tr><td>blur.gui.controller.port (40080)</td><td>The http status page port for the controller server</td></tr><tr><td>blur.controller.filtered.server.class</td><td>To intercept the calls made to the controller server and perform server side changes t
 o the calls extend org.apache.blur.server.FilteredBlurServer.</td></tr>
 </table>
             <h3 id="controller-blur-env">blur-env.sh</h3>
             <pre><code class="bash"># JAVA JVM OPTIONS for the controller servers, jvm tuning parameters are placed here.
@@ -204,7 +204,7 @@ Swap can kill java perform, you may want to consider disabling swap.</div>
 			<h4>Default Properties</h4>
 			<table class="table-bordered table-striped table-condensed">
 			<tr><td>Property</td><td>Description</td></tr>
-<tr><td>blur.shard.hostname</td><td>The hostname for the shard, if blank the hostname is automatically detected</td></tr><tr><td>blur.shard.bind.address (0.0.0.0)</td><td>The binding address of the shard</td></tr><tr><td>blur.shard.bind.port (40020)</td><td>The default binding port of the shard server</td></tr><tr><td>blur.shard.data.fetch.thread.count (8)</td><td>The number of fetcher threads</td></tr><tr><td>blur.shard.server.thrift.thread.count (8)</td><td>The number of the thrift threads</td></tr><tr><td>blur.shard.thrift.selector.threads (2)</td><td>The number of threads used for selector processing inside the thrift server.</td></tr><tr><td>blur.shard.thrift.max.read.buffer.bytes (9223372036854775807)</td><td>The maximum number of bytes used for reading requests in the thrift server.</td></tr><tr><td>blur.shard.thrift.accept.queue.size.per.thread (4)</td><td>The size of the blocking queue per selector thread for passing accepted connections to the selector thread.</td></tr><tr
 ><td>blur.shard.opener.thread.count (8)</td><td>The number of threads that are used for opening indexes</td></tr><tr><td>blur.shard.cache.max.querycache.elements (128)</td><td>The number of cached queries</td></tr><tr><td>blur.shard.cache.max.timetolive (60000)</td><td>The time to live for the cache query</td></tr><tr><td>blur.shard.filter.cache.class (org.apache.blur.manager.DefaultBlurFilterCache)</td><td>Default implementation of the blur cache filter, which is a pass through filter that does nothing</td></tr><tr><td>blur.shard.warmup.disabled (false)</td><td>Globally disable index warmup.</td></tr><tr><td>blur.shard.index.warmup.class (org.apache.blur.manager.indexserver.DefaultBlurIndexWarmup)</td><td>Default Blur index warmup class that warms the fields provided in the table descriptor</td></tr><tr><td>blur.shard.index.warmup.throttle (30000000)</td><td>Throttles the warmup to 30MB/s across all the warmup threads</td></tr><tr><td>blur.shard.block.cache.version (v2)</td><td>By 
 default the v2 version of the block cache is enabled</td></tr><tr><td>blur.shard.block.cache.total.size</td><td>By default the total amount of memory block cache will use is -XX:MaxDirectMemorySize - 64 MiB</td></tr><tr><td>blur.shard.blockcache.direct.memory.allocation (true)</td><td>v1 version of block cache only. By default the block cache using off heap memory</td></tr><tr><td>blur.shard.blockcache.slab.count (-1)</td><td>v1 version of block cache only. The slabs in the blockcache are automatically configured by default (-1) otherwise 1 slab equals 128MB.  The auto config is detected through the MaxDirectoryMemorySize provided to the JVM</td></tr><tr><td>blur.shard.block.cache.v2.fileBufferSize (8192)</td><td>v2 version of block cache only. File buffer size, this is the buffer size used to read and write to data to HDFS.  For production this will likely be increased.</td></tr><tr><td>blur.shard.block.cache.v2.cacheBlockSize (8192)</td><td>v2 version of block cache only. The is t
 he size of the blocks in the off heap cache, it is good practice to have this match 'blur.shard.block.cache.v2.fileBufferSize'.  For production this will likely be increased.</td></tr><tr><td>blur.shard.block.cache.v2.cacheBlockSize.filter (33554432)</td><td>blur.shard.block.cache.v2.cacheBlockSize.<ext>=</td></tr><tr><td>blur.shard.block.cache.v2.store (OFF_HEAP)</td><td>v2 version of block cache only. This is used to control if the block are created on or off heap.  Values are OFF_HEAP | ON_HEAP</td></tr><tr><td>blur.shard.block.cache.v2.read.cache.ext</td><td>v2 version of block cache only. This specifies what file types should be cached during reads.  Comma delimited list.</td></tr><tr><td>blur.shard.block.cache.v2.read.nocache.ext (fdt)</td><td>v2 version of block cache only. This specifies what file types should NOT be cached during reads.  Comma delimited list.</td></tr><tr><td>blur.shard.block.cache.v2.read.default (true)</td><td>v2 version of block cache only. This specifie
 s the default behavior if a file type is not specified in the cache or nocache lists during reads.  Values true | false</td></tr><tr><td>blur.shard.block.cache.v2.write.cache.ext</td><td>v2 version of block cache only. This specifies what file types should be cached during writes.  Comma delimited list.</td></tr><tr><td>blur.shard.block.cache.v2.write.nocache.ext (fdt)</td><td>v2 version of block cache only. This specifies what file types should NOT be cached during writes.  Comma delimited list.</td></tr><tr><td>blur.shard.block.cache.v2.write.default (true)</td><td>v2 version of block cache only. This specifies the default behavior if a file type is not specified in the cache or nocache lists during writes.  Values true | false</td></tr><tr><td>blur.shard.index.compressionmode (FAST)</td><td>Sets the compression of used in the storing of the fields. Valid entries are FAST FAST_DECOMPRESSION HIGH_COMPRESSION</td></tr><tr><td>blur.shard.index.chunksize (16384)</td><td>Sets the chunk
 size of the compression in the storing of the fields. Larger values may produce smaller fdt files at the small cost of fetch performance.</td></tr><tr><td>blur.shard.buffercache.8192 (67108864)</td><td>The amount of memory to be used by 8K byte buffers.  Note if you change the "blur.shard.block.cache.v2.cacheBlockSize" or "blur.shard.block.cache.v2.fileBufferSize" you should adjust the buffer sizes as well as the total memory allocated.  For example if you increased the "blur.shard.block.cache.v2.fileBufferSize" to 64K (65536) then this property should to "blur.shard.buffercache.65536".  You can also define as many of these properties as needed.</td></tr><tr><td>blur.shard.buffercache.1024 (8388608)</td><td>The amount of memory to be used by 1K byte buffers.  Note if you change the "blur.shard.block.cache.v2.cacheBlockSize" or "blur.shard.block.cache.v2.fileBufferSize" you should adjust the buffer sizes as well as the total memory allocated.</td></tr><tr><td>blur.shard.safemodedelay
  (5000)</td><td>The number of milliseconds to wait for the cluster to settle once changes have ceased</td></tr><tr><td>blur.shard.time.between.commits (30000)</td><td>The default time between index commits</td></tr><tr><td>blur.shard.time.between.refreshs (3000)</td><td>The default time between index refreshs</td></tr><tr><td>blur.shard.merge.thread.count (8)</td><td>The max number of threads used during index merges</td></tr><tr><td>blur.max.clause.count (1024)</td><td>The maximum number of clauses in a BooleanQuery</td></tr><tr><td>blur.indexmanager.search.thread.count (8)</td><td>The number of thread used for parallel searching in the index manager</td></tr><tr><td>blur.indexmanager.mutate.thread.count (8)</td><td>The number of thread used for parallel mutating in the index manager</td></tr><tr><td>blur.indexmanager.facet.thread.count (8)</td><td>The number of thread used for parallel faceting in the index manager</td></tr><tr><td>blur.shard.warmup.thread.count (8)</td><td>Number
  of threads used for warming up the index</td></tr><tr><td>blur.shard.fetchcount (110)</td><td>The fetch count per Lucene search, this fetches pointers to hits</td></tr><tr><td>blur.max.heap.per.row.fetch (10000000)</td><td>Heap limit on row fetch, once this limit has been reached the request will return</td></tr><tr><td>blur.max.records.per.row.fetch.request (1000)</td><td>The maximum number of records in a single row fetch</td></tr><tr><td>blur.gui.shard.port (40090)</td><td>The http status page port for the shard server</td></tr><tr><td>blur.shard.filtered.server.class</td><td>To intercept the calls made to the shard server and perform server side changes to the calls extend org.apache.blur.server.FilteredBlurServer.</td></tr><tr><td>blur.shard.blurindex.class</td><td>Defines the blur index class to be used to handle index requests.  This class has to extend org.apache.blur.manager.writer.BlurIndex.  This can be defined globally as well as per table.</td></tr><tr><td>blur.shard.r
 ead.interceptor</td><td>Defines the blur read interceptor class that can mask data from query results as well as data fetches.</td></tr><tr><td>blur.lucene.fst.bytearray.factory</td><td>Defines the byte array factory class that blur will use to manage the FST trees in Lucene (extends org.apache.blur.lucene.fst.ByteArrayFactory).</td></tr><tr><td>blur.shard.queue.max.pause.time.when.empty (1000)</td><td>The maximum amount of time to pause before checking the queue for RowMutations.</td></tr><tr><td>blur.shard.queue.max.writer.lock.time (5000)</td><td>The maximum amount of time that the queue can lock the writer before committing.  NOTE: Any other writer event will cause the queue to release it's lock on the writer.</td></tr><tr><td>blur.shard.queue.max.queue.batch.size (100)</td><td>The maximum number of RowMutations the writer can drain from the queue at a time.</td></tr><tr><td>blur.shard.queue.max.inmemory.length (100)</td><td>The maximum number of RowMutations that can exist in t
 he inmemory block queue any point in time.  NOTE: This is PER SHARD.</td></tr>
+<tr><td>blur.shard.hostname</td><td>The hostname for the shard, if blank the hostname is automatically detected</td></tr><tr><td>blur.shard.bind.address (0.0.0.0)</td><td>The binding address of the shard</td></tr><tr><td>blur.shard.bind.port (40020)</td><td>The default binding port of the shard server</td></tr><tr><td>blur.shard.data.fetch.thread.count (8)</td><td>The number of fetcher threads</td></tr><tr><td>blur.shard.server.thrift.thread.count (8)</td><td>The number of the thrift threads</td></tr><tr><td>blur.shard.thrift.selector.threads (2)</td><td>The number of threads used for selector processing inside the thrift server.</td></tr><tr><td>blur.shard.thrift.max.read.buffer.bytes (9223372036854775807)</td><td>The maximum number of bytes used for reading requests in the thrift server.</td></tr><tr><td>blur.shard.thrift.accept.queue.size.per.thread (4)</td><td>The size of the blocking queue per selector thread for passing accepted connections to the selector thread.</td></tr><tr
 ><td>blur.shard.opener.thread.count (8)</td><td>The number of threads that are used for opening indexes</td></tr><tr><td>blur.shard.cache.max.querycache.elements (128)</td><td>The number of cached queries</td></tr><tr><td>blur.shard.cache.max.timetolive (60000)</td><td>The time to live for the cache query</td></tr><tr><td>blur.shard.filter.cache.class (org.apache.blur.manager.DefaultBlurFilterCache)</td><td>Default implementation of the blur cache filter, which is a pass through filter that does nothing</td></tr><tr><td>blur.shard.warmup.disabled (true)</td><td>Globally disable index warmup.</td></tr><tr><td>blur.shard.index.warmup.class (org.apache.blur.manager.indexserver.DefaultBlurIndexWarmup)</td><td>Default Blur index warmup class that warms the fields provided in the table descriptor</td></tr><tr><td>blur.shard.index.warmup.throttle (30000000)</td><td>Throttles the warmup to 30MB/s across all the warmup threads</td></tr><tr><td>blur.shard.block.cache.version (v2)</td><td>By d
 efault the v2 version of the block cache is enabled</td></tr><tr><td>blur.shard.block.cache.total.size</td><td>By default the total amount of memory block cache will use is -XX:MaxDirectMemorySize - 64 MiB</td></tr><tr><td>blur.shard.blockcache.direct.memory.allocation (true)</td><td>v1 version of block cache only. By default the block cache using off heap memory</td></tr><tr><td>blur.shard.blockcache.slab.count (-1)</td><td>v1 version of block cache only. The slabs in the blockcache are automatically configured by default (-1) otherwise 1 slab equals 128MB.  The auto config is detected through the MaxDirectoryMemorySize provided to the JVM</td></tr><tr><td>blur.shard.block.cache.v2.fileBufferSize (8192)</td><td>v2 version of block cache only. File buffer size, this is the buffer size used to read and write to data to HDFS.  For production this will likely be increased.</td></tr><tr><td>blur.shard.block.cache.v2.cacheBlockSize (8192)</td><td>v2 version of block cache only. The is th
 e size of the blocks in the off heap cache, it is good practice to have this match 'blur.shard.block.cache.v2.fileBufferSize'.  For production this will likely be increased.</td></tr><tr><td>blur.shard.block.cache.v2.cacheBlockSize.filter (33554432)</td><td>blur.shard.block.cache.v2.cacheBlockSize.<ext>=</td></tr><tr><td>blur.shard.block.cache.v2.store (OFF_HEAP)</td><td>v2 version of block cache only. This is used to control if the block are created on or off heap.  Values are OFF_HEAP | ON_HEAP</td></tr><tr><td>blur.shard.block.cache.v2.read.cache.ext</td><td>v2 version of block cache only. This specifies what file types should be cached during reads.  Comma delimited list.</td></tr><tr><td>blur.shard.block.cache.v2.read.nocache.ext (fdt)</td><td>v2 version of block cache only. This specifies what file types should NOT be cached during reads.  Comma delimited list.</td></tr><tr><td>blur.shard.block.cache.v2.read.default (true)</td><td>v2 version of block cache only. This specifies
  the default behavior if a file type is not specified in the cache or nocache lists during reads.  Values true | false</td></tr><tr><td>blur.shard.block.cache.v2.write.cache.ext</td><td>v2 version of block cache only. This specifies what file types should be cached during writes.  Comma delimited list.</td></tr><tr><td>blur.shard.block.cache.v2.write.nocache.ext (fdt)</td><td>v2 version of block cache only. This specifies what file types should NOT be cached during writes.  Comma delimited list.</td></tr><tr><td>blur.shard.block.cache.v2.write.default (true)</td><td>v2 version of block cache only. This specifies the default behavior if a file type is not specified in the cache or nocache lists during writes.  Values true | false</td></tr><tr><td>blur.shard.index.compressionmode (FAST)</td><td>Sets the compression of used in the storing of the fields. Valid entries are FAST FAST_DECOMPRESSION HIGH_COMPRESSION</td></tr><tr><td>blur.shard.index.chunksize (16384)</td><td>Sets the chunks
 ize of the compression in the storing of the fields. Larger values may produce smaller fdt files at the small cost of fetch performance.</td></tr><tr><td>blur.shard.buffercache.8192 (67108864)</td><td>The amount of memory to be used by 8K byte buffers.  Note if you change the "blur.shard.block.cache.v2.cacheBlockSize" or "blur.shard.block.cache.v2.fileBufferSize" you should adjust the buffer sizes as well as the total memory allocated.  For example if you increased the "blur.shard.block.cache.v2.fileBufferSize" to 64K (65536) then this property should to "blur.shard.buffercache.65536".  You can also define as many of these properties as needed.</td></tr><tr><td>blur.shard.buffercache.1024 (8388608)</td><td>The amount of memory to be used by 1K byte buffers.  Note if you change the "blur.shard.block.cache.v2.cacheBlockSize" or "blur.shard.block.cache.v2.fileBufferSize" you should adjust the buffer sizes as well as the total memory allocated.</td></tr><tr><td>blur.shard.safemodedelay 
 (5000)</td><td>The number of milliseconds to wait for the cluster to settle once changes have ceased.</td></tr><tr><td>blur.shard.server.minimum.before.safemode.exit (0)</td><td>The number of shard servers in a cluster that have to be registered before the cluster will exit safemode.</td></tr><tr><td>blur.shard.time.between.commits (30000)</td><td>The default time between index commits</td></tr><tr><td>blur.shard.time.between.refreshs (3000)</td><td>The default time between index refreshs</td></tr><tr><td>blur.shard.merge.thread.count (8)</td><td>The max number of threads used during index merges</td></tr><tr><td>blur.max.clause.count (1024)</td><td>The maximum number of clauses in a BooleanQuery</td></tr><tr><td>blur.indexmanager.search.thread.count (8)</td><td>The number of thread used for parallel searching in the index manager</td></tr><tr><td>blur.indexmanager.mutate.thread.count (8)</td><td>The number of thread used for parallel mutating in the index manager</td></tr><tr><td>b
 lur.indexmanager.facet.thread.count (8)</td><td>The number of thread used for parallel faceting in the index manager</td></tr><tr><td>blur.shard.warmup.thread.count (8)</td><td>Number of threads used for warming up the index</td></tr><tr><td>blur.shard.fetchcount (110)</td><td>The fetch count per Lucene search, this fetches pointers to hits</td></tr><tr><td>blur.max.heap.per.row.fetch (10000000)</td><td>Heap limit on row fetch, once this limit has been reached the request will return</td></tr><tr><td>blur.max.records.per.row.fetch.request (1000)</td><td>The maximum number of records in a single row fetch</td></tr><tr><td>blur.gui.shard.port (40090)</td><td>The http status page port for the shard server</td></tr><tr><td>blur.shard.filtered.server.class</td><td>To intercept the calls made to the shard server and perform server side changes to the calls extend org.apache.blur.server.FilteredBlurServer.</td></tr><tr><td>blur.shard.blurindex.class</td><td>Defines the blur index class to 
 be used to handle index requests.  This class has to extend org.apache.blur.manager.writer.BlurIndex.  This can be defined globally as well as per table.</td></tr><tr><td>blur.shard.read.interceptor</td><td>Defines the blur read interceptor class that can mask data from query results as well as data fetches.</td></tr><tr><td>blur.lucene.fst.bytearray.factory</td><td>Defines the byte array factory class that blur will use to manage the FST trees in Lucene (extends org.apache.blur.lucene.fst.ByteArrayFactory).</td></tr><tr><td>blur.shard.queue.max.pause.time.when.empty (1000)</td><td>The maximum amount of time to pause before checking the queue for RowMutations.</td></tr><tr><td>blur.shard.queue.max.writer.lock.time (5000)</td><td>The maximum amount of time that the queue can lock the writer before committing.  NOTE: Any other writer event will cause the queue to release it's lock on the writer.</td></tr><tr><td>blur.shard.queue.max.queue.batch.size (100)</td><td>The maximum number of
  RowMutations the writer can drain from the queue at a time.</td></tr><tr><td>blur.shard.queue.max.inmemory.length (100)</td><td>The maximum number of RowMutations that can exist in the inmemory block queue any point in time.  NOTE: This is PER SHARD.</td></tr><tr><td>blur.shard.deep.paging.cache.size (1000)</td><td>The number of deep paging cache entries kept in memory for faster deep paging.</td></tr>
 			</table>
 
             <h3 id="shard-blur-env">blur-env.sh</h3>


Mime
View raw message