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 2021/01/12 03:18:22 UTC

[GitHub] [flink] KarmaGYZ opened a new pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

KarmaGYZ opened a new pull request #14612:
URL: https://github.com/apache/flink/pull/14612


   … default slot size and fix the relevant matching logic
   
   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   This PR proposed to replace the loose matching rules with the following exact matching rules.
   - An unspecified requirement (`ResourceProfile::UNKNOWN`) can only be fulfilled by a TM's default slot resource.
   - A specified requirement can only be fulfilled by a resource that is equal to itself.
   
   ## Brief change log
   
   - Introduce DEFAULT resource profile which represents the default slot profile of a TM and matches the UNKNOWN requirement.
   - Fix the `ResourceProfile#isMatching`. It's now only used in matching requirements with resources.
   - Introduce `ResourceProfile#isBiggerThan`, which is used to compare two resource capacities.
   
   


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

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



[GitHub] [flink] flinkbot edited a comment on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758375136


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900",
       "triggerID" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0f42dff0a5c7eedc6591f3526ceb06d39a1590db Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900) 
   * 6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot commented on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0f42dff0a5c7eedc6591f3526ceb06d39a1590db UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758375136


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900",
       "triggerID" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11904",
       "triggerID" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11904) 
   * e8f754cc415e4ff814616ed4eb1c7160cb765d7d UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] KarmaGYZ commented on a change in pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
KarmaGYZ commented on a change in pull request #14612:
URL: https://github.com/apache/flink/pull/14612#discussion_r556287199



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTableImpl.java
##########
@@ -319,7 +321,7 @@ public boolean allocateSlot(
         taskSlot =
                 new TaskSlot<>(
                         index,
-                        resourceProfile,
+                        effectiveResourceProfile,

Review comment:
       Yes, it should actually be a hotfix for FLINK-20837. We treat the matching of resource profile as one of the conditions to judge the duplicate slot. So we need to move this transition forward.




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

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



[GitHub] [flink] xintongsong closed pull request #14612: [FLINK-20864][runtime] Apply exactly matching for fine-rained resource profiles

Posted by GitBox <gi...@apache.org>.
xintongsong closed pull request #14612:
URL: https://github.com/apache/flink/pull/14612


   


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

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



[GitHub] [flink] flinkbot edited a comment on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758375136


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900",
       "triggerID" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0f42dff0a5c7eedc6591f3526ceb06d39a1590db Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] KarmaGYZ commented on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
KarmaGYZ commented on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-759248904


   Thanks for the review, @xintongsong . PR updated.


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

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



[GitHub] [flink] flinkbot edited a comment on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758375136


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900",
       "triggerID" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11904",
       "triggerID" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11952",
       "triggerID" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1617d36fad644d8fc50bb0a8d9e6a976eca942f0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11965",
       "triggerID" : "1617d36fad644d8fc50bb0a8d9e6a976eca942f0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "bf9637f6e9cf059c2e19fad15b6ca3e8afdac216",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "bf9637f6e9cf059c2e19fad15b6ca3e8afdac216",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1617d36fad644d8fc50bb0a8d9e6a976eca942f0 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11965) 
   * bf9637f6e9cf059c2e19fad15b6ca3e8afdac216 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] KarmaGYZ commented on a change in pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
KarmaGYZ commented on a change in pull request #14612:
URL: https://github.com/apache/flink/pull/14612#discussion_r556283807



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/ResourceProfile.java
##########
@@ -271,13 +271,41 @@ public boolean isMatching(final ResourceProfile required) {
             return true;
         }
 
