HBASE-12108 | Setting classloader so that HBase resources resolve even when HBaseConfiguration is loaded from a different class loader
Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
cf5ad96fcc
commit
c812d13a47
|
@ -91,6 +91,10 @@ public class HBaseConfiguration extends Configuration {
|
|||
*/
|
||||
public static Configuration create() {
|
||||
Configuration conf = new Configuration();
|
||||
// In case HBaseConfiguration is loaded from a different classloader than
|
||||
// Configuration, conf needs to be set with appropriate class loader to resolve
|
||||
// HBase resources.
|
||||
conf.setClassLoader(HBaseConfiguration.class.getClassLoader());
|
||||
return addHbaseResources(conf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue