hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-11903) Directly invoking split & merge of replica regions should be disallowed
Date Fri, 05 Sep 2014 22:48:29 GMT

    [ 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)

Mime
View raw message