-        if (cpuCores.getValue().compareTo(required.cpuCores.getValue()) >= 0
-                && taskHeapMemory.compareTo(required.taskHeapMemory) >= 0
-                && taskOffHeapMemory.compareTo(required.taskOffHeapMemory) >= 0
-                && managedMemory.compareTo(required.managedMemory) >= 0
-                && networkMemory.compareTo(required.networkMemory) >= 0) {
+        return false;
+    }
+
+    /**
+     * Check whether this resource profile is bigger than the given resource profile.
+     *
+     * @param other the other resource profile
+     * @return true if this resource profile is bigger, otherwise false
+     */
+    public boolean isBiggerThan(final ResourceProfile other) {

Review comment:
       `allFieldsNoLessThan` sounds good to me.




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

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



[GitHub] [flink] flinkbot edited a comment on pull request #14612: [FLINK-20864][runtime] Apply exactly matching for fine-rained resource profiles

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758375136


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900",
       "triggerID" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11904",
       "triggerID" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11952",
       "triggerID" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1617d36fad644d8fc50bb0a8d9e6a976eca942f0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11965",
       "triggerID" : "1617d36fad644d8fc50bb0a8d9e6a976eca942f0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "bf9637f6e9cf059c2e19fad15b6ca3e8afdac216",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11973",
       "triggerID" : "bf9637f6e9cf059c2e19fad15b6ca3e8afdac216",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * bf9637f6e9cf059c2e19fad15b6ca3e8afdac216 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11973) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758375136


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900",
       "triggerID" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11904",
       "triggerID" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11952",
       "triggerID" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1617d36fad644d8fc50bb0a8d9e6a976eca942f0",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1617d36fad644d8fc50bb0a8d9e6a976eca942f0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e8f754cc415e4ff814616ed4eb1c7160cb765d7d Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11952) 
   * 1617d36fad644d8fc50bb0a8d9e6a976eca942f0 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758375136


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900",
       "triggerID" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11904",
       "triggerID" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11904) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14612: [FLINK-20864][runtime] Apply exactly matching for fine-rained resource profiles

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758370275


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit bf9637f6e9cf059c2e19fad15b6ca3e8afdac216 (Fri May 28 07:06:50 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758375136


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900",
       "triggerID" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0f42dff0a5c7eedc6591f3526ceb06d39a1590db Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758375136


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900",
       "triggerID" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11904",
       "triggerID" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11952",
       "triggerID" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1617d36fad644d8fc50bb0a8d9e6a976eca942f0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11965",
       "triggerID" : "1617d36fad644d8fc50bb0a8d9e6a976eca942f0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "bf9637f6e9cf059c2e19fad15b6ca3e8afdac216",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11973",
       "triggerID" : "bf9637f6e9cf059c2e19fad15b6ca3e8afdac216",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1617d36fad644d8fc50bb0a8d9e6a976eca942f0 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11965) 
   * bf9637f6e9cf059c2e19fad15b6ca3e8afdac216 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11973) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot commented on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

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


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 0f42dff0a5c7eedc6591f3526ceb06d39a1590db (Tue Jan 12 03:25:42 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </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.

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



[GitHub] [flink] xintongsong commented on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
xintongsong commented on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758605289


   @KarmaGYZ 
   I'm not entirely sure about introducing the concept `DEFAULT` and changing the matching rules for `UNKNOWN` to be only matched by `DEFAULT`.
   
   First of all, it complicates the concepts. Currently, `ResourceProfile` is already complex and hard for new comers to understand.
     * It is used for describing both requirement and resource.
     * `UNKNOWN` can only be used for requirement
     * `ANY` can only be used for resource
     * `isMatching` can only be called as `resource.isMatching(requirement)`
    
   I think we might want to have two separate class `ResourceRequirement` and `ResourceCapacity` for the above two concepts, and make `ResourceProfile` a field of them that purely describes the resource value (like primitive types or `MemorySize`). In this way, we can have special values like `ResourceRequirement#UNKNOWN` and `ResourceCapacity#ANY` whose `ResourceProfile` field is `null`. However, this is not necessary for this PR. We can open a separate jira ticket to discuss it.
   
   I see how matching unknown requests only to the default slots may help in fine-grained resource management. When there are both fine-grained and unknown requests, the fine-grained requests may create slots with very different resources. Once these slots are reused for the unknown requirements, performance of tasks with unknown requirements could be very unstable, depending on how many resource the reused slot has.
   
   However, I would consider having fine-grained and unknown resource requirements together as a follow-up improvement. I'd rather not touching the matching rules for the unknown requirements for a future improvement, at the risk that the existing corse-grained resource management might also be affected.


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

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



[GitHub] [flink] flinkbot edited a comment on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758375136


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900",
       "triggerID" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11904",
       "triggerID" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11952",
       "triggerID" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11904) 
   * e8f754cc415e4ff814616ed4eb1c7160cb765d7d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11952) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758375136


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900",
       "triggerID" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11904",
       "triggerID" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0f42dff0a5c7eedc6591f3526ceb06d39a1590db Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900) 
   * 6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11904) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] xintongsong edited a comment on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
