You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by Grandl Robert <rg...@yahoo.com> on 2013/11/25 03:32:19 UTC

Force reducer to execute on a specific host

Hi guys, 

I am trying to run an experiment where I want the reducers to be forced executing on a specific host. The simplest way I found it is to modify in RMContainerAllocator such that whenever there is an addContainerReq(ContainerRequest) for a reducer, I simply do: addResourceRequest(req.priority, host_X_name, req.capability) and return, instead of setting the resourceName to ResourceRequest.ANY. 

Unfortunately when I pass such a ResourceRequest for reducers through a makeRemoteRequest, the RM crashes, giving an ugly exception like: 
FATAL org.apache.hadoop.yarn.server.resourcemanager.ResourceManager: Error in handling event type NODE_UPDATE to the scheduler
java.lang.NullPointerException
    at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.LeafQueue.assignContainers(LeafQueue.java:841)
    at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue.assignContainersToChildQueues(ParentQueue.java:640)
    at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue.assignContainers(ParentQueue.java:554)
    at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.nodeUpdate(CapacityScheduler.java:695)
    at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.handle(CapacityScheduler.java:739)
    at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.handle(CapacityScheduler.java:86)
    at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$SchedulerEventDispatcher$EventProcessor.run(ResourceManager.java:549)
    at java.lang.Thread.run(Thread.java:722)

Do you have other suggestion how I can enforce reducers execution on a certain host ? Or do you know what I am doing wrong here ? 

Thanks,
robert

RE: Force reducer to execute on a specific host

Posted by Bikas Saha <bi...@hortonworks.com>.
I would suggest using the AMRMClient/AMRMClientAsync libraries for this
kind of work. They take care of all the nuances like these.

Please also file a jira for the RM crash. That should not be happening.

Thanks!
Bikas

-----Original Message-----
From: Grandl Robert [mailto:rgrandl@yahoo.com]
Sent: Sunday, November 24, 2013 8:02 PM
To: common-dev@hadoop.apache.org; Grandl Robert
Subject: Re: Force reducer to execute on a specific host

I found the fix. I had to add also a rack local request for reducer. And
set the relaxLocality to false for both ANY and rack requests, in order to
force data locality.

robert




On Sunday, November 24, 2013 6:32 PM, Grandl Robert <rg...@yahoo.com>
wrote:

Hi guys,

I am trying to run an experiment where I want the reducers to be forced
executing on a specific host. The simplest way I found it is to modify in
RMContainerAllocator such that whenever there is an
addContainerReq(ContainerRequest) for a reducer, I simply do:
addResourceRequest(req.priority, host_X_name, req.capability) and return,
instead of setting the resourceName to ResourceRequest.ANY.

Unfortunately when I pass such a ResourceRequest for reducers through a
makeRemoteRequest, the RM crashes, giving an ugly exception like:
FATAL org.apache.hadoop.yarn.server.resourcemanager.ResourceManager: Error
in handling event type NODE_UPDATE to the scheduler
java.lang.NullPointerException
    at
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.LeafQueue
.assignContainers(LeafQueue.java:841)
    at
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQue
ue.assignContainersToChildQueues(ParentQueue.java:640)
    at
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQue
ue.assignContainers(ParentQueue.java:554)
    at
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityS
cheduler.nodeUpdate(CapacityScheduler.java:695)
    at
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityS
cheduler.handle(CapacityScheduler.java:739)
    at
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityS
cheduler.handle(CapacityScheduler.java:86)
    at
org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$SchedulerEve
ntDispatcher$EventProcessor.run(ResourceManager.java:549)
    at java.lang.Thread.run(Thread.java:722)

Do you have other suggestion how I can enforce reducers execution on a
certain host ? Or do you know what I am doing wrong here ?

Thanks,
robert

-- 
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.

Re: Force reducer to execute on a specific host

Posted by Grandl Robert <rg...@yahoo.com>.
I found the fix. I had to add also a rack local request for reducer. And set the relaxLocality to false for both ANY and rack requests, in order to force data locality.

robert




On Sunday, November 24, 2013 6:32 PM, Grandl Robert <rg...@yahoo.com> wrote:
 
Hi guys, 

I am trying to run an experiment where I want the reducers to be forced executing on a specific host. The simplest way I found it is to modify in RMContainerAllocator such that whenever there is an addContainerReq(ContainerRequest) for a reducer, I simply do: addResourceRequest(req.priority, host_X_name, req.capability) and return, instead of setting the resourceName to ResourceRequest.ANY. 

Unfortunately when I pass such a ResourceRequest for reducers through a makeRemoteRequest, the RM crashes, giving an ugly exception like: 
FATAL org.apache.hadoop.yarn.server.resourcemanager.ResourceManager: Error in handling event type NODE_UPDATE to the scheduler
java.lang.NullPointerException
    at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.LeafQueue.assignContainers(LeafQueue.java:841)
    at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue.assignContainersToChildQueues(ParentQueue.java:640)
    at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue.assignContainers(ParentQueue.java:554)
    at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.nodeUpdate(CapacityScheduler.java:695)
    at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.handle(CapacityScheduler.java:739)
    at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.handle(CapacityScheduler.java:86)
    at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$SchedulerEventDispatcher$EventProcessor.run(ResourceManager.java:549)
    at java.lang.Thread.run(Thread.java:722)

Do you have other suggestion how I can enforce reducers execution on a certain host ? Or do you know what I am doing wrong here ? 

Thanks,
robert