Nathan Roberts updated YARN-4287:
V3 of patch. Thanks again for the comments.
bq. RACK_LOCALITY_EXTRA_DELAY -> RACK_LOCALITY_DELAY, same as configuration
property name (rack-locality-delay)
Done - changed to absolute instead of relative to nodeLocality
bq. Do you think if is it a good idea to separate old rack-locality-delay
computation (using getLocalityWaitFactor) and new rack-locality-delay config?
Now rack-locality-delay = min(old-computed-delay, new-specified-delay), since
the getLocalityWaitFactor has some flaws, I think we can make this configurable
so user can choose to use specified or computed.
I simplified the code a little in this area to make it easier to see where the
computed-locality-delay is used. I didn't separate them in this version of the
patch because I still want to be able to specify rack-locality-delay BUT have
the computed delay take effect when an application is not asking for locality
OR is really small. This is a very important capability for at least our use
My opinion is that we shouldn't make it configurable to get the old behavior. I
can be convinced otherwise, if that's what folks want. Here's my reasoning:
- This is a behavior change, but I can't think of any good cases where someone
would prefer the old behavior to the new. Let me know if you can think of some.
- Node locality might go down a little bit but I think it's quite unlikely this
will happen in practice. As soon as it sees a node-local assignment, it
immediately goes back to waiting for node-locality - so it's quite hard to only
get rack locality when there is node locality to be had.
- Rack locality will go up because previously the computedDelay used for
OFFSWITCH would actually kick-in prior to a rack-local opportunity, which
wasn't ideal. I would think this would offset any node locality we lost.
> Capacity Scheduler: Rack Locality improvement
> Key: YARN-4287
> URL: https://issues.apache.org/jira/browse/YARN-4287
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: capacityscheduler
> Affects Versions: 2.7.1
> Reporter: Nathan Roberts
> Assignee: Nathan Roberts
> Attachments: YARN-4287-v2.patch, YARN-4287-v3.patch, YARN-4287.patch
> YARN-4189 does an excellent job describing the issues with the current delay
> scheduling algorithms within the capacity scheduler. The design proposal also
> seems like a good direction.
> This jira proposes a simple interim solution to the key issue we've been
> experiencing on a regular basis:
> - rackLocal assignments trickle out due to nodeLocalityDelay. This can have
> significant impact on things like CombineFileInputFormat which targets very
> specific nodes in its split calculations.
> I'm not sure when YARN-4189 will become reality so I thought a simple interim
> patch might make sense. The basic idea is simple:
> 1) Separate delays for rackLocal, and OffSwitch (today there is only 1)
> 2) When we're getting rackLocal assignments, subsequent rackLocal assignments
> should not be delayed
> Patch will be uploaded shortly. No big deal if the consensus is to go
> straight to YARN-4189.
This message was sent by Atlassian JIRA