jon-qj commented on pull request #5766:
URL: https://github.com/apache/dolphinscheduler/pull/5766#issuecomment-876253407


   Ok,I will correct the variable name.
   I use three numbers to show the three different running states on the 
front-end.And actually,'ruok' does show the running state of node.
   ----- 原始邮件 -----
   发件人:Wenjun Ruan ***@***.***>
   收件人:apache/dolphinscheduler ***@***.***>
   抄送人:jon-qj ***@***.***>,  Mention ***@***.***>
   主题:Re: [apache/dolphinscheduler] [#5748][refactor]get more reasonable 
monitoring indexes of the zk cluster (#5766)
   日期:2021年07月08日 13点53分
   
   
   @ruanwenjun commented on this pull request.
   
   
   
   In 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/FourLetterWordMain.java:
   > @@ -25,10 +25,7 @@
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
   -import java.net.InetAddress;
   -import java.net.InetSocketAddress;
   -import java.net.Socket;
   -import java.net.SocketTimeoutException;
   +import java.net.*;
   
   Don't use import *.
   
   
https://stackoverflow.com/questions/147454/why-is-using-a-wild-card-with-a-java-import-statement-bad
   
   
   
   In 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/ZooKeeperState.java:
   > @@ -43,6 +44,8 @@
        private int watches = -1;
        private int connections = -1;
    
   +    private boolean flag = false;
   
   Can we use a different variable name, may be healthFlag?
   
   
   
   In 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/ZookeeperMonitor.java:
   > @@ -91,7 +89,7 @@
                    float avgLatency = state.getAvgLatency();
                    float maxLatency = state.getMaxLatency();
                    int nodeCount = state.getNodeCount();
   -                int status = ok ? 1 : 0;
   +                int status = state.isFlag() ? -1: (ok ? 1 : 0);
   
   I think return true or false to front-end may be better than returning 0,1
   
   —
   You are receiving this because you were mentioned.
   Reply to this email directly, view it on GitHub, or unsubscribe.


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to