以下是在CentOS上集成HDFS與YARN的配置指南:
HADOOP_HOME環境變量。core-site.xml,配置fs.defaultFS為hdfs://localhost:9000。hdfs-site.xml,設置dfs.replication等參數。hdfs namenode -format格式化NameNode。start-dfs.sh腳本。yarn-site.xml,配置yarn.resourcemanager.hostname和yarn.nodemanager.aux - services等參數。mapred-site.xml,設置mapreduce.framework.name為yarn。start-yarn.sh腳本。使用jps命令查看進程,應看到NameNode、DataNode、ResourceManager、NodeManager等進程。還可通過訪問HDFS的Web界面http://localhost:50070和YARN的Web界面http://localhost:8088來確認集群運行狀態。