From issues-return-282201-apmail-flink-issues-archive=flink.apache.org@flink.apache.org Tue Oct 22 20:54:28 2019 Return-Path: X-Original-To: apmail-flink-issues-archive@minotaur.apache.org Delivered-To: apmail-flink-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 0920010990 for ; Tue, 22 Oct 2019 09:44:49 +0000 (UTC) Received: (qmail 76062 invoked by uid 500); 22 Oct 2019 09:44:45 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 75970 invoked by uid 500); 22 Oct 2019 09:44:45 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 75617 invoked by uid 99); 22 Oct 2019 09:44:44 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Oct 2019 09:44:44 +0000 From: GitBox To: issues@flink.apache.org Subject: [GitHub] [flink] azagrebin commented on a change in pull request #9910: [FLINK-14405][runtime] Align ResourceProfile/ResourceSpec fields with the new TaskExecutor memory setups. Message-ID: <157173748427.17071.7194904659416962572.gitbox@gitbox.apache.org> Date: Tue, 22 Oct 2019 09:44:44 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit azagrebin commented on a change in pull request #9910: [FLINK-14405][runtime] Align ResourceProfile/ResourceSpec fields with the new TaskExecutor memory setups. URL: https://github.com/apache/flink/pull/9910#discussion_r337401369 ########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/ResourceProfile.java ########## @@ -292,7 +349,15 @@ public boolean isMatching(ResourceProfile required) { @Override public int compareTo(@Nonnull ResourceProfile other) { - int cmp = Integer.compare(this.getMemoryInMB(), other.getMemoryInMB()); + if (this == other) { + return 0; + } else if (this == UNKNOWN) { Review comment: Are there cases where we have to compare with `UNKNOWN`? ---------------------------------------------------------------- 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 With regards, Apache Git Services