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

Amit Sela commented on HBASE-9682:
----------------------------------

One way to observe this bug is to add the following methods to Algorithm:
public Configuration createConfiguration() {
        Configuration conf = new Configuration();
        conf.setBoolean("hadoop.native.lib", true);
        return conf;
    }
public Configuration getConfiguration() {
      return this.conf;
    }

Now, running on OSGi client, you can print out the CLs returned by these two 
methods, they will return the same CL.
Update the client jar (touch is enough) and after it's updated, call these 
methods once more - getConfiguration will return the same CL as before 
(obsolete) while createConfiguration will return a different CL, new (valid) 
one.

Maybe one solution could be using createConfiguration() instead of new 
Configuration(conf) in getCodec and losing Algorithm's configuration member ?

> Bulk loading fails after ClassLoader is updated on OSGi client
> --------------------------------------------------------------
>
>                 Key: HBASE-9682
>                 URL: https://issues.apache.org/jira/browse/HBASE-9682
>             Project: HBase
>          Issue Type: Bug
>          Components: Client, HFile, io
>    Affects Versions: 0.94.2
>            Reporter: Amit Sela
>
> In an OSGi environment (felix) client, running with a bundled HBase (used bnd 
> tool), after CL is updated - for instance when updating the client bundle 
> without updating the HBase bundle, Algorithm class in HBase is a static enum 
> and therefore it's configuration member still holds on to the old CL. This 
> causes NPE when trying to bulk load using LoadIncrementalHFile.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to