Uh oh!
There was an error while loading. Please reload this page.
[SPARK-13232][YARN] Fix executor node label - #11129
Conversation
tgravescs
commented
Feb 16, 2016
Jenkins, test this please |
SparkQA
commented
Feb 16, 2016
Test build #51369 has finished for PR 11129 at commit
|
| } | ||
| constructor.newInstance(resource, nodes, racks, RM_REQUEST_PRIORITY, true: java.lang.Boolean, | ||
| labelExpression.orNull) | ||
| labelExp) |
There was a problem hiding this comment.
From my understanding, currently in your implementation if nodes or racks is not empty, label expression will not be worked even it is explicitly set through configuration.
IMO I would choose to set nodes and racks to null if label expression is configured, otherwise user will be confused why explicitly setting lab expression is not worked.
There was a problem hiding this comment.
Yeah, I had this idea before, but imo if totally disregard the data locality may cause a lot of network overhead.
There was a problem hiding this comment.
Normally if user set this label expression configuration, they want the label-based scheduling obviously. But in your implementation you silently disable this, this will make user confuse. Also since label-based scheduling cannot be worked with locality preferences in YARN side (I think it is intentionally), it would be better to ignore the locality information here.
jerryshao
commented
Mar 1, 2016
Any further updates on it? CC @sryza about this. |
srowen
commented
Mar 7, 2016
CC @sryza or maybe @steveloughran or @vanzin . I don't speak YARN |
steveloughran
commented
Mar 7, 2016
Yarn and labels, joy.
Yes, I have done this. No, I would not recommend it. I only did it for anti-affinity placement, where we needed a guarantee that there'd be only one instance per node, labelled or not. (i.e we wanted containers to be away from each other, rather than near the data). The request validation logic. I think; it failed for a while (SLIDER-1051) until I turned off some of the checks. There's one more corner case: app doesn't ask for labels, but the queue is bonded to a label. I actually don't know what happens to located requests here. |
srowen
commented
May 6, 2016
@steveloughran do you think this is a good or not-good change overall? |
steveloughran
commented
May 6, 2016
It's actually being fixed right now in Hadoop 2.8, which will take a while to surface. Looking at the patch, all Bibin is doing is cutting that validation check out from the container request submission...it's up to the scheduler how it handles things at that point. Presumably (hopefully) it does the right thing. If the patch goes in to spark, then eventually, there may be benefits in pulling it. If it goes in now, it stops things breaking today. This is a tough call...nobody wants to add another switch for this do they? (now, maximally devious would be to catch the exception and downgrade, but that's both hard to test and inevitably brittle in some way) |
jerryshao
commented
May 9, 2016
Maybe we could do this in Spark side, though a little complicated but doable. Yes it is hard to test label related things in Spark side, at least we could manually verify it locally. |
vanzin
commented
Dec 7, 2016
It's been a while since discussion died down here; I don't like the current version because it will break things with a fixed YARN. So the options are either implement Steve's suggestion, or not do anything and tell users to not use labels in broken version of YARN. I'm kinda leaning towards the latter but don't really feel strongly. |
HyukjinKwon
commented
May 11, 2017
Hi @AtkinsChang is it still active? |
movwei
commented
Mar 21, 2018
But In Hadoop 2.8.2 there still have this problem when request a container with both node label and locality(rack/node). ResourceManager will also checked it, and the related code is as follows: RMAppManager#validateAndCreateResourceRequest -> SchedulerUtils#validateResourceRequest org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerUtils.javaprivatestaticvoidvalidateResourceRequest(ResourceRequestresReq,
ResourcemaximumResource, QueueInfoqueueInfo, RMContextrmContext)
throwsInvalidResourceRequestException {
.......
StringlabelExp = resReq.getNodeLabelExpression();
// we don't allow specify label expression other than resourceName=ANY nowif (!ResourceRequest.ANY.equals(resReq.getResourceName())
&& labelExp != null && !labelExp.trim().isEmpty()) {
thrownewInvalidLabelResourceRequestException(
"Invalid resource request, queue=" + queueInfo.getQueueName()
+ " specified node label expression in a "
+ "resource request has resource name = "
+ resReq.getResourceName());
}
// we don't allow specify label expression with more than one node labels nowif (labelExp != null && labelExp.contains("&&")) {
thrownewInvalidLabelResourceRequestException(
"Invailid resource request, queue=" + queueInfo.getQueueName()
+ " specified more than one node label "
+ "in a node label expression, node label expression = "
+ labelExp);
}
......
}
}It will cause spark ApplicationMaster failed with InvalidLabelResourceRequestException, so we still need this patch. |
## What changes were proposed in this pull request? This PR proposes to close PRs ... - inactive to the review comments more than a month - WIP and inactive more than a month - with Jenkins build failure but inactive more than a month - suggested to be closed and no comment against that - obviously looking inappropriate (e.g., Branch 0.5) To make sure, I left a comment for each PR about a week ago and I could not have a response back from the author in these PRs below: Closesapache#11129Closesapache#12085Closesapache#12162Closesapache#12419Closesapache#12420Closesapache#12491Closesapache#13762Closesapache#13837Closesapache#13851Closesapache#13881Closesapache#13891Closesapache#13959Closesapache#14091Closesapache#14481Closesapache#14547Closesapache#14557Closesapache#14686Closesapache#15594Closesapache#15652Closesapache#15850Closesapache#15914Closesapache#15918Closesapache#16285Closesapache#16389Closesapache#16652Closesapache#16743Closesapache#16893Closesapache#16975Closesapache#17001Closesapache#17088Closesapache#17119Closesapache#17272Closesapache#17971 Added: Closesapache#17778Closesapache#17303Closesapache#17872 ## How was this patch tested? N/A Author: hyukjinkwon <gurwls223@gmail.com> Closesapache#18017 from HyukjinKwon/close-inactive-prs.
Specify node label for executor will cause Spark not working on Yarn due to Yarn does not support node container request with both label and locality(racks/nodes).
Add test to
YarnAllocatorSuiteto reproduce this situation and changeYarnAllocator#createContainerRequestto apply node label only to locality free request.