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 0958810261 for ; Mon, 7 Apr 2014 22:46:23 +0000 (UTC) Received: (qmail 48941 invoked by uid 500); 7 Apr 2014 22:46:22 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 48878 invoked by uid 500); 7 Apr 2014 22:46:20 -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 48793 invoked by uid 99); 7 Apr 2014 22:46:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2014 22:46:19 +0000 Date: Mon, 7 Apr 2014 22:46:19 +0000 (UTC) From: "Sandy Ryza (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-1909) FairScheduler isStartvedForFairShare does not work when fairShare == 1 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-1909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13962349#comment-13962349 ] Sandy Ryza commented on YARN-1909: ---------------------------------- This looks like an MR1 issue, so moving it to MAPREDUCE. > FairScheduler isStartvedForFairShare does not work when fairShare == 1 > ---------------------------------------------------------------------- > > Key: YARN-1909 > URL: https://issues.apache.org/jira/browse/YARN-1909 > Project: Hadoop YARN > Issue Type: Bug > Reporter: Anubhav Dhoot > Assignee: Anubhav Dhoot > > If the fair share returned by the scheduler getFairShare() == 1 the pool will never be marked as being starved because of the following calculation: > {code} > boolean isStarvedForFairShare(PoolSchedulable sched) { > int desiredFairShare = (int) Math.floor(Math.min( sched.getFairShare() / 2, sched.getDemand())); > return (sched.getRunningTasks() < desiredFairShare); > } > {code} > getFairShare() returns 1 > Math.min calculation will return 0.5 > Math.Floor() which will cause the desiredFairShare to be set to 0. > the return value to be 'false' (0 < 0) > If you have a small job without a minimum set it will not get scheduled if a large job is hogging the slots. -- This message was sent by Atlassian JIRA (v6.2#6252)