Hadoop參數:fs.defaultFS、 dfs.name.dir 、 dfs.data.dir


fs.defaultFS

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.

默認文件系統的名稱。一個URI和權威確定文件系統實現的方案。uri的計划決定配置屬性(fs.SCHEME.impl)命名文件系統實現類。uri的權威是用來確定主機、端口等對於一個文件系統

 

  <property>
        <name>fs.defaultFS</name>
        <value>hdfs://172.18.11.2:9000</value>
  </property>

 

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>

 

 



免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM