Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Prune namenode metadata

avatar
Master Guru

I am interested in pruning entries manually from the name node. If orphan entries exist in namenode (where namenode thinks file exist when it does not) how do I manually remove from namenode metadatea?

1 ACCEPTED SOLUTION

avatar
Master Guru

Use fsck, it's a tool of choice to manage HDFS. "Orphans" are corrupted files (with missing blocks) in HDFS lingo. You can use "-move" or "-delete" options to move corrupted files to /lost+found or to delete them. fsck will also tell you about under-replicated blocks (having at least 1 replica but less than configured replication factor) but HDFS will repair them little by little by creating missing replicas.

View solution in original post

1 REPLY 1

avatar
Master Guru

Use fsck, it's a tool of choice to manage HDFS. "Orphans" are corrupted files (with missing blocks) in HDFS lingo. You can use "-move" or "-delete" options to move corrupted files to /lost+found or to delete them. fsck will also tell you about under-replicated blocks (having at least 1 replica but less than configured replication factor) but HDFS will repair them little by little by creating missing replicas.