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 99D8173D1 for ; Mon, 10 Oct 2011 22:32:51 +0000 (UTC) Received: (qmail 33458 invoked by uid 500); 10 Oct 2011 22:32:51 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 33438 invoked by uid 500); 10 Oct 2011 22:32:51 -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 33430 invoked by uid 99); 10 Oct 2011 22:32:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2011 22:32:51 +0000 X-ASF-Spam-Status: No, hits=-2000.5 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; Mon, 10 Oct 2011 22:32:50 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B51E330153B for ; Mon, 10 Oct 2011 22:32:29 +0000 (UTC) Date: Mon, 10 Oct 2011 22:32:29 +0000 (UTC) From: "Liyin Tang (Updated) (JIRA)" To: issues@hbase.apache.org Message-ID: <131216726.16713.1318285949743.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <326634660.16141.1318276350710.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HBASE-4568) Make zk dump jsp response more quickly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-4568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Liyin Tang updated HBASE-4568: ------------------------------ Description: For each zk dump, currently hbase will create a zk client instance every time. This is quite slow when any machines in the quorum is dead. Because it will connect to each machine in the zk quorum again. HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER); Configuration conf = master.getConfiguration(); HBaseAdmin hbadmin = new HBaseAdmin(conf); HConnection connection = hbadmin.getConnection(); ZooKeeperWatcher watcher = connection.getZooKeeperWatcher(); So we can simplify this: HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER); ZooKeeperWatcher watcher = master.getZooKeeperWatcher(); Also when hbase call getServerStats() for each machine in the zk quorum, it hard coded the default time out as 1 min. It would be nice to make this configurable and set it to a low time out. When hbase tries to connect to each machine in the zk quorum, it will create the socket, and then set the socket time out, and read it with this time out. It means hbase will create a socket and connect to the zk server with 0 time out at first, which will take a long time. Because a timeout of zero is interpreted as an infinite timeout. The connection will then block until established or an error occurs. was: For each zk dump, currently hbase will create a zk client instance every time. This is quite slow when any machines in the quorum is dead. Because it will connect to each machine in the zk quorum again. HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER); Configuration conf = master.getConfiguration(); HBaseAdmin hbadmin = new HBaseAdmin(conf); HConnection connection = hbadmin.getConnection(); ZooKeeperWatcher watcher = connection.getZooKeeperWatcher(); So we can simplify this: HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER); ZooKeeperWatcher watcher = master.getZooKeeperWatcher(); Also when hbase call getServerStats() for each machine in the zk quorum, it hard coded the default time out as 1 min. It would be nice to make this configurable and set it to a low time out. > Make zk dump jsp response more quickly > -------------------------------------- > > Key: HBASE-4568 > URL: https://issues.apache.org/jira/browse/HBASE-4568 > Project: HBase > Issue Type: Improvement > Reporter: Liyin Tang > Assignee: Liyin Tang > > For each zk dump, currently hbase will create a zk client instance every time. > This is quite slow when any machines in the quorum is dead. Because it will connect to each machine in the zk quorum again. > HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER); > Configuration conf = master.getConfiguration(); > HBaseAdmin hbadmin = new HBaseAdmin(conf); > HConnection connection = hbadmin.getConnection(); > ZooKeeperWatcher watcher = connection.getZooKeeperWatcher(); > So we can simplify this: > HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER); > ZooKeeperWatcher watcher = master.getZooKeeperWatcher(); > Also when hbase call getServerStats() for each machine in the zk quorum, it hard coded the default time out as 1 min. > It would be nice to make this configurable and set it to a low time out. > When hbase tries to connect to each machine in the zk quorum, it will create the socket, and then set the socket time out, and read it with this time out. > It means hbase will create a socket and connect to the zk server with 0 time out at first, which will take a long time. > Because a timeout of zero is interpreted as an infinite timeout. The connection will then block until established or an error occurs. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira