[
https://issues.apache.org/jira/browse/HBASE-14306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15063645#comment-15063645
]
Yu Li commented on HBASE-14306:
-------------------------------
bq. please add a release note that folks relying specifying the
RegionGroupingProvider directly (to get wal-per-region) will have behavior
change unless they set {{hbase.wal.regiongrouping.strategy}} to {{identity}}.
Ok, will do, thanks for the note
bq. those relying on the ability to set a grouping strategy while using the
bounded behavior of the multiwal provider will no longer get the bounded
behavior and will have to update their strategy to bound the number of groups.
Since we've modified the defaultStrategy to BoundedGroupingStrategy.class in
{{RegionGroupingProvider$Strategies}} (as shown below), so user will still get
bounded behavior when they specify {{hbase.wal.provider}} to {{multiwal}}
{code}
static enum Strategies {
defaultStrategy(BoundedGroupingStrategy.class),
identity(IdentityGroupingStrategy.class),
bounded(BoundedGroupingStrategy.class),
namespace(NamespaceGroupingStrategy.class);
final Class<? extends RegionGroupingStrategy> clazz;
Strategies(Class<? extends RegionGroupingStrategy> clazz) {
this.clazz = clazz;
}
}
{code}
> Refine RegionGroupingProvider: fix issues and make it more scalable
> -------------------------------------------------------------------
>
> Key: HBASE-14306
> URL: https://issues.apache.org/jira/browse/HBASE-14306
> Project: HBase
> Issue Type: Improvement
> Components: wal
> Affects Versions: 2.0.0, 1.1.2
> Reporter: Yu Li
> Assignee: Yu Li
> Fix For: 2.0.0, 1.3.0
>
> Attachments: HBASE-14306.branch-1.patch, HBASE-14306.patch,
> HBASE-14306_v2.patch, HBASE-14306_v3.patch, HBASE-14306_v3.patch,
> HBASE-14306_v4.patch, HBASE-14306_v5.patch
>
>
> There're multiple issues in RegionGroupingProvider, including:
> * The provider cache in it is using byte array as the key of
> ConcurrentHashMap, which is not right (the reason is
> [here|http://stackoverflow.com/questions/1058149/using-a-byte-array-as-hashmap-key-java])
> * It's using IdentityGroupingStrategy to get group and use it as key of the
> cache, which means the cache will include an entry for each region. This is
> especially unnecessary when using BoundedRegionGroupingProvider
> Besides fixing the above issues, I suggest to change
> BoundedRegionGroupingProvider from a *provider* to a pluggable *strategy*,
> which will make the whole picture much more clear.
> For more details, please refer to the patch
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)