You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Andrew Purtell (JIRA)" <ji...@apache.org> on 2010/12/14 00:00:06 UTC

[jira] Created: (HBASE-3348) Allow Observers to completely override base function

Allow Observers to completely override base function
----------------------------------------------------

                 Key: HBASE-3348
                 URL: https://issues.apache.org/jira/browse/HBASE-3348
             Project: HBase
          Issue Type: Sub-task
            Reporter: Andrew Purtell
             Fix For: 0.92.0


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 means an observer cannot completely override the base function. To deal with this we can:

- Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 

- Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-3348) Allow Observers to completely override base function

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Purtell updated HBASE-3348:
----------------------------------

    Attachment: HBASE-3348.patch

> Allow Observers to completely override base function
> ----------------------------------------------------
>
>                 Key: HBASE-3348
>                 URL: https://issues.apache.org/jira/browse/HBASE-3348
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.92.0
>
>         Attachments: HBASE-3348.patch
>
>
> 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 means an observer cannot completely override the base function. To deal with this we can:
> - Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 
> - Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 
> The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3348) Allow Observers to completely override base function

Posted by "HBase Review Board (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971547#action_12971547 ] 

HBase Review Board commented on HBASE-3348:
-------------------------------------------

Message from: "Jonathan Gray" <jg...@apache.org>

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

Ship it!


Looks great.  Thanks Andy!


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

    We had discussed these returning the return type but we'll pass in an empty result instead?



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

    so here we have to because it's a primitive.  so is there a reason not to do this elsewhere on the pre methods?
    
    Or, this is for chaining, that's why... got it



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

    there shouldn't be @return javadoc now, right?
    
    I think it would be noting in the javadoc that you can modify the result that is passed in though.



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

    if i don't do bypass/complete, and i play with this Result, what is the impact?  do we just drop this if the flags don't get set?



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

    looks like we drop the result.  makes sense.  not sure if we should add something to some doc somewhere but it's clear to me now.


- Jonathan





> Allow Observers to completely override base function
> ----------------------------------------------------
>
>                 Key: HBASE-3348
>                 URL: https://issues.apache.org/jira/browse/HBASE-3348
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.92.0
>
>         Attachments: HBASE-3348.patch
>
>
> 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 means an observer cannot completely override the base function. To deal with this we can:
> - Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 
> - Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 
> The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work started: (HBASE-3348) Allow Observers to completely override base function

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on HBASE-3348 started by Andrew Purtell.

> Allow Observers to completely override base function
> ----------------------------------------------------
>
>                 Key: HBASE-3348
>                 URL: https://issues.apache.org/jira/browse/HBASE-3348
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.92.0
>
>
> 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 means an observer cannot completely override the base function. To deal with this we can:
> - Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 
> - Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 
> The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3348) Allow Observers to completely override base function

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974503#action_12974503 ] 

Hudson commented on HBASE-3348:
-------------------------------

Integrated in HBase-TRUNK #1697 (See [https://hudson.apache.org/hudson/job/HBase-TRUNK/1697/])
    

> Allow Observers to completely override base function
> ----------------------------------------------------
>
>                 Key: HBASE-3348
>                 URL: https://issues.apache.org/jira/browse/HBASE-3348
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.92.0
>
>         Attachments: HBASE-3348.patch
>
>
> 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 means an observer cannot completely override the base function. To deal with this we can:
> - Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 
> - Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 
> The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HBASE-3348) Allow Observers to completely override base function

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Purtell resolved HBASE-3348.
-----------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]

Committed the updated patch. Thanks for the reviews Ryan and Jon. Reopen if more needed here.

> Allow Observers to completely override base function
> ----------------------------------------------------
>
>                 Key: HBASE-3348
>                 URL: https://issues.apache.org/jira/browse/HBASE-3348
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.92.0
>
>         Attachments: HBASE-3348.patch
>
>
> 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 means an observer cannot completely override the base function. To deal with this we can:
> - Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 
> - Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 
> The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3348) Allow Observers to completely override base function

Posted by "HBase Review Board (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971602#action_12971602 ] 

HBase Review Board commented on HBASE-3348:
-------------------------------------------

Message from: "Andrew Purtell" <ap...@apache.org>

-----------------------------------------------------------
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





> Allow Observers to completely override base function
> ----------------------------------------------------
>
>                 Key: HBASE-3348
>                 URL: https://issues.apache.org/jira/browse/HBASE-3348
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.92.0
>
>         Attachments: HBASE-3348.patch
>
>
> 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 means an observer cannot completely override the base function. To deal with this we can:
> - Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 
> - Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 
> The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3348) Allow Observers to completely override base function

Posted by "HBase Review Board (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971534#action_12971534 ] 

HBase Review Board commented on HBASE-3348:
-------------------------------------------

Message from: "Ryan Rawson" <ry...@gmail.com>

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

Ship it!


- Ryan





