DFS Used%: NaN%问题
一.问题描述:
[root@master sbin]# hdfs dfsadmin -report
Configured Capacity: 0 (0 B)
Present Capacity: 0 (0 B)
DFS Remaining: 0 (0 B)
DFS Used: 0 (0 B)
DFS Used%: NaN%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0
Pending deletion blocks: 0
二.问题导致可能原因:
1)多次格式化导致的,可以尝试删除hdfs下的data目录、name目录、tmp目录后格式,然后重新启动;
2)没有关闭防火墙,可以通过以下命令检查是否关闭了防火墙,如果没有关闭先关闭对应节点的防火墙
[root@slave1 data]# service iptables status
iptables: Firewall is not running.
3)不在同一个网络,需要相互ping通
4)检查namenode节点上的cat /etc/hosts下有没有注释127.0.0.1映射表,如果没有先注释再重新启动
[root@master hadoop-3.0.0-alpha4]# cat /etc/hosts
127.0.0.1 master localhost
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.28.130 www
192.168.28.130 master
192.168.28.136 slave1
192.168.28.137 slave2
发现有127.0.0.1映射,先注释掉再启动hadoop相关服务
[root@master sbin]# ./start-all.sh
Starting namenodes on [master]
Starting datanodes
Starting secondary namenodes [master]
Starting resourcemanager
Starting nodemanagers
三.问题解决后,运行结果如下:
[root@master sbin]# hdfs dfsadmin -report
Configured Capacity: 202921664512 (188.99 GB)
Present Capacity: 166830989312 (155.37 GB)
DFS Remaining: 166830940160 (155.37 GB)
DFS Used: 49152 (48 KB)
DFS Used%: 0.00%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0
Pending deletion blocks: 0
-------------------------------------------------
Live datanodes (2):
Name: 192.168.28.136:9866 (slave1)
Hostname: slave1
Decommission Status : Normal
Configured Capacity: 101460832256 (94.49 GB)
DFS Used: 24576 (24 KB)
Non DFS Used: 12891869184 (12.01 GB)
DFS Remaining: 83415031808 (77.69 GB)
DFS Used%: 0.00%
DFS Remaining%: 82.21%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Jun 07 10:52:01 CST 2018
Last Block Report: Thu Jun 07 10:51:14 CST 2018
Name: 192.168.28.137:9866 (slave2)
Hostname: slave2
Decommission Status : Normal
Configured Capacity: 101460832256 (94.49 GB)
DFS Used: 24576 (24 KB)
Non DFS Used: 12890992640 (12.01 GB)
DFS Remaining: 83415908352 (77.69 GB)
DFS Used%: 0.00%
DFS Remaining%: 82.21%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Jun 07 10:52:01 CST 2018
Last Block Report: Thu Jun 07 10:51:14 CST 2018
最新文章
- Javascript 优化项目代码技巧之语言基础(二)
- 笔记:html 拾遗之一
- linux中,常用的账号管理命令
- Python TCP客户端
- Arduino小车学习与研究
- spring 主题使用详解[转]
- 求a,b在区间上的公倍数个数
- mindmanager2012打开文件出现runtime error r6025 解决方式
- 三白话经典算法系列 Shell排序实现
- python中文编码问题深入分析(一):字符编码基础
- WPF MVVM模式的一些理解
- 注销/etc/passwd带来的系统登陆不上
- linkin大话面向对象--方法详解
- 在Python中使用Redis
- 在 Mac OS X 下,如何向 sudoers 文件添加新用户
- js中split()方法得到的数组长度
- 【Python】【容器 | 迭代对象 | 迭代器 | 生成器 | 生成器表达式 | 协程 | 期物 | 任务】
- Easy to use cross-platform 3D engines
- Java虚拟机--线程安全和锁优化
- HDU 5836 Rubik's Cube BFS