aalhour commented on code in PR #5699:
URL: https://github.com/apache/hbase/pull/5699#discussion_r1499531595
##########
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/RegionSizeCalculator.java:
##########
@@ -96,11 +98,14 @@ private void init(RegionLocator regionLocator, Admin admin)
throws IOException {
}
private Set<ServerName> getRegionServersOfTable(RegionLocator regionLocator)
throws IOException {
-
Set<ServerName> tableServers = Sets.newHashSet();
- for (HRegionLocation regionLocation :
regionLocator.getAllRegionLocations()) {
- tableServers.add(regionLocation.getServerName());
- }
+
+ // The region locations could contain `null` ServerName instances if the
region is currently
+ // in transition, we filter those out for now, which impacts the size
calculation for these
+ // regions temporarily until the ServerName gets filled in later
+ tableServers.addAll(regionLocator.getAllRegionLocations().stream()
Review Comment:
Fixed, thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]