pjames
pjames

Reputation: 302

How do you calculate the size of a single row in hbase?

I am trying to figure out the size of a single row in HBase. I haven't found a way to do it online or through any of the hbase utils and I have used hbase hfile -mbsf to find out average row size and other statistics for an Hfile, but I am curious about a single row's size. Has anyone found a way to do this?

Upvotes: 3

Views: 4491

Answers (2)

Andrea Bergonzo
Andrea Bergonzo

Reputation: 5170

Result.getTotalSizeOfCells(Result result)

long size = Result.getTotalSizeOfCells(Result result)

Upvotes: 0

shakirgooty
shakirgooty

Reputation: 134

worked fine for me to calculate the size of single record
http://prafull-blog.blogspot.com/2012/06/how-to-calculate-record-size-of-hbase.html

Upvotes: 1

Related Questions