最小配置如下:
组件名称 | 配置文件 | 属性名称 | 独立模式 standalone | 伪分布式模式 pseudo-distributed | 全分布式模式 fully-distributed |
Common | conf/core-site.xml | fs.default.name | file:/// (默认) | hdfs://localhost | hdfs://namenode/ |
HDFS | conf/hdfs-site.xml | dfs.replication | N/A | 1 | 3(默认) |
MapReduce | conf/mapred-site.xml | mapred.job.tracker | local(默认) | localhost:8021 | localhost:8021 |
伪分布式模式最小配置如下:
conf/core-site.xml |
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>fs.default.name</name> <value>hdfs://localhost:9000</value> </property> </configuration> |
conf/hdfs-site.xml |
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>dfs.replication</name> <value>1</value> </property> </configuration> |
conf/mapred-site.xml |
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>mapred.job.tracker</name> <value>localhost:9001</value> </property> </configuration> |