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

Lars Hofhansl commented on HBASE-4844:
--------------------------------------

In part that can be done already using TimeToLiveLogCleaner and configure a 
long TTL (looks like the default is 600000ms = 10mins), or a custom log cleaner.

There are also WALActionListeners, although it looks like they can only be 
added via code changes to HRegionServer (see getWALActionListeners()).

So I am on the fence with this now. On one hand it would be nice to be able to 
implement some arbitrary actions on log rolling without touching the HBase 
code, on the other hand it'll likely duplicate logic that already exists.

The interface in WALObserver would be very simple:
{code}
  void postLogRoll(ObserverContext<WALCoprocessorEnvironment> ctx,
      Path oldPath, Path newPath) throws IOException;

  void postLogArchive(ObserverContext<WALCoprocessorEnvironment> ctx,
      Path oldPath, Path newPath) throws IOException;
{code}

There would be no "pre" method, as there is no way really do anything useful 
outside of the core HBase code (at least I cannot think of anything).

Opinions?

                
> Coprocessor hooks for log rolling
> ---------------------------------
>
>                 Key: HBASE-4844
>                 URL: https://issues.apache.org/jira/browse/HBASE-4844
>             Project: HBase
>          Issue Type: New Feature
>    Affects Versions: 0.94.0
>            Reporter: Lars Hofhansl
>            Priority: Minor
>
> In order to eventually do point in time recovery we need a way to reliably 
> back up the logs. Rather than adding some hard coded changes, we can provide 
> coprocessor hooks and folks can implement their own policies.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to