Skip to content

Commit 56fd34a

Browse files
zsxwingJoshRosen
authored andcommitted
[SPARK-3741] Add afterExecute for handleConnectExecutor
Sorry. I found that I forgot to add `afterExecute` for `handleConnectExecutor` in #2593. Author: zsxwing <[email protected]> Closes #2794 from zsxwing/SPARK-3741 and squashes the following commits: a0bc4dd [zsxwing] Add afterExecute for handleConnectExecutor
1 parent e7f4ea8 commit 56fd34a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

core/src/main/scala/org/apache/spark/network/nio/ConnectionManager.scala

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,16 @@ private[nio] class ConnectionManager(
117117
conf.getInt("spark.core.connection.connect.threads.max", 8),
118118
conf.getInt("spark.core.connection.connect.threads.keepalive", 60), TimeUnit.SECONDS,
119119
new LinkedBlockingDeque[Runnable](),
120-
Utils.namedThreadFactory("handle-connect-executor"))
120+
Utils.namedThreadFactory("handle-connect-executor")) {
121+
122+
override def afterExecute(r: Runnable, t: Throwable): Unit = {
123+
super.afterExecute(r, t)
124+
if (t != null && NonFatal(t)) {
125+
logError("Error in handleConnectExecutor is not handled properly", t)
126+
}
127+
}
128+
129+
}
121130

122131
private val serverChannel = ServerSocketChannel.open()
123132
// used to track the SendingConnections waiting to do SASL negotiation

0 commit comments

Comments
 (0)