[ 
https://issues.apache.org/jira/browse/HBASE-22623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16901677#comment-16901677
 ] 

Anoop Sam John commented on HBASE-22623:
----------------------------------------

In this discussion one comment on patch come up.
The new hook will be called for each and every add ops to WAL.  So when the add 
is doing a META cell addition we should not call the hook. You need to add the 
check. This is comment on the patch.
[~Apache9]  Pls see my comment abt the MiniBatchOperationInProgress related CP 
API around batchMutate() flow.  Here the CP is expected to create new WALEdit 
object and set to MiniBatchOperationInProgress.  But how the CP impl can create 
a WALEdit with cells().  There is no constructor which takes cells. The add() 
methods are Private marked. There is no static util method or WALEdit builder 
to do this. Only add(Map<byte[], List<Cell>> familyMap) is not marked private. 
But I think that is a miss at that time. If add(Cell) is private then this 
add(Map) also to be same way.  Also getCells() return the same List instance 
and CP can make use. This is not marked with any and no Javadoc even.  All 
these means there is some thing missing on our end already.
The 3rd is the discussion in this Jira specific.  I agree to the point that 
there should be ways to add some extra Cells into the WALEdit along with this 
API. Because MiniBatchOperationInProgress and related CP APIs are not available 
with Append/Increment kinda Mutations.  Now how to achieve that goal of letting 
CPs to add extra Cells into same WALEdit is a topic of discussion.  So lets 
address one by one I would say.

> 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
>             Fix For: 3.0.0, 1.5.0, 2.3.0
>
>
> 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)

Reply via email to