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

Matteo Bertozzi commented on HBASE-15481:
-----------------------------------------

I think everyone is one the same page that exposing Path is something we don't 
want to do in the future. In 2.0 with the RedoFS work (HBASE-14090) we will go 
in a place where we will have an object e.g. StoreFile or WalFile that will 
have an incrementReference() and an open() that return a stream that we pass 
around. without leaking the detail implementation. 

Unfortunately for branch-1 there is no easy way out. 
WALActionListener is not an alternative. first of all is not pluggable. You can 
Implement a coprocessor just (that you don't use) just to have a way to get 
your class loaded inside hbase. then you have to try to get the WAL objects. 
there is no easy way to get all the wals. so you probably have to use the 
postRegionOpen() coprocessor event to get the WAL object from the factory 
walFactory.getWAL(regionInfo) and at that point you can register the 
listener... at that point you'll say... if only we had an Observer on the 
wal... and we have. the WALObserver is there for that reason.

also, you can try to Implement your own WAL without Files. unfortunately if you 
do that and don't call the listener roll passing the path. Replication will not 
work since it relies on the file. so there is nothing you can do to abstract 
from the Path now.

coprocessor are also known to break almost every release. and this one will not 
change for sure for all the 1.x release series. given all the places we are 
locked in relying on the fs-layout. 
For 2.0 the story will be different and since it is a major we are allowed to 
change things around, and that will be the place to get rid of Path and the 
fs-layout exposure (HBASE-14090).

> Add pre/post roll to WALObserver
> --------------------------------
>
>                 Key: HBASE-15481
>                 URL: https://issues.apache.org/jira/browse/HBASE-15481
>             Project: HBase
>          Issue Type: New Feature
>    Affects Versions: 1.3.0
>            Reporter: Matteo Bertozzi
>            Assignee: Matteo Bertozzi
>            Priority: Trivial
>             Fix For: 2.0.0, 1.3.0
>
>         Attachments: HBASE-15481-v0.patch, HBASE-15481-v1.patch, 
> HBASE-15481-v1.patch
>
>
> currently the WALObserver has only a pre/post Write. It will be useful to 
> have a pre/post Roll too. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to