From yarn-issues-return-161830-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Fri Jan 25 07:01:05 2019 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 mx-eu-01.ponee.io (Postfix) with SMTP id 51B9D180608 for ; Fri, 25 Jan 2019 07:01:05 +0100 (CET) Received: (qmail 7933 invoked by uid 500); 25 Jan 2019 06:01: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 7914 invoked by uid 99); 25 Jan 2019 06:01:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jan 2019 06:01:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 72D0AC03A6 for ; Fri, 25 Jan 2019 06:01:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id y22dQFbQPzOG for ; Fri, 25 Jan 2019 06:01:02 +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 529225FE2D for ; Fri, 25 Jan 2019 06:01: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 8E7D1E2681 for ; Fri, 25 Jan 2019 06:01: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 375D8242ED for ; Fri, 25 Jan 2019 06:01:00 +0000 (UTC) Date: Fri, 25 Jan 2019 06:01:00 +0000 (UTC) From: "Tarun Parimi (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (YARN-9209) When nodePartition is not set in Placement Constraints, containers are allocated only in default partition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/YARN-9209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tarun Parimi updated YARN-9209: ------------------------------- Attachment: YARN-9209.001.patch > When nodePartition is not set in Placement Constraints, containers are allocated only in default partition > ---------------------------------------------------------------------------------------------------------- > > Key: YARN-9209 > URL: https://issues.apache.org/jira/browse/YARN-9209 > Project: Hadoop YARN > Issue Type: Bug > Components: capacity scheduler, scheduler > Affects Versions: 3.1.0 > Reporter: Tarun Parimi > Priority: Major > Attachments: YARN-9209.001.patch > > > When application sets a placement constraint without specifying a nodePartition, the default partition is always chosen as the constraint when allocating containers. This can be a problem. when an application is submitted to a queue which has doesn't have enough capacity available on the default partition. > This is a common scenario when node labels are configured for a particular queue. The below sample sleeper service cannot get even a single container allocated when it is submitted to a "labeled_queue", even though enough capacity is available on the label/partition configured for the queue. Only the AM container runs. > {code:java}{ > "name": "sleeper-service", > "version": "1.0.0", > "queue": "labeled_queue", > "components": [ > { > "name": "sleeper", > "number_of_containers": 2, > "launch_command": "sleep 90000", > "resource": { > "cpus": 1, > "memory": "4096" > }, > "placement_policy": { > "constraints": [ > { > "type": "ANTI_AFFINITY", > "scope": "NODE", > "target_tags": [ > "sleeper" > ] > } > ] > } > } > ] > } > {code} > It runs fine if I specify the node_partition explicitly in the constraints like below. > {code:java} > { > "name": "sleeper-service", > "version": "1.0.0", > "queue": "labeled_queue", > "components": [ > { > "name": "sleeper", > "number_of_containers": 2, > "launch_command": "sleep 90000", > "resource": { > "cpus": 1, > "memory": "4096" > }, > "placement_policy": { > "constraints": [ > { > "type": "ANTI_AFFINITY", > "scope": "NODE", > "target_tags": [ > "sleeper" > ], > "node_partitions": [ > "label" > ] > } > ] > } > } > ] > } > {code} > The problem seems to be because only the default partition "" is considered when node_partition constraint is not specified as seen in below RM log. > {code:java} > 2019-01-17 16:51:59,921 INFO placement.SingleConstraintAppPlacementAllocator (SingleConstraintAppPlacementAllocator.java:validateAndSetSchedulingRequest(367)) - Successfully added SchedulingRequest to app=appattempt_1547734161165_0010_000001 targetAllocationTags=[sleeper]. nodePartition= > {code} > However, I think it makes more sense to consider "*" or the {{default-node-label-expression}} of the queue if configured, when no node_partition is specified in the placement constraint. Since not specifying any node_partition should ideally mean we don't enforce placement constraints on any node_partition. However we are enforcing the default partition instead now. -- 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