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, mapr-ghq-5-las01.cdx-dev.unifieddeliverynetwork.net, executor 3): org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: no object data given
at org.elasticsearch.hadoop.util.Assert.notNull(Assert.java:40)
at org.elasticsearch.hadoop.rest.RestRepository.writeToIndex(RestRepository.java:156)
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.scheduler.Task.run(Task.scala:99)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:282)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)

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

What's it and why?

Thanks

Min

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.