for file in $(hive -e "show table extended like \`*\`" | grep location: | awk 'BEGIN { FS = ":" }; {printf("hdfs:%s:%s\n",$3,$4)}'); do hdfs dfs -du -h $file; done; Output: Time taken: 2.494 seconds 12.6m hdfs://hadoop1:8020/hive/tpcds/customer/customer.dat 5.2m hdfs://hadoop1:8020/hive/tpcds/customer_address/customer_address.dat 76.9m hdfs://hadoop1:8020/hive/tpcds/customer_demographics/customer_demographics.dat 9.8m hdfs://hadoop1:8020/hive/tpcds/date_dim/date_dim.dat 148.1k hdfs://hadoop1:8020/hive/tpcds/household_demographics/household_demographics.dat 4.8m hdfs://hadoop1:8020/hive/tpcds/item/item.dat 36.4k hdfs://hadoop1:8020/hive/tpcds/promotion/promotion.dat 3.1k hdfs://hadoop1:8020/hive/tpcds/store/store.dat 370.5m hdfs://hadoop1:8020/hive/tpcds/store_sales/store_sales.dat 4.9m hdfs://hadoop1:8020/hive/tpcds/time_dim/time_dim.dat 0 hdfs://hadoop1:8020/user/alexander/transac...
Hey, I'm Alex. I founded X-Warp, Infinimesh, Infinite Devices, Scalytics and worked with Cloudera, E.On, Google, Evariant, and had the incredible luck to build products with outstanding people in my life, across the globe.