ruanwenjun commented on a change in pull request #6656:
URL: https://github.com/apache/dolphinscheduler/pull/6656#discussion_r744095982



##########
File path: 
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/dispatch/host/LowerWeightHostManager.java
##########
@@ -154,6 +155,11 @@ public void run() {
         }
 
         public HostWeight getHostWeight(String addr, String workerGroup, 
String heartBeatInfo) {
+            if (StringUtils.isEmpty(heartBeatInfo)) {

Review comment:
       I agree zhenxu, use optional is better. If you think it is unnecessary 
to change `ServerNodeManager#getWorkerNodeInfo` in this pr, maybe it's better 
to change the return type of 
`LowerWeightHostManager.RefreshResourceTask#getHostWeight` to return  
`Optional<HostWeight>`? This is a small change.




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