Github user boneill42 commented on a diff in the pull request:
https://github.com/apache/spark/pull/15882#discussion_r87868136
--- Diff:
external/kinesis-asl/src/main/scala/org/apache/spark/streaming/kinesis/KinesisRecordProcessor.scala
---
@@ -102,27 +101,29 @@ private[kinesis] class
KinesisRecordProcessor[T](receiver: KinesisReceiver[T], w
* @param checkpointer used to perform a Kinesis checkpoint for
ShutdownReason.TERMINATE
* @param reason for shutdown (ShutdownReason.TERMINATE or
ShutdownReason.ZOMBIE)
*/
- override def shutdown(checkpointer: IRecordProcessorCheckpointer,
reason: ShutdownReason) {
+ override def shutdown(
+ checkpointer: IRecordProcessorCheckpointer,
+ reason: ShutdownReason): Unit = {
logInfo(s"Shutdown: Shutting down workerId $workerId with reason
$reason")
- reason match {
- /*
- * TERMINATE Use Case. Checkpoint.
- * Checkpoint to indicate that all records from the shard have been
drained and processed.
- * It's now OK to read from the new shards that resulted from a
resharding event.
- */
- case ShutdownReason.TERMINATE =>
- receiver.removeCheckpointer(shardId, checkpointer)
+ if (shardId != null) { // null if not initialized before shutdown
--- End diff --
cool. only difference i had in my fix was a LOG message indicating that we
hit this situation. (not sure the log message is actionable, but it is
informative)
---
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]