szetszwo commented on a change in pull request #300:
URL: https://github.com/apache/incubator-ratis/pull/300#discussion_r530727080



##########
File path: 
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java
##########
@@ -593,6 +593,30 @@ public boolean isLeaderReady() {
     return true;
   }
 
+  /**
+   * Return status of the RaftServer.
+   * @return LeaderStatus
+   */
+  public ServerStatus getServerStatus() {

Review comment:
       Could you use the following code in Ozone for the moment?
   ```
         final RaftServerImpl impl = 
((RaftServerProxy)raftServer).getImpl(groupId);
         if (!impl.isLeader()) {
           // not leader
         } else if (impl.isLeaderReady()) {
           // leader and ready
         } else {
           // leader but not ready
         }
   ```
    I will work on creating new APIs.
   




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