-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-17894] [CORE] Ensure uniqueness of TaskSetManager name. #15463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
kayousterhout
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
Jenkins, this is OK to test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this a little more specific and also include the JIRA: "[SPARK-17894] Verify TaskSetManagers for different stage attempts have unique names"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you pass these in as named parameters, to make the tests a little easier to read?
taskSet = FakeTask.createTaskSet(numTasks = 1, stageId = 0, stageAttemptId = 0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment about what's going on in this chunk -- something like "Make sure a task set for the same stage (but a different attempt) has a different ID"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar here -- "// Make sure a task set with the same attempt ID but different stage ID also has a unique name"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you pass 0 as a named parameter ("stageId = 0") to make it obvious what it's being used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
|
Thanks @kayousterhout for the comments. They are addressed. |
|
Jenkins, test this please |
|
Thanks @kayousterhout for review again. Jenkins did not start to build and run the tests. |
|
Jenkins, this is OK to test |
|
I think Jenkins can not be triggered ;) Is there any other way to trigger? |
|
Jenkins test this please |
|
Thanks @kayousterhout for support but I think problem still continues. Is there any contact from infrastructure/jenkins team to get support? |
|
Jenkins, retest this please |
|
Whoa! Jenkins disrespects @kayousterhout -- bad Jenkins! Or did you actually fix something @shivaram ? |
|
Hah - I wish I had that much insight into Jenkins. I just think it was just flaky esp. given the github DNS issues. |
|
Test build #67349 has finished for PR 15463 at commit
|
|
Thanks all for the support. Jenkins looks failed due to timeout. |
|
Jenkins, retest this please |
|
Test build #67399 has finished for PR 15463 at commit
|
|
Thanks all for the support. |
|
LGTM; merged to master |
| stageId: Int, | ||
| partitionId: Int, | ||
| prefLocs: Seq[TaskLocation] = Nil) extends Task[Int](stageId, 0, partitionId) { | ||
| prefLocs: Seq[TaskLocation] = Nil) extends Task[Int](stageId, stageAttemptId = 0, partitionId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not supported in Scala 2.10. Could you submit a follow-up PR to fix the Scala 2.10 build, please? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just opened #15617 sorry about this!
`TaskSetManager` should have unique name to avoid adding duplicate ones to parent `Pool` via `SchedulableBuilder`. This problem has been surfaced with following discussion: [[PR: Avoid adding duplicate schedulables]](apache#15326) **Proposal** : There is 1x1 relationship between `stageAttemptId` and `TaskSetManager` so `taskSet.Id` covering both `stageId` and `stageAttemptId` looks to be used for uniqueness of `TaskSetManager` name instead of just `stageId`. **Current TaskSetManager Name** : `var name = "TaskSet_" + taskSet.stageId.toString` **Sample**: TaskSet_0 **Proposed TaskSetManager Name** : `val name = "TaskSet_" + taskSet.Id ` `// taskSet.Id = (stageId + "." + stageAttemptId)` **Sample** : TaskSet_0.0 Added new Unit Test. Author: erenavsarogullari <[email protected]> Closes apache#15463 from erenavsarogullari/SPARK-17894.
`TaskSetManager` should have unique name to avoid adding duplicate ones to parent `Pool` via `SchedulableBuilder`. This problem has been surfaced with following discussion: [[PR: Avoid adding duplicate schedulables]](apache#15326) **Proposal** : There is 1x1 relationship between `stageAttemptId` and `TaskSetManager` so `taskSet.Id` covering both `stageId` and `stageAttemptId` looks to be used for uniqueness of `TaskSetManager` name instead of just `stageId`. **Current TaskSetManager Name** : `var name = "TaskSet_" + taskSet.stageId.toString` **Sample**: TaskSet_0 **Proposed TaskSetManager Name** : `val name = "TaskSet_" + taskSet.Id ` `// taskSet.Id = (stageId + "." + stageAttemptId)` **Sample** : TaskSet_0.0 Added new Unit Test. Author: erenavsarogullari <[email protected]> Closes apache#15463 from erenavsarogullari/SPARK-17894.
What changes were proposed in this pull request?
TaskSetManagershould have unique name to avoid adding duplicate ones to parentPoolviaSchedulableBuilder. This problem has been surfaced with following discussion: [PR: Avoid adding duplicate schedulables]Proposal :
There is 1x1 relationship between
stageAttemptIdandTaskSetManagersotaskSet.Idcovering bothstageIdandstageAttemptIdlooks to be used for uniqueness ofTaskSetManagername instead of juststageId.Current TaskSetManager Name :
var name = "TaskSet_" + taskSet.stageId.toStringSample: TaskSet_0
Proposed TaskSetManager Name :
val name = "TaskSet_" + taskSet.Id// taskSet.Id = (stageId + "." + stageAttemptId)Sample : TaskSet_0.0
How was this patch tested?
Added new Unit Test.