Kafka has a conflicting dependency with Spark and that's what caused this issue for me.
This is how you can exclude the dependency in you sbt file
lazy val excludeJpountz = ExclusionRule(organization = "net.jpountz.lz4", name = "lz4")
lazy val kafkaClients = "org.apache.kafka" % "kafka-clients" % userKafkaVersionHere excludeAll(excludeJpountz) // add more exclusions here
When you use this kafkaClients
dependency it would now exclude the problematic lz4 library.
Update:
This appears to be an issue with Kafka 0.11.x.x
and earlier version. As of 1.x.x
Kafka seems to have moved away from using the problematic net.jpountz.lz4
library. Therefore, using latest Kafka (1.x) with latest Spark (2.3.x) should not have this issue.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…