Caused by : com.esotericsoftware.kryo.KryoException : java.lang.NegativeArraySizeException

⚠️ Error: Kryo Reference Table Overflow (Spark)

📌 Causes

This error occurs because:

➡️ Reference table in Kryo serializer exceeds integer limit (overflow)

Usually appears in the form of:
NegativeArraySizeException

🧠 Simple Explanation

In Apache Spark : Problem:

🎯 When Did It Happen?

Often occurs when:

✅ Ultimate Solution

🔧 Disable Reference Tracking

Add the following configuration to the workflow:
    spark.kryo.referenceTracking=false

📍 How to Set Up on HGrid247

  1. Open Workflow
  2. Click on an empty area (canvas)
  3. Select Workflow Property
  4. Add configuration:
        Configuration Name                  Configuration Value
        -------------------------------------------------------
        spark.kryo.referenceTracking	false
        
    see :https://stackoverflow.com/questions/44414429/spark-negativearraysizeexception

🧩 Impact of Solutions

✔ Avoid overflow
✔ Reduce memory usage for tracking

⚠ Consequences: