Uh oh!
There was an error while loading. Please reload this page.
[SPARK-24560][CORE][MESOS] Fix some getTimeAsMs as getTimeAsSeconds - #21567
[SPARK-24560][CORE][MESOS] Fix some getTimeAsMs as getTimeAsSeconds#21567xueyumusic wants to merge 5 commits into
Conversation
| private[this] val killPollingIntervalMs: Long = | ||
| conf.getTimeAsMs("spark.task.reaper.pollingInterval", "10s") | ||
| conf.getTimeAsSeconds("spark.task.reaper.pollingInterval", "10s") * 1000L |
maropu
commented
Jun 15, 2018
Can you add tests in |
| /** How long to wait before killing the python worker if a task cannot be interrupted. */ | ||
| private val taskKillTimeout = env.conf.getTimeAsMs("spark.python.task.killTimeout", "2s") | ||
| private val taskKillTimeout = env.conf.getTimeAsSeconds("spark.python.task.killTimeout", "2s") * 1000L |
There was a problem hiding this comment.
Nit: Probably, we'd be better to add Ms in the suffix, => taskKillTimeoutMs
xueyumusic
commented
Jun 15, 2018
I have made some modification, @maropu please review the code, thanks |
ueshin
commented
Jun 16, 2018
ok to test. |
SparkQA
commented
Jun 16, 2018
Test build #91959 has finished for PR 21567 at commit
|
maropu
commented
Jun 16, 2018
cc @jiangxb1987 |
maropu
commented
Jun 16, 2018
@xueyumusic Can you fix the error first? |
SparkQA
commented
Jun 16, 2018
Test build #91964 has finished for PR 21567 at commit
|
maropu
commented
Jun 16, 2018
retest this please |
SparkQA
commented
Jun 16, 2018
Test build #91971 has finished for PR 21567 at commit
|
SparkQA
commented
Jun 17, 2018
Test build #91984 has started for PR 21567 at commit |
maropu
commented
Jun 18, 2018
retest this please |
SparkQA
commented
Jun 18, 2018
Test build #92008 has finished for PR 21567 at commit
|
| /** How long to wait before killing the python worker if a task cannot be interrupted. */ | ||
| private val taskKillTimeout = env.conf.getTimeAsMs("spark.python.task.killTimeout", "2s") | ||
| private val taskKillTimeoutMs = env.conf.getTimeAsSeconds("spark.python.task.killTimeout", |
There was a problem hiding this comment.
The conf is not documented, but I think it's designed to accept values like 1.5s
cc @zsxwing
| // Timeout to wait for when trying to terminate a driver. | ||
| private val DRIVER_TERMINATE_TIMEOUT_MS = | ||
| conf.getTimeAsMs("spark.worker.driverTerminateTimeout", "10s") | ||
| conf.getTimeAsSeconds("spark.worker.driverTerminateTimeout", "10s").seconds.toMillis |
| private[this] val killPollingIntervalMs: Long = | ||
| conf.getTimeAsMs("spark.task.reaper.pollingInterval", "10s") | ||
| conf.getTimeAsSeconds("spark.task.reaper.pollingInterval", "10s").seconds.toMillis |
There was a problem hiding this comment.
Actually I believe this is change things from right to wrong. If you want to use a second value then you shall use sth like 1s.
| // Update period of progress bar, in milliseconds | ||
| private val updatePeriodMSec = | ||
| sc.getConf.getTimeAsMs("spark.ui.consoleProgress.update.interval", "200") | ||
| sc.getConf.getTimeAsMs("spark.ui.consoleProgress.update.interval", "200ms") |
There was a problem hiding this comment.
We shall document this config.
jiangxb1987
commented
Jun 19, 2018
Overall I don't think the current logic shall be modified. However, it shall be useful to document some the configs mentioned in this PR. |
xueyumusic
commented
Jun 20, 2018
I see, thanks for your review and guidance, @jiangxb1987@maropu , I will try to add related config to doc and close this PR, thank you |
What changes were proposed in this pull request?
This PR replaces some "getTimeAsMs" with "getTimeAsSeconds". This will return a wrong value when the user specifies a value without a time unit.
How was this patch tested?
manual test
Please review http://spark.apache.org/contributing.html before opening a pull request.