yuqi1129 commented on a change in pull request #2702:
URL: https://github.com/apache/hbase/pull/2702#discussion_r530070666



##########
File path: 
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MasterAddressTracker.java
##########
@@ -297,7 +297,7 @@ public static boolean deleteIfEquals(ZKWatcher zkw, final 
String content) {
   public static List<ServerName> getBackupMastersAndRenewWatch(
       ZKWatcher zkw) throws InterruptedIOException {
     // Build Set of backup masters from ZK nodes
-    List<String> backupMasterStrings = Collections.emptyList();

Review comment:
       There is not need to assign value to `backupMasterStrings` see code below
    
   
![image](https://user-images.githubusercontent.com/15794564/100176111-a63b1380-2f0a-11eb-9c1c-afd803abc131.png)

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionServerTracker.java
##########
@@ -163,8 +168,9 @@ private synchronized void refresh() {
       server.abort("Unexpected zk exception getting RS nodes", e);
       return;
     }
-    Set<ServerName> servers =
+    Set<ServerName> servers = CollectionUtils.isEmpty(names) ? 
Collections.EMPTY_SET :

Review comment:
       OK, I will use replace it with `Collections.emptySet()` 




----------------------------------------------------------------
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]


Reply via email to