Skip to content

Commit 5f1ebb9

Browse files
TaskSetManager and spark.locality.wait
1 parent e9674a1 commit 5f1ebb9

File tree

3 files changed

+257
-303
lines changed

3 files changed

+257
-303
lines changed

docs/configuration-properties.md

+47-20
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,53 @@ A comma-separated list of directory paths for "scratch" space (a temporary stora
250250

251251
Default: `java.io.tmpdir` System property
252252

253+
## <span id="spark.locality.wait"><span id="LOCALITY_WAIT"> spark.locality.wait
254+
255+
How long to wait until an executor is available for locality-aware delay scheduling (for `PROCESS_LOCAL`, `NODE_LOCAL`, and `RACK_LOCAL` [TaskLocalities](scheduler/TaskSchedulerImpl.md#TaskLocality)) unless locality-specific setting is set (i.e., [spark.locality.wait.process](#spark.locality.wait.process), [spark.locality.wait.node](#spark.locality.wait.node), and [spark.locality.wait.rack](#spark.locality.wait.rack), respectively)
256+
257+
Default: `3s`
258+
259+
## <span id="spark.locality.wait.legacyResetOnTaskLaunch"><span id="LEGACY_LOCALITY_WAIT_RESET"> spark.locality.wait.legacyResetOnTaskLaunch
260+
261+
**(internal)** Whether to use the legacy behavior of locality wait, which resets the delay timer anytime a task is scheduled.
262+
263+
Default: `false`
264+
265+
Used when:
266+
267+
* `TaskSchedulerImpl` is [created](scheduler/TaskSchedulerImpl.md#legacyLocalityWaitReset)
268+
* `TaskSetManager` is [created](scheduler/TaskSetManager.md#legacyLocalityWaitReset)
269+
270+
## <span id="spark.locality.wait.node"><span id="LOCALITY_WAIT_NODE"> spark.locality.wait.node
271+
272+
Scheduling delay for [TaskLocality.NODE_LOCAL](scheduler/TaskSchedulerImpl.md#TaskLocality)
273+
274+
Default: [spark.locality.wait](#spark.locality.wait)
275+
276+
Used when:
277+
278+
* `TaskSetManager` is requested for the [locality wait](scheduler/TaskSetManager.md#getLocalityWait) (of `TaskLocality.NODE_LOCAL`)
279+
280+
## <span id="spark.locality.wait.process"><span id="LOCALITY_WAIT_PROCESS"> spark.locality.wait.process
281+
282+
Scheduling delay for [TaskLocality.PROCESS_LOCAL](scheduler/TaskSchedulerImpl.md#TaskLocality)
283+
284+
Default: [spark.locality.wait](#spark.locality.wait)
285+
286+
Used when:
287+
288+
* `TaskSetManager` is requested for the [locality wait](scheduler/TaskSetManager.md#getLocalityWait) (of `TaskLocality.PROCESS_LOCAL`)
289+
290+
## <span id="spark.locality.wait.rack"><span id="LOCALITY_WAIT_RACK"> spark.locality.wait.rack
291+
292+
Scheduling delay for [TaskLocality.RACK_LOCAL](scheduler/TaskSchedulerImpl.md#TaskLocality)
293+
294+
Default: [spark.locality.wait](#spark.locality.wait)
295+
296+
Used when:
297+
298+
* `TaskSetManager` is requested for the [locality wait](scheduler/TaskSetManager.md#getLocalityWait) (of `TaskLocality.RACK_LOCAL`)
299+
253300
## <span id="spark.logConf"> spark.logConf
254301

255302
Default: `false`
@@ -789,26 +836,6 @@ a| [[spark.launcher.port]]
789836
| spark.launcher.secret
790837
a| [[spark.launcher.secret]]
791838

792-
| spark.locality.wait
793-
a| [[spark.locality.wait]] For locality-aware delay scheduling for `PROCESS_LOCAL`, `NODE_LOCAL`, and `RACK_LOCAL` scheduler:TaskSchedulerImpl.md#TaskLocality[TaskLocalities] when locality-specific setting is not set.
794-
795-
Default: `3s`
796-
797-
| spark.locality.wait.node
798-
a| [[spark.locality.wait.node]] Scheduling delay for `NODE_LOCAL` scheduler:TaskSchedulerImpl.md#TaskLocality[TaskLocality]
799-
800-
Default: The value of <<spark.locality.wait, spark.locality.wait>>
801-
802-
| spark.locality.wait.process
803-
a| [[spark.locality.wait.process]] Scheduling delay for `PROCESS_LOCAL` scheduler:TaskSchedulerImpl.md#TaskLocality[TaskLocality]
804-
805-
Default: The value of <<spark.locality.wait, spark.locality.wait>>
806-
807-
| spark.locality.wait.rack
808-
a| [[spark.locality.wait.rack]] Scheduling delay for `RACK_LOCAL` scheduler:TaskSchedulerImpl.md#TaskLocality[TaskLocality]
809-
810-
Default: The value of <<spark.locality.wait, spark.locality.wait>>
811-
812839
| spark.logging.exceptionPrintInterval
813840
a| [[spark.logging.exceptionPrintInterval]] How frequently to reprint duplicate exceptions in full (in millis).
814841

docs/scheduler/TaskSchedulerImpl.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -384,11 +384,13 @@ createTaskSetManager(
384384
maxTaskFailures: Int): TaskSetManager
385385
```
386386

387-
`createTaskSetManager` creates a [TaskSetManager](TaskSetManager.md).
387+
`createTaskSetManager` creates a [TaskSetManager](TaskSetManager.md) (with this `TaskSchedulerImpl`, the given [TaskSet](TaskSet.md) and the `maxTaskFailures`).
388+
389+
---
388390

389391
`createTaskSetManager` is used when:
390392

391-
* `TaskSchedulerImpl` is requested to [submits tasks](#submitTasks)
393+
* `TaskSchedulerImpl` is requested to [submit a TaskSet](#submitTasks)
392394

393395
## <span id="handleFailedTask"> Notifying TaskSetManager that Task Failed
394396

0 commit comments

Comments
 (0)