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

Hadoop参数说明

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

--AvatarNode0上HDFS的镜像日志存储目录
<property>
    <name>dfs.name.dir.shared1</name>
    <value>/namenode/namenode1</value>
</property>
<property>
    <name>dfs.name.edits.dir.shared0</name>
    <value>/namenode/editlog0</value>
</property>
<property>
    <name>dfs.name.edits.dir.shared1</name>
    <value>/namenode/editlog1</value>
</property>

---在此配置文件里,除了Hadoop的配置项外,Avatar的配置项dfs.name.dir.shared0,dfs.name.edits.dir.shared0,dfs.name.dir.shared1,dfs.name.edits.dir.shared1,分别为AvatarNode0上HDFS的镜像日志存储目录,AvatarNode1上HDFS的镜像日志存储目录。可以看到这些目录都在NFS的共享目录中,当AvatarNode0上运行的是PrimaryNameNode时,会向dfs.name.edits.dir.share0中写日志,AvatarNode1上的StandbyNameNode就会去读这些日志,反之,当AvatarNode1上运行的是PrimaryNameNode时,会向dfs.name.edits.dir.share1中写日志,AvatarNode0上的StandbyNameNode就会去读这些日志。
<property>
        <name>dfs.http.address0</name>
        <value>0.0.0.0:50070</value>
</property>
<property>
        <name>dfs.http.address1</name>
        <value>192.168.0.69:50070</value>
</property>

</configuration>

---0.0.0.0,表示可通过任一网卡访问http接口

3,mapred-site.xml
第三个配置文件
[node1 conf]$ cat mapred-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>mapred.job.tracker</name>
        <value>192.168.0.75:9002</value>
        <description>The host and port that the MapReduce job tracker runs
        at.  If "local", then jobs are run in-process as a single map
        and reduce task.
        </description>
</property>
----JobTracker 的主机(或者IP)和端口。
<property>
        <name>mapred.job.tracker.http.address</name>
        <value>192.168.0.75:50030</value>
        <description>
        The job tracker http server address and port the server will listen on.
        If the port is 0 then the server will start on a free port.
        </description>
</property>
---job tracker http server的端口和地址
<property>
        <name>mapred.job.tracker.handler.count</name>
        <value>2</value>
        <description>
    The number of server threads for the JobTracker. This should be roughly
    4% of the number of tasktracker nodes.
        </description>
</property>
--JobTracker的线程数,为tasktracker的4%
<property>
        <name>mapred.tasktracker.map.tasks.maximum</name>
    <value>7</value>
</property>
--可同时运行的map任务数
<property>
        <name>mapred.tasktracker.reduce.tasks.maximum</name>
        <value>1</value>
        <description>The maximum number of reduce tasks that will be run
        simultaneously by a task tracker.
        </description>
</property>
-- 最大reduce并发数
--这2个参数分别是用来设置的map和reduce的并发数量。实际作用的就是控制同时运行的task的数量
<property>
        <name>mapred.task.tracker.report.address</name>
        <value>127.0.0.1:0</value>
        <description>The interface and port that task tracker server listens on.
        Since it is only connected to by the tasks, it uses the local interface.
        EXPERT ONLY. Should only be changed if your host does not have the loopback
        interface.</description>
</property>
--tasktracker监听的地址,除非loopback没有设置,一般设置为127.0.0.1
<property>
        <name>mapred.local.dir</name>
        <value>${hadoop.tmp.dir}/mapred/local</value>
        <description>The local directory where MapReduce stores intermediate
        data files.  May be a comma-separated list of
        directories on different devices in order to spread disk i/o.
        Directories that do not exist are ignored.
        </description>
</property>
--map存储临时数据的地方,可以设置多个目录
<property>
        <name>mapred.system.dir</name>
        <value>${hadoop.tmp.dir}/mapred/system</value>
        <description>The shared directory where MapReduce stores control files.
        </description>
</property>
--Map/Reduce存放控制文件的目录, Map/Reduce框架存储系统文件的HDFS路径。
<property>
        <name>mapred.temp.dir</name>
        <value>${hadoop.tmp.dir}/mapred/temp</value>
        <description>A shared directory for temporary files.
        </description>
</property>
--mapred临时文件存放地
<property>
        <name>mapred.map.tasks</name>
        <value>1</value>
        <description>The default number of map tasks per job.
        Ignored when mapred.job.tracker is "local".
        </description>
</property>
--每个job默认的task数
<property>
        <name>mapred.reduce.tasks</name>
        <value>1</value>
        <description>The default number of reduce tasks per job. Typically set to 99%
        of the cluster's reduce capacity, so that if a node fails the reduces can
        still be executed in a single wave.
        Ignored when mapred.job.tracker is "local".
        </description>
</property>
---每个job的默认的reduce任务数
<property>
        <name>hadoop.job.history.user.location</name>
        <value>none</value>
        <description> User can specify a location to store the history files of
        a particular job. If nothing is specified, the logs are stored in
        output directory. The files are stored in "_logs/history/" in the directory.
        User can stop logging by giving the value "none".
        </description>
</property>
---
<property>
        <name>mapred.compress.map.output</name>
        <value>true</value>
</property>
--map输出是否压缩
<property>
        <name>mapred.tasktracker.expiry.interval</name>
        <value>30000</value>
</property>
---tasktracker过期时间,30000秒内不发送心跳,则过期
<property>
        <name>mapred.job.reuse.jvm.num.tasks</name>
        <value>-1</value>
        <description>How many tasks to run per jvm. If set to -1, there is
        no limit.
        </description>
</property>
---每虚拟机运行的任务数
<property>
        <name>mapred.task.timeout</name>
        <value>90000000</value>
        <description>The number of milliseconds before a task will be
        terminated if it neither reads an input, writes an output, nor
        updates its status string.
        </description>
</property>

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

       

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