[e2e] Strip any trailing Spark error log from spark-sql output before comparison - #9971
Merged
JingsongLi merged 1 commit intoSep 19, 2026
Conversation
… comparison SparkE2eTest only cut the stdout at the "Uncaught exception in thread dispatcher-CoarseGrainedScheduler" message (apache#8907). The spark-sql shutdown race also logs through other loggers, e.g. "ERROR TransportRequestHandler: Error while invoking RpcHandler#receive() for one-way message." followed by a "Could not find AppClient" stack trace, which leaks past the query result and fails checkQueryResult even though the exit code is 0. Replace the message-specific cut with a helper that drops everything from the first line matching Spark's default log4j2 ERROR line prefix ("yy/MM/dd HH:mm:ss ERROR "). Anchoring on the timestamp keeps an "ERROR" word inside a result row intact. Add SparkE2eOutputTest (no Docker) to cover the helper. Generated-by: Claude Code
Contributor
|
+1 |
XiaoHongbo-Hope
pushed a commit
that referenced
this pull request
Sep 20, 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.
Purpose
fix #9970
SparkE2eTest.testFlinkWriteAndSparkReadfails intermittently incheckQueryResult: thespark-sqlshutdown race logs an ERROR after the correct rows, with exit code 0.dispatcher-CoarseGrainedSchedulermessage; the race also logsERROR TransportRequestHandler: Error while invoking RpcHandler#receive() for one-way message.with aCould not find AppClienttrace.stripTrailingSparkErrorLogs, which drops everything from the first line with Spark's default log4j2 ERROR prefix (yy/MM/dd HH:mm:ss ERROR); the timestamp anchor leaves anERRORword inside a result row intact.Tests
SparkE2eOutputTest(no Docker), 5 cases: no log, CoarseGrainedScheduler variant, two TransportRequestHandler blocks, ERROR on first line,ERRORinside a row.mvn -Pflink1,spark3 -pl paimon-e2e-tests -Dtest=SparkE2eOutputTest test— 5 passed;spotless:check, checkstyle andtest-compilegreen.SparkE2eTestnot run locally; covered by CIe2e-flink1.