Database Reference
In-Depth Information
Table A-1. Key configuration properties for different modes
Component Property
Standalone Pseudodistributed
Fully distributed
Common
fs.defaultFS
file:///
(default)
hdfs://localhost/ hdfs://
namenode
/
HDFS
N/A
3
(default)
dfs.replication
1
MapReduce
mapreduce.framework.name
local
(default)
yarn
yarn
YARN
yarn.resourcemanager.hostname
N/A
localhost
resourcemanager
yarn.nodemanager.aux-services
N/A
mapreduce_shuffle mapreduce_shuffle
You can read more about configuration in
Hadoop Configuration
.
Standalone Mode
In standalone mode, there is no further action to take, since the default properties are set
for standalone mode and there are no daemons to run.
Pseudodistributed Mode
In pseudodistributed mode, the configuration files should be created with the following
contents and placed in the
etc/hadoop
directory. Alternatively, you can copy the
etc/ha-
doop
directory to another location, and then place the
*-site.xml
configuration files there.
The advantage of this approach is that it separates configuration settings from the installa-
tion files. If you do this, you need to set the
HADOOP_CONF_DIR
environment variable
to the alternative location, or make sure you start the daemons with the
--config
op-
tion:
<?xml version="1.0"?>
<!-- core-site.xml -->
<configuration>
<property>
<name>
fs.defaultFS
</name>
<value>
hdfs://localhost/
</value>
</property>
</configuration>
<?xml version="1.0"?>
<!-- hdfs-site.xml -->
<configuration>
<property>
<name>
dfs.replication
</name>
<value>
1
</value>