HDFS Details for Multimachine Clusters
Hadoop Core does not need highly reliable storage on the DataNode or TaskTracker nodes. Hadoop Core greatly benefits from increased network bandwidth.(经典)
A Minimal hadoop-site.xml for an HFS Cluster (conf/hadoop-site.xml)
<property>
<name>fs.default.name</name>
<value>hdfs://master:54310/</value>
<description>The name of the default file system. A URI whose
scheme and authority determine the FileSystem implementation. The
uri's scheme determines the config property (fs.SCHEME.impl) naming
the FileSystem implementation class. The uri's authority is used to
determine the host, port, etc. for a filesystem.
</description>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/hdfs</value>
<description>A base for other all storage directories,
temporary and persistent.
</description>
</property>
Building the HDFS Configuration
1、Generating the conf/hadoop-site.xml File
2、Generating the conf/slaves and conf/masters Files
3、Customizing the conf/hadoop-env.sh File
Distributing Your Installation Data
检查文件系统用户可读写;检查各个节点的java环境变量;配置不需要密码的ssh;设置HADOOP_PID_DIR的文件夹
Formatting Your HDFS
hadoop namenode -format
Starting Your HDFS Installation
start-dfs.sh
在构建hadoop环境中还需要明确下“HADOOP_PID_DIR "作用。
(未完待续)