Skip to content

[e2e] Strip any trailing Spark error log from spark-sql output before comparison - #9971

Merged
JingsongLi merged 1 commit into
apache:masterfrom
thswlsqls:fix/e2e-strip-trailing-spark-error-logs
Sep 19, 2026
Merged

JingsongLi merged 1 commit into
apache:masterfrom
thswlsqls:fix/e2e-strip-trailing-spark-error-logs

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Purpose

fix #9970

Tests

  • Added SparkE2eOutputTest (no Docker), 5 cases: no log, CoarseGrainedScheduler variant, two TransportRequestHandler blocks, ERROR on first line, ERROR inside a row.
  • mvn -Pflink1,spark3 -pl paimon-e2e-tests -Dtest=SparkE2eOutputTest test — 5 passed; spotless:check, checkstyle and test-compile green.
  • Docker-based SparkE2eTest not run locally; covered by CI e2e-flink1.

… 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
@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit 023883e into apache:master Sep 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] SparkE2eTest fails on trailing Spark shutdown ERROR logs other than CoarseGrainedScheduler

2 participants