define max frame size as constant

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

Branch: refs/heads/blur-342a
Commit: bb119e6d1aaa2269a0dfc3f3f75544bfaf4e1cd8
Parents: 4ca4129
Author: Tim <[email protected]>
Authored: Thu Jul 17 10:17:30 2014 -0400
Committer: Tim <[email protected]>
Committed: Wed Jul 23 16:05:43 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/blur/thrift/ThriftBlurControllerServer.java   | 3 ++-
 .../main/java/org/apache/blur/thrift/ThriftBlurShardServer.java   | 3 ++-
 blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java  | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/bb119e6d/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java
----------------------------------------------------------------------
diff --git 
a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java
 
b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java
index 396b883..03cfc26 100644
--- 
a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java
+++ 
b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java
@@ -39,6 +39,7 @@ import static 
org.apache.blur.utils.BlurConstants.BLUR_GUI_CONTROLLER_PORT;
 import static 
org.apache.blur.utils.BlurConstants.BLUR_HTTP_STATUS_RUNNING_PORT;
 import static 
org.apache.blur.utils.BlurConstants.BLUR_MAX_RECORDS_PER_ROW_FETCH_REQUEST;
 import static org.apache.blur.utils.BlurConstants.BLUR_THRIFT_MAX_FRAME_SIZE;
+import static 
org.apache.blur.utils.BlurConstants.BLUR_THRIFT_DEFAULT_MAX_FRAME_SIZE;
 import static org.apache.blur.utils.BlurConstants.BLUR_ZOOKEEPER_CONNECTION;
 import static org.apache.blur.utils.BlurConstants.BLUR_ZOOKEEPER_TIMEOUT;
 import static 
org.apache.blur.utils.BlurConstants.BLUR_ZOOKEEPER_TIMEOUT_DEFAULT;
@@ -171,7 +172,7 @@ public class ThriftBlurControllerServer extends 
ThriftServer {
     
server.setAcceptQueueSizePerThread(configuration.getInt(BLUR_CONTROLLER_THRIFT_ACCEPT_QUEUE_SIZE_PER_THREAD,
 4));
     
server.setMaxReadBufferBytes(configuration.getLong(BLUR_CONTROLLER_THRIFT_MAX_READ_BUFFER_BYTES,
 Long.MAX_VALUE));
     
server.setSelectorThreads(configuration.getInt(BLUR_CONTROLLER_THRIFT_SELECTOR_THREADS,
 2));
-    server.setMaxFrameSize(configuration.getInt(BLUR_THRIFT_MAX_FRAME_SIZE, 
16384000));
+    server.setMaxFrameSize(configuration.getInt(BLUR_THRIFT_MAX_FRAME_SIZE, 
BLUR_THRIFT_DEFAULT_MAX_FRAME_SIZE));
 
     int configGuiPort = 
Integer.parseInt(configuration.get(BLUR_GUI_CONTROLLER_PORT));
     int instanceGuiPort = configGuiPort + serverIndex;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/bb119e6d/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 f740482..179d0f0 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
@@ -46,6 +46,7 @@ import static 
org.apache.blur.utils.BlurConstants.BLUR_SHARD_THRIFT_SELECTOR_THR
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_WARMUP_DISABLED;
 import static 
org.apache.blur.utils.BlurConstants.BLUR_SHARD_WARMUP_THREAD_COUNT;
 import static org.apache.blur.utils.BlurConstants.BLUR_THRIFT_MAX_FRAME_SIZE;
+import static 
org.apache.blur.utils.BlurConstants.BLUR_THRIFT_DEFAULT_MAX_FRAME_SIZE;
 import static org.apache.blur.utils.BlurConstants.BLUR_ZOOKEEPER_CONNECTION;
 import static org.apache.blur.utils.BlurConstants.BLUR_ZOOKEEPER_TIMEOUT;
 import static 
org.apache.blur.utils.BlurConstants.BLUR_ZOOKEEPER_TIMEOUT_DEFAULT;
@@ -287,7 +288,7 @@ public class ThriftBlurShardServer extends ThriftServer {
     
server.setAcceptQueueSizePerThread(configuration.getInt(BLUR_SHARD_THRIFT_ACCEPT_QUEUE_SIZE_PER_THREAD,
 4));
     
server.setMaxReadBufferBytes(configuration.getLong(BLUR_SHARD_THRIFT_MAX_READ_BUFFER_BYTES,
 Long.MAX_VALUE));
     
server.setSelectorThreads(configuration.getInt(BLUR_SHARD_THRIFT_SELECTOR_THREADS,
 2));
-    server.setMaxFrameSize(config.getInt(BLUR_THRIFT_MAX_FRAME_SIZE, 
16384000));
+    server.setMaxFrameSize(config.getInt(BLUR_THRIFT_MAX_FRAME_SIZE, 
BLUR_THRIFT_DEFAULT_MAX_FRAME_SIZE));
 
     // This will shutdown the server when the correct path is set in zk
     BlurShutdown shutdown = new BlurShutdown() {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/bb119e6d/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 e8d406e..66fbe8d 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
@@ -145,7 +145,8 @@ public class BlurConstants {
   public static final String BLUR_LUCENE_FST_BYTEARRAY_FACTORY = 
"blur.lucene.fst.bytearray.factory";
 
   public static final String BLUR_THRIFT_MAX_FRAME_SIZE = 
"blur.thrift.max.frame.size";
-
+  public static final int BLUR_THRIFT_DEFAULT_MAX_FRAME_SIZE = 16384000;
+  
   public static final String BLUR_SHARD_FILTERED_SERVER_CLASS = 
"blur.shard.filtered.server.class";
   public static final String BLUR_CONTROLLER_FILTERED_SERVER_CLASS = 
"blur.controller.filtered.server.class";
 

Reply via email to