[
https://issues.apache.org/jira/browse/HBASE-20111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16386407#comment-16386407
]
Rajeshbabu Chintaguntla commented on HBASE-20111:
-------------------------------------------------
[~elserj] Actually the region won't be split when
1) the region is closing/closed
2) when it's already has references.
3) If it's meta or namespace table.
4) when region split policy say's no.
To check these conditions we are having two methods in region.
Region#checkSplit()
{noformat}
/**
* Return the splitpoint. null indicates the region isn't splittable
* If the splitpoint isn't explicitly specified, it will go over the stores
* to find the best splitpoint. Currently the criteria of best splitpoint
* is based on the size of the store.
*/
public byte[] checkSplit() {
// Can't split META
if (this.getRegionInfo().isMetaRegion() ||
TableName.NAMESPACE_TABLE_NAME.equals(this.getRegionInfo().getTable()))
{
if (shouldForceSplit()) {
LOG.warn("Cannot split meta region in HBase 0.20 and above");
}
return null;
}
// Can't split a region that is closing.
if (this.isClosing()) {
return null;
}
if (!splitPolicy.shouldSplit()) {
return null;
}
byte[] ret = splitPolicy.getSplitPoint();
if (ret != null) {
try {
checkRow(ret, "calculated split");
} catch (IOException e) {
LOG.error("Ignoring invalid split", e);
return null;
}
}
return ret;
}
{noformat}
Region#isSplittable
{noformat}
@Override
public boolean isAvailable() {
return !isClosed() && !isClosing();
}
@Override
public boolean isSplittable() {
return isAvailable() && !hasReferences();
}
{noformat}
But currently the Region#checkSplit is returning null when the region should
not split but we are not taking that into consideration when we pass split key
explicitly. Due to this now we are able to split the meta and system tables
even it says no to split.
bq. Was there another reason you switched this form IOE or DNRIOE?
Currently when we are not able split or any failures we are retrying the split
so when we can't split the region better not to retry that's why changed to
DNRIOE.
> Able to split region explicitly even on shouldSplit return false from split
> policy
> ----------------------------------------------------------------------------------
>
> Key: HBASE-20111
> URL: https://issues.apache.org/jira/browse/HBASE-20111
> Project: HBase
> Issue Type: Bug
> Reporter: Rajeshbabu Chintaguntla
> Assignee: Rajeshbabu Chintaguntla
> Priority: Critical
> Fix For: 2.0.0
>
> Attachments: HBASE-20111.patch, HBASE-20111_test.patch
>
>
> Currently able to split the region explicitly even when the split policy
> returns from shouldSplit.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)