You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2014/09/06 00:48:29 UTC
[jira] [Commented] (HBASE-11903) Directly invoking split & merge of
replica regions should be disallowed
[ https://issues.apache.org/jira/browse/HBASE-11903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14123735#comment-14123735 ]
Ted Yu commented on HBASE-11903:
--------------------------------
Looks good overall.
Some minor comments:
{code}
+ if (pair.getFirst().getReplicaId() != HRegionInfo.DEFAULT_REPLICA_ID)
+ throw new IllegalArgumentException("Can't invoke merge on non-default regions directly");
{code}
Including region name / replicaId in exception message would be nice.
{code}
+ for (HRegionLocation h : rl.getRegionLocations()) {
+ if (h != null && encodedName.equals(h.getRegionInfo().getEncodedName())) {
+ sn = h.getServerName();
+ info = h.getRegionInfo();
+ matched = true;
+ }
{code}
Looks like you can break out of the for loop after match is found.
> Directly invoking split & merge of replica regions should be disallowed
> -----------------------------------------------------------------------
>
> Key: HBASE-11903
> URL: https://issues.apache.org/jira/browse/HBASE-11903
> Project: HBase
> Issue Type: Sub-task
> Reporter: Devaraj Das
> Assignee: Devaraj Das
> Attachments: 11903-1.txt
>
>
> When the primary is split/merged the secondaries follow suit. We should disallow calling split/merge on the secondaries directly.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)