Skip to content

Commit

Permalink
[SPARK-35404][CORE] Name the timers in TaskSchedulerImpl
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

make these threads easier to identify in thread dumps

### Why are the changes needed?

make these threads easier to identify in thread dumps

### Does this PR introduce _any_ user-facing change?

yes. Driver thread dumps will show the timers with pretty names

### How was this patch tested?

verified locally

Closes apache#32549 from yaooqinn/SPARK-35404.

Authored-by: Kent Yao <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
  • Loading branch information
yaooqinn authored and HyukjinKwon committed May 14, 2021
1 parent 6218bc5 commit 68239d1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private[spark] class TaskSchedulerImpl(

@volatile private var hasReceivedTask = false
@volatile private var hasLaunchedTask = false
private val starvationTimer = new Timer(true)
private val starvationTimer = new Timer("task-starvation-timer", true)

// Incrementing task IDs
val nextTaskId = new AtomicLong(0)
Expand All @@ -152,7 +152,7 @@ private[spark] class TaskSchedulerImpl(

protected val executorIdToHost = new HashMap[String, String]

private val abortTimer = new Timer(true)
private val abortTimer = new Timer("task-abort-timer", true)
// Exposed for testing
val unschedulableTaskSetToExpiryTime = new HashMap[TaskSetManager, Long]

Expand Down

0 comments on commit 68239d1

Please sign in to comment.