[
https://issues.apache.org/jira/browse/HBASE-21246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646763#comment-16646763
]
Josh Elser commented on HBASE-21246:
------------------------------------
{quote}So, a key for an instance of something called a WALIdentity (a 'key' for
a 'key'?).
{quote}
Nomenclature is the last thing I'm worried about :). I don't think any of us
are hard-set on a specific class name. WalKey is a little confusing to me in
that it might be confused with the contents of WalEdit. You have a suggestion?
{quote}The WALIdentity has a #toString AND a #getName? The #toString would
return what you'd pass to the #getName?
{quote}
Good point, a toString and getName can be unnecessary. The thought process was
that getName would return something you would pass to
WALProvider#getWalIdentity(String). e.g. this would be true:
{{walId.equals(walProvider.getWalIdentity(walId.getName()))}}. As long as we
make it clear that toString() on WalIdentity is used for "serde", I think
that's fine to drop the getName() method.
{quote}We'd pass WALIdentity around in HBase or we'd pass the String version?
{quote}
{quote}Would hbase have to serialize the WALIdentity ever? If so, the String
would be enough?
{quote}
We'd pass around WALIdentity (in lots of places, this is replacing Path with
WalIdentity). [[email protected]], are there places aside from replication
(where we put a wal into ZK) where we use a String representation?
{quote}We could have a WALIdentity that floats free of a WAL instance?
(Interface does not throw a UnknownWALException...)
{quote}
Yes, that would be possible. Since WALProvider is the thing creating
WalIdentity, my feeling was that the risk was "low" to get a handle on a
WalIdentity that didn't work with a WalProvider.
> 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)