hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guangxu Cheng (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-16430) RegionServer Group's bug when move tables
Date Wed, 17 Aug 2016 03:40:20 GMT
Guangxu Cheng created HBASE-16430:

             Summary: RegionServer Group's bug when move tables
                 Key: HBASE-16430
                 URL: https://issues.apache.org/jira/browse/HBASE-16430
             Project: HBase
          Issue Type: Bug
          Components: master
    Affects Versions: 2.0.0
            Reporter: Guangxu Cheng

it is an obvious bug when moves table. Implementation of the moveTables as follows´╝Ü
  public synchronized void moveTables(
      Set<TableName> tableNames, String groupName) throws IOException {
    if (groupName != null && !rsGroupMap.containsKey(groupName)) {
      throw new DoNotRetryIOException("Group "+groupName+" does not exist or is a special

    Map<String,RSGroupInfo> newGroupMap = Maps.newHashMap(rsGroupMap);
    for(TableName tableName: tableNames) {
      if (tableMap.containsKey(tableName)) {
        RSGroupInfo src = new RSGroupInfo(rsGroupMap.get(tableMap.get(tableName)));
        newGroupMap.put(src.getName(), src);
      if(groupName != null) {
        RSGroupInfo dst = new RSGroupInfo(newGroupMap.get(groupName));
        newGroupMap.put(dst.getName(), dst);

Should use newGroupMap instead of rsGroupMap:
RSGroupInfo src = new RSGroupInfo(rsGroupMap.get(tableMap.get(tableName)));
RSGroupInfo src = new RSGroupInfo(newGroupMap.get(tableMap.get(tableName)));

This message was sent by Atlassian JIRA

View raw message