hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sharad Agarwal" <shara...@yahoo-inc.com>
Subject Re: Question about the classpath setting for bin/hadoop jar
Date Fri, 17 Apr 2009 06:50:03 GMT

> I noticed that the "bin/hadoop jar" command doesn't add the jar being executed to the
classpath. Is this deliberate and what is the reasoning? The result is that resources in the
jar are not accessible from the system class loader. Rather they are only available from the
thread context class loader and the class loader of the main class.
In map and reduce tasks' jvm,  job libraries are added to the system classloader. However
for others only framework code is present in system classloader. If you are seeing this as
a problem in your client side code, you can use Configuration#getClassByName(String name)
instead of Class.forName() for loading your job related classes.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message