[
https://issues.apache.org/jira/browse/HBASE-6633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15261641#comment-15261641
]
Stephen Yuan Jiang commented on HBASE-6633:
-------------------------------------------
[~ram_krish], Hello, Ram, I know this has been a while. I have a question on
the deprecated post coprocessor. I know it did not make sense that we have
both postSplit (after successfully split region) and postCompleteSplit (no
matter split succeed or failed) coprocessors after completing region split. It
makes sense to deprecate one of them. However, the postSplit involves newly
created daughter regions (as input parameter) and postCompleteSplit does not
involves the daughter regions. If a customed coprocessor use postSplit today
and do something on daughter regions today, if we replace with the new
postCompleteSplit coprocessor, then we will lose some functionality in the
future.
{code}
/**
* Called after the region is split.
* @param c the environment provided by the region server
* (e.getRegion() returns the parent region)
* @param l the left daughter region
* @param r the right daughter region
* @throws IOException if an error occurred on the coprocessor
* @deprecated Use postCompleteSplit() instead
*/
@Deprecated
void postSplit(final ObserverContext<RegionCoprocessorEnvironment> c, final
Region l,
final Region r) throws IOException;
/**
* Called after any split request is processed. This will be called
irrespective of success or
* failure of the split.
* @param ctx
* @throws IOException
*/
void postCompleteSplit(final ObserverContext<RegionCoprocessorEnvironment>
ctx)
throws IOException;
{code}
> Adding new hooks to the split flow - For roll backs and one final hook after
> split is completed either successfully or failed
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-6633
> URL: https://issues.apache.org/jira/browse/HBASE-6633
> Project: HBase
> Issue Type: Improvement
> Components: Coprocessors
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Labels: coprocessors
> Fix For: 0.95.0
>
> Attachments: HBASE-6633.patch
>
>
> Currently we have two hooks in the split flow of a region. PreSplit() and
> postSplit(). But not always these are helpful in case i have a problem in
> preSplit() or postSplit() i need to do a rollback of the current region or
> the region that i am handling thro the hooks.
> So its better if we have a hook in the rollback code and also one final hook
> say postCompleteSplit() so that CP can take any corrective action.
> Pls do suggest if i can provide a patch for this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)