Wpis z mikrobloga

#spark #scala #programowanie

Nie działa mi 1 przykład z dokumentacji sparka: https://spark.apache.org/docs/latest/structured-streaming-kafka-integration.html

val df = spark
.readStream
.format("kafka")
.option("kafka.bootstrap.servers", "host1:port1,host2:port2")
.option("subscribe", "topic1")
.load()
df.selectExpr("CAST(key AS STRING)", "CAST(value AS STRING)")
.as[(String, String)]

podkreśla ostatnią linijkę "unable to find encoder (String, String)". An implicit encoder is needed to store (String, String) instances in Dataset
  • 1
  • Odpowiedz
  • Otrzymuj powiadomienia
    o nowych komentarzach