Good evening~ I'm Jin.

I want to calculate the table size without querying in HIVE or using Hadoop.

Because I don't have any permission about HIVE and Hadoop without selecting
data in database so I can't use show properties, etc. That is the rule of
our company.

How can I do this?


(For example)

   -

   dataRows : 100
   -

   columnName(Type) : userName(string), userNumber(int), userCode(bigint),
   userAge(int)
   - maximum length of userName : 36

I calculated table size like this.

   -

   I thought like that string is 8bytes, int is 4bytes, bigint is 8bytes (I
   didn't consider about record header size and column header size because I
   can't find the data in Hive web pages)
   - 100 * ((8*36)+4+8+4)
      - totalSize : 30,400 bytes

Would you give me some advice?

Reply via email to