[
https://issues.apache.org/jira/browse/HBASE-10126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13846810#comment-13846810
]
Enis Soztutar commented on HBASE-10126:
---------------------------------------
Thinking about how we can make this kind of row key grouping API. I think we
should not expose the regions directly to clients still, but expose a way to
the clients so that they can ensure some set of rows always falls into the same
region. In HBASE-7716 , I was thinking of adding one more dimension to KV to
achieve this. However, that might not be needed after all. We can add the row
key group dimension by adding an API to group row keys:
{code}
class RowKeyFamily {
byte[] getRowKeyFamily(byte[] rowKey)
}
class PrefixRowKeyFamily implements RowKeyFamily{
int prefixLength;
..
}
{code}
The RowKeyFamily is defined per table, Whenever it is set, there is a
corresponding RegionSplitPolicy that ensures that the regions are not split in
between region groups. We can then add a check for enforcing that constraint on
the client side to enforce that batching can only span to the same row key
group. Just some raw ideas. Take it with a grain of salt.
> guarantee atomicity of multi-row mutation within a same region from a single
> HTable.batch
> -----------------------------------------------------------------------------------------
>
> Key: HBASE-10126
> URL: https://issues.apache.org/jira/browse/HBASE-10126
> Project: HBase
> Issue Type: Improvement
> Components: regionserver
> Reporter: Feng Honghua
> Assignee: Feng Honghua
> Attachments: HBASE-10126-0.94-v0.patch
>
>
> We use this improvement together with
> DelimitedKeyPrefixRegionSplitPolicy.java to implement local secondary index
> without the help of coprocessor.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)