[SPARK-26463][CORE] Use ConfigEntry for hardcoded configs for scheduler categories.#23416
[SPARK-26463][CORE] Use ConfigEntry for hardcoded configs for scheduler categories.#23416kiszk wants to merge 19 commits intoapache:masterfrom
Conversation
|
Test build #100568 has finished for PR 23416 at commit
|
|
Test build #100569 has finished for PR 23416 at commit
|
|
Test build #100576 has finished for PR 23416 at commit
|
|
Test build #100581 has finished for PR 23416 at commit
|
|
Test build #100578 has finished for PR 23416 at commit
|
|
Test build #100583 has finished for PR 23416 at commit
|
|
retest this please |
There was a problem hiding this comment.
I feels that SPECULATION_ENABLED is better than SPECULATION.
|
Test build #100589 has finished for PR 23416 at commit
|
There was a problem hiding this comment.
MAX_TASK_MAX_DIRECT_RESULT_SIZE -> MAX_TASK_DIRECT_RESULT_SIZE?
vanzin
left a comment
There was a problem hiding this comment.
Seems like we could also have a new Scheduler object with the settings you're adding?
There was a problem hiding this comment.
Could you add a new Network.scala for these? If there are any existing network settings in this file you could also move them over.
There was a problem hiding this comment.
I see. I will create Network.scala
|
Test build #100836 has finished for PR 23416 at commit
|
There was a problem hiding this comment.
This seems to be convervative movements.
|
Test build #100841 has finished for PR 23416 at commit
|
There was a problem hiding this comment.
fallbackConf(DYN_ALLOCATION_SCHEDULER_BACKLOG_TIMEOUT)? Otherwise seems like the behavior will change in ExecutorAllocationManager.
There was a problem hiding this comment.
Shall we use config. prefix here instead of import config._ just for these?
There was a problem hiding this comment.
ditto. and some more in this file.
There was a problem hiding this comment.
ditto. and some more in this file.
|
Test build #101045 has finished for PR 23416 at commit
|
|
Retest this please |
|
Test build #101062 has finished for PR 23416 at commit
|
|
Retest this please. |
There was a problem hiding this comment.
Here requires #23447 to set default value in Network.scala.
|
Test build #101072 has finished for PR 23416 at commit
|
|
Test build #101070 has finished for PR 23416 at commit
|
|
Test build #101118 has finished for PR 23416 at commit
|
|
Test build #101119 has finished for PR 23416 at commit
|
…/speculation/cleaner categories
|
Test build #101431 has finished for PR 23416 at commit
|
|
Test build #101432 has finished for PR 23416 at commit
|
|
Retest this please. |
|
Test build #101438 has finished for PR 23416 at commit
|
srowen
left a comment
There was a problem hiding this comment.
A few more questions but this is looking good. I appreciate all the work to finish out this important refactoring.
| private[spark] object TaskSchedulerImpl { | ||
|
|
||
| val SCHEDULER_MODE_PROPERTY = "spark.scheduler.mode" | ||
| val SCHEDULER_MODE_PROPERTY = SCHEDULER_MODE.key |
There was a problem hiding this comment.
I think this becomes unused after your change on line 135?
There was a problem hiding this comment.
Unfortunally, this is still used in two files.
|
|
||
| protected override val minRegisteredRatio = | ||
| if (conf.getOption("spark.scheduler.minRegisteredResourcesRatio").isEmpty) { | ||
| if (conf.get(SCHEDULER_MIN_REGISTERED_RESOURCES_RATIO).isEmpty) { |
There was a problem hiding this comment.
Because this is very interesting code that does not use it value even if SCHEDULER_MIN_REGISTERED_RESOURCES_RATIO is declared, we cannot use getOrElse. I am not sure why it is.
This code just checks whether SCHEDULER_MIN_REGISTERED_RESOURCES_RATIO is declared or not.
| // is equal to at least this value, that is double between 0 and 1. | ||
| private val _minRegisteredRatio = | ||
| math.min(1, conf.getDouble("spark.scheduler.minRegisteredResourcesRatio", 0)) | ||
| math.min(1, conf.get(SCHEDULER_MIN_REGISTERED_RESOURCES_RATIO).getOrElse(0.0)) |
There was a problem hiding this comment.
Can this prop just have a default value of 0 where it's declared?
There was a problem hiding this comment.
We cannot have a defalut value 0 where it is declared due to the interesting code at KubernetesClusterSchedulerBackend.scala.
We need to know SCHEDULER_MIN_REGISTERED_RESOURCES_RATIO is declared or not.
|
|
||
| test("cluster mode, FIFO scheduler") { | ||
| val conf = new SparkConf().set("spark.scheduler.mode", "FIFO") | ||
| val conf = new SparkConf().set(SCHEDULER_MODE, "FIFO") |
There was a problem hiding this comment.
Do you want to use SchedulingMode.FIFO.toString in cases like this? no big deal, it doesn't matter much
| newConf.set("spark.rpc.message.maxSize", "1") | ||
| newConf.set("spark.rpc.askTimeout", "1") // Fail fast | ||
| newConf.set(RPC_MESSAGE_MAX_SIZE, 1) | ||
| newConf.set(RPC_ASK_TIMEOUT, "1") // Fail fast |
There was a problem hiding this comment.
In cases like this can you set the value to 1 instead of a string?
|
Test build #101447 has finished for PR 23416 at commit
|
|
OK, the rest looks OK to me. Merging to master |
…er categories. ## What changes were proposed in this pull request? The PR makes hardcoded `spark.dynamicAllocation`, `spark.scheduler`, `spark.rpc`, `spark.task`, `spark.speculation`, and `spark.cleaner` configs to use `ConfigEntry`. ## How was this patch tested? Existing tests Closes apache#23416 from kiszk/SPARK-26463. Authored-by: Kazuaki Ishizaki <ishizaki@jp.ibm.com> Signed-off-by: Sean Owen <sean.owen@databricks.com>
What changes were proposed in this pull request?
The PR makes hardcoded
spark.dynamicAllocation,spark.scheduler,spark.rpc,spark.task,spark.speculation, andspark.cleanerconfigs to useConfigEntry.How was this patch tested?
Existing tests