You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Kuan-Po Tseng (JIRA)" <ji...@apache.org> on 2017/09/06 06:30:00 UTC
[jira] [Comment Edited] (HBASE-17980) Any HRegionInfo we give out
should be immutable
[ https://issues.apache.org/jira/browse/HBASE-17980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16154878#comment-16154878 ]
Kuan-Po Tseng edited comment on HBASE-17980 at 9/6/17 6:29 AM:
---------------------------------------------------------------
Hello stack,
Now we have a Mutable(inside RegionInfoBuilder) and Immutable one, all HRegionInfo could be replaced with ImmutableHRegionInfo instead of
{code:java}
public static Result getMetaTableRowResultAsSplitRegion(
final HRegionInfo hri, final ServerName sn) throws IOException {
hri.setOffline(true);
hri.setSplit(true);
return getMetaTableRowResult(hri, sn);
}
{code} in MetaMockingUtil.java. But I don't find any class is using this mehod...
I stiil keep MutableRegionInfo if anyone still need it can be modified.
And RegionInfoBuilder will build RegionInfo which isn't mutable.
I didn't change Admin Interface API in this patch, should I replace all HRegionInfo to RegionInfo in this patch ???
I will modify getRegionInfoForReplica from
{code:java}
public static MutableRegionInfo getRegionInfoForReplica(MutableRegionInfo regionInfo, int replicaId)
{code}
into this :
{code:java}
public static RegionInfo getRegionInfoForReplica(RegionInfo regionInfo, int replicaId)
{code}
Thanks for your review.
was (Author: brandboat):
Hello stack,
Now we have a Mutable(inside RegionInfoBuilder) and Immutable one, all HRegionInfo could be replaced with ImmutableHRegionInfo instead of
{code:java}
public static Result getMetaTableRowResultAsSplitRegion(
final HRegionInfo hri, final ServerName sn) throws IOException {
hri.setOffline(true);
hri.setSplit(true);
return getMetaTableRowResult(hri, sn);
}
{code} in MetaMockingUtil.java. But I don't find any class is using this mehod...
I stiil keep MutableRegionInfo if anyone still need it can be modified.
And RegionInfoBuilder will build RegionInfo which isn't a mutable.
I didn't change Admin Interface API in this patch, should I replace all HRegionInfo to RegionInfo in this patch ???
I will modify getRegionInfoForReplica from
{code:java}
public static MutableRegionInfo getRegionInfoForReplica(MutableRegionInfo regionInfo, int replicaId)
{code}
into this :
{code:java}
public static RegionInfo getRegionInfoForReplica(RegionInfo regionInfo, int replicaId)
{code}
Thanks for your review.
> 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
>
> Attachments: HBASE-17980.master.v0.patch, HBASE-17980.master.v1.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)