[
https://issues.apache.org/jira/browse/HBASE-21456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16788279#comment-16788279
]
Ankit Singhal edited comment on HBASE-21456 at 3/8/19 8:39 PM:
---------------------------------------------------------------
bq. Why have both a public constructor and the static {{getInstance()}} method?
Can we consolidate in one direction?
Yes, agreed, we don't need both, working on refactoring the same along with the
current work (expecting to have public constructor instead of getInstance() and
move same factory object all around the code).
bq.Trying to think about how to help folks like Stack and Reid: what about an
issue to start updating the book? A (short) chapter on how we see WALs working
that briefly illustrate the design would help (and we'd probably write such
things later, anyways). This would be helpful to cover things like
Good point, will be glad to work on this , I'll pick this up immediately after
completing the current required API work for reader/writer.
How about committig this one in branch as will be producing the another patch
on the top of it for another Jira which will take care of above review comment
as well?
was (Author: [email protected]):
{quote}Why have both a public constructor and the static {{getInstance()}}
method? Can we consolidate in one direction?\{quote}
Yes, agreed, we don't need both, working on refactoring the same along with the
current work (expecting to have public constructor instead of getInstance() and
move same factory object all around the code).
{quote}Trying to think about how to help folks like Stack and Reid: what about
an issue to start updating the book? A (short) chapter on how we see WALs
working that briefly illustrate the design would help (and we'd probably write
such things later, anyways). This would be helpful to cover things like:\{quote}
Good point, will be glad to work on this , I'll pick this up immediately after
completing the current required API work for reader/writer.
How about committig this one in branch as will be producing the another patch
on the top of it for another Jira which will take care of above review comment
as well?
> Make WALFactory only used for creating WALProviders
> ---------------------------------------------------
>
> Key: HBASE-21456
> URL: https://issues.apache.org/jira/browse/HBASE-21456
> Project: HBase
> Issue Type: Sub-task
> Components: wal
> Reporter: Josh Elser
> Assignee: Ankit Singhal
> Priority: Major
> Attachments: HBASE-21456.HBASE-20952.001.patch,
> HBASE-21456.HBASE-20952.wip.patch
>
>
> As a Factory, WALFactory should only have one job: creating instances of
> WALProvider.
> However, over the years, it has been a landing place for lots of wal-related
> methods (e.g. constructing readers, WALEntryStream, and more). We want all of
> this to live in the WALProvider.
> We can do this in two steps: have the WALFactory methods invoke the method on
> the WALProvider (handled elsewhere), then here we can replace usage of the
> WALFactory "wrapper methods" with the WALProvider itself.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)