Spark 3.4: Backport Async Micro Batch Planner to 3.4#16311
Merged
Conversation
Backport of apache#15992 to spark/v3.4. Stacked on PR apache#16307 (apache#15683 SerializableFileIOWithSize), which is itself a backport. Adaptations from the source PR: - SparkMicroBatchStream.java was replaced wholesale with the v3.5 post-apache#15992 version because v3.4 had structural drift; the refactor extracts the planning logic into the new planner classes and there are no v3.4-only features in this file. - TestStructuredStreamingRead3.java was likewise replaced with the v3.5 version (which adds parameterized sync/async coverage). The only non-mechanical change is using 'SparkCatalogConfig.SPARK' instead of 'SparkCatalogConfig.SPARK_SESSION', because v3.4 still uses the older enum name.
efa8943 to
178fb2d
Compare
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.
Backport of #15992 to
spark/v3.4.Adaptations from the source PR
SparkMicroBatchStream.javawas replaced wholesale with the v3.5 post-Spark 3.5: Backport Async Micro Batch Planner to 3.5 #15992 version because v3.4 had structural drift relative to v3.5. The refactor extracts the planning logic into the new planner classes (BaseSparkMicroBatchPlanner,SyncSparkMicroBatchPlanner,AsyncSparkMicroBatchPlanner,MicroBatchUtils) and there are no v3.4-only features in this file, so a verbatim copy keeps the implementations aligned.TestStructuredStreamingRead3.javawas likewise replaced with the v3.5 version (which adds parameterized sync/async coverage). The only non-mechanical change was usingSparkCatalogConfig.SPARKinstead ofSparkCatalogConfig.SPARK_SESSIONbecause v3.4 still uses the older enum name.git apply --3way.Validation
./gradlew -DsparkVersions=3.4 :iceberg-spark:iceberg-spark-3.4_2.12:classes :iceberg-spark:iceberg-spark-3.4_2.12:testClasses./gradlew -DsparkVersions=3.4 :iceberg-spark:iceberg-spark-3.4_2.12:test --tests "*TestAsyncSparkMicroBatchPlanner*" --tests "*TestMicroBatchPlanningUtils*"./gradlew -DsparkVersions=3.4 :iceberg-spark:iceberg-spark-3.4_2.12:test --tests "org.apache.iceberg.spark.source.TestStructuredStreamingRead3.testReadStreamOnIcebergTableWithMultipleSnapshots"./gradlew :iceberg-spark:iceberg-spark-3.4_2.12:spotlessApply :iceberg-spark:iceberg-spark-extensions-3.4_2.12:spotlessApply