Hisoka-X commented on code in PR #5303:
URL: https://github.com/apache/seatunnel/pull/5303#discussion_r1303729816


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java:
##########
@@ -232,13 +232,19 @@ public boolean taskIsEnded(@NonNull TaskGroupLocation 
taskGroupLocation) {
     public boolean isMasterNode() {
         // must retry until the cluster have master node
         try {
-            return RetryUtils.retryWithException(
-                    () -> 
nodeEngine.getMasterAddress().equals(nodeEngine.getThisAddress()),
-                    new RetryUtils.RetryMaterial(
-                            Constant.OPERATION_RETRY_TIME,
-                            true,
-                            exception -> exception instanceof 
NullPointerException && isRunning,
-                            Constant.OPERATION_RETRY_SLEEP));
+            return Boolean.TRUE.equals(
+                    RetryUtils.retryWithException(
+                            () ->
+                                    nodeEngine.getMasterAddress() != null
+                                            && nodeEngine
+                                                    .getMasterAddress()
+                                                    
.equals(nodeEngine.getThisAddress()),

Review Comment:
   just `nodeEngine.getThisAddress().equals(nodeEngine.getMasterAddress())`



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