Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/6348#discussion_r30935261
--- Diff:
extras/kinesis-asl/src/main/scala/org/apache/spark/streaming/kinesis/KinesisReceiver.scala
---
@@ -126,8 +131,19 @@ private[kinesis] class KinesisReceiver(
}
worker = new Worker(recordProcessorFactory,
kinesisClientLibConfiguration)
- worker.run()
-
+ workerThread = new Thread() {
+ override def run(): Unit = {
+ try {
+ worker.run()
+ } catch {
+ case NonFatal(e) =>
+ restart("Error running the KCL worker in Receiver", e)
--- End diff --
Knowing nothing about Kinesis. Just a small question: if we call
`worker.run` twice, what will happen? I'm not sure if `worker` is reusable.
---
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]