Uh oh!
There was an error while loading. Please reload this page.
[SPARK-19567][CORE][SCHEDULER] Support some Schedulable variables immutability and access - #16905
[SPARK-19567][CORE][SCHEDULER] Support some Schedulable variables immutability and access#16905erenavsarogullari wants to merge 5 commits into
Conversation
erenavsarogullari
commented
Feb 12, 2017
srowen
left a comment
There was a problem hiding this comment.
I wonder if @squito or @kayousterhout has thoughts on these tweaks? I do like cleaning up and tightening the internal impl if there isn't a downside.
There was a problem hiding this comment.
This should be in a companion object, but really, maybe not worth it.
There was a problem hiding this comment.
Maintaining these messages with the various options is error-prone. Can you just use its .values and print that?
There was a problem hiding this comment.
We're not likely to add or remove SchedulingModes with any frequency, if at all, so this isn't likely to cause much opportunity for error -- but I agree with the principle that extracting from .values is a better approach.
There was a problem hiding this comment.
SchedulingMode possible values are FIFO, FAIR and NONE but NONE is unsupported value. I agree to support for potential values and it can be achieved by adding following logic to SchedulingMode object and can be used required places(2 times here and 1 time at Pool)def getSupportedValuesAsString(): String = values.filter(_ != NONE).mkString(", ") SchedulingMode.getSupportedValuesAsString() // returns FIFO, FAIR
WDYT?
There was a problem hiding this comment.
NONE is only used in tests, and doesn't really need to be used there -- see the commit in my repo that I pointed you to earlier. Technically, removing NONE is a change in the public interface, but the docs say that only FAIR and FIFO are allowed (http://spark.apache.org/docs/latest/job-scheduling.html#configuring-pool-properties), and trying to use NONE will lead you to the "unsupported" failure, so we probably can get rid of it.
There was a problem hiding this comment.
Yep, TaskSetManager also uses NONE to override schedulingMode (from parent Schedulable trait). However, it does not use schedulingMode. I think if NONE is removed, then FIFO will be used as the default value(e.g. TaskManager), right?
There was a problem hiding this comment.
These appear to be pretty much redundant then? if they're just set once to another existing variable's value?
There was a problem hiding this comment.
Pool extends Schedulable trait and needs to override weight. It is also used for taskToWeightRatio calculation at FairSchedulingAlgorithm level.
markhamstra
commented
Feb 13, 2017
@srowen These refactorings of unnecessary vars to vals is something that we've noted in the discussions of a few other PRs as something that could and probably should be done in a separate PR (i.e. this one). @erenavsarogullari There is another such refactoring that can be rolled into this PR. See the changes that I've made to |
There was a problem hiding this comment.
I'd really rather not see this kind of change. Other than the missing string-interpolation s in msg, the prior code was at least as good (and arguably better) than the new style, and making such an inconsequential style change just adds complication to future investigations of the git history.
erenavsarogullari
commented
Feb 14, 2017
Thanks @markhamstra and @srowen for the quick reviews. |
erenavsarogullari
commented
Feb 16, 2017
Hi All, @markhamstra, if it is suitable, i plan to address removing SchedulingMode.NONE via separated PR. In the light of this, the following new added unit test cases(using
WDYT? |
Hi @markhamstra, |
markhamstra
commented
Feb 21, 2017
ok to test |
erenavsarogullari
commented
Feb 21, 2017
Thanks @markhamstra. |
markhamstra
commented
Feb 21, 2017
If Jenkins is listening to me, that should have allowed you to trigger test for this PR. test this please |
erenavsarogullari
commented
Feb 21, 2017
Thanks @markhamstra. I encounter the same problem in my every PR and tech-ops team helps to trigger Jenkins. Problem may be related with Github Jenkins PR Builder plugin. Also it still looks not triggered. |
kayousterhout
commented
Feb 21, 2017
Jenkins test this please |
kayousterhout
commented
Feb 21, 2017
@erenavsarogullari the reason this was happening on past PRs is that Imran and I weren't on the Jenkins whitelist (which neither of us realized -- and has since been fixed). I think Mark is on the whitelist so this is probably a transient issue... we'll see if my triggering works. |
SparkQA
commented
Feb 21, 2017
Test build #73232 has finished for PR 16905 at commit
|
kayousterhout
commented
Feb 21, 2017
@shaneknapp is @markhamstra on the Jenkins whitelist? Wanted to double check since his attempt to trigger the build above didn't work |
shaneknapp
commented
Feb 21, 2017
nope, he's not in the admin list. i'll add him now. |
kayousterhout
commented
Feb 21, 2017
Awesome thanks Shane! |
markhamstra
commented
Feb 21, 2017
Thanks, Shane & Kay! |
erenavsarogullari
commented
Feb 21, 2017
Many thanks @kayousterhout and @markhamstra. |
kayousterhout
commented
Feb 22, 2017
Jenkins this is OK to test |
erenavsarogullari
commented
Feb 22, 2017
Thanks @kayousterhout. However, it still looks not triggered. |
vanzin
commented
Feb 22, 2017
retest this please |
SparkQA
commented
Feb 23, 2017
Test build #73299 has finished for PR 16905 at commit
|
erenavsarogullari
commented
Mar 12, 2017
Hi @markhamstra, @kayousterhout and @squito |
There was a problem hiding this comment.
one quick comment here if Imran didn't already merge: can you un-do these changes to add private? It's not useful / necessary to make test classes private (they're already hidden by the build), and this change will make git blames more confusing in the future.
erenavsarogullari
commented
Mar 15, 2017
Thanks @kayousterhout and @squito for review this ;) |
kayousterhout
commented
Mar 15, 2017
Jenkins test this please |
erenavsarogullari
commented
Mar 15, 2017
Thanks again @kayousterhout and @squito. |
kayousterhout
commented
Mar 15, 2017
Jenkins retest this please |
SparkQA
commented
Mar 16, 2017
Test build #74620 has finished for PR 16905 at commit
|
SparkQA
commented
Mar 16, 2017
Test build #74629 has finished for PR 16905 at commit
|
squito
commented
Mar 16, 2017
reopened https://issues.apache.org/jira/browse/SPARK-7420 for the failure Jenkins, retest this please |
erenavsarogullari
commented
Mar 16, 2017
Thanks again @kayousterhout and @squito ;) |
squito
commented
Mar 16, 2017
@shaneknapp I had to trigger jenkins manually via spark-prs. Every once in a while I encounter a pr for which tests are never triggered via comments. Its pretty rare, so its not a big deal, but I thought I'd point you at this in case you want to take a look. |
SparkQA
commented
Mar 16, 2017
Test build #3600 has finished for PR 16905 at commit
|
SparkQA
commented
Mar 16, 2017
Test build #3601 has finished for PR 16905 at commit
|
erenavsarogullari
commented
Mar 22, 2017
Hi @squito, I think jenkins can be triggered again. Last unrelated build - UT issue looks fixed(https://issues.apache.org/jira/browse/SPARK-19988) Thanks in advance ;) |
kayousterhout
commented
Mar 22, 2017
Jenkins, this is ok to test |
kayousterhout
commented
Mar 22, 2017
Jenkins test this please |
kayousterhout
commented
Mar 23, 2017
Jenkins add to whitelist |
SparkQA
commented
Mar 23, 2017
Test build #75070 has finished for PR 16905 at commit
|
SparkQA
commented
Mar 23, 2017
Test build #75072 has finished for PR 16905 at commit
|
kayousterhout
commented
Mar 24, 2017
LGTM merged into master |
What changes were proposed in this pull request?
Some
SchedulableEntities(PoolandTaskSetManager) variables need refactoring for immutability and access modifiers levels as follows:vartoval(if there is no requirement): This is important to support immutability as much as possible.Pool:weight,minShare,priority,nameandtaskSetSchedulingAlgorithm.vars access needs to be restricted from other parts of codebase to prevent potential side effects.TaskSetManager:tasksSuccessful,totalResultSize,calculatedTasksetc...This PR is related with #15604 and has been created seperatedly to keep patch content as isolated and to help the reviewers.
How was this patch tested?
Added new UTs and existing UT coverage.