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_r241243951
 
 

 ##########
 File path: 
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaSourceProvider.scala
 ##########
 @@ -340,9 +340,19 @@ private[kafka010] class KafkaSourceProvider extends 
DataSourceRegister
     // Validate user-specified Kafka options
 
     if 
(caseInsensitiveParams.contains(s"kafka.${ConsumerConfig.GROUP_ID_CONFIG}")) {
-      throw new IllegalArgumentException(
-        s"Kafka option '${ConsumerConfig.GROUP_ID_CONFIG}' is not supported as 
" +
-          s"user-specified consumer groups are not used to track offsets.")
+      logWarning(
+        s"It is not recommended to set Kafka option 
'kafka.${ConsumerConfig.GROUP_ID_CONFIG}'. " +
 
 Review comment:
   The long string for log message is duplicated 3 times. Could we move this 
and reuse it like `KafkaSourceProvider.INSTRUCTION_FOR_FAIL_ON_DATA_LOSS_FALSE` 
and `KafkaSourceProvider.INSTRUCTION_FOR_FAIL_ON_DATA_LOSS_TRUE`?

----------------------------------------------------------------
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