Return-Path: Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: (qmail 78289 invoked from network); 15 Dec 2010 02:37:23 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Dec 2010 02:37:23 -0000 Received: (qmail 19100 invoked by uid 500); 15 Dec 2010 02:37:23 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 18912 invoked by uid 500); 15 Dec 2010 02:37:23 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 18899 invoked by uid 99); 15 Dec 2010 02:37:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Dec 2010 02:37:22 +0000 X-ASF-Spam-Status: No, hits=1.8 required=10.0 tests=FH_HELO_EQ_D_D_D_D,FREEMAIL_FROM,MIME_QP_LONG_LINE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 184.73.217.71 is neither permitted nor denied by domain of ryanobjc@gmail.com) Received: from [184.73.217.71] (HELO ip-10-202-7-187.ec2.internal) (184.73.217.71) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Dec 2010 02:37:16 +0000 Received: from ip-10-202-7-187.ec2.internal (localhost [127.0.0.1]) by ip-10-202-7-187.ec2.internal (Postfix) with ESMTP id 7065A8A215; Wed, 15 Dec 2010 02:36:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: Review Request: Allow Observers to completely override base function From: "Ryan Rawson" To: "Jonathan Gray" , "Mingjie Lai" Date: Wed, 15 Dec 2010 02:36:55 -0000 Message-ID: <20101215023655.24974.19248@ip-10-202-7-187.ec2.internal> Cc: "Andrew Purtell" , jiraposter@review.hbase.org, dev@hbase.apache.org, "Ryan Rawson" In-Reply-To: <20101215021622.3648.4186@ip-10-202-7-187.ec2.internal> References: <20101215021622.3648.4186@ip-10-202-7-187.ec2.internal> X-Virus-Checked: Checked by ClamAV on apache.org ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://review.cloudera.org/r/1295/#review2063 ----------------------------------------------------------- src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserverCoproce= ssor.java presumably a co-processor could modify the Get object to implement poli= cy? Another consideration is replacing the Get query with an alternate que= ry, for example we have InternalGet subclasses for additional functionality= , I'm just winging this though. src/main/java/org/apache/hadoop/hbase/regionserver/CoprocessorHost.java unless you need CAS semantics, you can just use volatile here. We are = over-using the Atomic* stuff sometimes. - Ryan On 2010-12-14 18:16:21, Andrew Purtell wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://review.cloudera.org/r/1295/ > ----------------------------------------------------------- > = > (Updated 2010-12-14 18:16:21) > = > = > Review request for hbase, Jonathan Gray and Mingjie Lai. > = > = > Summary > ------- > = > Currently an observer can act as a filter or translator but cannot stop a= subsequent call down to the base method for get, put, delete, etc. This pa= tch allows observers to 1) keep any subsequently chained observer from exec= uting, or 2) prevent default behavior from executing. This latter option al= lows a preXXX hook to completely reimplement something. > = > I also found and fixed some logic bugs in coprocessor framework integrati= on in HRegion. > = > I will squelch the added extraneous whitespace upon commit. > = > = > This addresses bug HBASE-3348. > http://issues.apache.org/jira/browse/HBASE-3348 > = > = > Diffs > ----- > = > src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserverCop= rocessor.java 134ed2f = > src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorEnvironmen= t.java 654b179 = > src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java 1= 0dfff4 = > src/main/java/org/apache/hadoop/hbase/regionserver/CoprocessorHost.java= c57ca0c = > src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java cf9cad0 = > src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 8= 248f5f = > src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.= java 345790f = > src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverSta= cking.java 9ef3562 = > = > Diff: http://review.cloudera.org/r/1295/diff > = > = > Testing > ------- > = > All coprocessor unit tests pass. No failures of other unit tests observed= that might be related to these changes. > = > = > Thanks, > = > Andrew > = >