Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/247#discussion_r11228531
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/dstream/NetworkInputDStream.scala
---
@@ -124,84 +143,109 @@ abstract class NetworkReceiver[T: ClassTag]()
extends Serializable with Logging
receivingThread
// Call user-defined onStart()
+ logInfo("Calling onStart")
onStart()
+
+ // Wait until interrupt is called on this thread
+ while(true) Thread.sleep(100000)
--- End diff --
I'm a little confused here about whether the receiver `onStart` is supposed
to block forever or if it's supposed to exit int he normal case. It would be
good to add documentation to make it clear whether this represents an error
case or a normal case.
Also, instead of busy waiting why not sleep on a condition varaible here?
---
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.
---