Hadoop 损坏块
我正在使用 hadoop 0.20.append 和 hbase 0.90.0。我将一些数据上传到 Hbase,然后杀死 HMaster 和 Namenode 以进行评估。之后,我向 Hbase 添加了更多数据,我可以在 hbase shell 中看到它们。
现在当我启动Namenode时,我遇到了问题。日志显示名称节点处于安全模式,我无法添加或删除内容,因为它处于安全模式。
另外,当我刚刚运行时
./bin/hadoop fsck /
,我得到,
............Status: HEALTHY
Total size: 12034 B (Total open files size: 4762 B)
Total dirs: 22
Total files: 12 (Files currently being written: 3)
Total blocks (validated): 12 (avg. block size 1002 B) (Total open file blocks (not validated): 3)
Minimally replicated blocks: 12 (100.0 %)
Over-replicated blocks: 0 (0.0 %)
Under-replicated blocks: 0 (0.0 %)
Mis-replicated blocks: 0 (0.0 %)
Default replication factor: 3
Average block replication: 3.0
Corrupt blocks: 0
Missing replicas: 0 (0.0 %)
Number of data-nodes: 3
Number of racks: 1
路径“/”下的文件系统是健康的
但是当我运行 ./bin/hadoop fsck / -openforwrite
时
,我得到,
Total size: 16796 B
Total dirs: 22
Total files: 15
Total blocks (validated): 15 (avg. block size 1119 B)
********************************
CORRUPT FILES: 2
********************************
Minimally replicated blocks: 13 (86.666664 %)
Over-replicated blocks: 0 (0.0 %)
Under-replicated blocks: 0 (0.0 %)
Mis-replicated blocks: 0 (0.0 %)
Default replication factor: 3
Average block replication: 2.6
Corrupt blocks: 0
Missing replicas: 0 (0.0 %)
Number of data-nodes: 3
Number of racks: 1
路径“/”下的文件系统已
损坏以及损坏块的信息。
还尝试使用
./bin/hadoop fsck / -move
但即使在获得相同的损坏块列表之后。关于如何解决这个问题并恢复我的内容有什么想法吗?
I am using hadoop 0.20.append and hbase 0.90.0. I uploaded few data into Hbase and then killed HMaster and Namenode for an evaluation purpose. After this I added few more data to the Hbase and I could see them in the hbase shell.
Now when I started the Namenode, I am facing problems. The log says that the name node is in safe mode and I am not able to add or delete the contents as it is in Safemode.
Also when I just ran
./bin/hadoop fsck /
I get,
............Status: HEALTHY
Total size: 12034 B (Total open files size: 4762 B)
Total dirs: 22
Total files: 12 (Files currently being written: 3)
Total blocks (validated): 12 (avg. block size 1002 B) (Total open file blocks (not validated): 3)
Minimally replicated blocks: 12 (100.0 %)
Over-replicated blocks: 0 (0.0 %)
Under-replicated blocks: 0 (0.0 %)
Mis-replicated blocks: 0 (0.0 %)
Default replication factor: 3
Average block replication: 3.0
Corrupt blocks: 0
Missing replicas: 0 (0.0 %)
Number of data-nodes: 3
Number of racks: 1
The filesystem under path '/' is HEALTHY
But when I run ./bin/hadoop fsck / -openforwrite
I get,
Total size: 16796 B
Total dirs: 22
Total files: 15
Total blocks (validated): 15 (avg. block size 1119 B)
********************************
CORRUPT FILES: 2
********************************
Minimally replicated blocks: 13 (86.666664 %)
Over-replicated blocks: 0 (0.0 %)
Under-replicated blocks: 0 (0.0 %)
Mis-replicated blocks: 0 (0.0 %)
Default replication factor: 3
Average block replication: 2.6
Corrupt blocks: 0
Missing replicas: 0 (0.0 %)
Number of data-nodes: 3
Number of racks: 1
The filesystem under path '/' is CORRUPT
along with the info of corrupt blocks.
Also tried using
./bin/hadoop fsck / -move
But even after that getting the same list of corrupt blocks. Any idea regarding how to tackle this and recover my contents?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我有类似的问题。根据我的经验,它们无法恢复。创建文件的过程被中断,导致文件无人看管。您可以通过以下方式查看是否可以读取它们:
并且删除它们是安全的,因为失败的进程负责稍后再次重试创建这些文件。
它们应该被删除,因为这种不一致可能会导致未来的问题。
I had similar problem. In my experience, they cannot be recovered. The process to create the files was interrupted, and left them unattended. You can see if you can read them by:
And it was safe to delete them, because the failed process is responsible to retry the creation of those files again later.
And they should be removed, because such inconsistency can cause future problems.
正如它所暗示的,-openforwrite 意味着当一组文件被写入时,它们没有关闭。因此,如果您可以查看 fsck 详细信息,您会看到那些仍然由 hdfs fsck 报告打开的文件。我遇到过这个问题,并且只解决方案是删除在 fsck 中显示打开的文件。如有任何进一步问题,请告诉我。
as it suggest,-openforwrite means when the set of files were getting written,they were not closed.So if you can look into fsck details you would see those files which were still reported open by hdfs fsck.I have faced this issue and only solution is to delete the files which are showing open in fsck.Let me know for any further questions.