0

I have installed Hadoop 3.2.3 stable version. 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.

I uploaded sample files in HDFS. When I am executing the wordcount program in hadoop-mapreduce-examples-3.2.3.jar using below command

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. Container id: container_1657253647702_0002_02_000001 Exit code: 1 Exception message: CreateSymbolicLink error (1314): A required privilege is not held by the client. Shell output: 1 file(s) moved. "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. . Failing the application.

  • The core of your issue appears to be "A required privilege is not held by the client" This may be helpful: https://stackoverflow.com/questions/28958999/hdfs-write-resulting-in-createsymboliclink-error-1314-a-required-privilege – sorifiend Jul 08 '22 at 05:11

1 Answers1

1

Alright, I figured out the solution after did so many research. What I did is, I set the following properties in 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>