Skip to content

Commit 01adf45

Browse files
ilayaperumalgtdas
authored andcommitted
[SPARK-4802] [streaming] Remove receiverInfo once receiver is de-registered
Once the streaming receiver is de-registered at executor, the `ReceiverTrackerActor` needs to remove the corresponding reveiverInfo from the `receiverInfo` map at `ReceiverTracker`. Author: Ilayaperumal Gopinathan <[email protected]> Closes #3647 from ilayaperumalg/receiverInfo-RTracker and squashes the following commits: 6eb97d5 [Ilayaperumal Gopinathan] Polishing based on the review 3640c86 [Ilayaperumal Gopinathan] Remove receiverInfo once receiver is de-registered (cherry picked from commit 10d69e9) Signed-off-by: Tathagata Das <[email protected]>
1 parent 6a46cc3 commit 01adf45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

streaming/src/main/scala/org/apache/spark/streaming/scheduler/ReceiverTracker.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ class ReceiverTracker(ssc: StreamingContext, skipReceiverLaunch: Boolean = false
150150
logWarning("No prior receiver info")
151151
ReceiverInfo(streamId, "", null, false, "", lastErrorMessage = message, lastError = error)
152152
}
153-
receiverInfo(streamId) = newReceiverInfo
154-
listenerBus.post(StreamingListenerReceiverStopped(receiverInfo(streamId)))
153+
receiverInfo -= streamId
154+
listenerBus.post(StreamingListenerReceiverStopped(newReceiverInfo))
155155
val messageWithError = if (error != null && !error.isEmpty) {
156156
s"$message - $error"
157157
} else {

0 commit comments

Comments
 (0)