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

Chia-Ping Tsai commented on HBASE-17980:
----------------------------------------

The failed tests is due to the wrong regionname of .meta. 
{code}
    if (tableName.equals(TableName.META_TABLE_NAME)) {
      return RegionInfoBuilder.newBuilder(
      RegionReplicaUtil.getRegionInfoForReplica(
      RegionInfoBuilder.FIRST_META_REGIONINFO,
      proto.getReplicaId()))
      .build();
    }
{code}
The old way will return the FIRST_META_REGIONINFO, but now the builder will 
create an new one with rewriting the regionname in new format.

I think the RegionInfoBuilder is a bit strange.
{code}
  public RegionInfo build() {
    return new MutableRegionInfo(content, isMetaRegion);
  }
{code}
The {{content}} has a "created" region name, but we will re-create the region 
name again according the flag "isMetaRegion". 

> Any HRegionInfo we give out should be immutable
> -----------------------------------------------
>
>                 Key: HBASE-17980
>                 URL: https://issues.apache.org/jira/browse/HBASE-17980
>             Project: HBase
>          Issue Type: Sub-task
>    Affects Versions: 2.0.0
>            Reporter: Chia-Ping Tsai
>            Assignee: Kuan-Po Tseng
>              Labels: beginner
>             Fix For: 2.0.0-alpha-3
>
>         Attachments: HBASE-17980.master.001.patch, 
> HBASE-17980.master.002.patch, HBASE-17980.master.v0.patch, 
> HBASE-17980.master.v1.patch, HBASE-17980-master.v2.patch, 
> HBASE-17980-master.v2.patch, HBASE-17980.master.v3.patch, 
> HBASE-17980.master.v4.patch, HBASE-17980.master.v5.patch, 
> HBASE-17980.master.v6.patch
>
>
> This is similar to HBASE-15583.
> # Introduce RegionInfo class. HRegionInfo will extend RegionInfo.
> # Deprecate HRegionInfo to be removed in 3.0
> # RegionInfo contain all of the read-only methods of HRegionInfo
> # Add "RegionInfo Builder"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to