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 9AE0517E37 for ; Tue, 28 Oct 2014 01:03:12 +0000 (UTC) Received: (qmail 79087 invoked by uid 500); 28 Oct 2014 01:03:12 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 79044 invoked by uid 500); 28 Oct 2014 01:03:12 -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 79020 invoked by uid 99); 28 Oct 2014 01:03:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Oct 2014 01:03:12 +0000 Date: Tue, 28 Oct 2014 01:03:12 +0000 (UTC) From: "Manukranth Kolloju (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-12075) Preemptive Fast Fail 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-12075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Manukranth Kolloju updated HBASE-12075: --------------------------------------- Release Note: The Interceptor Framework can be used to modify the behavior of retrying client calls on the client side without altering the core of the client code. This framework gives reasonable flexibility with little intrusion. An example use case of the interceptor is to have a custom sleep strategy within retries. We can consider a simple accounting system where we have a time spent quota on the client side for the servers. And we would want to error some of the calls if we have consumed the server's quota already. Interceptor.intercept() { // would keep track the start time. server = getServer() // Throw if we already spent a lot of time on a server. timeSpentOnServer = getTimeSpentSinceLastReset(server) if ( timeSpentOnServer > THRESHOLD) throw new Exception("We spend too long on this server") setServerStartTime(server) } Interceptor.handleFailure() { server = getServer() updateTimeSpentOnServer(server) } Interceptor.updateFailureInfo() { server = getServer() updateTimeSpentOnServer(server) } > Preemptive Fast Fail > -------------------- > > Key: HBASE-12075 > URL: https://issues.apache.org/jira/browse/HBASE-12075 > Project: HBase > Issue Type: Sub-task > Components: Client > Affects Versions: 0.99.0, 2.0.0, 0.98.6.1 > Reporter: Manukranth Kolloju > Assignee: Manukranth Kolloju > Attachments: 0001-Add-a-test-case-for-Preemptive-Fast-Fail.patch, 0001-HBASE-12075-Implement-Preemptive-Fast-Fail.patch, 0001-HBASE-12075-Implement-Preemptive-Fast-Fail.patch, 0001-HBASE-12075-Implement-Preemptive-Fast-Fail.patch, 0001-HBASE-12075-Implement-Preemptive-Fast-Fail.patch, 0001-HBASE-12075-Implement-Preemptive-Fast-Fail.patch, 0001-HBASE-12075-Implement-Preemptive-Fast-Fail.patch, 0001-HBASE-12075-Implement-Preemptive-Fast-Fail.patch, 0001-HBASE-12075-Implement-Preemptive-Fast-Fail.patch, 0001-Implement-Preemptive-Fast-Fail.patch, 0001-Implement-Preemptive-Fast-Fail.patch, 0001-Implement-Preemptive-Fast-Fail.patch, 0001-Implement-Preemptive-Fast-Fail.patch, 0001-Implement-Preemptive-Fast-Fail.patch > > > In multi threaded clients, we use a feature developed on 0.89-fb branch called Preemptive Fast Fail. This allows the client threads which would potentially fail, fail fast. The idea behind this feature is that we allow, among the hundreds of client threads, one thread to try and establish connection with the regionserver and if that succeeds, we mark it as a live node again. Meanwhile, other threads which are trying to establish connection to the same server would ideally go into the timeouts which is effectively unfruitful. We can in those cases return appropriate exceptions to those clients instead of letting them retry. -- This message was sent by Atlassian JIRA (v6.3.4#6332)