[SPARK-42137][CORE] Enable spark.kryo.unsafe
by default
#39679
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR aims to enable
spark.kryo.unsafe
by default at Apache Spark 3.4. This configuration was introduced at Apache Spark 2.1.0 and has been used.spark/core/src/main/scala/org/apache/spark/internal/config/Kryo.scala
Lines 41 to 44 in 66f6a63
Note that this is used only inside
KryoSerializer
class which is still disabled by default. New behavior will be used only when the user setsKryoSerializer
explicitly.Why are the changes needed?
To help a user use
KroSerializer
more easily by settingspark.serializer=org.apache.spark.serializer.KryoSerializer
.Apache Spark provides the benchmark result already.
spark/core/benchmarks/KryoBenchmark-jdk11-results.txt
Lines 1 to 26 in 66f6a63
Does this PR introduce any user-facing change?
No. This is still behind
spark.serializer
configuration which is unchanged.How was this patch tested?
Pass the CIs.