You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Matt Steele <rm...@gmail.com> on 2010/03/24 02:39:25 UTC

job dependencies unavailable when job jar is in CLASSPATH

Hi all,

I'm finding that the mechanism I'm relying on to make my dependencies
available doesn't work when the job jar is in my classpath.

Example:
MyJob.jar contains these files:
mypackage/EntryPoint.class
lib/mydependency.jar

When I run

hadoop jar MyJob.jar mypackage.EntryPoint

I find that

1) If MyJob.jar is in the CLASSPATH, then I get NoClassDefFoundError
exceptions when I try to call classes in mydependency.jar from my main()
entry point method.  (Don't know whether I'd be able to call those classes
from within my Mapper or Reducer, however).

but
2) If MyJob.jar is _not_ in the CLASSPATH, then I can use the code in
mydependency.jar without any problems.

I think the behavior is confusing; I don't think hadoop should behave this
way.  Has anyone else seen this?  Is it a known bug?

Thanks,
Matt