HBASE-24821 simplify the logic of getRegionInfo in TestFlushFromClient to reduce redundancy code

Closes #2200

Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
Zheng Wang 2020-08-05 19:56:09 +05:30 committed by Viraj Jasani
parent d2f5a5f27b
commit c39cad220d
No known key found for this signature in database
GPG Key ID: B3D6C0B41C8ADFD5
1 changed files with 1 additions and 5 deletions

View File

@ -194,11 +194,7 @@ public class TestFlushFromClient {
}
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());
return TEST_UTIL.getHBaseCluster().getRegions(tableName);
}
private List<HRegion> getRegionInfo(HRegionServer rs) {