CentOS 7.4下Hadoop 2.7.6安装部署(4)

# 该配置和Hadoop服务无关,只是用于Hadoop脚本的批量使用
[yun@mini01 hadoop]$ pwd
/app/hadoop/etc/hadoop
[yun@mini01 hadoop]$ cat slaves
mini03
mini04
mini05

5.7. 格式化namenode
(是对namenode进行初始化)

[yun@mini01 hadoop]$ hdfs namenode -format 
18/06/09 17:44:56 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG:  host = mini01/10.0.0.11
STARTUP_MSG:  args = [-format]
STARTUP_MSG:  version = 2.7.6
………………
STARTUP_MSG:  java = 1.8.0_112
************************************************************/
18/06/09 17:44:56 INFO namenode.NameNode: registered UNIX signal handlers for [TERM, HUP, INT]
18/06/09 17:44:56 INFO namenode.NameNode: createNameNode [-format]
Formatting using clusterid: CID-72e356f5-7723-4960-885a-72e522e19be1
18/06/09 17:44:57 INFO namenode.FSNamesystem: No KeyProvider found.
18/06/09 17:44:57 INFO namenode.FSNamesystem: fsLock is fair: true
18/06/09 17:44:57 INFO namenode.FSNamesystem: Detailed lock hold time metrics enabled: false
18/06/09 17:44:57 INFO blockmanagement.DatanodeManager: dfs.block.invalidate.limit=1000
18/06/09 17:44:57 INFO blockmanagement.DatanodeManager: dfs.namenode.datanode.registration.ip-hostname-check=true
18/06/09 17:44:57 INFO blockmanagement.BlockManager: dfs.namenode.startup.delay.block.deletion.sec is set to 000:00:00:00.000
18/06/09 17:44:57 INFO blockmanagement.BlockManager: The block deletion will start around 2018 Jun 09 17:44:57
18/06/09 17:44:57 INFO util.GSet: Computing capacity for map BlocksMap
18/06/09 17:44:57 INFO util.GSet: VM type      = 64-bit
18/06/09 17:44:57 INFO util.GSet: 2.0% max memory 889 MB = 17.8 MB
18/06/09 17:44:57 INFO util.GSet: capacity      = 2^21 = 2097152 entries
18/06/09 17:44:57 INFO blockmanagement.BlockManager: dfs.block.access.token.enable=false
18/06/09 17:44:57 INFO blockmanagement.BlockManager: defaultReplication        = 3
18/06/09 17:44:57 INFO blockmanagement.BlockManager: maxReplication            = 512
18/06/09 17:44:57 INFO blockmanagement.BlockManager: minReplication            = 1
18/06/09 17:44:57 INFO blockmanagement.BlockManager: maxReplicationStreams      = 2
18/06/09 17:44:57 INFO blockmanagement.BlockManager: replicationRecheckInterval = 3000
18/06/09 17:44:57 INFO blockmanagement.BlockManager: encryptDataTransfer        = false
18/06/09 17:44:57 INFO blockmanagement.BlockManager: maxNumBlocksToLog          = 1000
18/06/09 17:44:57 INFO namenode.FSNamesystem: fsOwner            = yun (auth:SIMPLE)
18/06/09 17:44:57 INFO namenode.FSNamesystem: supergroup          = supergroup
18/06/09 17:44:57 INFO namenode.FSNamesystem: isPermissionEnabled = true
18/06/09 17:44:57 INFO namenode.FSNamesystem: HA Enabled: false
18/06/09 17:44:57 INFO namenode.FSNamesystem: Append Enabled: true
18/06/09 17:44:58 INFO util.GSet: Computing capacity for map INodeMap
18/06/09 17:44:58 INFO util.GSet: VM type      = 64-bit
18/06/09 17:44:58 INFO util.GSet: 1.0% max memory 889 MB = 8.9 MB
18/06/09 17:44:58 INFO util.GSet: capacity      = 2^20 = 1048576 entries
18/06/09 17:44:58 INFO namenode.FSDirectory: ACLs enabled? false
18/06/09 17:44:58 INFO namenode.FSDirectory: XAttrs enabled? true
18/06/09 17:44:58 INFO namenode.FSDirectory: Maximum size of an xattr: 16384
18/06/09 17:44:58 INFO namenode.NameNode: Caching file names occuring more than 10 times
18/06/09 17:44:58 INFO util.GSet: Computing capacity for map cachedBlocks
18/06/09 17:44:58 INFO util.GSet: VM type      = 64-bit
18/06/09 17:44:58 INFO util.GSet: 0.25% max memory 889 MB = 2.2 MB
18/06/09 17:44:58 INFO util.GSet: capacity      = 2^18 = 262144 entries
18/06/09 17:44:58 INFO namenode.FSNamesystem: dfs.namenode.safemode.threshold-pct = 0.9990000128746033
18/06/09 17:44:58 INFO namenode.FSNamesystem: dfs.namenode.safemode.min.datanodes = 0
18/06/09 17:44:58 INFO namenode.FSNamesystem: dfs.namenode.safemode.extension    = 30000
18/06/09 17:44:58 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.window.num.buckets = 10
18/06/09 17:44:58 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.num.users = 10
18/06/09 17:44:58 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.windows.minutes = 1,5,25
18/06/09 17:44:58 INFO namenode.FSNamesystem: Retry cache on namenode is enabled
18/06/09 17:44:58 INFO namenode.FSNamesystem: Retry cache will use 0.03 of total heap and retry cache entry expiry time is 600000 millis
18/06/09 17:44:58 INFO util.GSet: Computing capacity for map NameNodeRetryCache
18/06/09 17:44:58 INFO util.GSet: VM type      = 64-bit
18/06/09 17:44:58 INFO util.GSet: 0.029999999329447746% max memory 889 MB = 273.1 KB
18/06/09 17:44:58 INFO util.GSet: capacity      = 2^15 = 32768 entries
18/06/09 17:44:58 INFO namenode.FSImage: Allocated new BlockPoolId: BP-925531343-10.0.0.11-1528537498201
18/06/09 17:44:58 INFO common.Storage: Storage directory /app/hadoop/tmp/dfs/name has been successfully formatted.
18/06/09 17:44:58 INFO namenode.FSImageFormatProtobuf: Saving image file /app/hadoop/tmp/dfs/name/current/fsimage.ckpt_0000000000000000000 using no compression
18/06/09 17:44:58 INFO namenode.FSImageFormatProtobuf: Image file /app/hadoop/tmp/dfs/name/current/fsimage.ckpt_0000000000000000000 of size 319 bytes saved in 0 seconds.
18/06/09 17:44:58 INFO namenode.NNStorageRetentionManager: Going to retain 1 images with txid >= 0
18/06/09 17:44:58 INFO util.ExitUtil: Exiting with status 0
18/06/09 17:44:58 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at mini01/10.0.0.11
************************************************************/
[yun@mini01 hadoop]$ pwd
/app/hadoop
[yun@mini01 hadoop]$ ll
total 112
drwxr-xr-x 2 yun yun  194 Jun  8 16:36 bin
drwxr-xr-x 3 yun yun    20 Jun  8 16:36 etc
drwxr-xr-x 2 yun yun  106 Jun  8 16:36 include
drwxr-xr-x 3 yun yun    20 Jun  8 16:36 lib
drwxr-xr-x 2 yun yun  239 Jun  8 16:36 libexec
-rw-r--r-- 1 yun yun 86424 Jun  8 16:36 LICENSE.txt
-rw-r--r-- 1 yun yun 14978 Jun  8 16:36 NOTICE.txt
-rw-r--r-- 1 yun yun  1366 Jun  8 16:36 README.txt
drwxr-xr-x 2 yun yun  4096 Jun  8 16:36 sbin
drwxr-xr-x 4 yun yun    31 Jun  8 16:36 share
drwxrwxr-x 3 yun yun    17 Jun  9 17:44 tmp  # 该目录之前是没有的
[yun@mini01 hadoop]$ ll tmp/
total 0
drwxrwxr-x 3 yun yun 18 Jun  9 17:44 dfs
[yun@mini01 hadoop]$ ll tmp/dfs/
total 0
drwxrwxr-x 3 yun yun 21 Jun  9 17:44 name
[yun@mini01 hadoop]$ ll tmp/dfs/name/
total 0
drwxrwxr-x 2 yun yun 112 Jun  9 17:44 current
[yun@mini01 hadoop]$ ll tmp/dfs/name/current/
total 16
-rw-rw-r-- 1 yun yun 319 Jun  9 17:44 fsimage_0000000000000000000
-rw-rw-r-- 1 yun yun  62 Jun  9 17:44 fsimage_0000000000000000000.md5
-rw-rw-r-- 1 yun yun  2 Jun  9 17:44 seen_txid
-rw-rw-r-- 1 yun yun 199 Jun  9 17:44 VERSION

  

5.8. 启动namenode

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/b2e31508b89581f63241fcea001a6e24.html