2017-01-30 110 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