Skip to content

Commit dc36542

Browse files
tgravescscloud-fan
authored andcommitted
[SPARK-22653] executorAddress registered in CoarseGrainedSchedulerBac…
https://issues.apache.org/jira/browse/SPARK-22653 executorRef.address can be null, pass the executorAddress which accounts for it being null a few lines above the fix. Manually tested this patch. You can reproduce the issue by running a simple spark-shell in yarn client mode with dynamic allocation and request some executors up front. Let those executors idle timeout. Get a heap dump. Without this fix, you will see that addressToExecutorId still contains the ids, with the fix addressToExecutorId is properly cleaned up. Author: Thomas Graves <[email protected]> Closes #19850 from tgravescs/SPARK-22653.
1 parent 7da1f57 commit dc36542

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class CoarseGrainedSchedulerBackend(scheduler: TaskSchedulerImpl, val rpcEnv: Rp
182182
addressToExecutorId(executorAddress) = executorId
183183
totalCoreCount.addAndGet(cores)
184184
totalRegisteredExecutors.addAndGet(1)
185-
val data = new ExecutorData(executorRef, executorRef.address, hostname,
185+
val data = new ExecutorData(executorRef, executorAddress, hostname,
186186
cores, cores, logUrls)
187187
// This must be synchronized because variables mutated
188188
// in this block are read when requesting executors

0 commit comments

Comments
 (0)