hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amit Sela (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10061) TableMapReduceUtil.findOrCreateJar calls updateMap(null, ) resulting in thrown NPE
Date Tue, 03 Dec 2013 14:53:39 GMT

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

Amit Sela commented on HBASE-10061:
-----------------------------------

I'm running a Hadoop/HBase OSGi client running over Apache felix.
In OSGi loader.getResources(class_file) will return something like: 
bundle://byndle#:bundleVersion/path/to/class.class
i.e., bundle://17.0:1/com/google/common/collect/ImmutableSet.class
But this is not the real path on file system, but a reference to the bundle.
So this just won't work.
By the way, returning a path that doesn't exist will just print WARN to log, so why throw
exception if jar is missing but WARN if it was "found" but doesn't exist ?
You could add a getDependencyClasses and setTmpJars() to allow the client to find jars by
himself if he wishes.
But anyway, I would stick to WARN in log and not throwing exception.

> TableMapReduceUtil.findOrCreateJar calls updateMap(null, ) resulting in thrown NPE
> ----------------------------------------------------------------------------------
>
>                 Key: HBASE-10061
>                 URL: https://issues.apache.org/jira/browse/HBASE-10061
>             Project: HBase
>          Issue Type: Bug
>          Components: mapreduce
>    Affects Versions: 0.94.12
>            Reporter: Amit Sela
>         Attachments: 10061-trunk.txt, HBASE-10061.patch
>
>
> TableMapReduceUtil.findOrCreateJar line 596:
> jar = getJar(my_class);
> updateMap(jar, packagedClasses);
> In case getJar returns null, updateMap will throw NPE.
> Should check null==jar before calling updateMap.



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

Mime
View raw message