我基本上试图在远程节点上运行疯狂的reduce工作,我正面临下面提到的异常。有人经历过同样的问题吗?我正在发布我正用于设置类路径并启动作业的文件。
#!/bin/bash
export JAVA_HOME=/usr/java/jdk7
export HADOOP_HOME=/usr/local/hadoop/hadoop-2.4.0
export CONF=/home/hadoop/p2Cluster/conf
export PATH=$CONF:$HADOOP_HOME/bin:$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$CONF:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export HADOOP_CONF_DIR=$CONF
echo "classpath=$CLASSPATH"
#
C2=""
JARS=`find $HADOOP_HOME -name '*hadoop*.jar'`
for j in $JARS
do
echo "$j"
export CLASSPATH=$CLASSPATH:$j
C2=$C2,$j
done
client=******
jobQueueName=default
JAR=****.jar
export HADOOP_CLASS_PATH=$CLASSPATH
hadoop jar $JAR $client interactive 2 groupA.txt groupB.txt
#
#java $client interactive 2 groupA.txt groupB.txt $jobQueueName
exit 0
error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/util/RunJar
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.util.RunJar
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.util.RunJar. Program will exit.
答案 0 :(得分:0)