Why does format(“kafka”) fail with “Failed to find data source: kafka.” (even with uber-jar)?

前端 未结 6 1581
难免孤独
难免孤独 2020-11-30 10:23

I use HDP-2.6.3.0 with Spark2 package 2.2.0.

I\'m trying to write a Kafka consumer, using the Structured Streaming API, but I\'m getting the following error after su

6条回答
  •  难免孤独
    2020-11-30 10:45

    The top answer is correct this solved the issue for me:

    assemblyMergeStrategy in assembly := {
      case "reference.conf" => MergeStrategy.concat
      case "META-INF/services/org.apache.spark.sql.sources.DataSourceRegister" => MergeStrategy.concat
      case PathList("META-INF", xs@_*) => MergeStrategy.discard
      case _ => MergeStrategy.first
    }
    

提交回复
热议问题