我有一台安装了Hadoop 3.0.0-cdh6.3.2的机器。我运行了这个
hadoop jar helloworld.jar solution.CardDriver /user/vmuser/playing_cards_simple /user/vmuser/output
告诉我这个错误:
Failing this attempt.Diagnostics: [2023-01-22 16:24:13.729]Exception from container-launch.
Container id: container_1674418413963_0005_02_000001
Exit code: 1
[2023-01-22 16:24:13.730]Container exited with a non-zero exit code 1. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
/var/lib/hadoop-yarn/cache/yarn/nm-local-dir/usercache/vmuser/appcache/application_1674418413963_0005/container_1674418413963_0005_02_000001/launch_container.sh: line 19: ${/usr/lib/hadoop-mapreduce}: bad substitution
[2023-01-22 16:24:13.731]Container exited with a non-zero exit code 1. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
/var/lib/hadoop-yarn/cache/yarn/nm-local-dir/usercache/vmuser/appcache/application_1674418413963_0005/container_1674418413963_0005_02_000001/launch_container.sh: line 19: ${/usr/lib/hadoop-mapreduce}: bad substitution
For more detailed output, check the application tracking page: http://localhost:8088/cluster/app/application_1674418413963_0005 Then click on links to logs of each attempt.
我
/etc/hadoop/conf/mapred-site.xml
/etc/hadoop/conf/core-site.xml
的值
HADOOP_MAPRED_HOME=${/usr/lib/hadoop-mapreduce} . I tried with $HADOOP_HOME but gave a lot of errors.
我没有改变yarn-site.xml (yarn.application.classpath的值被设置,但我不知道是否有正确的。yarn-site.xml的值为:
<description>Classpath for typical applications.</description>
<name>yarn.application.classpath</name>
<value>
$HADOOP_CONF_DIR,
$HADOOP_COMMON_HOME/*,$HADOOP_COMMON_HOME/lib/*,
$HADOOP_HDFS_HOME/*,$HADOOP_HDFS_HOME/lib/*,
$HADOOP_MAPRED_HOME/*,$HADOOP_MAPRED_HOME/lib/*,
$HADOOP_YARN_HOME/*,$HADOOP_YARN_HOME/lib/*
</value>
</property>
请帮忙我花了好几天时间在这件事上,任何光都可以帮我很多。
这是/etc/hadoop/conf/yarn-site.xml中变量的问题
<property>
<description>Classpath for typical applications.</description>
<name>yarn.application.classpath</name>
<value>
/etc/hadoop/conf,
/usr/lib/hadoop/*,
/usr/lib/hadoop/lib/*,
/usr/lib/hadoop-hdfs/*,
/usr/lib/hadoop-hdfs/lib/*,
/usr/lib/hadoop-mapreduce/*,
/usr/lib/hadoop-mapreduce/lib/*,
/usr/lib/hadoop-yarn/*,
/usr/lib/hadoop-yarn/lib/*
</value>
</property>
你不需要其他任何东西。