column based or row based for HBase

前端 未结 2 462
长发绾君心
长发绾君心 2021-02-03 13:22

I am wondering whether HBase is using column based storage or row based storage?

  • I read some technical documents and mentioned advantages of HBase is using column
2条回答
  •  無奈伤痛
    2021-02-03 13:59

    In addition to Ian's excellent answer, I would opine that HBase is both a row-based key-value, as well as a column-based key-value store (if you know the row-key).

    If you prefer to think of it in terms of data structures, here's what a simple HBase table could look like:

    'rowkey1' => {
        'c:col1' => 'value1',
        'c:col2' => 'value2',
    },
    'rowkey2' => {
        'c:col1' => 'value10',
        'c:col3' => 'value3'
    }
    

    Of course, you can also store even more complicated data-structures in it, as you can see from Ian's presentation.

提交回复
热议问题