Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 71DB4C7C0 for ; Tue, 12 Aug 2014 07:21:15 +0000 (UTC) Received: (qmail 92544 invoked by uid 500); 12 Aug 2014 07:21:08 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 92408 invoked by uid 500); 12 Aug 2014 07:21:08 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 92396 invoked by uid 99); 12 Aug 2014 07:21:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2014 07:21:07 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of wheeleast@gmail.com designates 74.125.82.175 as permitted sender) Received: from [74.125.82.175] (HELO mail-we0-f175.google.com) (74.125.82.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2014 07:21:02 +0000 Received: by mail-we0-f175.google.com with SMTP id t60so9604267wes.34 for ; Tue, 12 Aug 2014 00:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=FEAwStUUUdyxv3xYUFX8SKwEcoUhhAPf3rB6wOyyCgI=; b=01FojBSMesghDszCor8np0nF9OsdvqlsK0zj33ROuehLW03wYoglPOQHDVrwxcyPTt nFoEb8YE17LuOipBYmsnV9a4JO5jbuyi5u1kjSbo0P9YqpGq4NHimwsWSzlncl5UFV6s nqBWccU2whD3dWAg31wuTmrXHwttR2uxJvvFnZo+xxVDwndX798DjzYEVLGbVqiKU0Yz f1ktI13A9JzOenJBZXi7ZmLfmm5Fqi90LwmdOdvxcfseUQZDLJ+aLwLf9oQily8Rm4QQ WR/oY3xEibJwjHU30H8mSJzZ363qHUvKLpzbkv+/HDvNwEF+WrH53+DSsH8+HLdxmXct 6EIA== X-Received: by 10.180.99.34 with SMTP id en2mr27167963wib.34.1407828041189; Tue, 12 Aug 2014 00:20:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.27.129 with HTTP; Tue, 12 Aug 2014 00:20:11 -0700 (PDT) In-Reply-To: References: From: Wangda Tan Date: Tue, 12 Aug 2014 15:20:11 +0800 Message-ID: Subject: Re: Negative value given by getVirtualCores() or getAvailableResources() To: "user@hadoop.apache.org" Content-Type: multipart/alternative; boundary=f46d0442847e4ccda305006982f5 X-Virus-Checked: Checked by ClamAV on apache.org --f46d0442847e4ccda305006982f5 Content-Type: text/plain; charset=UTF-8 By default, vcore = 1 for each resource request. If you don't like this behavior, you can set yarn.scheduler.minimum-allocation-vcores=0 Hope this helps, Wangda Tan On Thu, Aug 7, 2014 at 7:13 PM, Krishna Kishore Bonagiri < write2kishore@gmail.com> wrote: > Hi, > I am calling getAvailableResources() on AMRMClientAsync and getting -ve > value for the number virtual cores as below. Is there something wrong? > > . > > I have set the vcores in my yarn-site.xml like this, and just ran an > application that requires two containers other than the Application > Master's container. In the ContainerRequest setup from my > ApplicationMaster, I haven't set anything for virtual cores, means I didn't > call setVirtualCores() at all. > > So, I think it shouldn't be showing a -ve value for the vcores, when I > call getAvailableResources(), am I wrong? > > > Number of CPU cores that can be allocated for containers. > > yarn.nodemanager.resource.cpu-vcores > 4 > > > Thanks, > Kishore > --f46d0442847e4ccda305006982f5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
By default, vcore =3D 1 for each resource request. If you = don't like this behavior, you can set yarn.scheduler.minimum-allocation= -vcores=3D0=C2=A0

Hope this helps,
Wangda Tan<= /div>



On Thu, Aug 7, 2014 at 7:13 PM, Krishna Kishore Bo= nagiri <write2kishore@gmail.com> wrote:
Hi,
=C2=A0 I= am calling=C2=A0getAvailableResources() on=C2=A0AMRMClientAsync and gettin= g -ve value for the number virtual cores as below. Is there something wrong= ?

<memory:16110, vCores:-2&g= t;.

I have set the vcores in my yarn-site.xml like this, an= d just ran an application that requires two containers other than the Appli= cation Master's container. In the=C2=A0ContainerRequest setup from my A= pplicationMaster, I haven't set anything for virtual cores, means I did= n't call setVirtualCores() at all.

So, I think it shouldn't be showing a -ve value for= the vcores, when I call getAvailableResources(), am I wrong?

<description> Number of CPU cores tha= t can be allocated for containers. </description>
<name> yarn.nodemanager.resource.cpu-vcores </name>
<= div><value> 4 </value>
</property>
<= div>
Thanks,
Kishore

--f46d0442847e4ccda305006982f5--