Skip to content

Commit

Permalink
Remove duplicate RegisterReceiver message
Browse files Browse the repository at this point in the history
  - The ReceiverTracker receivers `RegisterReceiver` messages two times
     1) When the actor at `ReceiverSupervisorImpl`'s preStart is invoked
     2) After the receiver is started at the executor `onReceiverStart()` at `ReceiverSupervisorImpl`

Though, RegisterReceiver message uses the same streamId and the receiverInfo gets updated everytime
the message is processed at the `ReceiverTracker`, it makes sense to call register receiver only after the
receiver is started.
  • Loading branch information
ilayaperumalg committed Dec 9, 2014
1 parent 61f1a70 commit 634abde
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@ private[streaming] class ReceiverSupervisorImpl(
/** Akka actor for receiving messages from the ReceiverTracker in the driver */
private val actor = env.actorSystem.actorOf(
Props(new Actor {
override def preStart() {
logInfo("Registered receiver " + streamId)
val msg = RegisterReceiver(
streamId, receiver.getClass.getSimpleName, Utils.localHostName(), self)
val future = trackerActor.ask(msg)(askTimeout)
Await.result(future, askTimeout)
}

override def receive() = {
case StopReceiver =>
Expand Down

0 comments on commit 634abde

Please sign in to comment.