hadoop 配置 单台机器

http://khangaonkar.blogspot.com/2012/09/hadoop-2x-tutorial.html

1. hdfs-site.xml

namenode and datanode folder need to create in advance, all the content in these two folder should be deleted every time do 

hadoop namenode -format

otherwise clusterID for namenode and datanode will not match

http://stackoverflow.com/questions/26907878/hadoop-multinode-cluster-data-node-not-working-properly

<configuration>
<property>
    <name>dfs.replication</name>
    <value>1</value>
  </property>
  <property>
    <name>dfs.namenode.name.dir</name>
    <value>file:/home/steve/hdfs/namenode</value>
  </property>
  <property>
    <name>dfs.datanode.data.dir</name>
    <value>/home/steve/hdfs/datanode</value>
  </property>
</configuration>

2. core-site.xml

<configuration>
<property>
    <name>fs.default.name</name>
    <value>hdfs://localhost:9000</value>
  </property>
</configuration>

3. yarn-site.xml

<configuration>

 <property>
    <name>yarn.nodemanager.aux-services</name>
    <value>mapreduce_shuffle</value>
  </property>
 <property>
    <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
    <value>org.apache.hadoop.mapred.ShuffleHandler</value>
  </property>


</configuration>

4. mapred-site.xml

<configuration>
<property>
    <name>mapreduce.framework.name</name>
    <value>yarn</value>
  </property>
</configuration>
原文地址:https://www.cnblogs.com/phoenix13suns/p/4464548.html