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 86F3D18AEB for ; Thu, 28 Jan 2016 22:49:41 +0000 (UTC) Received: (qmail 79899 invoked by uid 500); 28 Jan 2016 22:49:40 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 79849 invoked by uid 500); 28 Jan 2016 22:49:40 -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 79800 invoked by uid 99); 28 Jan 2016 22:49:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jan 2016 22:49:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 115FB2C1F60 for ; Thu, 28 Jan 2016 22:49:40 +0000 (UTC) Date: Thu, 28 Jan 2016 22:49:40 +0000 (UTC) From: "Jian He (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-4617) LeafQueue#pendingOrderingPolicy should always use fixed ordering policy instead of using same as active applications ordering policy 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-4617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15122475#comment-15122475 ] Jian He commented on YARN-4617: ------------------------------- One more comment: I think for pending apps, we do not need to call addAllSchedulableEntities, because the passed-in argument will always be empty ? {code} public synchronized void setPendingAppsOrderingPolicy( OrderingPolicy pendingOrderingPolicy) { if (null != this.pendingOrderingPolicy) { pendingOrderingPolicy .addAllSchedulableEntities(this.pendingOrderingPolicy .getSchedulableEntities()); } this.pendingOrderingPolicy = pendingOrderingPolicy; } {code} So we may just need to initialize the pendingOrderingPolicy variable, like this. {code} this.pendingOrderingPolicy = new FifoOrderingPolicyForPendingApps(); {code} Doing this, the CapacitySchedulerConfiguration#getPendingOrderingPolicy method can also be removed > LeafQueue#pendingOrderingPolicy should always use fixed ordering policy instead of using same as active applications ordering policy > ------------------------------------------------------------------------------------------------------------------------------------ > > Key: YARN-4617 > URL: https://issues.apache.org/jira/browse/YARN-4617 > Project: Hadoop YARN > Issue Type: Bug > Components: capacity scheduler > Affects Versions: 2.8.0 > Reporter: Rohith Sharma K S > Assignee: Rohith Sharma K S > Attachments: 0001-YARN-4617.patch, 0001-YARN-4617.patch, 0002-YARN-4617.patch, 0003-YARN-4617.patch, 0004-YARN-4617.patch > > > In discussion with [~leftnoteasy] in the JIRA [comment|https://issues.apache.org/jira/browse/YARN-4479?focusedCommentId=15108236&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15108236] pointed out that {{LeafQueue#pendingOrderingPolicy}} should NOT be assumed to be same as active applications ordering policy. It causes an issue when using fair ordering policy. > Expectations of this JIRA should include > # Create FifoOrderingPolicyForPendingApps which extends FifoOrderingPolicy. > # Comparator of new ordering policy should use RecoveryComparator,PriorityComparator and Fifocomparator in order respectively. > # Clean up {{LeafQueue#pendingOPForRecoveredApps}} which is no more required once new fixed ordering policy is created pending applications. -- This message was sent by Atlassian JIRA (v6.3.4#6332)