0
votes

I have a scenario , where each object has a 300 variants, so I want to store them in hbase and each row store the original object and 300 variants in different column families? The access model is try to insert the objects to the table in every morning by batch , then just read them .I have no idea if it is ok to create a hbase table with 300 column families for my scenario?

3
Would you elaborate on the access model? How do you intend on reading them? Will you be writing all three hundred variants?Matthew Moisen

3 Answers

1
votes

The documentation suggests that the number of column families should have a maximum of 10, and also that a normal amount of column families is between one and three.

Do you have any objections to storing three hundred columns into one column family instead?

1
votes

There is a limit of the number of column families in HBase. There is one MemStore (it's a write cache which stores new data before writing it into Hfiles) per Column Family. When one is full, they all flush.

The more column families you add the more MemStores will be created and Memstore flush will be more frequent. It will degrade the performance.

0
votes

Stick to a very low number of columnfamilies: 1 or 2 A column family maps to files in the underlying system and thus impose a load on hbase. The way to do this in by creating 300 columns instead.