Duo Zhang created HBASE-22124:
---------------------------------

             Summary: Optimize the performance for region moving
                 Key: HBASE-22124
                 URL: https://issues.apache.org/jira/browse/HBASE-22124
             Project: HBase
          Issue Type: Improvement
            Reporter: Duo Zhang


It is an admin operation so we do not care much about the performance in the 
past, but it is really important for rolling upgrade.

For AsyncAdmin, if encoded name is present at client side, we will always scan 
the whole meta region to find the region record first, which is really 
expensive for a large cluster.

And we always send the encoded name to master, so at master side, we still need 
the encoded name -> region name converting, and it is still very expensive

{code}
  public RegionState getRegionState(final String encodedRegionName) {
    // TODO: Need a map <encodedName, ...> but it is just dispatch merge...
    for (RegionStateNode node: regionsMap.values()) {
      if (node.getRegionInfo().getEncodedName().equals(encodedRegionName)) {
        return node.toRegionState();
      }
    }
    return null;
  }
{code}

Need to fix them both.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to