> Allow Observers to completely override base function
> ----------------------------------------------------
>
>                 Key: HBASE-3348
>                 URL: https://issues.apache.org/jira/browse/HBASE-3348
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.92.0
>
>         Attachments: HBASE-3348.patch
>
>
> 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 means an observer cannot completely override the base function. To deal with this we can:
> - Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 
> - Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 
> The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-3348) Allow Observers to completely override base function

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Purtell updated HBASE-3348:
----------------------------------

    Attachment:     (was: HBASE-3348.patch)

> Allow Observers to completely override base function
> ----------------------------------------------------
>
>                 Key: HBASE-3348
>                 URL: https://issues.apache.org/jira/browse/HBASE-3348
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.92.0
>
>         Attachments: HBASE-3348.patch
>
>
> 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 means an observer cannot completely override the base function. To deal with this we can:
> - Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 
> - Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 
> The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3348) Allow Observers to completely override base function

Posted by "HBase Review Board (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971531#action_12971531 ] 

HBase Review Board commented on HBASE-3348:
-------------------------------------------

Message from: "Andrew Purtell" <ap...@apache.org>

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

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




> Allow Observers to completely override base function
> ----------------------------------------------------
>
>                 Key: HBASE-3348
>                 URL: https://issues.apache.org/jira/browse/HBASE-3348
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.92.0
>
>         Attachments: HBASE-3348.patch
>
>
> 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 means an observer cannot completely override the base function. To deal with this we can:
> - Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 
> - Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 
> The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-3348) Allow Observers to completely override base function

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Purtell updated HBASE-3348:
----------------------------------

    Attachment: HBASE-3348.patch

Patch contains API changes and fixes some logic bugs I found with coprocessor integration in HRegion. Not quite ready yet, will put up a new patch on RB then.

> Allow Observers to completely override base function
> ----------------------------------------------------
>
>                 Key: HBASE-3348
>                 URL: https://issues.apache.org/jira/browse/HBASE-3348
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.92.0
>
>         Attachments: HBASE-3348.patch
>
>
> 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 means an observer cannot completely override the base function. To deal with this we can:
> - Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 
> - Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 
> The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-3348) Allow Observers to completely override base function

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Purtell updated HBASE-3348:
----------------------------------

    Description: 
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 means an observer cannot completely override the base function. To deal with this we can:

- Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 

- Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 

The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 


  was:
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 means an observer cannot completely override the base function. To deal with this we can:

- Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 

- Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 



> Allow Observers to completely override base function
> ----------------------------------------------------
>
>                 Key: HBASE-3348
>                 URL: https://issues.apache.org/jira/browse/HBASE-3348
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>             Fix For: 0.92.0
>
>
> 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 means an observer cannot completely override the base function. To deal with this we can:
> - Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 
> - Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 
> The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3348) Allow Observers to completely override base function

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971314#action_12971314 ] 

Andrew Purtell commented on HBASE-3348:
---------------------------------------

I had a patch ready but it is failing some tests, digging in.

> Allow Observers to completely override base function
> ----------------------------------------------------
>
>                 Key: HBASE-3348
>                 URL: https://issues.apache.org/jira/browse/HBASE-3348
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.92.0
>
>
> 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 means an observer cannot completely override the base function. To deal with this we can:
> - Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 
> - Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 
> The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HBASE-3348) Allow Observers to completely override base function

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Purtell reassigned HBASE-3348:
-------------------------------------

    Assignee: Andrew Purtell

> Allow Observers to completely override base function
> ----------------------------------------------------
>
>                 Key: HBASE-3348
>                 URL: https://issues.apache.org/jira/browse/HBASE-3348
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.92.0
>
>
> 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 means an observer cannot completely override the base function. To deal with this we can:
> - Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 
> - Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 
> The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-3348) Allow Observers to completely override base function

Posted by "HBase Review Board (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971533#action_12971533 ] 

HBase Review Board commented on HBASE-3348:
-------------------------------------------

Message from: "Ryan Rawson" <ry...@gmail.com>

-----------------------------------------------------------
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/BaseRegionObserverCoprocessor.java
<http://review.cloudera.org/r/1295/#comment6478>

    presumably a co-processor could modify the Get object to implement policy?  Another consideration is replacing the Get query with an alternate query, 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
<http://review.cloudera.org/r/1295/#comment6479>

    unless you need CAS semantics, you can just use volatile here.  We are over-using the Atomic* stuff sometimes.


- Ryan





> Allow Observers to completely override base function
> ----------------------------------------------------
>
>                 Key: HBASE-3348
>                 URL: https://issues.apache.org/jira/browse/HBASE-3348
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.92.0
>
>         Attachments: HBASE-3348.patch
>
>
> 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 means an observer cannot completely override the base function. To deal with this we can:
> - Change the preXXX methods to return the same type as the postXXX methods, the same return type of the base method. 
> - Extend {{Coprocessor.Environment}} with methods that get/set a "should continue" flag. 
> The framework should check the "should continue" flag before calling the base method. If not, just return what was returned by the preXXX method. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.