问题
Can anyone please let me know the must have properties for Core-site.xml, hdfs-site.xml, mapred-site.xml and yarn-site.xml without which hadoop can not start?
回答1:
Below settings is for Hadoop 2.x.x for Standalone and Pseudo node setup.
core-site.xml
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>file:///home/hadoop/hadoopdata/hdfs/namenode</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>file:///home/hadoop/hadoopdata/hdfs/datanode</value>
</property>
</configuration>
mapred-site.xml
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
yarn-site.xml
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>
also refer apache hadoop documentation for single node setup
来源:https://stackoverflow.com/questions/41357226/must-have-properties-for-core-site-hdfs-site-mapred-site-and-yarn-site-xml