Return-Path: X-Original-To: apmail-incubator-accumulo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-accumulo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8ADAE99A1 for ; Mon, 30 Jan 2012 19:01:04 +0000 (UTC) Received: (qmail 21760 invoked by uid 500); 30 Jan 2012 19:01:04 -0000 Delivered-To: apmail-incubator-accumulo-commits-archive@incubator.apache.org Received: (qmail 21741 invoked by uid 500); 30 Jan 2012 19:01:03 -0000 Mailing-List: contact accumulo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: accumulo-dev@incubator.apache.org Delivered-To: mailing list accumulo-commits@incubator.apache.org Received: (qmail 21734 invoked by uid 99); 30 Jan 2012 19:01:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jan 2012 19:01:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jan 2012 19:01:01 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id EA3AE23889ED; Mon, 30 Jan 2012 19:00:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: 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 Date: Mon, 30 Jan 2012 19:00:39 -0000 To: accumulo-commits@incubator.apache.org From: kturner@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120130190039.EA3AE23889ED@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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())); ;