Spark Streaming Integrated Kafak The problem of the RAN out of messages

Source: Internet
Author: User

caused by: java.lang.assertionerror: assertion failed: ran out of  Messages before reaching ending offset 264251742 for topic topic partition 1 start 264245135. this should not happen, and  indicates that messages may have been lost    At scala. Predef$.assert (predef.scala:179)     at org.apache.spark.streaming.kafka.kafkardd$ Kafkardditerator.getnext (kafkardd.scala:165)     At org.apache.spark.util.nextiterator.hasnext ( nextiterator.scala:71)     at scala.collection.iterator$ $anon $11.hasnext (iterator.scala:327)     at scala.collection.iterator$ $anon $14.hasnext (iterator.scala:388)     at  scala.collection.iterator$ $anon $11.hasnext (iterator.scala:327)     at  Org.apache.spark.util.collection.ExternalSorter.insertAll (externalsorter.scala:203) &NBSp   At org.apache.spark.shuffle.sort.sortshufflewriter.write (sortshufflewriter.scala:73)     at  org.apache.spark.scheduler.shufflemaptask.runtask (shufflemaptask.scala:73)     at  Org.apache.spark.scheduler.ShuffleMapTask.runTask (shufflemaptask.scala:41)     at  Org.apache.spark.scheduler.Task.run (task.scala:88)     at org.apache.spark.executor.executor$ Taskrunner.run (executor.scala:214)    The exception here is because the Kafka is reading the specified offset log (here is 264245135 to 264251742), because the log is too large, causing the total size of the log to exceed Fetch.message.max.bytesThe Set value (default is 1024*1024), which causes this error. The workaround is to increase the value of fetch.message.max.bytes in the parameters of the Kafka client.  For example://kafka configuration file val kafkaparams = map[string, String] ("Metadata.broker.list", Brokers, "fetch.message.max.bytes"- > "10485760")//Workflow Val messages = kafkautils.createdirectstream[string, String, Stringdecoder, Stringdecoder] (SSC, Kafkaparams, Topicsset)

Spark Streaming Integrated Kafak The problem of the RAN out of messages

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.