Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CDC3E200D53 for ; Tue, 5 Dec 2017 15:50:09 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CC752160C1F; Tue, 5 Dec 2017 14:50:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2BC91160C1B for ; Tue, 5 Dec 2017 15:50:09 +0100 (CET) Received: (qmail 12371 invoked by uid 500); 5 Dec 2017 14:50:08 -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 12223 invoked by uid 99); 5 Dec 2017 14:50:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Dec 2017 14:50:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 54F5A1A166C for ; Tue, 5 Dec 2017 14:50:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id K5r8T85TXWer for ; Tue, 5 Dec 2017 14:50:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 693AF5F4AE for ; Tue, 5 Dec 2017 14:50:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id BB3D6E25D1 for ; Tue, 5 Dec 2017 14:50:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 626F4255E9 for ; Tue, 5 Dec 2017 14:50:01 +0000 (UTC) Date: Tue, 5 Dec 2017 14:50:01 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-7878) Extend the resource type user can define in ResourceSpec MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 05 Dec 2017 14:50:10 -0000 [ https://issues.apache.org/jira/browse/FLINK-7878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16278656#comment-16278656 ] ASF GitHub Bot commented on FLINK-7878: --------------------------------------- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/4911#discussion_r154965306 --- Diff: flink-core/src/main/java/org/apache/flink/api/common/operators/ResourceSpec.java --- @@ -183,17 +240,124 @@ public int hashCode() { result = 31 * result + directMemoryInMB; result = 31 * result + nativeMemoryInMB; result = 31 * result + stateSizeInMB; + result = 31 * result + extendedResources.hashCode(); return result; } @Override public String toString() { + String extend = ""; + for (Resource resource : extendedResources.values()) { + extend += ", " + resource.name + "=" + resource.value; + } return "ResourceSpec{" + "cpuCores=" + cpuCores + ", heapMemoryInMB=" + heapMemoryInMB + ", directMemoryInMB=" + directMemoryInMB + ", nativeMemoryInMB=" + nativeMemoryInMB + - ", stateSizeInMB=" + stateSizeInMB + + ", stateSizeInMB=" + stateSizeInMB + extend + '}'; } + + public static abstract class Resource implements Serializable { + final private String name; + + final private Double value; --- End diff -- Wrong order of keywords: `private final` > Extend the resource type user can define in ResourceSpec > -------------------------------------------------------- > > Key: FLINK-7878 > URL: https://issues.apache.org/jira/browse/FLINK-7878 > Project: Flink > Issue Type: Improvement > Components: DataSet API, DataStream API > Reporter: shuai.xu > Assignee: shuai.xu > Labels: flip-6 > > Now, flink only support user define how much CPU and MEM used in an operator, but now the resource in a cluster is various. For example, an application for image processing may need GPU, some others may need FPGA. > Only CPU and MEM is not enough, and the resource type is becoming more and more, so we need to make the ResourSpec extendible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)