[
https://issues.apache.org/jira/browse/HBASE-22623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16901676#comment-16901676
]
Duo Zhang commented on HBASE-22623:
-----------------------------------
At least Thread.sleep and System.exit will not mess up the data right? As I
said above, if you want to put things into WALEdit, just use higher level CPs
to add more puts/deletes into the batch. I know this would be a pain, but I
think this is the correct way. We used to expose too many internal things in
CPs which made Phoenix went to the wrong way, for example, the strange local
secondary index implementation which breaks the HBase assumption after
split/merge, and then hack deeply into the StoreFileReader which highly depends
on the private implementation of HBase so after upgrading to 2.x everything is
broken...
And back to WALKey&WALEdit, even though I still has some concerns on
HBASE-22622, but at least, WALKey is an interface, and the only write method is
addExtendedAttribute, which I think is fine. But for WALEdit, it is an
implementation class, it even has setCells, readFromCells method, which will be
really dangerous to CP users. Notice that now we are making everything off
heap, and we have just fixed a critical bug related to reference counting on
cells, and here we let users directly set or remove cells? I do not think this
is a good idea...
And for the patch here, what is the difference between preWALAppend and the old
preWALWrite?
> 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)