简体   繁体   English

无法删除 HDFS 丢失/损坏的文件

[英]Unable to delete HDFS Missing/Corrupt files

I am unable to delete corrupt files present in my HDFS.我无法删除 HDFS 中存在的损坏文件。

when i launch :当我启动时:

hdfs fsck -list-corruptfileblocks

i got some blocks corrupted : The filesystem under path '/' has 10 CORRUPT files我有一些块损坏: The filesystem under path '/' has 10 CORRUPT files

hdfs dfs -rm /path/to/filename.fileextension

rm: `/path/to/filename.fileextension': No such file or directory

I also tried我也试过

hdfs fsck / -delete

  Under-replicated blocks:       0 (0.0 %)
     Mis-replicated blocks:         0 (0.0 %)
     Default replication factor:    3     
     Corrupt blocks:                0
     Missing replicas:              0 (0.0 %)   
    The filesystem under path '/' is HEALTHY 

I've also restart both of namenodes and the bug still occurs我也重新启动了两个名称节点,但仍然出现错误

Can anyone please help me in this case ?在这种情况下,有人可以帮助我吗? Here is a similar case :这是一个类似的案例

Thanks.谢谢。

maybe the corrupt files are in snapshot, and you should delete snapshot也许损坏的文件在快照中,您应该删除快照

https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsSnapshots.html https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsSnapshots.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM