Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7A065200B9D for ; Thu, 8 Sep 2016 00:56:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 78A5E160AC1; Wed, 7 Sep 2016 22:56:22 +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 BE361160AD2 for ; Thu, 8 Sep 2016 00:56:21 +0200 (CEST) Received: (qmail 33035 invoked by uid 500); 7 Sep 2016 22:56:20 -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 32948 invoked by uid 99); 7 Sep 2016 22:56:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2016 22:56:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B86982C1B90 for ; Wed, 7 Sep 2016 22:56:20 +0000 (UTC) Date: Wed, 7 Sep 2016 22:56:20 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-5605) Preempt containers (all on one node) to meet the requirement of starved applications MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 07 Sep 2016 22:56:22 -0000 [ https://issues.apache.org/jira/browse/YARN-5605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15472064#comment-15472064 ] ASF GitHub Bot commented on YARN-5605: -------------------------------------- Github user templedf commented on a diff in the pull request: https://github.com/apache/hadoop/pull/124#discussion_r77919563 --- Diff: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSLeafQueue.java --- @@ -223,17 +225,76 @@ public void setPolicy(SchedulingPolicy policy) } super.policy = policy; } - + @Override - public void recomputeShares() { + public void updateInternal(boolean checkStarvation) { readLock.lock(); try { policy.computeShares(runnableApps, getFairShare()); + if (checkStarvation) { + identifyStarvedApplications(); + } } finally { readLock.unlock(); } } + /** + * Helper method to identify starved applications. This needs to be called + * ONLY from {@link #updateInternal}, after the application shares + * are updated. + * + * A queue can be starving due to fairshare or minshare. + * + * Minshare is defined only on the queue and not the applications. + * Fairshare is defined for both the queue and the applications. + * + * If this queue is starved due to minshare, we need to identify the most + * deserving apps if they themselves are not starved due to fairshare. + * + * If this queue is starving due to fairshare, there must be at least + * one application that is starved. And, even if the queue is not + * starved due to fairshare, there might still be starved applications. + */ + private void identifyStarvedApplications() { + // First identify starved applications and track total amount of + // starvation (in resources) + Resource fairShareStarvation = Resources.clone(none()); + TreeSet appsWithDemand = fetchAppsWithDemand(); + for (FSAppAttempt app : appsWithDemand) { --- End diff -- Spurious space before the colon > Preempt containers (all on one node) to meet the requirement of starved applications > ------------------------------------------------------------------------------------ > > Key: YARN-5605 > URL: https://issues.apache.org/jira/browse/YARN-5605 > Project: Hadoop YARN > Issue Type: Sub-task > Components: fairscheduler > Reporter: Karthik Kambatla > Assignee: Karthik Kambatla > Attachments: yarn-5605-1.patch > > > Required items: > # Identify starved applications > # Identify a node that has enough containers from applications over their fairshare. > # Preempt those containers -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org