[
https://issues.apache.org/jira/browse/HBASE-5827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13257667#comment-13257667
]
ramkrishna.s.vasudevan commented on HBASE-5827:
-----------------------------------------------
@Andy
I have some thing which is similar to this and sorry if am diverting the
current JIRA title.
Suppose i want some state variable or some common object to be used across one
flow, for eg. take the case of PUT.
May be i have the current PUT with me and from which i form the new PUTs to be
added thro coprocessor hooks to a new region.
Assume the PUT(and related things) that i created in preBatchPut is also needed
while i use the preWALWrite, is there any way i can carry it in one flow?
Hope am not missing anything? If you feel this can be done may be we can file
an Improvement JIRA. Please provide your suggestions
> [Coprocessors] Observer notifications on exceptions
> ---------------------------------------------------
>
> Key: HBASE-5827
> URL: https://issues.apache.org/jira/browse/HBASE-5827
> Project: HBase
> Issue Type: Improvement
> Components: coprocessors
> Reporter: Andrew Purtell
>
> Benjamin Busjaeger wrote on dev@:
> {quote}
> Is there a reason that RegionObservers are not notified when a get/put/delete
> fails? Suppose I maintain some (transient) state in my Coprocessor that is
> created during preGet and discarded during postGet. If the get fails, postGet
> is not invoked, so I cannot remove the state.
> If there is a good reason, is there any other way to achieve the same thing?
> If not, would it be possible to add something the snippet below to the code
> base?
> {code}
> // pre-get CP hook
> if (withCoprocessor && (coprocessorHost != null)) {
> if (coprocessorHost.preGet(get, results)) {
> return results;
> }
> }
> + try{
> ...
> + } catch (Throwable t) {
> + // failed-get CP hook
> + if (withCoprocessor && (coprocessorHost != null)) {
> + coprocessorHost.failedGet(get, results);
> + }
> + rethrow t;
> + }
> // post-get CP hook
> if (withCoprocessor && (coprocessorHost != null)) {
> coprocessorHost.postGet(get, results);
> }
> {code}
> {quote}
--
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