hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Daniel Cryans (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-2515) ChangeTableState considers split&&offline regions as being served
Date Wed, 05 May 2010 00:48:04 GMT

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

Jean-Daniel Cryans commented on HBASE-2515:
-------------------------------------------

TableOperation.call:
{code}
          if (!isBeingServed(serverName) || !isEnabled(info)) {
            unservedRegions.add(info);
          }
          processScanItem(serverName, info);
{code}

The two helper methods:
{code}
  protected boolean isBeingServed(String serverName) {
    boolean result = false;
    if (serverName != null && serverName.length() > 0) {
      HServerInfo s = master.getServerManager().getServerInfo(serverName);
      result = s != null;
    }
    return result;
  }

  protected boolean isEnabled(HRegionInfo info) {
    return !info.isOffline();
  }
{code}

And in ChangeTableState.processScanItem:
{code}
    if (isBeingServed(serverName)) {
      HashSet<HRegionInfo> regions = this.servedRegions.get(serverName);
      if (regions == null) {
        regions = new HashSet<HRegionInfo>();
      }
      regions.add(info);
      this.servedRegions.put(serverName, regions);
    }
{code}

An example of a split region:
{code}
 TestTable,,1273020409729    column=info:regioninfo, timestamp=1273020435277, value=REGION
=> {NAME => 'TestTa
                             ble,,1273020409729', STARTKEY => '', ENDKEY => '', ENCODED
=> 713340189, OFFLINE 
                             => true, SPLIT => true, TABLE => {{NAME => 'TestTable',
FAMILIES => [{NAME => 'in
                             fo', VERSIONS => '3', COMPRESSION => 'NONE', TTL =>
'2147483647', BLOCKSIZE => '6
                             5536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}]}} 
                          
 TestTable,,1273020409729    column=info:server, timestamp=1273020410555, value=10.10.1.177:60020
            
 TestTable,,1273020409729    column=info:serverstartcode, timestamp=1273020410555, value=1273020312801

{code}

Lots of information, but as you can see the table is OFFLINE and SPLIT but still has the assignment
information. It's not enabled, so it is considered unserved but then it does have serverinfo
so it is considered served.

> ChangeTableState considers split&&offline regions as being served
> -----------------------------------------------------------------
>
>                 Key: HBASE-2515
>                 URL: https://issues.apache.org/jira/browse/HBASE-2515
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: Jean-Daniel Cryans
>            Assignee: Jean-Daniel Cryans
>            Priority: Critical
>             Fix For: 0.20.5, 0.21.0
>
>
> A region is considered as being serverd and unserved at the same time in the ChangeTableState
(and TableOperation) class. This translates to logs like this:
> {code}
> 2010-05-04 17:26:01,073 INFO org.apache.hadoop.hbase.master.ServerManager: Processing
MSG_REPORT_SPLIT_INCLUDES_DAUGHTERS: TestTable,0000518811,1273019008135: Daughters; 
> TestTable,0000518811,1273019159867, TestTable,0000584541,1273019159867 from 10.10.1.177,60020,1273018776034;
1 of 1
> <<disable is called>>
> 2010-05-04 17:26:25,893 DEBUG org.apache.hadoop.hbase.master.ChangeTableState: Skipping
region REGION => {NAME => 'TestTable,0000518811,1273019008135', STARTKEY => '0000518811',
ENDKEY => '0000650817', 
> ENCODED => 143183187, OFFLINE => true, SPLIT => true, TABLE => {{NAME =>
'TestTable', FAMILIES => [{NAME => 'info', VERSIONS => '3', COMPRESSION => 'NONE',
TTL => '2147483647', BLOCKSIZE => '65536', IN_MEMORY => 
> 'false', BLOCKCACHE => 'true'}]}} because it is offline and split
> 2010-05-04 17:26:25,902 DEBUG org.apache.hadoop.hbase.master.ChangeTableState: Adding
region TestTable,0000518811,1273019008135 to setClosing list
> 2010-05-04 17:26:27,008 DEBUG org.apache.hadoop.hbase.master.ChangeTableState: Skipping
region REGION => {NAME => 'TestTable,0000518811,1273019008135', STARTKEY => '0000518811',
ENDKEY => '0000650817', 
> ENCODED => 143183187, OFFLINE => true, SPLIT => true, TABLE => {{NAME =>
'TestTable', FAMILIES => [{NAME => 'info', VERSIONS => '3', COMPRESSION => 'NONE',
TTL => '2147483647', BLOCKSIZE => '65536', IN_MEMORY =>
>  'false', BLOCKCACHE => 'true'}]}} because it is offline and split
> 2010-05-04 17:26:27,018 DEBUG org.apache.hadoop.hbase.master.ChangeTableState: Adding
region TestTable,0000518811,1273019008135 to setClosing list
> {code}
> The region gets stuck in transition! More details in a comment to come.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message