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

Ivan Kelly commented on HBASE-5937:
-----------------------------------

{quote}
Can you factory it in places like HLogInputFormat?
{quote}
HLogInputFormat among a few funny ones which I wasn't sure how to deal with 
(one of the others is the PrettyPrinter). The problem with these is that they 
take a individual log file, rather than a whole log instance. This makes it 
more complicated to use it with HLogFactory, as createHLog asks for the whole 
log directory. We could get the log directory by using Path.getParent(), but 
that seemed messy to me at the time. Otherwise, yes, the solution to 
HLogUtil.createReader -> HLog#createReader is to instantiate a HLog where 
needed. We just haven't gotten that far yet.

{quote}
Whats FSLog? An HDFSLog?
{quote}
Exactly. FileSystem doesn't necessarily have to be HDFS so FSLog is a better 
name.

{quote}
Can you not get HLogFactory.createHLog into the places where we have getReader 
now – e.g. in HRegion (Should HRegion even be concerned w/ HLog/WAL? Only 
RegionServer should be?)?
{quote}
As I understand it now, HRegion only creates the HLog for the META and ROOT 
tables, which are managed from the Master and as such, do not have access to a 
RegionServer. Perhaps this could be refactored a little to make HRegion always 
receive a preconstructed HLog.

{quote}
Should HLog Interface be instead named WAL?
Is it right that the HLog Interface takes an fs? That OK for you lads? You'll 
be doing a bookkeeper FS?
HLog Interface seems fat. We need all those methods?
{quote}
The current patch is a first cut to give you guys an idea of where we are, but 
it's quite far from what we imagine the final interface from looking like. At 
the moment, what we want to do is refactor all the HLog code so that everything 
that access HLog is going through well defined interfaces. Once that is done, 
we can look at the interfaces to see where the implementation specific stuff 
(like Path, Filesystem etc) is leaking out, and work to resolve them.

I'll try and find time to get back to do some coding on this (i.e. fix tests, 
refactor createReader) this week.
                
> Refactor HLog into an interface.
> --------------------------------
>
>                 Key: HBASE-5937
>                 URL: https://issues.apache.org/jira/browse/HBASE-5937
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Li Pi
>            Assignee: Flavio Junqueira
>            Priority: Minor
>
> What the summary says. Create HLog interface. Make current implementation use 
> it.

--
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