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 11C61200D68 for ; Thu, 28 Dec 2017 16:52:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 1006E160C16; Thu, 28 Dec 2017 15:52:05 +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 55B41160C0C for ; Thu, 28 Dec 2017 16:52:04 +0100 (CET) Received: (qmail 8134 invoked by uid 500); 28 Dec 2017 15:52:03 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 8123 invoked by uid 99); 28 Dec 2017 15:52:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Dec 2017 15:52:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id D7132180733 for ; Thu, 28 Dec 2017 15:52:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id OCUhRmr2NsDA for ; Thu, 28 Dec 2017 15:52:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 1A4605F19C for ; Thu, 28 Dec 2017 15:52:01 +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 57DE2E0C25 for ; Thu, 28 Dec 2017 15:52:00 +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 11B2A240EE for ; Thu, 28 Dec 2017 15:52:00 +0000 (UTC) Date: Thu, 28 Dec 2017 15:52:00 +0000 (UTC) From: "Panagiotis Garefalakis (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (YARN-7682) Expose canAssign method in the PlacementConstraintManager MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 28 Dec 2017 15:52:05 -0000 [ https://issues.apache.org/jira/browse/YARN-7682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16305548#comment-16305548 ] Panagiotis Garefalakis edited comment on YARN-7682 at 12/28/17 3:51 PM: ------------------------------------------------------------------------ Attaching a first version of the patch. PlacementConstaintsUtl class is now returning if a node is a valid placement for a set of allocationTags. Currently supporting SingleConstaints as discussed and both scopes Node and Rack. An interesting fact is during the first allocation where no tags exist affinity would always fail if we wanted to ensure minCardinality is always >=1. I fixed that by checking if it is the first application allocation. However for more generic scenarios like cardinality there are different ways to tackle the problem. For example: {code:java} {NODE, 2, 10,allocationTag("spark")} {code} should we promote affinity on Nodes where cMin is <= 2 or just ensure cMax is <= 10 ? [~asuresh] [~kkaranasos] Thoughts? was (Author: pgaref): Attaching a first version of the patch. PlacementConstaintsUtl class is now returning if a node is a valid placement for a set of allocationTags. Currently supporting SingleConstaints as discussed and both scopes Node and Rack. An interesting fact is during the first allocation where no tags exist affinity would always fail if we wanted to ensure minCardinality is always >=1. I fixed that by checking if it is the first application allocation. However for more generic scenarios like cardinality there are different ways to tackle the problem. For example {NODE, 2, 10,allocationTag("spark")} should we promote affinity on Nodes where cMin is <= 2 or just ensure cMax is <= 10 ? [~asuresh] [~kkaranasos] Thoughts? > Expose canAssign method in the PlacementConstraintManager > --------------------------------------------------------- > > Key: YARN-7682 > URL: https://issues.apache.org/jira/browse/YARN-7682 > Project: Hadoop YARN > Issue Type: Sub-task > Reporter: Arun Suresh > Assignee: Panagiotis Garefalakis > Attachments: YARN-7682-YARN-6592.001.patch, YARN-7682.wip.patch > > > As per discussion in YARN-7613. Lets expose {{canAssign}} method in the PlacementConstraintManager that takes a sourceTags, applicationId, SchedulerNode and AllocationTagsManager and returns true if constraints are not violated by placing the container on the node. > I prefer not passing in the SchedulingRequest, since it can have > 1 numAllocations. We want this api to be called for single allocations. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org