[
https://issues.apache.org/jira/browse/HDFS-12916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16290409#comment-16290409
]
Allen Wittenauer commented on HDFS-12916:
-----------------------------------------
bq. Changed the hadoop-layout.sh mapred_home hadoop_hdfs_home etc. to point to
only hdfs client jar location and copied all tools and shaded client jars .
That just broke all of the admin commands and a good chunk of hadoop-tools.
bq. Actually this is done as part of work to use shaded client jars for running
hdfs commands and also not to expose other run time jars to clients. And also
use same jars for running hdfs commands.
The vast majority of hadoop shell commands are *not* client-level commands and
actually need all of those jars. This means that classpath construction has to
take place on a per command basis if one truly wants to hide all of the extra
jars. That, in turn, means a ton of extra code in the shell scripts.
I brought up the idea of having the default classpath with shaded jars back in
April (https://s.apache.org/LTzv). Given how much Hortonworks, Yahoo!, and
Cloudera have been fighting against backwards incompatibilities breaking
rolling upgrade despite this being a major release, it likely would have been a
wasted effort anyway.
> HDFS commands throws error, when only shaded clients in classpath
> -----------------------------------------------------------------
>
> Key: HDFS-12916
> URL: https://issues.apache.org/jira/browse/HDFS-12916
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Bharat Viswanadham
> Assignee: Bharat Viswanadham
>
> [root@n001 hadoop]# bin/hdfs dfs -rm /
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/htrace/core/Tracer$Builder
> at org.apache.hadoop.fs.FsShell.run(FsShell.java:303)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
> at org.apache.hadoop.fs.FsShell.main(FsShell.java:389)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.htrace.core.Tracer$Builder
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ... 4 more
> cc [~busbey]
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]