-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/1295/#review2066
-----------------------------------------------------------



src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserverCoprocessor.java
<http://review.cloudera.org/r/1295/#comment6485>

    No need to return something. We are assuming the 'result' object is 
sufficiently modifiable by its methods. An empty result is passed in to be 
populated. 



src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserverCoprocessor.java
<http://review.cloudera.org/r/1295/#comment6486>

    We assume the Get is fully modifiable via its methods. Replacing the query 
with something else is not a problem: The coprocessor can do just about 
anything from the preXXX hooks, populate the Result object with data, then tell 
the framework to return without invoking the base function.



src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
<http://review.cloudera.org/r/1295/#comment6487>

    Ok



src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
<http://review.cloudera.org/r/1295/#comment6488>

    Yes, if you play with the result but don't call e.bypass() then there is no 
impact. To change the result of an increment you need to use postIncrement.



src/main/java/org/apache/hadoop/hbase/regionserver/CoprocessorHost.java
<http://review.cloudera.org/r/1295/#comment6489>

    I'll add a note to the javadoc.


- Andrew


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 patch 
> allows observers to 1) keep any subsequently chained observer from executing, 
> or 2) prevent default behavior from executing. This latter option allows a 
> preXXX hook to completely reimplement something.
> 
> I also found and fixed some logic bugs in coprocessor framework integration 
> 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/BaseRegionObserverCoprocessor.java
>  134ed2f 
>   
> src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorEnvironment.java 
> 654b179 
>   src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java 
> 10dfff4 
>   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 
> 8248f5f 
>   src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java 
> 345790f 
>   
> src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverStacking.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
> 
>

Reply via email to