美文网首页
Hbase创建前缀布隆过滤器

Hbase创建前缀布隆过滤器

作者: 无色的叶 | 来源:发表于2019-12-30 21:02 被阅读0次

HBASE如何提升根据rowkey前缀扫描?

如果rowkey设计为: rowkey=<userid>#<other-field> 查询某个指定用户userid用户下的所有数据,即按照userid来做前缀扫描,则可以使用前缀bloomfilter特性来提升查询性能,创建语法如下:

Add two bloom filter type : ROWPREFIX_FIXED_LENGTH and ROWPREFIX_DELIMITED

  1. ROWPREFIX_FIXED_LENGTH: specify the length of the prefix
  2. ROWPREFIX_DELIMITED: specify the delimiter of the prefix
    Need to specify parameters for these two types of bloomfilter, otherwise the table will fail to create
    Example:
    create 't1', {NAME => 'f1', BLOOMFILTER => 'ROWPREFIX_FIXED_LENGTH', CONFIGURATION => {'RowPrefixBloomFilter.prefix_length' => '10'}}
    create 't1', {NAME => 'f1', BLOOMFILTER => 'ROWPREFIX_DELIMITED', CONFIGURATION => {'RowPrefixDelimitedBloomFilter.delimiter' => '#'}}

https://issues.apache.org/jira/browse/HBASE-20636
该特性HBASE 2.2.0版本以后支持

相关文章

网友评论

      本文标题:Hbase创建前缀布隆过滤器

      本文链接:https://www.haomeiwen.com/subject/rfqvoctx.html