You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/04/02 05:32:36 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #24270: [MINOR][KAFKA][SQL]Avoid hadcoded for kafka-0-10-sql

dongjoon-hyun commented on a change in pull request #24270: [MINOR][KAFKA][SQL]Avoid hadcoded for kafka-0-10-sql
URL: https://github.com/apache/spark/pull/24270#discussion_r271138831
 
 

 ##########
 File path: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaSourceProvider.scala
 ##########
 @@ -457,10 +457,14 @@ private[kafka010] class KafkaSourceProvider extends DataSourceRegister
 
 private[kafka010] object KafkaSourceProvider extends Logging {
   private val STRATEGY_OPTION_KEYS = Set("subscribe", "subscribepattern", "assign")
+  private val ASSIGN = "assign"
+  private val SUBSCRIBEPATTERN = "subscribepattern"
+  private val SUBSCRIBE = "subscribe"
 
 Review comment:
   If we have all individual values, we can change `STRATEGY_OPTION_KEYS` together, can't we?
   ```
   - private val STRATEGY_OPTION_KEYS = Set("subscribe", "subscribepattern", "assign")
   + private val STRATEGY_OPTION_KEYS = Set(SUBSCRIBE, SUBSCRIBEPATTERN, ASSIGN)
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org