I am trying to save a json file to Elasticsearch, I am getting this error (Exception in thread "main" java.lang.AbstractMethodError) I am using "spark 2.3.0" and "scala 2.11.6" please find the code Below:
//
import org.apache.spark.sql.SQLContext
import org.elasticsearch.spark.sql._
import org.apache.spark.{SparkConf, SparkContext}
object OrangetoES {
def main(args: Array[String]) {
val conf = new SparkConf().setAppName("OrangetoES").setMaster("local[*]")
val sc = new SparkContext(conf)
conf.set("es.index.auto.create", "true")
val sqlc = new SQLContext(sc)
val df = sqlc.read.json("../Orange.json")
df.saveToEs("orangetoes/people")
}
}
//
help me to solve this problem