EricJoy2048 commented on code in PR #3213:
URL: 
https://github.com/apache/incubator-seatunnel/pull/3213#discussion_r1008708054


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/resourcemanager/AbstractResourceManager.java:
##########
@@ -170,9 +170,19 @@ public CompletableFuture<Void> releaseResource(long jobId, 
SlotProfile profile)
 
     @Override
     public boolean slotActiveCheck(SlotProfile profile) {
-        return registerWorker.values().stream()
-            .flatMap(workerProfile -> 
Arrays.stream(workerProfile.getAssignedSlots()))
-            .anyMatch(s -> s.getSlotID() == profile.getSlotID());
+        boolean active;
+        if (registerWorker.containsKey(profile.getWorker())) {
+            active = 
Arrays.stream(registerWorker.get(profile.getWorker()).getAssignedSlots())
+                .allMatch(s -> s.getSlotID() == profile.getSlotID());
+        } else {
+            active = false;
+        }
+        if (!active) {
+            LOGGER.info("received slot active check failed profile: " + 
profile);
+        } else {
+            LOGGER.fine("received slot active check success. profile: " + 
profile);

Review Comment:
   > remove .
   
   Thanks, Would it be better add `.` after `received slot active check failed` 
?



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