What you ask, try on request node and then fallback to others, is the
default behavior for current schedulers in yarn. Ie. relaxLocality is true
by default.

-----Original Message-----
From: Thomas Weise [mailto:[email protected]]
Sent: Wednesday, November 13, 2013 3:55 PM
To: [email protected]
Subject: Re: Allocating Containers on a particular Node in Yarn

Is it possible to specify a particular node and have RM fallback to an
different node only after making an attempt to allocate for the requested
node? In other words, is the combination of specific host name and
relaxLocality=TRUE meaningful at all?

Thanks.


On Wed, Nov 13, 2013 at 3:23 PM, Alejandro Abdelnur
<[email protected]>wrote:

> Gaurav,
>
> Setting relaxLocality to FALSE should do it.
>
> thanks.
>
>
> On Wed, Nov 13, 2013 at 2:58 PM, gaurav <[email protected]> wrote:
>
> >  Hi,
> >  I am trying to allocate containers on a particular node in Yarn but
> > Yarn is returning me containers on different node although the
> > requested node has resources available.
> >
> > I checked into the allocate(AllocateRequest request) function of
> > ApplicationMasterService and my request is as follows
> >
> > *request: ask { priority { priority: 1 } resource_name: "h2"
> > capability {
> > memory: 1000 } num_containers: 2 } ask { priority { priority: 1 }
> > resource_name: "/default-rack" capability { memory: 1000 }
> num_containers:
> > 2 } ask { priority { priority: 1 } resource_name: "*" capability {
> memory:
> > 1000 } num_containers: 2 } response_id: 1 progress: 0.0*
> >
> > but the containers that I am getting back is as follows
> > [Container: [ContainerId: container_1384381084244_0001_01_000002,
NodeId:
> > h1:1234, NodeHttpAddress: h1:2, Resource: <memory:1024, vCores:1>,
> > Priority: 1, Token: Token { kind: ContainerToken, service: h1:1234
> > }, ],
> > Container: [ContainerId: container_1384381084244_0001_01_000003,
NodeId:
> > h1:1234, NodeHttpAddress: h1:2, Resource: <memory:1024, vCores:1>,
> > Priority: 1, Token: Token { kind: ContainerToken, service: h1:1234
> > }, ]]
> >
> > I am attaching the test case that I have written along with the
> > mail. It uses classes under
org.apache.hadoop.yarn.server.resourcemanager package.
> >
> > Any pointers would be of great help
> >
> > Thanks
> > Gaurav
> >
> >
> >
> >
> >
>
>
> --
> Alejandro
>

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Reply via email to