Repository navigation
Conversation
|
This branch has not been deployed
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.



What changes were proposed in this pull request
Closes #4518
Fix checkpoint/savepoint deletion for YARN Application records whose stored HDFS path has no authority, for example
hdfs:/tmp/checkpoints/chk-1.Hadoop accepts this URI and resolves its authority using
fs.defaultFS. The currentHdfsOperator.toHdfsPathonly recognizeshdfs://, so it prepends the default filesystem to a single-slash HDFS URI. Withfs.defaultFS=hdfs://namenode:8020, that produceshdfs://namenode:8020hdfs:/tmp/checkpoints/chk-1, and the target directory is not deleted.Preserve paths starting with
hdfs:/and let Hadoop resolve them. This includes the existing triple-slash and fully qualified forms. Paths without a scheme continue to use the existing default-filesystem prefix behavior.Based on the current upstream
devat829466b5470d749773793193f1fc1d46e8613d61.Brief change log
HdfsOperator.toHdfsPath.HdfsOperator.deleteand checks the resolved deletion target. It covers single-slash, triple-slash, fully qualified and absolute paths across a host/port default filesystem and a logical nameservice with/without a trailing slash.Verifying this change
This change adds regression coverage and was verified as follows.
Automated regression tests and project checks
./mvnw -B -ntp -pl streampark-common test checkstyle:check spotless:check apache-rat:checkPassed: 121 tests, 0 failures, 0 errors, 0 skipped; Checkstyle, Spotless and Apache RAT passed. Also ran these goals against a fresh source archive in a Linux container using Maven 3.9.9 / Temurin 11.0.27 with the same result. The host run used OpenJDK 17 with the project's Java 11 target.
The newly added regression test fails against the original implementation (3 affected single-slash cases) and passes with this change (12/12).
Real HDFS deletion validation
Ran an isolated Hadoop 3.3.5
MiniDFSClusterwith a real NameNode and one DataNode under Java 11. The test creates a target directory containing_metadata, confirms the file exists, invokes the productionHdfsOperator.delete, then checks the directory is absent and an adjacent file still contains its original data.hdfs:/...hdfs:///...hdfs://host:port/.../...The two configurations use
fs.defaultFSwith and without a trailing slash. The adjacent file remained intact in all cases. The baseline loadsHdfsOperatorcompiled from upstreamdev; the fixed run loads this branch's production class. MiniDFSCluster is temporary test tooling and is not added as a project dependency.Console API end-to-end validation
Started the freshly built 3.0.0 Console package with an isolated file-backed H2 database and the real MiniDFSCluster. The container had no external network access. Used the bundled demo application with
deploy_mode=4(YARN Application) and the standard authentication/permission checks.For each of the four path forms above:
_metadatafile and an adjacent file to retain; inserted a matching savepoint record into the isolated H2 database before Console startup.POST /passport/signinand confirmed the record throughPOST /flink/savepoint/history.POST /flink/savepoint/deletewithid,appIdandteamId.data=true, absence of the record from history, absence of the directory in real HDFS, and unchanged content of the adjacent file.Result: 4/4 API cases passed; final H2 row count: 0.
This covers HTTP authentication → controller → savepoint service → HDFS deletion → persisted database removal. It uses seeded checkpoint fixtures, not a live Flink/YARN job, and does not cover browser interaction. During fixture setup, the bundled H2 seed script had an unrelated demo-project column-count mismatch; initialization continued as configured by the application, and the required account/application/savepoint fixtures were verified before testing.
Backend package build
Passed: all 30 reactor modules, including the Console runtime package. Tests are skipped by this packaging command; test execution is reported separately above. The frontend was not built.
The repository's current
E2E - Resultworkflow is a retired-suite compatibility check, so it is not used as evidence of the validation above.Does this pull request potentially affect one of the following parts