You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Bryan Beaudreault (Jira)" <ji...@apache.org> on 2022/07/13 17:55:00 UTC
[jira] [Created] (HBASE-27197) Add KeyRangeSplitRestriction
Bryan Beaudreault created HBASE-27197:
-----------------------------------------
Summary: Add KeyRangeSplitRestriction
Key: HBASE-27197
URL: https://issues.apache.org/jira/browse/HBASE-27197
Project: HBase
Issue Type: Improvement
Reporter: Bryan Beaudreault
A common schema design pattern is to add a shard/salt prefix to row keys. For example, you may start every row key with bytes 0 through f (16 shards). If HBase is unaware of this pattern, it may split regions such that start/end row lands outside of that range. This typically happens at the start and end of a table – if HBase tries to split the first region (empty start, 1 end) it will probably choose something between -127 and 1 as the first byte (-64) but the lowest possible rowkey for your table starts with byte 0. So this newly split region will remain empty forever and never get any requests.
I originally thought KeyPrefixRegionSplitRestriction could help with this, but that works through truncating split points. If you set the prefix to 1, you effectively limit the table to 16 regions max. This is impractical for any non-trivial table.
What we actually want to do is ensure that HBase is not allowed to create a split point below the known start range or after the known end range. So I suggest a KeyRangeSplitRestriction which disallows splits out of a configured range.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)