hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-16430) Fix RegionServer Group's bug when moving multiple tables
Date Fri, 19 Aug 2016 17:41:20 GMT

    [ https://issues.apache.org/jira/browse/HBASE-16430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15428516#comment-15428516
] 

Hudson commented on HBASE-16430:
--------------------------------

FAILURE: Integrated in Jenkins build HBase-Trunk_matrix #1444 (See [https://builds.apache.org/job/HBase-Trunk_matrix/1444/])
Revert commit for HBASE-16430 which didn't have JIRA number (tedyu: rev fbd87f91bc968172b0347ec45d5686c7444ea665)
* (edit) hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java
* (edit) hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java
HBASE-16430 Fix RegionServer Group's bug when moving multiple tables (tedyu: rev 741d0a4511b9c397b2eb821aef49e858e217bf1e)
* (edit) hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java
* (edit) hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java


> Fix RegionServer Group's bug when moving multiple 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
>             Fix For: 2.0.0
>
>         Attachments: HBASE-16430-v1.patch, HBASE-16430-v2.patch
>
>
> It will be good when move one table at the same time. 
> However,will appear abnormal when move two or more tables at once.
> For example,move tableA and tableB from Group foo to Group bar:
> {code}
> hbase(main):001:0> get_rsgroup 'foo'
> GROUP INFORMATION                                                                   
                                                                                         
              
> Servers:                                                                            
                                                                                         
              
> hbase-rs1:60020                                                                     
                                                                                         
     
> Tables:                                                                             
                                                                                         
              
> tableA                                                                              
                                                                                         
              
> tableB                                                                              
                                                                                         
              
> 5 row(s) in 0.2800 seconds
> hbase(main):002:0> get_rsgroup 'bar'
> GROUP INFORMATION                                                                   
                                                                                         
              
> Servers:                                                                            
                                                                                         
              
> hbase-rs2:60020                                                                     
                                                                                         
     
> Tables:                                                                             
                                                                                         
              
> 3 row(s) in 0.0050 seconds
> hbase(main):003:0> move_rsgroup_tables 'bar',['tableA','tableB']
> hbase(main):004:0> get_rsgroup 'foo'
> GROUP INFORMATION                                                                   
                                                                                         
              
> Servers:                                                                            
                                                                                         
              
> hbase-rs1:60020                                                                     
                                                                                         
     
> Tables:                                                                             
                                                                                         
              
> tableB                                                                              
                                                                                         
              
> 4 row(s) in 0.0120 seconds
> hbase(main):005:0> get_rsgroup 'bar'
> GROUP INFORMATION                                                                   
                                                                                         
              
> Servers:                                                                            
                                                                                         
              
> hbase-rs2:60020                                                                     
                                                                                         
    
> Tables:                                                                             
                                                                                         
              
> tableA                                                                              
                                                                                         
              
> tableB                                                                              
                                                                                         
              
> 5 row(s) in 0.0130 seconds
> {code}
> Now, you will be find tableB belongs to Group foo and Group bar.
> Implementation of the moveTables as follows´╝Ü
> {code:title=RSGroupInfoManagerImpl.java|borderStyle=solid}
> @Override
>   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
group");
>     }
>     Map<String,RSGroupInfo> newGroupMap = Maps.newHashMap(rsGroupMap);
>     for(TableName tableName: tableNames) {
>       if (tableMap.containsKey(tableName)) {
>         RSGroupInfo src = new RSGroupInfo(rsGroupMap.get(tableMap.get(tableName)));
>         src.removeTable(tableName);
>         newGroupMap.put(src.getName(), src);
>       }
>       if(groupName != null) {
>         RSGroupInfo dst = new RSGroupInfo(newGroupMap.get(groupName));
>         dst.addTable(tableName);
>         newGroupMap.put(dst.getName(), dst);
>       }
>     }
>     flushConfig(newGroupMap);
>   }
> {code}
> Should use newGroupMap instead of rsGroupMap:
> {code}
> RSGroupInfo src = new RSGroupInfo(rsGroupMap.get(tableMap.get(tableName)));
> {code}
> ==>
> {code}
> RSGroupInfo src = new RSGroupInfo(newGroupMap.get(tableMap.get(tableName)));
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message