2017-01-30 129 views
1

我试图打开HDFS以下路径:无法打开HDFS路径

TwitterAgent.sinks.HDFS.hdfs.path = hdfs://localhost:9000/user/flume/tweets 

我打开一个新的浏览器,而我打字http://localhost:50070/dfshealth.html#tab-overview

我收到以下错误:

There are 2 missing blocks.

The following files may be corrupted:

blk_1073742237 /hbase/data/hbase/meta/1588230740/info/c5da7e591d294ae58968f4d0f2e8ffd9 blk_1073742231 /hbase/WALs/quickstart.cloudera,60020,1482726320014-splitting/quickstart.cloudera%2C60020%2C1482726320014..meta.1482726370496.meta

这是说如何找到可能的解决方案,但有没有解决这个问题的任何简化方法?使用

hdfs fsck <path> -list-corruptfileblocks 
e.g. hdfs fsck /hbase -list-corruptfileblocks 

将损坏的块/的lost + found:

+0

localhost上运行的是什么服务:50070? – halfer

+0

2块Hbase文件已损坏。如果不需要这些文件,删除它们是使HDFS恢复健康的最简单的选择。 – franklinsijo

+0

谢谢,但我该如何删除它们? –

回答

0

这可能会有所帮助:

检查使用命令损坏块

hdfs fsck <path> -move 
e.g. hdfs fsck /hbase -move 

或删除损坏使用的块:

hdfs fsck <path> -delete 
e.g. hdfs fsck /hbase -delete 

有时候会要求您提供超级用户权限,在这种情况下,请在您的命令之前附加sudo -u hdfs,例如, sudo -u hdfs hdfs fsck /hbase -list-corruptfileblocks

+0

非常感谢您的帮助,我可以删除它们。但我仍然没有得到以下结果:在虚拟机中打开Mozilla浏览器,然后转到HDFS中的/ user/flume/tweets。这是链接上的第24步:https://www.eduonix.com/blog/bigdata-and-hadoop/flume-installation-and-streaming-twitter-data-using-flume/ –

+0

如果你是无所谓使用虚拟机或直接使用机器,第24步的含义是:打开浏览器并输入URL为“http:// localhost:50070/explorer.html”。然后导航到'user> flume> tweets'目录 – daemon12

+0

我的情况中的端口是50070.它可能与您的情况不同。检查此:http://stackoverflow.com/questions/22855232/default-namenode-port-of-hdfs-is-50070-but-i-have-come-across-at-some-places-802 – daemon12