Hadoop的配置文件

  • hdfs-default.xml 2.7.2:http://hadoop.apache.org/docs/r2.7.2/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml
  • hdfs-default.xml 3.1.2:https://hadoop.apache.org/docs/r3.1.2/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml

 

  • core-default.xml  2.7.2:https://hadoop.apache.org/docs/r2.7.2/hadoop-project-dist/hadoop-common/core-default.xml
  • core-default.xml  3.1.2:https://hadoop.apache.org/docs/r3.1.2/hadoop-project-dist/hadoop-common/core-default.xml

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)


    fs.defaultFS
    hdfs://localhost:9000

集群模式: 



    fs.defaultFS
    hdfs://hadoop102:9000

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.tmp.dir
    /opt/module/hadoop-2.7.2/data/tmp

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

你可能感兴趣的:(大数据_Hadoop)