我无法在Hadoop 3.0.0-cdh6.3.2上运行haddop jar

5uzkadbs  于 2023-01-25  发布在  Hadoop
关注(0)|答案(1)|浏览(198)

我有一台安装了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>

请你的帮助,我投资了几天在这方面,任何光可以帮助我很多。

uidvcgyl

uidvcgyl1#

这是/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>

你不需要别的了。

相关问题