accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1498901 - in /accumulo/branches/1.4/src: ./ core/ proxy/proxy.properties proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java server/ server/src/ server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
Date Tue, 02 Jul 2013 12:25:03 GMT
Author: kturner
Date: Tue Jul  2 12:25:03 2013
New Revision: 1498901

URL: http://svn.apache.org/r1498901
Log:
ACCUMULO-1467 keep proxy in 1.4 consistent w/ 1.5 

Modified:
    accumulo/branches/1.4/src/   (props changed)
    accumulo/branches/1.4/src/core/   (props changed)
    accumulo/branches/1.4/src/proxy/proxy.properties
    accumulo/branches/1.4/src/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
    accumulo/branches/1.4/src/server/   (props changed)
    accumulo/branches/1.4/src/server/src/   (props changed)
    accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
  (props changed)

Propchange: accumulo/branches/1.4/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5:r1484916-1484928

Propchange: accumulo/branches/1.4/src/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/core:r1484916-1484928

Modified: accumulo/branches/1.4/src/proxy/proxy.properties
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/proxy/proxy.properties?rev=1498901&r1=1498900&r2=1498901&view=diff
==============================================================================
--- accumulo/branches/1.4/src/proxy/proxy.properties (original)
+++ accumulo/branches/1.4/src/proxy/proxy.properties Tue Jul  2 12:25:03 2013
@@ -17,7 +17,7 @@ useMockInstance=false
 useMiniAccumulo=false
 protocolFactory=org.apache.thrift.protocol.TCompactProtocol$Factory
 port=42424
+maxFrameSize=16M
 
 instance=test
 zookeepers=localhost:2181
-

Modified: accumulo/branches/1.4/src/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java?rev=1498901&r1=1498900&r2=1498901&view=diff
==============================================================================
--- accumulo/branches/1.4/src/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java (original)
+++ accumulo/branches/1.4/src/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java Tue
Jul  2 12:25:03 2013
@@ -22,8 +22,9 @@ import java.io.IOException;
 import java.lang.reflect.Constructor;
 import java.util.Properties;
 
-import org.apache.accumulo.proxy.thrift.AccumuloProxy;
+import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.minicluster.MiniAccumuloCluster;
+import org.apache.accumulo.proxy.thrift.AccumuloProxy;
 import org.apache.log4j.Logger;
 import org.apache.thrift.TProcessor;
 import org.apache.thrift.protocol.TCompactProtocol;
@@ -114,6 +115,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);
     
@@ -121,7 +123,10 @@ public class Proxy {
     
     THsHaServer.Args args = new THsHaServer.Args(socket);
     args.processor(processor);
-    args.transportFactory(new TFramedTransport.Factory());
+    final long maxFrameSize = AccumuloConfiguration.getMemoryInBytes(properties.getProperty("maxFrameSize",
"16M"));
+    if (maxFrameSize > Integer.MAX_VALUE)
+      throw new RuntimeException(maxFrameSize + " is larger than MAX_INT");
+    args.transportFactory(new TFramedTransport.Factory((int)maxFrameSize));
     args.protocolFactory(protoClass.newInstance());
     return new THsHaServer(args);
   }

Propchange: accumulo/branches/1.4/src/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server:r1484916-1484928

Propchange: accumulo/branches/1.4/src/server/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server/src:r1484916-1484928

Propchange: accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java:r1484916-1484928



Mime
View raw message