java.util.NoSuchElementException: next on empty iterator Any idea? This is the stack output: WARN TaskSetManager: Lost task 48.0 in stage 18.0 (TID 605, 192.168.0.1): org.apache.spark.SparkException: Task failed while writing rows.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Stack Overflow by LeiNaD_87
, 1 year ago
next on empty iterator Any idea? This is the stack output: WARN TaskSetManager: Lost task 48.0 in stage 18.0 (TID 605, 192.168.0.1): org.apache.spark.SparkException: Task failed while writing rows.
java.util.NoSuchElementException: next on empty iterator Any idea? This is the stack output: WARN TaskSetManager: Lost task 48.0 in stage 18.0 (TID 605, 192.168.0.1): org.apache.spark.SparkException: Task failed while writing rows.
at scala.collection.Iterator$$anon$2.next(Iterator.scala:39)
at scala.collection.Iterator$$anon$2.next(Iterator.scala:37)
at com.databricks.spark.avro.AvroOutputWriter$$anonfun$com$databricks$spark$avro$AvroOutputWriter$$createConverterToAvro$7.apply(AvroOutputWriter.scala:141)
at com.databricks.spark.avro.AvroOutputWriter.write(AvroOutputWriter.scala:70)
at org.apache.spark.sql.execution.datasources.DefaultWriterContainer.writeRows(WriterContainer.scala:242)
at org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelation$$anonfun$run$1$$anonfun$apply$mcV$sp$3.apply(InsertIntoHadoopFsRelation.scala:150)
at org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelation$$anonfun$run$1$$anonfun$apply$mcV$sp$3.apply(InsertIntoHadoopFsRelation.scala:150)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
at org.apache.spark.scheduler.Task.run(Task.scala:88)
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:745)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
Once, 1 week ago
Once, 1 month ago
4 times, 2 months ago
Once, 11 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.