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

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

See if I understand Josh's proposal correctly. Under Josh's proposal, we would 
use WAL instance in place of where WALIdentity is used.
w.r.t. invalidating the need for WalIdentity completely, I think some classes 
still need to reference WAL instance by name (the WALIdentity of the WAL). For 
distributed FS backed WAL, such name would be a Path. For non-distributed FS 
backed WAL, the name would be a String.

Examples for the classes referencing WAL by name include, but are not limited 
to, WALCoprocessor observers.Here is snippet from WALObserver (current code, 
the Path would be replaced with String after refactoring):
{code}
public void preWALRoll(ObserverContext<? extends WALCoprocessorEnvironment> ctx,
Path oldPath, Path newPath) throws IOException {
{code}
Using WALIdentity (the name) in such places would be better compared to passing 
WAL instance reference directly.

> 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.HBASE-20952.001.patch, 
> 21246.HBASE-20952.002.patch, 21246.HBASE-20952.004.patch, 
> 21246.HBASE-20952.005.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