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

Josh Elser commented on HBASE-21247:
------------------------------------

{code:java}
-      provider = createProvider(getProviderClass(META_WAL_PROVIDER,
-          conf.get(WAL_PROVIDER, DEFAULT_WAL_PROVIDER)));
+      boolean metaWALProvPresent = conf.get(META_WAL_PROVIDER_CLASS) != null;
+      provider = createProvider(getProviderClass(
+          metaWALProvPresent ? META_WAL_PROVIDER_CLASS : WAL_PROVIDER_CLASS,
+          META_WAL_PROVIDER, conf.get(WAL_PROVIDER, 
DEFAULT_WAL_PROVIDER)));{code}
I thought HBASE-20856 got rid of this duplicity around setting a WALProvider 
and a Meta WALProvider?
{code:java}
   public static final String WAL_PROVIDER = "hbase.wal.provider";
   static final String DEFAULT_WAL_PROVIDER = Providers.defaultProvider.name();
+  public static final String WAL_PROVIDER_CLASS = "hbase.wal.provider.class";
+  static final Class<? extends WALProvider> DEFAULT_WAL_PROVIDER_CLASS = 
AsyncFSWALProvider.class;{code}
What happens if I provide both the old configuration properties and the new 
ones? Can you summarize how this will work in release notes? We should have 
some test additions to cover that too.

How about adding a test to make sure you can create a WALProvider (i.e. as a 
static-inner class of the the test class) and HBase uses it as the WALProvider? 
I think it should be easy in TestWALFactory – I recall some prior art there.

> Allow WAL Provider to be specified by configuration without explicit enum in 
> Providers
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-21247
>                 URL: https://issues.apache.org/jira/browse/HBASE-21247
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>            Priority: Major
>             Fix For: 3.0.0
>
>         Attachments: 21247.v1.txt
>
>
> Currently all the WAL Providers acceptable to hbase are specified in 
> Providers enum of WALFactory.
> This restricts the ability for additional WAL Providers to be supplied - by 
> class name.
> This issue introduces additional config which allows the specification of new 
> WAL Provider through class name.



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

Reply via email to