You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kt...@apache.org on 2012/01/30 20:00:39 UTC
svn commit: r1237929 - in /incubator/accumulo/branches/1.4/src:
core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java
server/src/main/java/org/apache/accumulo/server/master/Master.java
Author: kturner
Date: Mon Jan 30 19:00:39 2012
New Revision: 1237929
URL: http://svn.apache.org/viewvc?rev=1237929&view=rev
Log:
ACCUMULO-327 Upped connection pool timeout for master process
Modified:
incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java
incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
Modified: incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java?rev=1237929&r1=1237928&r2=1237929&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java (original)
+++ incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java Mon Jan 30 19:00:39 2012
@@ -27,9 +27,9 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
-import java.util.concurrent.atomic.AtomicBoolean;
import java.util.Random;
import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.Property;
@@ -528,6 +528,16 @@ public class ThriftTransportPool {
}
}
+ /**
+ * Set the time after which idle connections should be closed
+ *
+ * @param time
+ */
+ public synchronized void setIdleTime(long time) {
+ this.killTime = time;
+ log.debug("Set thrift transport pool idle time to " + time);
+ }
+
private static ThriftTransportPool instance = new ThriftTransportPool();
private static final AtomicBoolean daemonStarted = new AtomicBoolean(false);
Modified: incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1237929&r1=1237928&r2=1237929&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java (original)
+++ incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java Mon Jan 30 19:00:39 2012
@@ -50,6 +50,7 @@ import org.apache.accumulo.core.client.R
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.impl.Tables;
+import org.apache.accumulo.core.client.impl.ThriftTransportPool;
import org.apache.accumulo.core.client.impl.thrift.TableOperation;
import org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType;
import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;
@@ -528,12 +529,15 @@ public class Master implements LiveTServ
}
public Master(String[] args) throws IOException {
+
Accumulo.init("master");
log.info("Version " + Constants.VERSION);
instance = HdfsZooInstance.getInstance();
log.info("Instance " + instance.getInstanceID());
+ ThriftTransportPool.getInstance().setIdleTime(ServerConfiguration.getSiteConfiguration().getTimeInMillis(Property.GENERAL_RPC_TIMEOUT));
+
hostname = Accumulo.getLocalAddress(args).getHostName();
fs = TraceFileSystem.wrap(FileUtil.getFileSystem(CachedConfiguration.getInstance(), ServerConfiguration.getSiteConfiguration()));
;