MabelYC commented on a change in pull request #1437:
URL: https://github.com/apache/samza/pull/1437#discussion_r526535509



##########
File path: 
samza-kafka/src/main/scala/org/apache/samza/checkpoint/kafka/KafkaCheckpointManager.scala
##########
@@ -112,6 +115,12 @@ class KafkaCheckpointManager(checkpointSpec: 
KafkaStreamSpec,
     info(s"Starting the checkpoint SystemConsumer from oldest offset 
$oldestOffset")
     systemConsumer.register(checkpointSsp, oldestOffset)
     systemConsumer.start()
+    Runtime.getRuntime.addShutdownHook(new 
Thread("KafkaCheckPointManagerShutdownHook") {
+      override def run(): Unit = {
+        producerRef.get().stop()

Review comment:
       adminClient and producer/consumer are not started at the same time. so I 
think it is better to add different shutdownhook here?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to