wchevreuil commented on a change in pull request #2928:
URL: https://github.com/apache/hbase/pull/2928#discussion_r570869200
##########
File path:
hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationTrackerZKImpl.java
##########
@@ -168,7 +169,7 @@ private boolean refreshOtherRegionServersList(boolean
watch) {
} else {
synchronized (otherRegionServers) {
otherRegionServers.clear();
- otherRegionServers.addAll(newRsList);
+
newRsList.stream().map(ServerName::parseServerName).forEach(otherRegionServers::add);
Review comment:
Nit: Maybe worth do this conversion inside `getRegisteredRegionServers`
method, instead, as it's the first point of entry from ZK where data comes as
Sting still? Just in case we may find useful use `getRegisteredRegionServers`
method elsewhere, than it would already be returning a list of `ServerName`.
##########
File path:
hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationTrackerZKImpl.java
##########
@@ -168,7 +169,7 @@ private boolean refreshOtherRegionServersList(boolean
watch) {
} else {
synchronized (otherRegionServers) {
otherRegionServers.clear();
- otherRegionServers.addAll(newRsList);
+
newRsList.stream().map(ServerName::parseServerName).forEach(otherRegionServers::add);
Review comment:
Nit: Maybe worth do this conversion inside `getRegisteredRegionServers`
method, instead, as it's the first point of entry from ZK where data comes as
Sting still? Just in case we may find useful use `getRegisteredRegionServers`
method elsewhere, then it would already be returning a list of `ServerName`.
----------------------------------------------------------------
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:
[email protected]