hadoop安装笔记-2.配置文件

hadoop的配置文件可以分为两种:

1.只读文件,如,src/core/core-default.xml, src/hdfs/hdfs-default.xmlsrc/mapred/mapred-default.xml.

2.site配置文件,如,conf/core-site.xml, conf/hdfs-site.xml 和conf/mapred-site.xml.

配置hadoop daemon环境:

conf/hadoop-env.sh,这里安排着各个hadoop节点的基本信息(最基本的是该站点的java_home)。

其他的还有(HADOOP_*_OPTS):

export HADOOP_NAMENODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_NAMENODE_OPTS"
export HADOOP_SECONDARYNAMENODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_SECONDARYNAMENODE_OPTS"
export HADOOP_DATANODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_DATANODE_OPTS"
export HADOOP_BALANCER_OPTS="-Dcom.sun.management.jmxremote $HADOOP_BALANCER_OPTS"
export HADOOP_JOBTRACKER_OPTS="-Dcom.sun.management.jmxremote $HADOOP_JOBTRACKER_OPTS"

除了以上已经在配置文件中的东西,还有HADOOP_LOG_DIRHADOOP_HEAPSIZE

配置site:

site的配置分布在不同的文件ls一下目录可以看到

capacity-scheduler.xml      hadoop-policy.xml      slaves
configuration.xsl           hdfs-site.xml          ssl-client.xml.example
core-site.xml               log4j.properties       ssl-server.xml.example
fair-scheduler.xml          mapred-queue-acls.xml  taskcontroller.cfg
hadoop-env.sh               mapred-site.xml
hadoop-metrics2.properties  masters
有site结尾的都是
其中core-site是节点和该节点的dfs位置
mapred-site是mapreduce的一些配置
ParameterValueNotes
mapred.job.trackerHost or IP and port of JobTracker.host:port pair.
mapred.system.dirPath on the HDFS where where the MapReduce framework stores system files e.g. /hadoop/mapred/system/.This is in the default filesystem (HDFS) and must be accessible from both the server and client machines.
mapred.local.dirComma-separated list of paths on the local filesystem where temporary MapReduce data is written.Multiple paths help spread disk i/o.
mapred.tasktracker.{map|reduce}.tasks.maximumThe maximum number of MapReduce tasks, which are run simultaneously on a given TaskTracker, individually.Defaults to 2 (2 maps and 2 reduces), but vary it depending on your hardware.
dfs.hosts/dfs.hosts.excludeList of permitted/excluded DataNodes.If necessary, use these files to control the list of allowable datanodes.
mapred.hosts/mapred.hosts.excludeList of permitted/excluded TaskTrackers.If necessary, use these files to control the list of allowable TaskTrackers.
mapred.queue.namesComma separated list of queues to which jobs can be submitted.The MapReduce system always supports atleast one queue with the name as default. Hence, this parameter's value should always contain the string default. Some job schedulers supported in Hadoop, like the Capacity Scheduler, support multiple queues. If such a scheduler is being used, the list of configured queue names must be specified here. Once queues are defined, users can submit jobs to a queue using the property name mapred.job.queue.name in the job configuration. There could be a separate configuration file for configuring properties of these queues that is managed by the scheduler. Refer to the documentation of the scheduler for information on the same.
mapred.acls.enabledBoolean, specifying whether checks for queue ACLs and job ACLs are to be done for authorizing users for doing queue operations and job operations.If true, queue ACLs are checked while submitting and administering jobs and job ACLs are checked for authorizing view and modification of jobs. Queue ACLs are specified using the configuration parameters of the form mapred.queue.queue-name.acl-name, defined below under mapred-queue-acls.xml. Job ACLs are described at Job Authorization

太多了,懒得翻译

mapred-queue-acls.xml配置的是

通过配置还能满足某些系统的要求,9tb什么概念?

conf/hdfs-site.xmldfs.block.size134217728HDFS blocksize of 128MB for large file-systems.
conf/hdfs-site.xmldfs.namenode.handler.count40More NameNode server threads to handle RPCs from large number of DataNodes.
conf/mapred-site.xmlmapred.reduce.parallel.copies20Higher number of parallel copies run by reduces to fetch outputs from very large number of maps.
conf/mapred-site.xmlmapred.map.child.java.opts-Xmx512MLarger heap-size for child jvms of maps.
conf/mapred-site.xmlmapred.reduce.child.java.opts-Xmx512MLarger heap-size for child jvms of reduces.
conf/core-site.xmlfs.inmemory.size.mb200Larger amount of memory allocated for the in-memory file-system used to merge map-outputs at the reduces.
conf/core-site.xmlio.sort.factor100More streams merged at once while sorting files.
conf/core-site.xmlio.sort.mb200Higher memory-limit while sorting data.
conf/core-site.xmlio.file.buffer.size131072Size of read/write buffer used in SequenceFiles.

 

task配置

 

转载于:https://www.cnblogs.com/alabasta/archive/2012/09/08/2667749.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值