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

Josh Elser commented on HBASE-21062:
------------------------------------

{quote}It makes sense as the enum {{defaultProvider}} can not have a different 
value at runtime unless we change code
{quote}
My mindset is that the defaultProvider _will_ change at some point in time – 
inevitably. I think the change I've already put forward makes this much more 
clear for someone new to come along and change what the default is without 
having to know what about the impls of a different WALProvider.
{quote}So the test will pass anyway: w/ or w/o the fix in {{getProviderClass}}, 
w/ or w/o the {{getDefaultProvider}}. Correct me if I'm wrong.
{quote}
The test fails without the fix to WALFactory.
{quote}Another (orthogonal?) problem in {{getProviderClass}} is that, the 
try-catch scope is not implemented well
{quote}
I noticed that as well. Without having a clear reason to know why this happened 
(nor, it likely being something that we'd be OK with hitting all the time), I 
ignored that.
{quote}Last, for any error case, it merits to have logging message.
{quote}
That's a good idea.

> WALFactory has misleading notion of "default"
> ---------------------------------------------
>
>                 Key: HBASE-21062
>                 URL: https://issues.apache.org/jira/browse/HBASE-21062
>             Project: HBase
>          Issue Type: Bug
>          Components: wal
>            Reporter: Josh Elser
>            Assignee: Josh Elser
>            Priority: Major
>             Fix For: 3.0.0, 2.0.2, 2.2.0, 2.1.1
>
>         Attachments: HBASE-21062.001.branch-2.0.patch
>
>
> In WALFactory, there is an enum {{Providers}} which has a list of supported 
> WALProvider implementations. In addition to list this, there is also a 
> {{defaultProvider}} (which the Configuration defaults to), that is meant to 
> be our "advertised" default WALProvider.
> However, the implementation of {{getProviderClass}} in WALFactory doesn't 
> actually adhere to the value of this enum, instead *always* returning 
> AsyncFSWal if it can be loaded.
> Having the default value in the enum but then overriding it in the 
> implementation of {{getProviderClass}} is silly and misleading.



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

Reply via email to