Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io 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 E3717160C15 for ; Wed, 3 Jan 2018 07:33:05 +0100 (CET) Received: (qmail 84688 invoked by uid 500); 3 Jan 2018 06:33:04 -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 84677 invoked by uid 99); 3 Jan 2018 06:33:04 -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; Wed, 03 Jan 2018 06:33:04 +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 E0EB01807C6 for ; Wed, 3 Jan 2018 06:33:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -107.211 X-Spam-Level: X-Spam-Status: No, score=-107.211 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id qKCYwEqDMlMR for ; Wed, 3 Jan 2018 06:33:03 +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 C74875F27E for ; Wed, 3 Jan 2018 06:33:02 +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 73F8CE25BF for ; Wed, 3 Jan 2018 06:33:01 +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 A188824116 for ; Wed, 3 Jan 2018 06:33:00 +0000 (UTC) Date: Wed, 3 Jan 2018 06:33:00 +0000 (UTC) From: "Konstantinos Karanasos (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-7682) Expose canAssign method in the PlacementConstraintManager MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 03 Jan 2018 06:33:06 -0000 [ https://issues.apache.org/jira/browse/YARN-7682?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16309= 205#comment-16309205 ]=20 Konstantinos Karanasos commented on YARN-7682: ---------------------------------------------- Thanks for the patch, [~pgaref]. Two main comments: * I think that the functions you push in the getNodeCardinalityByOp should = be reversed. That is, I think when you have multiple tags, you should look = at the highest cardinality one in the node/rack, and your min cardinality o= f the constraint should be below that. Same for the max cardinality of the = constraint (should be above the min of the actual cardinalities of the give= n tags). So essentially you would define your minScopeCardinality using the= Long::max, and your maxScopeCardinality using the Long::min. Then everythi= ng goes as is. You can also make a check that your minScopeCardinality <=3D= maxScopeCardinality, just to be on the safe side. Does it make sense? * Do we need the line right after the comment =E2=80=9C// Make sure Anti-af= finity satisfies hard upper limit=E2=80=9D? Nits: * Let=E2=80=99s fill out the javadoc comments in canSatisfyConstraints * In canSatisfySingleConstraintExpression the javadoc is a bit ambiguous. "= The node or rack should satisfy the constraints that are enabled by the giv= en allocation tags". Also let=E2=80=99s add javadoc comments for parameters= its parameters (I know it is private, but it helps). * In both methods you mention Node in the javadoc but you actually support = RACK too. If the above are fixed, +1 from me. > 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-YARN-6592.0= 02.patch, YARN-7682-YARN-6592.003.patch, YARN-7682.wip.patch > > > As per discussion in YARN-7613. Lets expose {{canAssign}} method in the P= lacementConstraintManager that takes a sourceTags, applicationId, Scheduler= Node and AllocationTagsManager and returns true if constraints are not viol= ated by placing the container on the node. > I prefer not passing in the SchedulingRequest, since it can have > 1 numA= llocations. 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