xintongsong edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758605289


   @KarmaGYZ 
   I'm not entirely sure about introducing the concept `DEFAULT` and changing the matching rules for `UNKNOWN` to be only matched by `DEFAULT`.
   
   First of all, it complicates the concepts. Currently, `ResourceProfile` is already complex and hard for new comers to understand.
     * It is used for describing both requirement and resource.
     * `UNKNOWN` can only be used for requirement
     * `ANY` can only be used for resource
     * `isMatching` can only be called as `resource.isMatching(requirement)`
    
   I think we might want to have two separate classes `ResourceRequirement` and `ResourceCapacity` for the above two concepts, and make `ResourceProfile` a field of them that purely describes the resource value (like primitive types or `MemorySize`). In this way, we can have special values like `ResourceRequirement#UNKNOWN` and `ResourceCapacity#ANY` whose `ResourceProfile` field is `null`. However, this is not necessary for this PR. We can open a separate jira ticket to discuss it.
   
   I see how matching unknown requests only to the default slots may help in fine-grained resource management. When there are both fine-grained and unknown requests, the fine-grained requests may create slots with very different resources. Once these slots are reused for the unknown requirements, performance of tasks with unknown requirements could be very unstable, depending on how many resource the reused slot has.
   
   However, I would consider having fine-grained and unknown resource requirements together as a follow-up improvement. I'd rather not touching the matching rules for the unknown requirements for a future improvement, at the risk that the existing corse-grained resource management might also be affected.


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

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



[GitHub] [flink] KarmaGYZ commented on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
KarmaGYZ commented on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758610537


   Having two separate classes `ResourceRequirement` and `ResourceCapacity` is my future plan. I agree that this effort is out of the scope of this PR.
   
   For the matching logic, I agree that we can treat fine-grained and unknown resource requirements together as a follow-up improvement at the moment. I'll prepare an update soon.


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

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



[GitHub] [flink] flinkbot edited a comment on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758375136


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900",
       "triggerID" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11904",
       "triggerID" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11952",
       "triggerID" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1617d36fad644d8fc50bb0a8d9e6a976eca942f0",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11965",
       "triggerID" : "1617d36fad644d8fc50bb0a8d9e6a976eca942f0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e8f754cc415e4ff814616ed4eb1c7160cb765d7d Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11952) 
   * 1617d36fad644d8fc50bb0a8d9e6a976eca942f0 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11965) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] xintongsong commented on a change in pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
xintongsong commented on a change in pull request #14612:
URL: https://github.com/apache/flink/pull/14612#discussion_r556238763



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/ResourceProfile.java
##########
@@ -271,13 +271,41 @@ public boolean isMatching(final ResourceProfile required) {
             return true;
         }
 
-        if (cpuCores.getValue().compareTo(required.cpuCores.getValue()) >= 0
-                && taskHeapMemory.compareTo(required.taskHeapMemory) >= 0
-                && taskOffHeapMemory.compareTo(required.taskOffHeapMemory) >= 0
-                && managedMemory.compareTo(required.managedMemory) >= 0
-                && networkMemory.compareTo(required.networkMemory) >= 0) {
+        return false;
+    }

