Issue 7476 : Spark / Beam validation#7482
Open
mattcasters wants to merge 6 commits into
Open
Conversation
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.
Code review report: issue #7476 — Spark / Beam validation
Branch:
issue-7476Issue: #7476 — Validate Spark functionality on Beam
Base:
main@02b72d78afCommits (oldest → newest):
a33b663f6cd3cb207381670ba47518fce6f6dd84ccc2cb5052Diff size: ~41 files, +2212 / −972 lines
1. Executive summary for reviewers
This work answers: What Spark versions actually work with current Hop (Java 21) + Beam 2.74 client-mode submit?
Measured conclusion
NoSuchMethodException: DirectByteBuffer.<init>(long,int)(SPARK-42369, fixed in Spark 3.5.0)InvalidClassException/ serialVersionUIDHop requires Java 21 for the driver and for workers (fat-jar bytecode). The Spark cluster must therefore also run Java 21 → Spark ≥ 3.5.0 is the platform floor.
What changed in product code
integration-tests/sparksmoke (removeddisabled.txt).spark-core/spark-streaming+ network jars) as a default client pack underlib/spark-client/.lib/spark-client/*in all hop launch scripts.lib/spark-clients/<V>/) + fat-jar flag--spark-client-versionfor 3.5.x alignment (and future matrix cells).BeamSparkPipelineEngineTestre-enabled (local[2], UI disabled).2. Commit walkthrough
a33b663f6c— Spark IT revived, pin 3.5.7Intent: Get a single green path and a way to measure other cluster versions.
spark-core/spark-streamingas compile (not test-only); exclusions for log4j / jackson-scala preservedARG SPARK_VERSION,archive.apache.org, healthcheckhop-spark-test(no underscores — Spark RPC rejects them);spark.ui.enabled=false;SPARK_MASTER_HOST=sparkdisabled.txt; fixtempLocation; defer Hive workflows tooptional-*(notmain*.hwf)run-spark-matrix.sh;SPARK_VERSIONplumbing inrun-tests-docker.shlocal[2]+ Spark UI offd3cb207381— MATRIX-REPORT + matrix hardeningbin-hadoop3.2)<failure>tags)670ba47518— Versioned Spark client packslib/spark-client/(not flatlib/beam/)HOP_SPARK_CLIENT_VERSIONHopBeamGuiPluginGenerateFatJarConfigPlugin--spark-client-version/-scvtools/spark-client-pack/(Maven POM +materialize-pack.sh)run-spark-matched-matrix.sh; beam image build-arg for pack-aware fat jarfce6f6dd84— Java 21 conclusion + driver classpath reliabilityCritical runtime fixes after matrix failures:
JavaStreamingListener/SourceCNFEs: packagedhop-run.shnever putlib/spark-clienton the mainCLASSPATH; versioned pack path was also wiped by unzip-before-docker.lib/spark-client/*into primary classpath; after unzip, rematerialise pack and copy intolib/spark-client; invalidate base/beam images when pack version set.3.5.7only.ccc2cb5052— RATpom.xml).3. Architecture notes (review focus)
Install layout
Driver:
hop-run/hop-guiclasspath includeslib/spark-client/*(or versioned pack if present).Workers: fat jar from
hop-conf --generate-fat-jarwith optional--spark-client-version=V.Rule: driver pack + fat jar pack + cluster minor should match.
Why not rebuild all of Hop with
-Dspark.version=X?Packs allow one Hop build + optional client sets. Full multi-version Maven rebuilds are expensive and don’t help a released tarball. Packs still matter for 3.5.x patch alignment; they do not restore 3.4 on Java 21.
IT flow (matched)
materialize-pack.sh V→lib/spark-clients/Vlib/spark-client(driver)hop-base-image+hop-beam-image(fat jar with--spark-client-version=V)SPARK_VERSION=Vmain-0001-test-spark-cluster4. Test evidence
BeamSparkPipelineEngineTest(local[2])spark.ui.enabled=false)DirectByteBufferDirectByteBufferDirectByteBuffer(SPARK-42369)Artifacts:
integration-tests/spark/MATRIX-REPORT.md,MATRIX-REPORT-MATCHED.md.Reproduce smoke:
5. Review checklist
Correctness / design
lib/spark-clientand always adding it to hop launch scripts is acceptable (size / dependency footprint).lib/beam/spark-*.jarfragments so they don’t mix with an alternate pack (seeHopBeamGuiPlugin.findInstalledJarFilenames).optional-*(not run bymain*.hwfdiscovery) — intentional deferral, not silent delete.integration_test_spark→hop-spark-test(underscores invalid in Spark RPC hostnames).Security / supply chain
archive.apache.orgin Dockerfiles (checksums not pinned — optional follow-up).Ops / maintainability
run-spark-matrix.shvsrun-spark-matched-matrix.shnaming/docs clear enough.3.5.7) — full matrix is manual/expensive..batdiffs are mostly line-ending / block rewrite noise — focus review on the classpath logic, not every bat line.Docs
Gaps / follow-ups (out of this PR unless reviewers want them)
--exclude-spark-client) — related to [Feature Request]: Investigate splitting up Spark, Flink and Beam libraries #2612.PROJECT_NAME=spark+SPARK_VERSION=3.5.7if not already enabled.integration-tests/flink/disabled.txt).6. Key files to read first
integration-tests/spark/MATRIX-REPORT.mdplugins/engines/beam/pom.xmlplugins/engines/beam/src/assembly/assembly.xmllib/spark-clientpackingassemblies/static/.../hop-run.shplugins/engines/beam/.../HopBeamGuiPlugin.javaplugins/engines/beam/.../GenerateFatJarConfigPlugin.javatools/spark-client-pack/*docker/integration-tests/integration-tests-spark.yamlintegration-tests/scripts/run-tests-docker.shdocs/hop-user-manual/.../beam*7. Risk summary
Report generated for branch
issue-7476/ commitsa33b663f6c…ccc2cb5052.