You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/07/24 14:34:49 UTC

[GitHub] [flink] wanglijie95 opened a new pull request, #20349: [FLINK-28660][runtime] Simplify logs of blocklist

wanglijie95 opened a new pull request, #20349:
URL: https://github.com/apache/flink/pull/20349

   ## What is the purpose of the change
   Simplify logs of blocklist
   
   ## Verifying this change
   This change is already covered by existing tests.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (**no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (**no**)
     - The serializers: (**no**)
     - The runtime per-record code paths (performance sensitive): (**no**)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (**no**)
     - The S3 file system connector: (**no**)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (**no**)
     - If yes, how is the feature documented? (**not applicable**)
   


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zhuzhurk closed pull request #20349: [FLINK-28660][runtime] Simplify logs of blocklist

Posted by GitBox <gi...@apache.org>.
zhuzhurk closed pull request #20349: [FLINK-28660][runtime] Simplify logs of blocklist
URL: https://github.com/apache/flink/pull/20349


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zhuzhurk commented on a diff in pull request #20349: [FLINK-28660][runtime] Simplify logs of blocklist

Posted by GitBox <gi...@apache.org>.
zhuzhurk commented on code in PR #20349:
URL: https://github.com/apache/flink/pull/20349#discussion_r928547936


##########
flink-runtime/src/main/java/org/apache/flink/runtime/blocklist/DefaultBlocklistHandler.java:
##########
@@ -111,26 +111,27 @@ private void assertRunningInMainThread() {
     public void addNewBlockedNodes(Collection<BlockedNode> newNodes) {
         assertRunningInMainThread();
 
-        Collection<BlockedNode> newlyAddedOrMerged = blocklistTracker.addNewBlockedNodes(newNodes);
-        if (!newlyAddedOrMerged.isEmpty()) {
+        BlockedNodeAdditionResult result = blocklistTracker.addNewBlockedNodes(newNodes);
+        Collection<BlockedNode> newlyAddedNodes = result.getNewlyAddedNodes();
+        if (!newlyAddedNodes.isEmpty()) {
             if (log.isDebugEnabled()) {
                 log.debug(
-                        "Newly added/merged {} blocked nodes, details: {}."
+                        "Newly added {} blocked nodes, details: {}."
                                 + " Total {} blocked nodes currently, details: {}.",
-                        newlyAddedOrMerged.size(),
-                        newlyAddedOrMerged,
+                        newlyAddedNodes.size(),
+                        newlyAddedNodes,
                         blocklistTracker.getAllBlockedNodes().size(),
                         blocklistTracker.getAllBlockedNodes());
             } else {
                 log.info(
-                        "Newly added/merged {} blocked nodes. Total {} blocked nodes currently.",
-                        newlyAddedOrMerged.size(),
+                        "Newly added {} blocked nodes. Total {} blocked nodes currently.",
+                        newlyAddedNodes.size(),
                         blocklistTracker.getAllBlockedNodes().size());
             }
 
-            blocklistListeners.forEach(
-                    listener -> listener.notifyNewBlockedNodes(newlyAddedOrMerged));
-            blocklistContext.blockResources(newlyAddedOrMerged);
+            Collection<BlockedNode> allNodes = result.getAllNodes();

Review Comment:
   maybe we only need to invoke `blockResources` on `newlyAddedNodes`?



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] wanglijie95 commented on pull request #20349: [FLINK-28660][runtime] Simplify logs of blocklist

Posted by GitBox <gi...@apache.org>.
wanglijie95 commented on PR #20349:
URL: https://github.com/apache/flink/pull/20349#issuecomment-1194816044

   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] flinkbot commented on pull request #20349: [FLINK-28660][runtime] Simplify logs of blocklist

Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #20349:
URL: https://github.com/apache/flink/pull/20349#issuecomment-1193331004

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "dd37936b0da23c7cc8ae8cd366e25d5f1b839300",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "dd37936b0da23c7cc8ae8cd366e25d5f1b839300",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * dd37936b0da23c7cc8ae8cd366e25d5f1b839300 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zhuzhurk commented on a diff in pull request #20349: [FLINK-28660][runtime] Simplify logs of blocklist

Posted by GitBox <gi...@apache.org>.
zhuzhurk commented on code in PR #20349:
URL: https://github.com/apache/flink/pull/20349#discussion_r928548780


##########
flink-runtime/src/main/java/org/apache/flink/runtime/blocklist/DefaultBlocklistHandler.java:
##########
@@ -111,26 +111,27 @@ private void assertRunningInMainThread() {
     public void addNewBlockedNodes(Collection<BlockedNode> newNodes) {
         assertRunningInMainThread();
 
-        Collection<BlockedNode> newlyAddedOrMerged = blocklistTracker.addNewBlockedNodes(newNodes);
-        if (!newlyAddedOrMerged.isEmpty()) {
+        BlockedNodeAdditionResult result = blocklistTracker.addNewBlockedNodes(newNodes);
+        Collection<BlockedNode> newlyAddedNodes = result.getNewlyAddedNodes();
+        if (!newlyAddedNodes.isEmpty()) {
             if (log.isDebugEnabled()) {
                 log.debug(
-                        "Newly added/merged {} blocked nodes, details: {}."
+                        "Newly added {} blocked nodes, details: {}."
                                 + " Total {} blocked nodes currently, details: {}.",
-                        newlyAddedOrMerged.size(),
-                        newlyAddedOrMerged,
+                        newlyAddedNodes.size(),
+                        newlyAddedNodes,
                         blocklistTracker.getAllBlockedNodes().size(),
                         blocklistTracker.getAllBlockedNodes());
             } else {
                 log.info(
-                        "Newly added/merged {} blocked nodes. Total {} blocked nodes currently.",
-                        newlyAddedOrMerged.size(),
+                        "Newly added {} blocked nodes. Total {} blocked nodes currently.",
+                        newlyAddedNodes.size(),
                         blocklistTracker.getAllBlockedNodes().size());
             }
 
-            blocklistListeners.forEach(
-                    listener -> listener.notifyNewBlockedNodes(newlyAddedOrMerged));
-            blocklistContext.blockResources(newlyAddedOrMerged);
+            Collection<BlockedNode> allNodes = result.getAllNodes();

Review Comment:
   Then the `getAllNodes()` is not needed



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] wanglijie95 commented on a diff in pull request #20349: [FLINK-28660][runtime] Simplify logs of blocklist

Posted by GitBox <gi...@apache.org>.
wanglijie95 commented on code in PR #20349:
URL: https://github.com/apache/flink/pull/20349#discussion_r928558858


##########
flink-runtime/src/main/java/org/apache/flink/runtime/blocklist/DefaultBlocklistHandler.java:
##########
@@ -111,26 +111,27 @@ private void assertRunningInMainThread() {
     public void addNewBlockedNodes(Collection<BlockedNode> newNodes) {
         assertRunningInMainThread();
 
-        Collection<BlockedNode> newlyAddedOrMerged = blocklistTracker.addNewBlockedNodes(newNodes);
-        if (!newlyAddedOrMerged.isEmpty()) {
+        BlockedNodeAdditionResult result = blocklistTracker.addNewBlockedNodes(newNodes);
+        Collection<BlockedNode> newlyAddedNodes = result.getNewlyAddedNodes();
+        if (!newlyAddedNodes.isEmpty()) {
             if (log.isDebugEnabled()) {
                 log.debug(
-                        "Newly added/merged {} blocked nodes, details: {}."
+                        "Newly added {} blocked nodes, details: {}."
                                 + " Total {} blocked nodes currently, details: {}.",
-                        newlyAddedOrMerged.size(),
-                        newlyAddedOrMerged,
+                        newlyAddedNodes.size(),
+                        newlyAddedNodes,
                         blocklistTracker.getAllBlockedNodes().size(),
                         blocklistTracker.getAllBlockedNodes());
             } else {
                 log.info(
-                        "Newly added/merged {} blocked nodes. Total {} blocked nodes currently.",
-                        newlyAddedOrMerged.size(),
+                        "Newly added {} blocked nodes. Total {} blocked nodes currently.",
+                        newlyAddedNodes.size(),
                         blocklistTracker.getAllBlockedNodes().size());
             }
 
-            blocklistListeners.forEach(
-                    listener -> listener.notifyNewBlockedNodes(newlyAddedOrMerged));
-            blocklistContext.blockResources(newlyAddedOrMerged);
+            Collection<BlockedNode> allNodes = result.getAllNodes();

Review Comment:
   Good idea!



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org