AbstractMethodError creating Kafka stream

前端 未结 3 669
失恋的感觉
失恋的感觉 2021-02-07 07:17

I\'m trying to open a Kafka (tried versions 0.11.0.2 and 1.0.1) stream using createDirectStream method and getting this AbstractMethodError error:

E         


        
相关标签:
3条回答
  • 2021-02-07 07:33

    I had the same exception, in my case I created the application jar with dependency to spark-streaming-kafka-0-10_2.11 of version 2.1.0, while trying to deploy to Spark 2.3.0 cluster.

    0 讨论(0)
  • 2021-02-07 07:38

    I recieved same error. I set my dependencies same version as my spark interpreter is

    %spark2.dep
    z.reset()
    z.addRepo("MavenCentral").url("https://mvnrepository.com/")
    
    z.load("org.apache.spark:spark-streaming-kafka-0-10_2.11:2.3.0")
    z.load("org.apache.kafka:kafka-clients:2.3.0")
    
    0 讨论(0)
  • 2021-02-07 07:44

    Turns out I was using Spark 2.3 and I should've been using Spark 2.2. Apparently that method was made abstract in the later version so I was getting that error.

    0 讨论(0)
提交回复
热议问题