Review comment:
       I wonder if we can remove the `if (this.equals(UNKNOWN))` branch now, and add `throwUnsupportedOperationExecptionIfUnknown` at the beginning of this method.
   
   Ideally, the caller of this method should always represent a resource capacity rather than a requirement, thus should never be `UNKNOWN`. I suspect the reason we didn't do that previously is because this method was also used as `isBiggerThan` in some test cases.

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTableImpl.java
##########
@@ -319,7 +321,7 @@ public boolean allocateSlot(
         taskSlot =
                 new TaskSlot<>(
                         index,
-                        resourceProfile,
+                        effectiveResourceProfile,

Review comment:
       I think changes to this file are less related to the matching rules.
   Basically, for static slot requests, we now use the default profile rather than `UNKNOWN` for creating the `TaskSlot`.
   
   * Could you explain why is this change needed?
   * Even if this change is indeed needed, we should make it a separate commit.

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/clusterframework/types/ResourceProfileTest.java
##########
@@ -102,23 +102,61 @@ public void testMatchRequirement() {
                         .setManagedMemoryMB(100)
                         .setNetworkMemoryMB(100)
                         .build();
-        assertFalse(rp4.isMatching(rp5));
+        assertFalse(rp4.isBiggerThan(rp5));
 
         ResourceSpec rs1 = ResourceSpec.newBuilder(1.0, 100).setGPUResource(2.2).build();
         ResourceSpec rs2 = ResourceSpec.newBuilder(1.0, 100).setGPUResource(1.1).build();
 
-        assertFalse(rp1.isMatching(ResourceProfile.fromResourceSpec(rs1)));
+        assertFalse(rp1.isBiggerThan(ResourceProfile.fromResourceSpec(rs1)));
         assertTrue(
                 ResourceProfile.fromResourceSpec(rs1)
-                        .isMatching(ResourceProfile.fromResourceSpec(rs2)));
+                        .isBiggerThan(ResourceProfile.fromResourceSpec(rs2)));
         assertFalse(
                 ResourceProfile.fromResourceSpec(rs2)
-                        .isMatching(ResourceProfile.fromResourceSpec(rs1)));
+                        .isBiggerThan(ResourceProfile.fromResourceSpec(rs1)));
     }
 
     @Test
-    public void testUnknownMatchesUnknown() {

Review comment:
       Why is this test case removed? I think we still need to cover `UNKNOWN >= UNKNOWN`.

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/ResourceProfile.java
##########
@@ -271,13 +271,41 @@ public boolean isMatching(final ResourceProfile required) {
             return true;
         }
 
-        if (cpuCores.getValue().compareTo(required.cpuCores.getValue()) >= 0
-                && taskHeapMemory.compareTo(required.taskHeapMemory) >= 0
-                && taskOffHeapMemory.compareTo(required.taskOffHeapMemory) >= 0
-                && managedMemory.compareTo(required.managedMemory) >= 0
-                && networkMemory.compareTo(required.networkMemory) >= 0) {
+        return false;
+    }
+
+    /**
+     * Check whether this resource profile is bigger than the given resource profile.
+     *
+     * @param other the other resource profile
+     * @return true if this resource profile is bigger, otherwise false
+     */
+    public boolean isBiggerThan(final ResourceProfile other) {

Review comment:
       I'm not sure about the name `isBiggerThan`.
   * First of all, the semantic here is `>=` rather than `>`
   * I'm not sure `bigger` is the proper phrase for describing resource amount. Maybe `greater` or `larger`.
   * I think we should emphasize the semantic that **every** field should be `>= other`, to avoid confusing this with comparing the **total** resource.
   
   To sum up, I would suggest `allFieldsGreaterThanOrEqualTo`, `allFieldsLargerThanOrEqualTo`, or `allFieldsNoLessThan`.

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/ResourceProfile.java
##########
@@ -271,13 +271,41 @@ public boolean isMatching(final ResourceProfile required) {
             return true;
         }
 
-        if (cpuCores.getValue().compareTo(required.cpuCores.getValue()) >= 0
-                && taskHeapMemory.compareTo(required.taskHeapMemory) >= 0
-                && taskOffHeapMemory.compareTo(required.taskOffHeapMemory) >= 0
-                && managedMemory.compareTo(required.managedMemory) >= 0
-                && networkMemory.compareTo(required.networkMemory) >= 0) {
+        return false;
+    }
+
+    /**
+     * Check whether this resource profile is bigger than the given resource profile.
+     *
+     * @param other the other resource profile
+     * @return true if this resource profile is bigger, otherwise false
+     */
+    public boolean isBiggerThan(final ResourceProfile other) {

Review comment:
       And we should also explain in the `JavaDoc` what is the definition of `bigger than`, maybe with a few examples if necessary.




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

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



[GitHub] [flink] flinkbot edited a comment on pull request #14612: [FLINK-20864][runtime] Introduce the DEFAULT resource profile for the…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14612:
URL: https://github.com/apache/flink/pull/14612#issuecomment-758375136


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11900",
       "triggerID" : "0f42dff0a5c7eedc6591f3526ceb06d39a1590db",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11904",
       "triggerID" : "6a65d8ad557da469d8b91b3b4c598ae02d5ee0f9",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11952",
       "triggerID" : "e8f754cc415e4ff814616ed4eb1c7160cb765d7d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e8f754cc415e4ff814616ed4eb1c7160cb765d7d Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11952) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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