Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
Current logic:
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()); }
The MiniHBaseCluster has similar method to do same thing.
So it could just directly call:
private List<HRegion> getRegionInfo() { return TEST_UTIL.getHBaseCluster().getRegions(tableName); }
Attachments
Issue Links
- links to