Return-Path: Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: (qmail 9363 invoked from network); 30 Aug 2010 19:52:36 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Aug 2010 19:52:36 -0000 Received: (qmail 65373 invoked by uid 500); 30 Aug 2010 19:52:36 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 65298 invoked by uid 500); 30 Aug 2010 19:52:35 -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 65290 invoked by uid 99); 30 Aug 2010 19:52:35 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Aug 2010 19:52:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Aug 2010 19:52:17 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7UJpu8o011226 for ; Mon, 30 Aug 2010 19:51:56 GMT Message-ID: <23710322.74001283197916147.JavaMail.jira@thor> Date: Mon, 30 Aug 2010 15:51:56 -0400 (EDT) From: "Jean-Daniel Cryans (JIRA)" To: issues@hbase.apache.org Subject: [jira] Updated: (HBASE-2937) Facilitate Timeouts In HBase Client In-Reply-To: <2956572.21691282870435526.JavaMail.jira@thor> 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-2937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jean-Daniel Cryans updated HBASE-2937: -------------------------------------- Fix Version/s: 0.90.0 (was: 0.89.20100621) Changing the target to 0.90.0 since 0.89 releases are only snapshots of trunk. @Karthick, could you post the patches on review board? It'll instantly get more chances of being reviewed and ideally committed. Don't forget to set the group to "hbase" and the bug to the jira handle so it will be linked back here. http://review.hbase.org > Facilitate Timeouts In HBase Client > ----------------------------------- > > Key: HBASE-2937 > URL: https://issues.apache.org/jira/browse/HBASE-2937 > Project: HBase > Issue Type: New Feature > Components: client > Affects Versions: 0.89.20100621 > Reporter: Karthick Sankarachary > Fix For: 0.90.0 > > Attachments: HBASE-2937.patch > > > Currently, there is no way to force an operation on the HBase client (viz. HTable) to time out if a certain amount of time has elapsed. In other words, all invocations on the HTable class are veritable blocking calls, which will not return until a response (successful or otherwise) is received. > In general, there are two ways to handle timeouts: (a) call the operation in a separate thread, until it returns a response or the wait on the thread times out and (b) have the underlying socket unblock the operation if the read times out. The downside of the former approach is that it consumes more resources in terms of threads and callables. > Here, we describe a way to specify and handle timeouts on the HTable client, which relies on the latter approach (i.e., socket timeouts). Right now, the HBaseClient sets the socket timeout to the value of the "ipc.ping.interval" parameter, which is also how long it waits before pinging the server in case of a failure. The goal is to allow clients to set that timeout on the fly through HTable. Rather than adding an optional timeout argument to every HTable operation, we chose to make it a property of HTable which effectively applies to every method that involves a remote operation. > In order to propagate the timeout from HTable to HBaseClient, we replaced all occurrences of ServerCallable in HTable with an extension called ClientCallable, which sets the timeout on the region server interface, once it has been instantiated, through the HConnection object. The latter, in turn, asks HBaseRPC to pass that timeout to the corresponding Invoker, so that it may inject the timeout at the time the invocation is made on the region server proxy. Right before the request is sent to the server, we set the timeout specified by the client on the underlying socket. > In conclusion, this patch will afford clients the option of performing an HBase operation until it completes or a specified timeout elapses. Note that a timeout of zero is interpreted as an infinite timeout. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.