Com.esotericsoftware.kryo.kryoexception java.util.ConcurentModificationException

Source: Internet
Author: User

Recently I have a netizen to see my "Integrated Kafka to spark streaming--code demonstration Samples and challenges" article,
The Kafka object is placed in the pool and broadcast through broadcast:

Then in the development test phase of the error such as the following:

Then you come to me and say, "The code is almost the same as yours, why do you report this mistake?" ”
In fact, for broadcast operations. Spark must have a serial number, and try not to broadcast the big object.
Later the code came to look down. Find Createkafkaproducerpool This method, create a separate class, the same time this class extends Serializable. What I was feeling was, suppose the Createkafkaproducerpool method. Writing in the main method or driver side should certainly not have this problem, I also recommend this. And I suspect that the cluster is enabled with the Kryo serial number method. And Createkafkaproducerpool method of the class incredibly extends Serializable, puzzled

Important

The closures (anon function going inside rdd.map (...)) is serialized by Spark before distributing them. Hadoop does not has this problem because it binary-serializes the whole. Jar and copies it over the network. Spark uses javaserialization by default, but it's very slow compared to, say, Kryo. So we use the Kryo to does, by using a wrapper (Spark doesn ' t support kryo-serde for closures, not yet).

And Uptill now the Org.dbpedia.extraction.spark.serializeKryoSerializationWrapper class has been working perfectly. Some Freak extractors seem to fail though.

Articles retrieved based on this error
    1. Https://github.com/dbpedia/distributed-extraction-framework/issues/9
    2. Http://stackoverflow.com/questions/27277015/sparkcontext-broadcast-jedispool-not-work
    3. http://apache-spark-user-list.1001560.n3.nabble.com/ Why-does-quot-com-esotericsoftware-kryo-kryoexception-java-u-til-concurrentmodificationexception-quo-tc23067.html
If you have such a problem or some good idea, please reply, THX ~

Com.esotericsoftware.kryo.kryoexception java.util.ConcurentModificationException

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.