From yarn-issues-return-168470-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Mon Jun 3 16:16:04 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 203F518062F for ; Mon, 3 Jun 2019 18:16:04 +0200 (CEST) Received: (qmail 29880 invoked by uid 500); 3 Jun 2019 16:16: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 29780 invoked by uid 99); 3 Jun 2019 16:16:03 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jun 2019 16:16:03 +0000 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 8F448E2C0C for ; Mon, 3 Jun 2019 16:16: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 97959245A3 for ; Mon, 3 Jun 2019 16:16:00 +0000 (UTC) Date: Mon, 3 Jun 2019 16:16:00 +0000 (UTC) From: "Suma Shivaprasad (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-9569) Auto-created leaf queues do not honor cluster-wide min/max memory/vcores 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-9569?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16854= 763#comment-16854763 ]=20 Suma Shivaprasad commented on YARN-9569: ---------------------------------------- +1. Patch LGTM > Auto-created leaf queues do not honor cluster-wide min/max memory/vcores > ------------------------------------------------------------------------ > > Key: YARN-9569 > URL: https://issues.apache.org/jira/browse/YARN-9569 > Project: Hadoop YARN > Issue Type: Improvement > Components: capacity scheduler > Affects Versions: 3.2.0 > Reporter: Craig Condit > Assignee: Craig Condit > Priority: Major > Attachments: YARN-9569.001.patch, YARN-9569.002.patch > > > Auto-created leaf queues do not honor=C2=A0cluster-wide settings for maxi= mum CPU/vcores allocation. > To reproduce: > # Set auto-create-child-queue.enabled=3Dtrue for a parent queue. > # Set leaf-queue-template.maximum-allocation-mb=3D16384. > # Set=C2=A0yarn.resource-types.memory-mb.maximum-allocation=3D16384 in r= esource-types.xml > # Launch a YARN app with a container requesting 16 GB RAM. > =C2=A0 > This scenario should work, but instead you get an error similar to this: > {code:java} > java.lang.IllegalArgumentException: Queue maximum allocation cannot be la= rger than the cluster setting for queue root.auto.test max allocation per q= ueue: cluster setting: =C2= =A0 {code} > =C2=A0 > This seems to be caused by this code in ManagedParentQueue.getLeafQueueCo= nfigs: > {code:java} > CapacitySchedulerConfiguration leafQueueConfigTemplate =3D new > CapacitySchedulerConfiguration(new Configuration(false), false);{code= } > =C2=A0 > This initializes a new leaf queue configuration that does not read resour= ce-types.xml (or any other config). Later, this CapacitySchedulerConfigurat= ion instance calls=C2=A0ResourceUtils.fetchMaximumAllocationFromConfig()=C2= =A0 from its getMaximumAllocationPerQueue() method and passes itself as the= configuration to use. Since the resource types are not present, ResourceUt= ils falls back to compiled-in defaults of 8GB RAM, 4 cores. > =C2=A0 > I was able to work around this with a custom=C2=A0AutoCreatedQueueManagem= entPolicy implementation which does something like this in init() and reini= tialize(): > {code:java} > for (Map.Entry entry : this.scheduler.getConfiguration())= { > if (entry.getKey().startsWith("yarn.resource-types")) { > parentQueue.getLeafQueueTemplate().getLeafQueueConfigs() > .set(entry.getKey(), entry.getValue()); > } > } > {code} > However, this is obviously a very hacky way to solve the problem. > I can submit a proper patch if someone can provide some direction as to t= he best way to proceed. > =C2=A0 -- 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