bash - How determine Hive database size? -
how determine hive's database size bash
or hive cli
?
hdfs
, hadoop
commands avaliable in bash
.
a database in hive metadata storage - meaning holds information tables , has default location. tables in database can stored anywhere in hdfs
if location
specified when creating table.
you can see tables in database using show tables
command in hive cli
.
then, each table, can find location in hdfs
using describe formatted <table name>
(again in hive cli
).
last, each table can find size using hdfs dfs -du -s -h /table/location/
i don't think there's single command measure sum of sizes of tables of database. however, should easy write script automates above steps. hive can invoked bash cli
using: hive -e '<hive command>'
Comments
Post a Comment