Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/15618#discussion_r85663898
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/scheduler/ReceiverTracker.scala
---
@@ -154,6 +147,17 @@ class ReceiverTracker(ssc: StreamingContext,
skipReceiverLaunch: Boolean = false
throw new SparkException("ReceiverTracker already started")
}
+ if (receivedBlockTracker == null) {
--- End diff --
It looks like this is meant to be restartable, in that it will allow a
stopped tracker to call `start()` again. If that's the case, then
`receivedBlockTracker` needs to be nulled in `stop()`, and then this check
isn't needed I think because it should really be null. In fact if you like you
can require that it's null, and that endpoint is null, in `start()`?
But then ... I think this method needs to throw an exception also if
`isTrackerStopping` at the start. It won't observe the intermediate state
because of syncrhonization, but it could be left in this state if stopping
failed.
I am wary of going too far down a path of fixing or changing the corner
cases here. I do agree that there's a legitimate mismatch between where the
tracker is initialized and stopped, and I think the changes you made and that
possibly the ones I mention here together improve the situation without
complicating it further.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]