Re: Allocating Containers on a particular Node in Yarn

2014-07-30 Thread Gaurav Gupta
Just to add, when I am using Capacity Scheduler, the same request works fine. On Wed, Jul 30, 2014 at 11:45 AM, Gaurav Gupta wrote: > Hi, > > I am using CHD5 (Hadoop 2.3.0-cdh5.0.0) as my Hadoop Distro. I am using > Fair Scheduler. I am requesting for two containers on a particular host, > but

Re: Allocating Containers on a particular Node in Yarn

2013-11-14 Thread Sandy Ryza
umber of racks in the cluster, this > >feature is disabled by default, set to -1. > > > > > > > > -Gaurav > > > > *From:* Sandy Ryza [mailto:sandy.r...@cloudera.com] > *Sent:* Thursday, November 14, 2013 12:41 PM > > *To:* user@hadoop.apache.

RE: Allocating Containers on a particular Node in Yarn

2013-11-14 Thread Gaurav Gupta
From: Sandy Ryza [mailto:sandy.r...@cloudera.com] Sent: Thursday, November 14, 2013 12:41 PM To: user@hadoop.apache.org Subject: Re: Allocating Containers on a particular Node in Yarn Great to hear. Other answers inline On Thu, Nov 14, 2013 at 12:05 PM, Gaurav Gupta wrote: Sandy

Re: Allocating Containers on a particular Node in Yarn

2013-11-14 Thread Sandy Ryza
urav > > > > *From:* Sandy Ryza [mailto:sandy.r...@cloudera.com] > *Sent:* Thursday, November 14, 2013 11:41 AM > *To:* user@hadoop.apache.org > > *Subject:* Re: Allocating Containers on a particular Node in Yarn > > > > Requesting the rack is not necessary, and is leadin

RE: Allocating Containers on a particular Node in Yarn

2013-11-14 Thread Gaurav Gupta
Gaurav From: Sandy Ryza [mailto:sandy.r...@cloudera.com] Sent: Thursday, November 14, 2013 11:41 AM To: user@hadoop.apache.org Subject: Re: Allocating Containers on a particular Node in Yarn Requesting the rack is not necessary, and is leading to the behavior that you're seeing.

Re: Allocating Containers on a particular Node in Yarn

2013-11-14 Thread Sandy Ryza
Requesting the rack is not necessary, and is leading to the behavior that you're seeing. The documentation states: * If locality relaxation is disabled, then only within the same request, * a node and its rack may be specified together. This allows for a specific * rack with a preference

Re: Allocating Containers on a particular Node in Yarn

2013-11-13 Thread gaurav
Here is the snippet of code that I am using to allocate containers AMRMClient amRmClient = AMRMClient.createAMRMClient();; String host = "h1"; Resource capability = Records.newRecord(Resource.class); capability.setMemory(memory); nodes = new String[] {host}; // in order

Re: Allocating Containers on a particular Node in Yarn

2013-11-13 Thread Sandy Ryza
In that case, the AMRMClient code looks correct to me. Can you share the code you've written against it that's not receiving the correct containers? On Wed, Nov 13, 2013 at 5:30 PM, gaurav wrote: > Hi, > > I looked in the trunk and line numbers are 361 and 366. > > Thanks > -Gaurav > > On 11/

Re: Allocating Containers on a particular Node in Yarn

2013-11-13 Thread gaurav
Hi, I looked in the trunk and line numbers are 361 and 366. Thanks -Gaurav On 11/13/2013 5:04 PM, gaurav wrote: I have hadoop-2.2.0 Thanks -Gaurav On 11/13/2013 4:59 PM, Sandy Ryza wrote: What version are you using? Setting the relax locality to true for nodes is always correct. For racks,

Re: Allocating Containers on a particular Node in Yarn

2013-11-13 Thread gaurav
I have hadoop-2.2.0 Thanks -Gaurav On 11/13/2013 4:59 PM, Sandy Ryza wrote: What version are you using? Setting the relax locality to true for nodes is always correct. For racks, this is not necessarily the case. When I look at trunk, it is set to true always on line 361 (which is correct)

Re: Allocating Containers on a particular Node in Yarn

2013-11-13 Thread Sandy Ryza
What version are you using? Setting the relax locality to true for nodes is always correct. For racks, this is not necessarily the case. When I look at trunk, it is set to true always on line 361 (which is correct), but on on line 374. -Sandy On Wed, Nov 13, 2013 at 4:47 PM, gaurav wrote: >

Re: Allocating Containers on a particular Node in Yarn

2013-11-13 Thread gaurav
Hi Sandy, No it is not working for me. As mentioned earlier, AMRMClient is not respecting the locality for node and rack in *Line 361 and 374 *and is set to true always. I am requesting for one container with specified node and rack and relaxed locality false. Thanks -Gaurav On 11/13/2013

Re: Allocating Containers on a particular Node in Yarn

2013-11-13 Thread Sandy Ryza
[moving to user list] Right. relaxLocality needs to be set on the next level up. It determines whether locality can be relaxed to that level. Confusing, I know. If you are using AMRMClient, you should be able to accomplish what you're looking for by creating an AMRMClient.ContainerRequest that