Hi, all,

RMContainerRequestor creates more than one resource requests for each task
attempt.
If we have a hdfs file with a 3 replicas, on which a task attempt would
runs in a
one rack only cluster , the code below would create 3 (hosts) + 1  (rack)
 + 1 (any) = 5
container request for the attempt.

  protected void addContainerReq(ContainerRequest req) {
    // Create resource requests
    for (String host : req.hosts) {
      // Data-local
      if (!isNodeBlacklisted(host)) {
        addResourceRequest(req.priority, host, req.capability);
      }
    }

    // Nothing Rack-local for now
    for (String rack : req.racks) {
      addResourceRequest(req.priority, rack, req.capability);
    }

    // Off-switch
    addResourceRequest(req.priority, ANY, req.capability);
  }

 IMHO, that should be only one for each attempt. Would MRAppMaster launch 5
containers for it?
How MRv2 guarantees that would be only one for the attempt?
Can any kindly explain the logic on this point for me?

Thanks,
Min
-- 
My research interests are distributed systems, parallel computing and
bytecode based virtual machine.

My profile:
http://www.linkedin.com/in/coderplay
My blog:
http://coderplay.javaeye.com

Reply via email to