HeartSaVioR commented on a change in pull request #23301: 
[SPARK-26350][SS]Allow to override group id of the Kafka consumer
URL: https://github.com/apache/spark/pull/23301#discussion_r242006804
 
 

 ##########
 File path: 
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaMicroBatchReadSupport.scala
 ##########
 @@ -122,7 +123,13 @@ private[kafka010] class KafkaMicroBatchReadSupport(
     // Find deleted partitions, and report data loss if required
     val deletedPartitions = 
startPartitionOffsets.keySet.diff(endPartitionOffsets.keySet)
     if (deletedPartitions.nonEmpty) {
-      reportDataLoss(s"$deletedPartitions are gone. Some data may have been 
missed")
+      val message =
+        if 
(kafkaOffsetReader.driverKafkaParams.containsKey(ConsumerConfig.GROUP_ID_CONFIG))
 {
+          s"$deletedPartitions are gone. " + 
KafkaSourceProvider.CUSTOM_GROUP_ID_ERROR_MESSAGE
 
 Review comment:
   Personally either is fine for me (use `+` or string interpolation), but in 
this case it might be better for error message to be added to former string 
since former strong is already using string interpolation.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to