Skip to content

[CELEBORN-2477] Enhance Celeborn Spark UI extension with detailed shuffle metrics - #3869

Closed
yew1eb wants to merge 2 commits into
apache:mainfrom
yew1eb:spark-ui-enhancement
Closed

yew1eb wants to merge 2 commits into
apache:mainfrom
yew1eb:spark-ui-enhancement

Conversation

@yew1eb

@yew1eb yew1eb commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Gate the Celeborn Spark UI extension on the new celeborn.client.spark.ui.enabled config so the documented "zero-overhead when off" actually holds.

Today CelebornPlugin registers CelebornListener and attaches the Celeborn tab unconditionally: setting spark.celeborn.client.spark.ui.enabled=false never disables anything. And a bare-key SparkConf.getBoolean/getInt lookup would not help either, because SparkConf matches keys exactly while user-set values carry the spark.celeborn. prefix — so the flag must be resolved through CelebornConf.

This PR:

  • adds the celeborn.client.spark.ui.enabled entry (categories: client, default true) with its accessor and the regenerated docs/configuration/client.md row;
  • adds CelebornUIUtils.celebornConf, a local spark.celeborn.* -> CelebornConf conversion, and reads the flag through the CelebornConf entry (never a bare-key lookup). The conversion is local to the spark-3-ui module because SparkUtils.fromSparkConf's class init drags in spark-sql's UnsafeRowSerializer, which is not on this module's classpath (spark-core only) and is absent in RDD-only applications;
  • gates CelebornDriverPlugin.init (listener registration) and registerMetrics (tab attachment) on the flag, together with Spark's own spark.ui.enabled.

Why are the changes needed?

The extension could not be turned off, so the listener stayed on the status queue and metrics kept being collected even when the user disabled the UI extension. Fixes CELEBORN-2477.

Does this PR introduce any user-facing change?

Yes: celeborn.client.spark.ui.enabled=false now disables the Celeborn Spark UI extension (listener + tab). Default behavior is unchanged (enabled).

How was this patch tested?

  • New uiGatingHonorsSparkCelebornPrefix case in CelebornListenerSuite: default true, spark.celeborn.client.spark.ui.enabled=false disables, spark.ui.enabled=false disables.
  • mvn -Pspark-3.5 -pl client-spark/spark-3-ui -am clean test passes (incl. the ConfigurationSuite golden-file check for the new doc row).

@yew1eb
yew1eb marked this pull request as draft October 13, 2026 11:28
yew1eb and others added 2 commits October 13, 2026 19:35
…ffle metrics

Extend the CELEBORN-2415 Spark UI skeleton into a full observability tab:

- Instrument the client write/read paths (PushState, InFlightRequestTracker,
  ReadStreamStats) and report the aggregates to the driver through the
  MapperEnd RPC and a new ReportShuffleReadMetrics RPC.
- Post custom CelebornEvents (build info, shuffle assignment, fallback,
  reassign, write/read metrics) from the driver into the listener bus via
  the status queue, so they persist into the event log and replay on the
  HistoryServer.
- Fuse everything into a single CelebornListener that also consumes native
  TaskMetrics, aggregating per-shuffle write/read metrics and per-worker
  push/read costs into the KVStore.
- Render a Uniffle-style page: headline stat tiles, per-shuffle details
  table (joined assignments + write + read metrics with derived
  speed/share columns), vertical write/read time breakdowns, per-worker
  tables with avg RTT, build info, fallback stats and formatted timestamps.

Co-Authored-By: Claude <noreply@anthropic.com>
The Spark UI extension read its configs by bare keys from SparkConf:
celeborn.client.spark.ui.enabled in CelebornUIUtils.isUIEnabled and
celeborn.client.spark.ui.retainedShuffles in CelebornListener. SparkConf
matches keys exactly, so user-set spark.celeborn.* values never applied:
the listener and tab were still registered when the extension was disabled
(breaking the documented "zero-overhead when off"), and retainedShuffles
was stuck at the default.

Both now read through CelebornUIUtils.celebornConf, a local
spark.celeborn.* -> CelebornConf conversion (SparkUtils.fromSparkConf does
the same but its class init drags in spark-sql's UnsafeRowSerializer, which
is not on this module's classpath and absent in RDD-only applications), so
the entry defaults and the retainedShuffle alias apply. CelebornPlugin's
buildInfoMap is switched to the same helper to avoid the spark-sql class
init there as well.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant