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 288C8200B80 for ; Wed, 31 Aug 2016 05:46:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 26E70160AC5; Wed, 31 Aug 2016 03:46:23 +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 6D662160ABA for ; Wed, 31 Aug 2016 05:46:22 +0200 (CEST) Received: (qmail 85204 invoked by uid 500); 31 Aug 2016 03:46:21 -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 85177 invoked by uid 99); 31 Aug 2016 03:46:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Aug 2016 03:46:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 728772C014C for ; Wed, 31 Aug 2016 03:46:21 +0000 (UTC) Date: Wed, 31 Aug 2016 03:46:21 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-4347) Implement SlotManager core MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 31 Aug 2016 03:46:23 -0000 [ https://issues.apache.org/jira/browse/FLINK-4347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15450983#comment-15450983 ] ASF GitHub Bot commented on FLINK-4347: --------------------------------------- Github user KurtYoung commented on a diff in the pull request: https://github.com/apache/flink/pull/2388#discussion_r76920351 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/SlotID.java --- @@ -75,9 +75,15 @@ public int hashCode() { @Override public String toString() { - return "SlotID{" + - "resourceId=" + resourceId + - ", slotId=" + slotId + - '}'; + return resourceId + "_" + slotId; + } + + /** + * Generate a random slot id. + * + * @return A random slot id. + */ + public static SlotID generate() { + return new SlotID(ResourceID.generate(), 0); --- End diff -- A SlotID is a identify of the slot which locates in some TaskManager. In current flink's implementaion, we use integer to represent a slot within TM, i think we should make this more explicit. For generating a random slot, i think random a resource id which slot is located is enough. (We may have some limitation of the integer else where, like the integer can not be greater than the total slot number of the TM, so i choose 0) > Implement SlotManager core > -------------------------- > > Key: FLINK-4347 > URL: https://issues.apache.org/jira/browse/FLINK-4347 > Project: Flink > Issue Type: Sub-task > Components: Cluster Management > Reporter: Kurt Young > Assignee: Kurt Young > > The slot manager is responsible to maintain the list of slot requests and slot allocations. It allows to request slots from the registered TaskExecutors and issues container allocation requests in case that there are not enough available resources. -- This message was sent by Atlassian JIRA (v6.3.4#6332)