You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/12/09 13:07:43 UTC
[GitHub] [spark] srowen commented on a change in pull request #30658: [SPARK-22769] Do not log rpc post message error when sparkEnv is already stopped
srowen commented on a change in pull request #30658:
URL: https://github.com/apache/spark/pull/30658#discussion_r539291068
##########
File path: core/src/main/scala/org/apache/spark/rpc/netty/Dispatcher.scala
##########
@@ -147,13 +147,15 @@ private[netty] class Dispatcher(nettyEnv: NettyRpcEnv, numUsableCores: Int) exte
/** Posts a one-way message. */
def postOneWayMessage(message: RequestMessage): Unit = {
postMessage(message.receiver.name, OneWayMessage(message.senderAddress, message.content),
- (e) => e match {
+ {
// SPARK-31922: in local cluster mode, there's always a RpcEnvStoppedException when
// stop is called due to some asynchronous message handling. We catch the exception
// and log it at debug level to avoid verbose error message when user stop a local
// cluster in spark shell.
case re: RpcEnvStoppedException => logDebug(s"Message $message dropped. ${re.getMessage}")
- case _ => throw e
+ case e if SparkEnv.get.isStopped =>
+ logDebug(s"Message $message dropped due to sparkEnv is stopped. ${e.getMessage}")
Review comment:
I might log this as a warning at least, but looks OK otherwise
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org