Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wiping out DFS in Hadoop

Tags:

hadoop

How do I wipe out the DFS in Hadoop?

like image 220
biznez Avatar asked Sep 10 '09 23:09

biznez


People also ask

How do I delete files from dfs hdfs?

rm: Remove a file from HDFS, similar to Unix rm command. This command does not delete directories. For recursive delete, use command -rm -r .

How do I clear hdfs disk usage?

Simply follow this path; from the Ambari Dashboard, click HDFS -> Configs -> Advanced -> Advanced core-site. Then set the 'fs. trash. interval' to 0 to disable.

What is dfs in hadoop?

DFS stands for the distributed file system, it is a concept of storing the file in multiple nodes in a distributed manner.


1 Answers

You need to do two things:

  1. Delete the main hadoop storage directory from every node. This directory is defined by the hadoop.tmp.dir property in your hdfs-site.xml.

  2. Reformat the namenode:

hadoop namenode -format

If you only do (2), it will only remove the metadata stored by the namenode, but won't get rid of all the temporary storage and datanode blocks.

like image 174
Eduard Avatar answered Sep 19 '22 22:09

Eduard