hadoop配置文件: hdfs-site.xml, mapred-site.xml


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>/pvdata/hadoopdata/data/,/opt/hadoopdata/data/</value>
</property>


轉:http://blog.csdn.net/lxpbs8851/article/details/9768039

mapred-site.xml文件中的mapred.local.dir為mapreduce本地數據目錄,應當設置為本地目錄,如:D:/hadoop/mapred-local-dir。mapreduce在執行一個task時,需要將task的JAR包

和配置文件等下載到本地,然后才能執行,而提交job時,只是將JAR等上傳到了HDFS上。

mapred-site.xml文件中的mapred.system.dir為mapreduce共享目錄,不能為本地目錄,只能為HDFS目錄,可以填 寫相對目錄如:mapred-system-dir,假設以Administrator登錄cygwin,並啟動hadoop,則:
$ ./hadoop fs -ls /user/Administrator
Found 1 items
drwx-wx-wx   - Administrator supergroup          0 2010-02-02 14:32 /user/Administrator/mapred-system-dir
 
轉:http://www.hadoopor.com/archiver/tid-481.html


免責聲明!

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



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