[
https://issues.apache.org/jira/browse/HBASE-22623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16885696#comment-16885696
]
Geoffrey Jacoby commented on HBASE-22623:
-----------------------------------------
Upon looking more closely, it doesn't seem like my idea above of using
ObserverContext to pass state to be added to the WALKey will work, because the
write path in HRegion doesn't have access to the ObserverContext.
So, new plan: there's a MiniBatchOperationInProgress object that gets created
at the start of a batch Put or Delete operation (doMiniBatchMutate), and which
gets passed to each subsequent coprocessor in the batch mutation pipeline. Both
the main pipeline and the coprocs would be able to read or write WALKey
attributes to the MiniBatchOperationInProgress, and all that has to change in
the main pipeline is an additional optional parameter on doWALAppend (which is
private) to instrument the WALKeyImpls it creates.
Existing coprocessors won't have to change unless they want to take advantage
of the new feature, and there are no new interface methods to implement.
> Add RegionObserver coprocessor hook for preWALAppend
> ----------------------------------------------------
>
> Key: HBASE-22623
> URL: https://issues.apache.org/jira/browse/HBASE-22623
> Project: HBase
> Issue Type: New Feature
> Reporter: Geoffrey Jacoby
> Assignee: Geoffrey Jacoby
> Priority: Major
>
> While many coprocessor hooks expose the WALEdit to implementing coprocs,
> there aren't any that expose the WALKey before it's created and added to the
> WALEntry.
> It's sometimes useful for coprocessors to be able to edit the WALKey, for
> example to add extended attributes using the fields to be added in
> HBASE-22622.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)