Repository navigation
fix(spark): broadcast the Hadoop conf in a form Kryo keeps - #93
Merged
Merged
Conversation
VortexIo.broadcast sent executors a SerializableHadoopConf, which keeps its Configuration in a transient field and relies on Java serialization's writeObject/readObject. A broadcast value goes through spark.serializer, and Kryo skips transient fields and ignores those methods, so under Kryo every executor got a null Configuration and each read failed in HadoopReadable.open with an NPE. Broadcast a SerializableWritable<Configuration> instead. It's public Spark API, and Spark's KryoSerializer registers it to use Java serialization, so it arrives intact under either serializer. Local-mode tests can't see this: tasks there reuse the driver's broadcast object without serializing it. The new test round-trips the broadcast value through JavaSerializer and KryoSerializer, as a remote executor does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
a392n328
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Spark reads of Vortex files fail on any cluster whose
spark.serializeris Kryo, since the 0.91.0 sync (#91).What breaks
VortexScanandVortexFileFormatbroadcast the Hadoop conf (VortexIo.broadcast).SerializableHadoopConf, which keeps the conf in atransientfield and relies on Java'swriteObject/readObject.spark.serializer. Kryo skips the field, so every executor gets anullconf, and every read NPEs inHadoopReadable.open→Path.getFileSystem(null).0.91.0-qc39: the write succeeded, but every read of the written files failed.Fix
SerializableWritable<Configuration>instead. It's public Spark API, and Spark'sKryoSerializerregisters it to use Java serialization, so it arrives intact under both serializers.SerializableHadoopConfstays for the non-broadcastcreatepath, which travels with the task and so is always Java-serialized.Tests
VortexIoTestcase: round-trips the broadcast value throughJavaSerializerandKryoSerializer, as a remote executor does.VortexIoTestpasses on the Spark 4.0 and 3.5 builds. The read-path suites (VortexListElementPruningIoTest,VortexNestedSchema*) pass as well.developdoes the same (16 failures), so it isn't this change.Upstream has the same code, so it should go upstream too.
🤖 Generated with Claude Code