Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C99A17145 for ; Tue, 9 Aug 2011 16:26:52 +0000 (UTC) Received: (qmail 42324 invoked by uid 500); 9 Aug 2011 16:26:52 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 42255 invoked by uid 500); 9 Aug 2011 16:26:52 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 42247 invoked by uid 99); 9 Aug 2011 16:26:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2011 16:26:51 +0000 X-ASF-Spam-Status: No, hits=-2000.8 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2011 16:26:48 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 550D5B421C for ; Tue, 9 Aug 2011 16:26:27 +0000 (UTC) Date: Tue, 9 Aug 2011 16:26:27 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: <1910891795.20631.1312907187345.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1880808198.18754.1312858347676.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HBASE-4181) HConnectionManager can't find cached HRegionInterface makes client very slow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-4181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] stack updated HBASE-4181: ------------------------- Resolution: Fixed Fix Version/s: (was: 0.90.4) 0.92.0 Assignee: Liu Jia Status: Resolved (was: Patch Available) Committed to TRUNK. Thank you for the patch Liu Jia and Ted for review. > HConnectionManager can't find cached HRegionInterface makes client very slow > ---------------------------------------------------------------------------- > > Key: HBASE-4181 > URL: https://issues.apache.org/jira/browse/HBASE-4181 > Project: HBase > Issue Type: Bug > Components: client > Affects Versions: 0.90.4, 0.92.0 > Reporter: Liu Jia > Assignee: Liu Jia > Priority: Critical > Labels: HConnectionManager > Fix For: 0.92.0 > > Attachments: HBASE-4181-trunk-v2.patch, HBASE-4181-trunk-v3.patch, HBASE-4181.patch, HConnectionManager.patch > > > HRegionInterface getHRegionConnection(final String hostname, > final int port, final InetSocketAddress isa, final boolean master) > throws IOException > ///////////////////////// > String rsName = isa != null ? isa.toString() : Addressing > .createHostAndPortStr(hostname, port); > > ////here,if isa is null, the Addressing created a address like "node41:60010" > ////should use "isa.toString():new InetSocketAddress(hostname, port).toString();" > ////instead of "Addressing.createHostAndPortStr(hostname, port);" > server = this.servers.get(rsName); > if (server == null) { > // create a unique lock for this RS (if necessary) > this.connectionLock.putIfAbsent(rsName, rsName); > // get the RS lock > synchronized (this.connectionLock.get(rsName)) { > // do one more lookup in case we were stalled above > server = this.servers.get(rsName); > if (server == null) { > try { > if (clusterId.hasId()) { > conf.set(HConstants.CLUSTER_ID, clusterId.getId()); > } > // Only create isa when we need to. > InetSocketAddress address = isa != null ? isa > : new InetSocketAddress(hostname, port); > // definitely a cache miss. establish an RPC for this RS > server = (HRegionInterface) HBaseRPC.waitForProxy( > serverInterfaceClass, HRegionInterface.VERSION, address, > this.conf, this.maxRPCAttempts, this.rpcTimeout, > this.rpcTimeout); > this.servers.put(address.toString(), server); > > ////but here address.toString() send an address like "node41/10.61.2l.171:60010 > ////so this method can never get cached address and make client request very slow due to it's synchronized. > > > } catch (RemoteException e) { > LOG.warn("RemoteException connecting to RS", e); > // Throw what the RemoteException was carrying. > throw RemoteExceptionHandler.decodeRemoteException(e); > } > } > } > /////////////////////// -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira