Search code examples
hbasehbase-shell

Hbase rowkey with space


Can a rowkey have a space and some special characters like & ?

Example - USA.new [email protected]

Is this a good practice ?


Solution

  • Yes it can have these characters and/or space. If omitting them(for example SPACE) does not cause key conflict, then it would be better to not have them in case having or not having them makes difference of a new block.

    KeyValue instances are not split across blocks. For example, if there is an 8 MB KeyValue, even if the block-size is 64kb this KeyValue will be read in as a coherent block.

    But, it should worry you only if KeyValues are having block additions too frequently because of this which is not very common, so it should not be a concern.

    reference document