hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Viraj Jasani (Jira)" <j...@apache.org>
Subject [jira] [Resolved] (HBASE-24821) Simplify the logic of getRegionInfo in TestFlushFromClient to reduce redundancy code
Date Wed, 05 Aug 2020 14:43:00 GMT

     [ https://issues.apache.org/jira/browse/HBASE-24821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Viraj Jasani resolved HBASE-24821.
----------------------------------
    Fix Version/s: 2.2.7
                   2.4.0
                   2.3.1
                   3.0.0-alpha-1
     Hadoop Flags: Reviewed
       Resolution: Fixed

> Simplify the logic of getRegionInfo in TestFlushFromClient to reduce redundancy code
> ------------------------------------------------------------------------------------
>
>                 Key: HBASE-24821
>                 URL: https://issues.apache.org/jira/browse/HBASE-24821
>             Project: HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Zheng Wang
>            Assignee: Zheng Wang
>            Priority: Minor
>             Fix For: 3.0.0-alpha-1, 2.3.1, 2.4.0, 2.2.7
>
>
> Current logic:
> {code:java}
>   private List<HRegion> getRegionInfo() {
>     return TEST_UTIL.getHBaseCluster().getLiveRegionServerThreads().stream()
>       .map(JVMClusterUtil.RegionServerThread::getRegionServer)
>       .flatMap(r -> r.getRegions().stream())
>       .filter(r -> r.getTableDescriptor().getTableName().equals(tableName))
>       .collect(Collectors.toList());
>   }
> {code}
> The MiniHBaseCluster has similar method to do same thing.
>  So it could just directly call:
> {code:java}
>   private List<HRegion> getRegionInfo() {
>     return TEST_UTIL.getHBaseCluster().getRegions(tableName);
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message