From yarn-issues-return-135459-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Mon Jan 22 04:59:10 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 268FA180676 for ; Mon, 22 Jan 2018 04:59:10 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 162EB160C36; Mon, 22 Jan 2018 03:59:10 +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 5D28E160C37 for ; Mon, 22 Jan 2018 04:59:09 +0100 (CET) Received: (qmail 50243 invoked by uid 500); 22 Jan 2018 03:59:08 -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 50225 invoked by uid 99); 22 Jan 2018 03:59:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jan 2018 03:59:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E6AD9C359F for ; Mon, 22 Jan 2018 03:59:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -107.911 X-Spam-Level: X-Spam-Status: No, score=-107.911 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_LOW=-0.7, 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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 8LridG3VhtUb for ; Mon, 22 Jan 2018 03:59:07 +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 8BEA45F3F0 for ; Mon, 22 Jan 2018 03:59:06 +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 2AB76E0F88 for ; Mon, 22 Jan 2018 03:59:05 +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 8EBB4241C4 for ; Mon, 22 Jan 2018 03:59:01 +0000 (UTC) Date: Mon, 22 Jan 2018 03:59:01 +0000 (UTC) From: "Wangda Tan (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-7783) Add validation step to ensure constraints are not violated due to order in which a request is processed MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/YARN-7783?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16333= 846#comment-16333846 ]=20 Wangda Tan commented on YARN-7783: ---------------------------------- [~asuresh] , I think this is a known issue and we knew this from the beginning. This=C2= =A0is bad for inter-application affinity. Intra-application is better since= it's easier to control requests within the same app.=C2=A0A simpler way to= fix this problem is restricting anti-affinity only to its own allocation t= ags. To me, this is acceptable since we're implementing a subset of Placeme= ntConstraint in any case.=C2=A0 Just looked at the patch, I'm a little worried about the change, this chang= e looks pretty intrusive. Changes like temp tag for the internal algorithm = (including AppPlacementAllocator should not be a part of AllocationTagsMana= ger. AllocationTagsManager should restrict to allocated containers. > Add validation step to ensure constraints are not violated due to order i= n which a request is processed > -------------------------------------------------------------------------= ------------------------------ > > Key: YARN-7783 > URL: https://issues.apache.org/jira/browse/YARN-7783 > Project: Hadoop YARN > Issue Type: Sub-task > Reporter: Arun Suresh > Assignee: Arun Suresh > Priority: Blocker > Attachments: YARN-7783-YARN-6592.001.patch > > > When the algorithm has placed a container on a node, allocation tags are = added to the node if the constraint is satisfied, But depending on the orde= r in which the algorithm sees the request, it is possible that a constraint= that happen to be valid during placement of an earlier-seen request, might= not be valid after all subsequent requests have been placed. > For eg: > Assume nodes n1, n2, n3, n4 and n5 > Consider the 2 constraints: > # *foo* -> anti-affinity with *foo* > # *bar* -> anti-affinity with *foo* > And 2 requests > # req1: NumAllocations =3D 4, allocTags =3D [foo] > # req2: NumAllocations =3D 1, allocTags =3D [bar] > If *req1* is seen first, the algorithm can place the 4 containers in n1, = n2, n3 and n4. And when it gets to *req2*, it will see that 4 nodes have th= e *foo* tag and will place it on n5. But if *req2* is seen first, then *bar= * tag will be placed on any node, since no node will at that point have *fo= o*, and then when it gets to *req1*, since *foo* has no anti-affinity with = *bar*, the algorithm can end up placing *foo* on a node with *bar* violatin= g the second constraint. > To prevent the above, we need a validation step: after the placements for= a batch of requests are made, then for each req, we remove its tags from t= he node and try to see of constraints are still satisfied if the tag were t= o be added back on the node. > When applied to the example above, after the algorithm has run through *r= eq2* and then *req1*, we remove the *bar* tag from the node and try to add = it back on the node. This time, constraint satisfaction will fail, since th= ere is now a *foo* tag on the node and *bar* cannot be added. The algorithm= will then retry placing *req2* on another node. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org