0

I am new to Apache Kudu, I installed it on my Ubuntu system and later created a table in it using Apache Spark shell. Now I am trying to insert data into that table using insertRows() for that I am using the but below given command,

kuduContext.insertRows(customersDF, "spark_kudu_tbl")

Where customersDF is a Data Frame and spark_kudu_tbl is a table in the Kudu data base. I am getting below error,

java.lang.NoSuchMethodError: org.apache.kudu.spark.kudu.KuduContext.insertRows(Lorg/apache/spark/sql/Dataset;Ljava/lang/String;)V

... 70 elided

I have tried different options but no one is giving results to me. Can any one give any solution for my question.

Pavan Kumar
  • 205
  • 1
  • 14

1 Answers1

1

From the error message it appears as though you are using wrong kudu-spark artifact, you should use kudu-spark2_2. please start your spark-shell as below (replace the last bit with your kudu version)

spark-shell --packages org.apache.kudu:kudu-spark2_2.11:1.3.0
Adam
  • 4,445
  • 1
  • 31
  • 49
Aashrith
  • 11
  • 1
  • Totally agreed, this seems a clear problem of artifact version mismatch. Pavan Kumar, please try compatible version of spark and kudu-spark artifact. – ramanKC Jan 29 '20 at 08:17