You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2013/05/21 21:38:20 UTC
svn commit: r1484916 - in /accumulo/branches/1.5/proxy: proxy.properties
src/main/java/org/apache/accumulo/proxy/Proxy.java
Author: ecn
Date: Tue May 21 19:38:20 2013
New Revision: 1484916
URL: http://svn.apache.org/r1484916
Log:
ACCUMULO-1424 add a configuration parameter for max transfer size
Modified:
accumulo/branches/1.5/proxy/proxy.properties
accumulo/branches/1.5/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
Modified: accumulo/branches/1.5/proxy/proxy.properties
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/proxy/proxy.properties?rev=1484916&r1=1484915&r2=1484916&view=diff
==============================================================================
--- accumulo/branches/1.5/proxy/proxy.properties (original)
+++ accumulo/branches/1.5/proxy/proxy.properties Tue May 21 19:38:20 2013
@@ -18,7 +18,7 @@ useMiniAccumulo=false
protocolFactory=org.apache.thrift.protocol.TCompactProtocol$Factory
tokenClass=org.apache.accumulo.core.client.security.tokens.PasswordToken
port=42424
+maxFrameSize=16384000
instance=test
zookeepers=localhost:2181
-
Modified: accumulo/branches/1.5/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java?rev=1484916&r1=1484915&r2=1484916&view=diff
==============================================================================
--- accumulo/branches/1.5/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java (original)
+++ accumulo/branches/1.5/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java Tue May 21 19:38:20 2013
@@ -127,6 +127,7 @@ public class Proxy {
Class<?> proxyProcClass = Class.forName(api.getName() + "$Processor");
Class<?> proxyIfaceClass = Class.forName(api.getName() + "$Iface");
+
@SuppressWarnings("unchecked")
Constructor<? extends TProcessor> proxyProcConstructor = (Constructor<? extends TProcessor>) proxyProcClass.getConstructor(proxyIfaceClass);
@@ -134,7 +135,8 @@ public class Proxy {
THsHaServer.Args args = new THsHaServer.Args(socket);
args.processor(processor);
- args.transportFactory(new TFramedTransport.Factory());
+ final int maxFrameSize = Integer.parseInt(properties.getProperty("maxFrameSize", "16384000"));
+ args.transportFactory(new TFramedTransport.Factory(maxFrameSize));
args.protocolFactory(protoClass.newInstance());
return new THsHaServer(args);
}