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

Bharat Viswanadham commented on HDFS-12916:
-------------------------------------------

[~aw]

Ya admin commands will break with this, but hadoop tools commands should work 
as I have copied tools/lib folder and
changed hadoop-layout.sh accordingly


{code:java}
HADOOP_TOOLS_HOME=${HADOOP_HOME}
HADOOP_TOOLS_DIR=${HADOOP_TOOLS_DIR:-"tools"}
HADOOP_TOOLS_LIB_JARS_DIR=${HADOOP_TOOLS_LIB_JARS_DIR:-"${HADOOP_TOOLS_DIR}/lib"}
{code}

For backward compatibility we can have existing hdfs script as it is, and we 
can have 2 scripts 
1. One for client commands 
2. Other for admin commands. 
So, that when some one does this kind of seperating shaded client jars, they 
can use respective client script. With this users will not get class not found 
exceptions for some classes and other strange errors. Thinking loud, not sure 
might be there is better approach than this.







> 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: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to