Home > other >  HBASE value design into one big string is reasonable
HBASE value design into one big string is reasonable

Time:09-22

Each great god! There is a demand, my HBase table corresponding to a province population information (to store all the provinces of population mobile phone number), can will need to be in 5 minutes the province's data warehouse to HBase, among them the table design is as follows:
RowKey: base station logo + time (yyyyMMdd)
ColumnFamily: peoFamily;
Column: 00/05/10/15... (every 5 minutes), a rowKey corresponding 12 columns, which is 1 hour 5 minutes with 12
Value: use a comma to cell phone number (the string is about 10 w a phone number)

What a great god, and the value design is reasonable, or what better way to design?
Whether the value is stored directly HDFS, hbase deposit corresponding offset or file link?

CodePudding user response:

Difficult! You have a solution?

CodePudding user response:

Depending on who to read HBase data,
If it is pure Java, you can put the List Serialized deposit, read deserialization, split operations are saved,
If there are other languages to participate in, comma separated or json array the cross-language serialization, is no problem,
Note, however, that each Cell HBase suggest no more than 64 MB, you have a Cell for 10 w a phone number, which is 110 w + number + 10 w a delimiter, each character 2 bytes, is about 240 w bytes or 2.28 MB is can completely,
  • Related