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

Ted Yu commented on HBASE-21246:
--------------------------------

Thanks for detailed comments, Josh.

bq. This still banks on the assumption that recovered.edits are always on the 
storefile FS?

To be more precise, the assumption is that recovered.edits are always on the 
FileSystem specified by hbase.wal.dir config.
See HBASE-20734

bq. Is there a reason to keep the static "helper" methods around?

The number of static methods for creating Reader has been reduced to 1.
Without this, many classes would have to create WALFactory, get hold of 
WALProvider and call createReader on the provider.
I think having 1 static method is equivalent to the above.

bq. You couldn't possibly know that this is a SyncReplicationWALProvider?

The getFullPath and getWalFromArchivePath methods are only defined by 
SyncReplicationWALProvider.
Let me think more about how to abstract these methods. Probably when 
replication part of the design doc is refreshed, we would have different 
perspectives.

bq. Missed push-down into WALProvider

Looking at the init method for the FSHLogProvider.Writer:
{code}
  public void init(FileSystem fs, Path path, Configuration conf, boolean 
overwritable,
      long blocksize) throws IOException, StreamLacksCapabilityException {
{code}
There are several things specific to distributed FileSystem (such as blocksize).

StreamLacksCapabilityException extends Exception. Probably it can extend IOE so 
that the init method can declare to throw IOE, instead of exception tied to 
distributed FileSystem.

> Introduce WALIdentity interface
> -------------------------------
>
>                 Key: HBASE-21246
>                 URL: https://issues.apache.org/jira/browse/HBASE-21246
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>            Priority: Major
>             Fix For: HBASE-20952
>
>         Attachments: 21246.003.patch, 21246.20.txt, 
> 21246.HBASE-20952.001.patch, 21246.HBASE-20952.002.patch, 
> 21246.HBASE-20952.004.patch, 21246.HBASE-20952.005.patch, 
> 21246.HBASE-20952.007.patch, 21246.HBASE-20952.008.patch
>
>
> We are introducing WALIdentity interface so that the WAL representation can 
> be decoupled from distributed filesystem.
> The interface provides getName method whose return value can represent 
> filename in distributed filesystem environment or, the name of the stream 
> when the WAL is backed by log stream.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to