简体   繁体   English

Hadoop mapreduce程序失败

[英]Hadoop mapreduce program fail

I have installed Hadoop 3.2.3 stable version.我已经安装了 Hadoop 3.2.3 稳定版。 I set all environment variables like JAVA_HOME, HADOOP_HOME, PATH etc.. I configured yarn-site.xml, hdfs-site.xml, core-site.xml, mapred-site.xml.我设置了所有环境变量,如 JAVA_HOME、HADOOP_HOME、PATH 等。我配置了 yarn-site.xml、hdfs-site.xml、core-site.xml、mapred-site.xml。

I uploaded sample files in HDFS.我在 HDFS 中上传了示例文件。 When I am executing the wordcount program in hadoop-mapreduce-examples-3.2.3.jar using below command当我使用以下命令在 hadoop-mapreduce-examples-3.2.3.jar 中执行 wordcount 程序时

bin\yarn jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.2.3.jar wordcount /input /output bin\yarn jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.2.3.jar wordcount /input /output

However, I got the error like below: enter image description here但是,我收到如下错误:在此处输入图像描述

Application application_1657253647702_0002 failed 2 times due to AM Container for appattempt_1657253647702_0002_000002 exited with exitCode: 1 Failing this attempt.Diagnostics: [2022-07-08 12:30:30.730]Exception from container-launch.由于 AM Container for appattempt_1657253647702_0002_000002 退出,应用程序 application_1657253647702_0002 失败 2 次,退出代码:1 失败。诊断:[2022-07-08 12:30:30.730] 容器启动异常。 Container id: container_1657253647702_0002_02_000001 Exit code: 1 Exception message: CreateSymbolicLink error (1314): A required privilege is not held by the client.容器 ID:container_1657253647702_0002_02_000001 退出代码:1 异常消息:CreateSymbolicLink 错误(1314):客户端未持有所需的权限。 Shell output: 1 file(s) moved. Shell 输出:已移动 1 个文件。 "Setting up env variables" "Setting up job resources" [2022-07-08 12:30:30.731]Container exited with a non-zero exit code 1. [2022-07-08 12:30:30.731]Container exited with a non-zero exit code 1. For more detailed output, check the application tracking page: http://DESKTOP-P234DBF:8088/cluster/app/application_1657253647702_0002 Then click on links to logs of each attempt. “设置环境变量”“设置作业资源”[2022-07-08 12:30:30.731]容器以非零退出代码 1 退出。 [2022-07-08 12:30:30.731]容器退出非零退出代码 1. 有关更详细的输出,请查看应用程序跟踪页面:http://DESKTOP-P234DBF:8088/cluster/app/application_1657253647702_0002 然后单击指向每次尝试日志的链接。 . . Failing the application.申请失败。

Alright, I figured out the solution after did so many research.好吧,经过这么多研究,我想出了解决方案。 What I did is, I set the following properties in mapred-site.xml我所做的是,我在 mapred-site.xml 中设置了以下属性

<property>
    <name>yarn.app.mapreduce.am.env</name>
    <value>HADOOP_MAPRED_HOME=$HADOOP_HOME</value>
</property>
<property>
   <name>mapreduce.map.env</name>
   <value>HADOOP_MAPRED_HOME=$HADOOP_HOME</value>
</property>
<property>
   <name>mapreduce.reduce.env</name>
   <value>HADOOP_MAPRED_HOME=$HADOOP_HOME</value>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM