[
https://issues.apache.org/jira/browse/MAPREDUCE-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205162#comment-13205162
]
Roman Shaposhnik commented on MAPREDUCE-3845:
---------------------------------------------
Yup, sorry about the noise. It is now fixed and hence I'm closing the issue.
Quick question though -- would it make sense to deprecate these 2 commands
along the lines with everything else that got moved to mapred. Will the patch
along the following lines make sense:
{noformat}
--- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop
+++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop
@@ -66,7 +66,7 @@ case $COMMAND in
;;
#mapred commands for backwards compatibility
- pipes|job|queue)
+ pipes|job|queue|distcp|archive)
echo "DEPRECATED: Use of this script to execute mapred command is
deprecated." 1>&2
echo "Instead use the mapred command for it." 1>&2
echo "" 1>&2
@@ -100,17 +100,9 @@ case $COMMAND in
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
elif [ "$COMMAND" = "jar" ] ; then
CLASS=org.apache.hadoop.util.RunJar
- elif [ "$COMMAND" = "distcp" ] ; then
- CLASS=org.apache.hadoop.tools.DistCp
- CLASSPATH=${CLASSPATH}:${TOOL_PATH}
- HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
elif [ "$COMMAND" = "daemonlog" ] ; then
CLASS=org.apache.hadoop.log.LogLevel
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
- elif [ "$COMMAND" = "archive" ] ; then
- CLASS=org.apache.hadoop.tools.HadoopArchives
- CLASSPATH=${CLASSPATH}:${TOOL_PATH}
- HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
elif [[ "$COMMAND" = -* ]] ; then
# class and package names cannot begin with a -
echo "Error: No command named \`$COMMAND' was found. Perhaps you meant
\`hadoop ${COMMAND#-}'"
{noformat}
> hadoop distcp fails to run with java.lang.NoClassDefFoundError
> --------------------------------------------------------------
>
> Key: MAPREDUCE-3845
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-3845
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: distcp
> Affects Versions: 0.23.1
> Reporter: Roman Shaposhnik
> Assignee: Roman Shaposhnik
> Fix For: 0.23.1
>
>
> Here's how to reproduce:
> {noformat}
> $ cd /tmnp
> $ curl
> http://people.apache.org/~acmurthy/hadoop-0.23.1-rc0/hadoop-0.23.1.tar.gz |
> tar xzvf -
> $ cd hadoop-0.23.1
> $ ./bin/hadoop distcp
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/hadoop/tools/DistCp
> Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.tools.DistCp
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> Could not find the main class: org.apache.hadoop.tools.DistCp. Program will
> exit.
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira