File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
main/scala/org/apache/spark/rpc
test/scala/org/apache/spark/rpc/netty Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,8 @@ private[spark] trait RpcEndpoint {
116116 }
117117
118118 /**
119- * Invoked when [[RpcEndpoint ]] is stopping.
119+ * Invoked when [[RpcEndpoint ]] is stopping. `self` will be `null` in this method and you cannot
120+ * use it to send or ask messages.
120121 */
121122 def onStop (): Unit = {
122123 // By default, do nothing.
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ private[netty] class Inbox(
178178 }
179179 }
180180 if (dropped) {
181- onDrop()
181+ onDrop(message )
182182 }
183183 }
184184
@@ -197,7 +197,7 @@ private[netty] class Inbox(
197197 }
198198
199199 // Visible for testing.
200- protected def onDrop (message : Any ): Unit = {
200+ protected def onDrop (message : InboxMessage ): Unit = {
201201 logWarning(s " Drop ${message} because $endpointRef is stopped " )
202202 }
203203
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ class InboxSuite extends SparkFunSuite {
7272
7373 val numDroppedMessages = new AtomicInteger (0 )
7474 val inbox = new Inbox (endpointRef, endpoint) {
75- override def onDrop (message : Any ): Unit = {
75+ override def onDrop (message : InboxMessage ): Unit = {
7676 numDroppedMessages.incrementAndGet()
7777 }
7878 }
You can’t perform that action at this time.
0 commit comments