sershe-ms commented on a change in pull request #237: HBASE-22408 add dead and 
unknown server open regions metric to AM 01
URL: https://github.com/apache/hbase/pull/237#discussion_r284950268
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
 ##########
 @@ -907,6 +906,20 @@ public boolean isServerOnline(ServerName serverName) {
     return serverName != null && onlineServers.containsKey(serverName);
   }
 
+  public enum ServerLiveState {
+    LIVE,
+    DEAD,
+    UNKNOWN
+  }
+
+  /**
+   * @return whether the server is online, dead, or unknown.
+   */
+  public synchronized ServerLiveState isServerKnownAndOnline(ServerName 
serverName) {
 
 Review comment:
   It's needed to synchronize between online and dead map, in case the server 
moves from one to the other so we miss it from both

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


With regards,
Apache Git Services

Reply via email to