eS no object data given error

I got the following error all the time when using EsSpark.saveJsonToEs in Spark streaming app. Some data were save to ES but it the driver log always show this error

17/05/31 23:46:06 WARN TaskSetManager: Lost task 15.6 in stage 31285.0 (TID 627168,, executor 3): org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: no object data given
at org.elasticsearch.hadoop.util.Assert.notNull(
at org.elasticsearch.spark.rdd.EsRDDWriter.write(EsRDDWriter.scala:67)
at org.elasticsearch.spark.rdd.EsSpark$$anonfun$doSaveToEs$1.apply(EsSpark.scala:102)
at org.elasticsearch.spark.rdd.EsSpark$$anonfun$doSaveToEs$1.apply(EsSpark.scala:102)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:87)
at org.apache.spark.executor.Executor$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$

I searched everywhere but could not find anything with this error.

What's it and why?



1 Like

Because there are empty rdd no object data given , try to add a filter before each save rdd.filter(row -> row != null)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.