1. 程式人生 > >Hadoop引數:dfs.name.dir 與 dfs.data.dir

Hadoop引數:dfs.name.dir 與 dfs.data.dir

dfs.name.dir Determines where on the local filesystem the DFS name node should store the name table(fsimage). If this is a comma-delimited list of directories then the name table is replicated in all of the directories, for redundancy. 這個引數用於確定將HDFS檔案系統的元資訊儲存在什麼目錄下。 如果這個引數設定為多個目錄,那麼這些目錄下都儲存著元資訊的多個備份。 如: <property>

    <name>dfs.name.dir</name>
    <value>/pvdata/hadoopdata/name/,/opt/hadoopdata/name/</value>
</property>
dfs.data.dir  Determines where on the local filesystem an DFS data node should store its blocks. If this is a comma-delimited list of directories, then data will be stored in all named directories, typically on different devices. Directories that do not exist are ignored. 這個引數用於確定將HDFS檔案系統的資料儲存在什麼目錄下。 我們可以將這個引數設定為多個分割槽上目錄,即可將HDFS建立在不同分割槽上。 如: <property>

    <name>dfs.data.dir</name>
    <value>/dev/sda3/hadoopdata/,/dev/sda1/hadoopdata/</value>
</property>