Return-Path: X-Original-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CF5A317889 for ; Mon, 27 Oct 2014 17:32:35 +0000 (UTC) Received: (qmail 8846 invoked by uid 500); 27 Oct 2014 17:32:35 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 8801 invoked by uid 500); 27 Oct 2014 17:32:35 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-issues@hadoop.apache.org Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 8788 invoked by uid 99); 27 Oct 2014 17:32:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Oct 2014 17:32:35 +0000 Date: Mon, 27 Oct 2014 17:32:35 +0000 (UTC) From: "Xuan Gong (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-2726) CapacityScheduler should explicitly log when an accessible label has no capacity 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-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14185462#comment-14185462 ] Xuan Gong commented on YARN-2726: --------------------------------- Committed to trunk, branch-2 and branch-2.6. Thanks wangda ! > CapacityScheduler should explicitly log when an accessible label has no capacity > -------------------------------------------------------------------------------- > > Key: YARN-2726 > URL: https://issues.apache.org/jira/browse/YARN-2726 > Project: Hadoop YARN > Issue Type: Sub-task > Components: capacityscheduler > Reporter: Phil D'Amore > Assignee: Wangda Tan > Priority: Minor > Fix For: 2.6.0 > > Attachments: YARN-2726-20141023-1.patch, YARN-2726-20141023-2.patch > > > Given: > - Node label defined: test-label > - Two queues defined: a, b > - label accessibility and and capacity defined as follows (properties abbreviated for readability): > root.a.accessible-node-labels = test-label > root.a.accessible-node-labels.test-label.capacity = 100 > If you restart the RM or do a 'rmadmin -refreshQueues' you will get a stack trace with the following error buried within: > "Illegal capacity of -1.0 for label=test-label in queue=root.b" > This of course occurs because test-label is accessible to b due to inheritance from the root, and -1 is the UNDEFINED value. To my mind this might not be obvious to the admin, and the error message which results does not help guide someone to the source of the issue. > I propose that this situation be updated so that when the capacity on an accessible label is undefined, it is explicitly called out instead of falling through to the illegal capacity check. Something like: > {code} > if (capacity == UNDEFINED) { > throw new IllegalArgumentException("Configuration issue: " + " label=" + label + " is accessible from queue=" + queue + " but has no capacity set."); > } > {code} > I'll leave it to better judgement than mine as to whether I'm throwing the appropriate exception there. I think this check should be added to both getNodeLabelCapacities and getMaximumNodeLabelCapacities in CapacitySchedulerConfiguration.java. -- This message was sent by Atlassian JIRA (v6.3.4#6332)