You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by km...@apache.org on 2015/11/13 00:46:34 UTC

knox git commit: KNOX-624: Expose configuration for Jetty's request and response buffer sizes. Fix property names.

Repository: knox
Updated Branches:
  refs/heads/master 43bb06d66 -> 99d7b8f73


KNOX-624: Expose configuration for Jetty's request and response buffer sizes. Fix property names.


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/99d7b8f7
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/99d7b8f7
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/99d7b8f7

Branch: refs/heads/master
Commit: 99d7b8f73616e182c4c04101aff7cdbc9d0ed6c6
Parents: 43bb06d
Author: Kevin Minder <ke...@hortonworks.com>
Authored: Thu Nov 12 18:46:30 2015 -0500
Committer: Kevin Minder <ke...@hortonworks.com>
Committed: Thu Nov 12 18:46:30 2015 -0500

----------------------------------------------------------------------
 .../apache/hadoop/gateway/config/impl/GatewayConfigImpl.java | 8 ++++----
 .../hadoop/gateway/config/impl/GatewayConfigImplTest.groovy  | 5 +++++
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/99d7b8f7/gateway-server/src/main/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImpl.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImpl.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImpl.java
index 0b3b106..6aa5418 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImpl.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImpl.java
@@ -114,10 +114,10 @@ public class GatewayConfigImpl extends Configuration implements GatewayConfig {
   private static final String EPHEMERAL_DH_KEY_SIZE = GATEWAY_CONFIG_FILE_PREFIX + ".jdk.tls.ephemeralDHKeySize";
   private static final String HTTP_CLIENT_MAX_CONNECTION = GATEWAY_CONFIG_FILE_PREFIX + ".httpclient.maxConnections";
   private static final String THREAD_POOL_MAX = GATEWAY_CONFIG_FILE_PREFIX + ".threadpool.max";
-  public static final String HTTP_SERVER_REQUEST_BUFFER = GATEWAY_CONFIG_FILE_PREFIX + "httpserver.requestBuffer";
-  public static final String HTTP_SERVER_REQUEST_HEADER_BUFFER = GATEWAY_CONFIG_FILE_PREFIX + "httpserver.requestHeaderBuffer";
-  public static final String HTTP_SERVER_RESPONSE_BUFFER = GATEWAY_CONFIG_FILE_PREFIX + "httpserver.responseBuffer";
-  public static final String HTTP_SERVER_RESPONSE_HEADER_BUFFER = GATEWAY_CONFIG_FILE_PREFIX + "httpserver.responseHeaderBuffer";
+  public static final String HTTP_SERVER_REQUEST_BUFFER = GATEWAY_CONFIG_FILE_PREFIX + ".httpserver.requestBuffer";
+  public static final String HTTP_SERVER_REQUEST_HEADER_BUFFER = GATEWAY_CONFIG_FILE_PREFIX + ".httpserver.requestHeaderBuffer";
+  public static final String HTTP_SERVER_RESPONSE_BUFFER = GATEWAY_CONFIG_FILE_PREFIX + ".httpserver.responseBuffer";
+  public static final String HTTP_SERVER_RESPONSE_HEADER_BUFFER = GATEWAY_CONFIG_FILE_PREFIX + ".httpserver.responseHeaderBuffer";
 
   // These config property names are not inline with the convention of using the
   // GATEWAY_CONFIG_FILE_PREFIX as is done by those above. These are left for

http://git-wip-us.apache.org/repos/asf/knox/blob/99d7b8f7/gateway-server/src/test/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImplTest.groovy
----------------------------------------------------------------------
diff --git a/gateway-server/src/test/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImplTest.groovy b/gateway-server/src/test/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImplTest.groovy
index 1902b03..c292744 100644
--- a/gateway-server/src/test/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImplTest.groovy
+++ b/gateway-server/src/test/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImplTest.groovy
@@ -34,6 +34,11 @@ public class GatewayConfigImplTest {
     assertThat( config.getHttpServerResponseBuffer(), is( 32*1024 ) );
     assertThat( config.getHttpServerResponseHeaderBuffer(), is( 8*1024 ) );
 
+    assertThat( GatewayConfigImpl.HTTP_SERVER_REQUEST_BUFFER, is( "gateway.httpserver.requestBuffer" ) );
+    assertThat( GatewayConfigImpl.HTTP_SERVER_REQUEST_HEADER_BUFFER, is( "gateway.httpserver.requestHeaderBuffer" ) );
+    assertThat( GatewayConfigImpl.HTTP_SERVER_RESPONSE_BUFFER, is( "gateway.httpserver.responseBuffer" ) );
+    assertThat( GatewayConfigImpl.HTTP_SERVER_RESPONSE_HEADER_BUFFER, is( "gateway.httpserver.responseHeaderBuffer" ) );
+
     config.setInt( GatewayConfigImpl.HTTP_SERVER_REQUEST_BUFFER, 32*1024 );
     assertThat( config.getHttpServerRequestBuffer(), is( 32*1024 ) );