Help Center/ MapReduce Service/ Component Operation Guide (LTS) (Ankara Region)/ Using Doris/ Doris FAQs/ How Do I Rectify the Serialization Exception Reported When Data Is Imported to Spark Load?
Updated on 2024-11-29 GMT+08:00

How Do I Rectify the Serialization Exception Reported When Data Is Imported to Spark Load?

Symptom

When Spark Load is used to import data, error message "java.io.NotSerializableException: org.apache.spark.defense.DefenseRules" is displayed.

Cause Analysis

The org.apache.spark.defense.DefenseRules class of the Spark component does not support serialization.

Procedure

  1. Delete the spark-sql-defense_2.12-3.3.1-h0.cbu.mrs.330.r9.jar package from the Client installation directory/Spark/spark/jars directory.
  2. Run the following command to compress the packages in the Spark jars directory again:

    cd Client installation directory/Spark/spark/jars

    zip -qr spark-archive.zip

  3. Execute the Spark Load task on the Doris client again.