[GitHub] [hbase] virajjasani commented on a change in pull request #2928: HBASE-25553 It is better for ReplicationTracker.getListOfRegionServer…

2021-02-07 Thread GitBox


virajjasani commented on a change in pull request #2928:
URL: https://github.com/apache/hbase/pull/2928#discussion_r571577627



##
File path: 
hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationTrackerZKImpl.java
##
@@ -190,6 +193,7 @@ private boolean refreshOtherRegionServersList(boolean 
watch) {
 } catch (KeeperException e) {
   this.abortable.abort("Get list of registered region servers", e);
 }
-return result;
+return result == null ? null :
+  
result.stream().map(ServerName::parseServerName).collect(Collectors.toList());

Review comment:
   Ah, I wish we could fix that boolean condition too, but I agree that it 
doesn't need to be part of this PR. Maybe later sometime.
   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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [hbase] virajjasani commented on a change in pull request #2928: HBASE-25553 It is better for ReplicationTracker.getListOfRegionServer…

2021-02-06 Thread GitBox


virajjasani commented on a change in pull request #2928:
URL: https://github.com/apache/hbase/pull/2928#discussion_r571560442



##
File path: 
hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationTrackerZKImpl.java
##
@@ -190,6 +193,7 @@ private boolean refreshOtherRegionServersList(boolean 
watch) {
 } catch (KeeperException e) {
   this.abortable.abort("Get list of registered region servers", e);
 }
-return result;
+return result == null ? null :
+  
result.stream().map(ServerName::parseServerName).collect(Collectors.toList());

Review comment:
   Let's take this opportunity to never return null here. If result is 
null, let's return `emptyList()`





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org