Hadoop的配置文件

 


dfs.blocksize

134217728

hdfs数据块的大小,默认为128 MB。

The default block size for new files, in bytes. You can use the following suffix (case insensitive): k(kilo), m(mega), g(giga), t(tera), p(peta), e(exa) to specify the size (such as 128k, 512m, 1g, etc.), Or provide complete size in bytes (such as 134217728 for 128 MB).

新文件的默认块大小(字节)。您可以使用以下后缀(不区分大小写):k(kilo)、m(mega)、g(giga)、t(tera)、p(peta)、e(exa)指定大小(例如128k、512m、1g等),或者以字节为单位提供完整大小(例如134217728表示128 MB)。


dfs.replication 

3

hdfs中快的副本数。 

Default block replication. The actual number of replications can be specified when the file is created. The default is used if replication is not specified in create time.


fs.defaultFS  

file:/// 

用于指定HDFS中NameNode的地址默认是本地。

本地模式:(默认端口8020)

<property>
    <name>fs.defaultFS</name>
    <value>hdfs://localhost:9000</value>
</property>

集群模式: 

<!-- 指定HDFS中NameNode的地址 -->
<property>
    <name>fs.defaultFS</name>
    <value>hdfs://hadoop102:9000</value>
</property>

The name of the default file system. A URI whose scheme and authority determine the FileSystem implementation. The uri's scheme determines the config property (fs.SCHEME.impl) naming the FileSystem implementation class. The uri's authority is used to determine the host, port, etc. for a filesystem. 

默认文件系统的名称。其方案和权限决定文件系统实现的URI。URI的方案确定了命名文件系统实现类的配置属性(fs.scheme.impl)。URI的权限用于确定文件系统的主机、端口等。


hadoop.tmp.dir 

/tmp/hadoop-${user.name} 

用于指定hdfs文件在节点上具体的存储位置。

比如:

<!-- 指定Hadoop运行时产生文件的存储目录 -->
<property>
    <name>hadoop.tmp.dir</name>
    <value>/opt/module/hadoop-2.7.2/data/tmp</value>
</property>

A base for other temporary directories. 


dfs.namenode.checkpoint.period

3600    

The number of seconds between two periodic checkpoints.

SecondaryNamenode,专门用于 FsImage 和 Edits 的合并。

SecondaryNameNode 每隔  dfs.namenode.checkpoint.period (默认为1小时)秒会回去询问NameNode是否需要CheckPoint。

dfs.namenode.checkpoint.check.period

60  

一分钟检(默认)查一次操作次数,当操作次数达到1百万次(默认),SecondaryNameNode 执行一次。

The SecondaryNameNode and CheckpointNode will poll the NameNode every 'dfs.namenode.checkpoint.check.period' seconds to query the number of uncheckpointed transactions. 

dfs.namenode.checkpoint.txns  

1000000 

对编辑日志的操作达到多少次后,执行 CheckPoint。

The Secondary NameNode or CheckpointNode will create a checkpoint of the namespace every 'dfs.namenode.checkpoint.txns' transactions, regardless of whether 'dfs.namenode.checkpoint.period' has expired.


dfs.permissions.enabled 

true

If "true", enable permission checking in HDFS. If "false", permission checking is turned off, but all other behavior is unchanged. Switching from one parameter value to the other does not change the mode, owner or group of files or directories.

如果为“真”,则启用HDFS中的权限检查。如果为“假”,则关闭权限检查,但所有其他行为不变。从一个参数值切换到另一个参数值不会更改文件或目录的模式、所有者或组。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值