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/13 06:11:35 UTC

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

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