Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HDFS free space available command

Tags:

hadoop

hdfs

Is there a hdfs command to see available free space in hdfs. We can see that through browser at master:hdfsport in browser , but for some reason I can't access this and I need some command. I can see my disk usage through command ./bin/hadoop fs -du -h but cannot see free space available.

Thanks for answer in advance.

like image 615
Animesh Raj Jha Avatar asked Jul 20 '12 16:07

Animesh Raj Jha


People also ask

How do I know my HDFS size?

2 Answers. You can use the “hadoop fs -ls command”. This command displays the list of files in the current directory and all it's details.In the output of this command, the 5th column displays the size of file in bytes.

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.

How do I clean up my HDFS files?

You will find rm command in your Hadoop fs command. This command is similar to the Linux rm command, and it is used for removing a file from the HDFS file system. The command –rmr can be used to delete files recursively.


1 Answers

Try this:

hdfs dfsadmin -report 

With older versions of Hadoop, try this:

hadoop dfsadmin -report 
like image 66
Razvan Avatar answered Sep 29 '22 06:09

Razvan