[
https://issues.apache.org/jira/browse/HBASE-21247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16648186#comment-16648186
]
Sean Busbey commented on HBASE-21247:
-------------------------------------
bq. One more thing, use isAssignableFrom(..) to make sure the provided class is
an instance of WALProvider.
The existing call to {{Configuration.getClass}} already does this ([ref
apidocs|https://hadoop.apache.org/docs/r2.8.0/api/org/apache/hadoop/conf/Configuration.html#getClass(java.lang.String,%20java.lang.Class,%20java.lang.Class)])
bq. The second and third parameters of getClass are of type Class. For the
purpose of this JIRA, the class of the custom WAL provider is not known before
Class.forName is called. That was why I used conf.get
Read the javadoc for the API call please Ted. The two class parameters are both
things that can be known at call time. The fundamental bug is that the value we
see that corresponds to the key "hbase.wal.provider" appears to be different
than what is being set. Find out why and fix that. For starters, maybe go see
if this works as expected in a branch-1 based branch.
> Custom WAL Provider cannot be specified by configuration whose value is
> outside the enums in Providers
> ------------------------------------------------------------------------------------------------------
>
> Key: HBASE-21247
> URL: https://issues.apache.org/jira/browse/HBASE-21247
> Project: HBase
> Issue Type: Bug
> Reporter: Ted Yu
> Assignee: Ted Yu
> Priority: Major
> Fix For: 3.0.0
>
> Attachments: 21247.v1.txt, 21247.v2.txt, 21247.v3.txt, 21247.v4.tst,
> 21247.v4.txt, 21247.v5.txt, 21247.v6.txt, 21247.v7.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 fixes the bug by allowing the specification of new WAL Provider
> class name using the config "hbase.wal.provider".
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)