The Holy Java

Building the right thing, building it right, fast

Bash Magic: List Hive Table Sizes in GB

Posted by Jakub Holý on January 8, 2013

To list the sizes of Hive tables in Hadoop in GBs:

sudo -u hdfs hadoop fs -du /user/hive/warehouse/ | awk '/^[0-9]+/ { print int($1/(1024**3)) " [GB]\t" $2 }'


448 [GB] hdfs://
8 [GB]	hdfs://
0 [GB]	hdfs://

Sorry, the comment form is closed at this time.

%d bloggers like this: