码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-06-11 06:55:03      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:

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

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

标签:

原文地址:http://www.cnblogs.com/shiguotao-com/p/4567922.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!