Created 08-29-2018 12:49 PM
I am currently deleting a large amount of small files and am needing to monitor the number of blocks pending deletion so I do not put too much of a load on the cluster. I know this number can be viewed in the NameNode UI, but I would like to run a command instead which I can then use in combination with `watch` so I can get continuous updates. Does such a command exist?
Created 08-29-2018 01:13 PM
This works for me, "PendingDeletionBlocks" is what you're looking for in the output if you're looking for pending deletes only.
watch curl --silent http://<your-name-node>:50070/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem
Created 08-29-2018 01:13 PM
This works for me, "PendingDeletionBlocks" is what you're looking for in the output if you're looking for pending deletes only.
watch curl --silent http://<your-name-node>:50070/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem
Created 08-29-2018 01:17 PM
I didn't think of querying the JMX, this works fantastically, thanks!
Actually @Jonathan Sneep I am not able to curl to the JMX as I need authorization. This cluster is kerberized and using SSL. I tried searching around on how to pass credentials but couldn't find anything. Any ideas?
Created 08-29-2018 02:06 PM
Hey @Josh Nicholson
curl --negotiate -u should work, I will test this myself in a bit.
Created 08-29-2018 02:19 PM
That worked, thanks.
Created 08-29-2018 02:22 PM
Perfect, glad to hear!
Created 11-13-2018 07:08 AM
goto Ambari --> HDFS --> QuickLinks --> Master(Active) ... a new page will open ... search "Number of Blocks Pending Deletion"... you will find the pending deletion blocks.. refresh page after 30 sec. counts will be changed... enjoy