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 6AC2D91B5 for ; Wed, 21 Mar 2012 18:28:04 +0000 (UTC) Received: (qmail 34491 invoked by uid 500); 21 Mar 2012 18:28:04 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 34404 invoked by uid 500); 21 Mar 2012 18:28:04 -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 34350 invoked by uid 99); 21 Mar 2012 18:28:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2012 18:28:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_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; Wed, 21 Mar 2012 18:28:03 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 237211B6CDB for ; Wed, 21 Mar 2012 18:27:43 +0000 (UTC) Date: Wed, 21 Mar 2012 18:27:43 +0000 (UTC) From: "Andrew Purtell (Issue Comment Edited) (JIRA)" To: issues@hbase.apache.org Message-ID: <2068182340.43263.1332354463149.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <825356208.18943.1331817577706.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Issue Comment Edited] (HBASE-5584) Coprocessor hooks can be called in the respective handlers 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-5584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13234806#comment-13234806 ] Andrew Purtell edited comment on HBASE-5584 at 3/21/12 6:26 PM: ---------------------------------------------------------------- In the patch I don't see where the unit test waits sufficiently for the async operation to complete. It's going to be racy. Use a CountDownLatch or similar to wait in the test for the handler? Edit: Ok, didn't refresh this page before commenting. Consider that a sleep may not be the best option, you don't eliminate a race against async activity, just hope to get out in front of it by waiting for a while. was (Author: apurtell): In the patch I don't see where the unit test waits sufficiently for the async operation to complete. It's going to be racy. Use a CountDownLatch or similar to wait in the test for the handler? > Coprocessor hooks can be called in the respective handlers > ---------------------------------------------------------- > > Key: HBASE-5584 > URL: https://issues.apache.org/jira/browse/HBASE-5584 > Project: HBase > Issue Type: Improvement > Components: coprocessors > Reporter: ramkrishna.s.vasudevan > Assignee: ramkrishna.s.vasudevan > Fix For: 0.96.0 > > Attachments: HBASE-5584-1.patch, HBASE-5584.patch > > > Following points can be changed w.r.t to coprocessors > -> Call preCreate, postCreate, preEnable, postEnable, etc. in their respective handlers > -> Currently it is called in the HMaster thus making the postApis async w.r.t the handlers > -> Similar is the case with the balancer. > with current behaviour once we are in the postEnable(for eg) we any way need to wait for the main enable handler to > be completed. > We should ensure that we dont wait in the main thread so again we need to spawn a thread and wait on that. > On the other hand if the pre and post api is called on the handlers then only that handler thread will be > used in the pre/post apis > If the above said plan is ok i can prepare a patch for all such related changes. -- 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