此文章针对日志报错如下
22/03/12 06:14:24 INFO util.GSet: Computing capacity for map cachedBlocks
22/03/12 06:14:24 INFO util.GSet: VM type = 64-bit
22/03/12 06:14:24 INFO util.GSet: 0.25% max memory 966.7 MB = 2.4 MB
22/03/12 06:14:24 INFO util.GSet: capacity = 2^18 = 262144 entries
22/03/12 06:14:24 INFO namenode.FSNamesystem: dfs.namenode.safemode.threshold-pct = 0.9990000128746033
22/03/12 06:14:24 INFO namenode.FSNamesystem: dfs.namenode.safemode.min.datanodes = 0
22/03/12 06:14:24 INFO namenode.FSNamesystem: dfs.namenode.safemode.extension = 30000
22/03/12 06:14:24 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.window.num.buckets = 10
22/03/12 06:14:24 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.num.users = 10
22/03/12 06:14:24 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.windows.minutes = 1,5,25
22/03/12 06:14:24 INFO namenode.FSNamesystem: Retry cache on namenode is enabled
22/03/12 06:14:24 INFO namenode.FSNamesystem: Retry cache will use 0.03 of total heap and retry cache entry expiry time is 600000 millis
22/03/12 06:14:24 INFO util.GSet: Computing capacity for map NameNodeRetryCache
22/03/12 06:14:24 INFO util.GSet: VM type = 64-bit
22/03/12 06:14:24 INFO util.GSet: 0.029999999329447746% max memory 966.7 MB = 297.0 KB
22/03/12 06:14:24 INFO util.GSet: capacity = 2^15 = 32768 entries
22/03/12 06:14:24 INFO namenode.FSImage: Allocated new BlockPoolId: BP-1117087883-192.168.72.132-1647094464397
22/03/12 06:14:24 INFO common.Storage: Storage directory /var/hadoop/dfs/name has been successfully formatted.
22/03/12 06:14:24 INFO namenode.NNStorageRetentionManager: Going to retain 1 images with txid >= 0
22/03/12 06:14:24 INFO util.ExitUtil: Exiting with status 0
22/03/12 06:14:24 INFO namenode.NameNode: SHUTDOWN_MSG:
解决办法
1.终端输入:vim /opt/module/hadoop/etc/hadoop/core-site.xml这个根据自己的core-site.xml目录来填
2.往里面添加代码
3.格式化:hdfs namenode -format
最后重新开启



