Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16686#discussion_r97629645
  
    --- Diff: 
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaProvider.scala
 ---
    @@ -28,19 +28,27 @@ import 
org.apache.kafka.common.serialization.ByteArrayDeserializer
     import org.apache.spark.internal.Logging
     import org.apache.spark.sql.SQLContext
     import org.apache.spark.sql.execution.streaming.Source
    -import org.apache.spark.sql.kafka010.KafkaSource._
    -import org.apache.spark.sql.sources.{DataSourceRegister, 
StreamSourceProvider}
    +import org.apache.spark.sql.kafka010.KafkaOffsetReader.{AssignStrategy, 
SubscribePatternStrategy, SubscribeStrategy}
    +import org.apache.spark.sql.sources._
     import org.apache.spark.sql.types.StructType
     
     /**
      * The provider class for the [[KafkaSource]]. This provider is designed 
such that it throws
      * IllegalArgumentException when the Kafka Dataset is created, so that it 
can catch
      * missing options even before the query is started.
      */
    -private[kafka010] class KafkaSourceProvider extends StreamSourceProvider
    -  with DataSourceRegister with Logging {
    +private[kafka010] class KafkaProvider extends DataSourceRegister with 
StreamSourceProvider
    +  with RelationProvider with Logging {
    +  import KafkaProvider._
     
    -  import KafkaSourceProvider._
    +  // Used to check parameters for different source modes
    +  private sealed trait Mode
    --- End diff --
    
    nit: could you move these classes and `deserClassName` to `object 
KafkaProvider`?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to