You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Gavin (JIRA)" <ji...@apache.org> on 2018/08/01 06:22:09 UTC
[jira] [Issue Comment Deleted] (HBASE-19350) TestMetaWithReplicas
is flaky
[ https://issues.apache.org/jira/browse/HBASE-19350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gavin updated HBASE-19350:
--------------------------
Comment: was deleted
(was: A comment with security level 'jira-users' was removed.)
> TestMetaWithReplicas is flaky
> -----------------------------
>
> Key: HBASE-19350
> URL: https://issues.apache.org/jira/browse/HBASE-19350
> Project: HBase
> Issue Type: Bug
> Reporter: Chia-Ping Tsai
> Assignee: Chia-Ping Tsai
> Priority: Major
> Fix For: 1.4.0, 1.3.2, 1.2.7, 2.0.0-beta-1, 2.0.0
>
> Attachments: HBASE-19350.branch-1.v0.test (1).patch, HBASE-19350.branch-1.v0.test (1).patch, HBASE-19350.branch-1.v0.test.patch, HBASE-19350.branch-1.v0.test.patch, HBASE-19350.branch-1.v0.test.patch
>
>
> If the size of RegionsInTransition is zero, the list passed to {{ClusterStatus}} will be null.
> {code:title=ClusterStatus.java}
> Set<RegionState> rit = null;
> if (!proto.getRegionsInTransitionList().isEmpty()) {
> rit = new HashSet<RegionState>(proto.getRegionsInTransitionList().size());
> for (RegionInTransition region : proto.getRegionsInTransitionList()) {
> RegionState value = RegionState.convert(region.getRegionState());
> rit.add(value);
> }
> }
> {code}
> It causes NPE if someone try to do the for-each work. The HBaseFsckRepair is a real-life example.
> {code:title=HBaseFsckRepair.java}
> for (RegionState rs: admin.getClusterStatus().getRegionsInTransition()) {
> if (rs.getRegion().equals(region)) {
> inTransition = true;
> break;
> }
> }
> {code}
> branch-2/master don't have this issue as the list of RegionsInTransition passed to {{ClusterStatus}} never be null.
> {code:title=ProtobufUtil.java}
> List<RegionState> rit =
> new ArrayList<>(proto.getRegionsInTransitionList().size());
> for (RegionInTransition region : proto.getRegionsInTransitionList()) {
> RegionState value = RegionState.convert(region.getRegionState());
> rit.add(value);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)