你好,游客 登录 注册 搜索
背景:
阅读新闻

Hadoop参数说明

[日期:2013-03-06] 来源:Linux社区  作者:hijk139 [字体:大 中 小]

一般来说,Hadoop主要有三个默认参数文件,分别为core-default.xml,hdfs-default.xml,mapred-default.xml。其它需要用户配置的参数文件为core-site.xml,hdfs-site.xml,mapred-site.xml,下面分别介绍下相关参数的含义

三个重要配置文件

1,core-site.xml
[node1 conf]$ cat core-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>

<property>
        <name>fs.default.name</name>
        <value>hdfs://192.168.0.75:9000/</value>
        <description>URI of NameNode.</description>
</property>
--fs.default.name  缺省的文件URI标识设定。
<property>
        <name>hadoop.tmp.dir</name>
        <value>/data1/tmp</value>
        <description>Temp dir.</description>
</property>
--hadoop.tmp.dir  临时目录设定
<property>
        <name>dfs.hosts.exclude</name>
        <value>/home/ocdc/hadoop-ocdc/conf/excludes</value>
        <description>List of excluded DataNodes.</description>
</property>
-- dfs.hosts.exclude    Datanode的黑名单
<property>
        <name>fs.default.name0</name>
        <value>hdfs://0.0.0.0:9000/</value>
</property>
--fs.default.name0 Avatar hadoop的配置,主namenode的URI,目前设置为空
<property>
        <name>fs.default.name1</name>
        <value>hdfs://192.168.0.69:9000/</value>
</property>
</configuration>
--fs.default.name1 备namenode的URI

2,hdfs-site.xml

[node1 conf]$ cat hdfs-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>

<!-- The necessary parameters, please modify value
-->
<property>
    <name>dfs.name.dir</name>
    <value>/home/ocdc/hadoop-ocdc/data/namenode</value>
        <description>File fsimage location.
        If this is a comma-delimited list of directories then the name
        table is replicated in all of the directories, for redundancy.
        </description>
</property>
--默认配置是${hadoop.tmp.dir}/dfs/name,namenode相关数据存放的地方,如果此处配置了多个目录,这数据在这些目录中各方一份
<property>
    <name>dfs.name.edits.dir</name>
    <value>/home/ocdc/hadoop-ocdc/data/editlog</value>
        <description>File edits location.
        If this is a comma-delimited list of directories then the name
        table is replicated in all of the directories, for redundancy.
        </description>
</property>
文件编辑的目录,也可设置多个目录的冗余配置
<property>
        <name>dfs.data.dir</name>
        <value>/data01/data,/data02/data,/data03/data,/data04/data,/data05/data</value>
        <description>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.
        </description>
</property>

linux
相关资讯       Hadoop参数 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款