One property (that is, mapreduce.framework.name) needs to be set to the etc/hadoop/ mapred-site.xml file. First, copy and replace the original template file to the mapred-site.xml as follows:
$ cp mapred-site.xml.template mapred-site.xml
Now, just copy the following lines of codes:
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>