Skip to content

[SPARK-44162][CORE] Support G1GC in spark metrics#42

Closed
giggsoff wants to merge 1 commit into
develop/4.3.0/3.5.4.4from
feature/SPARK-44162
Closed

[SPARK-44162][CORE] Support G1GC in spark metrics#42
giggsoff wants to merge 1 commit into
develop/4.3.0/3.5.4.4from
feature/SPARK-44162

Conversation

@giggsoff

@giggsoff giggsoff commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

What changes were proposed in this pull request?

As a part of support JDK21, add support G1 Concurrent GC GarbageCollectorMXBean in Spark metrics. Refer openjdk/jdk#11341 and https://bugs.openjdk.org/browse/JDK-8297247 , the G1 Concurrent GC not a part of YoungGC or FullGC. So we follow the JDK definition, bring two new metrics: ConcurrentGCCount and ConcurrentGCTime.

Why are the changes needed?

add new builtin garbage collectors for metrics.

Does this PR introduce any user-facing change? Yes, will receive new metrics.

How was this patch tested?

Test in local, I will add test if necessary.

Backported from Spark 4.0

### What changes were proposed in this pull request?
As a part of support JDK21, add support `G1 Concurrent GC` GarbageCollectorMXBean in Spark metrics.
Refer openjdk/jdk#11341 and https://bugs.openjdk.org/browse/JDK-8297247 , the `G1 Concurrent GC` not a part of YoungGC or FullGC. So we follow the JDK definition, bring two new metrics: `ConcurrentGCCount` and `ConcurrentGCTime`.

### Why are the changes needed?
add new builtin garbage collectors for metrics.

### Does this PR introduce _any_ user-facing change?
Yes, will receive new metrics.

### How was this patch tested?
Test in local, I will add test if necessary.

Closes apache#41808 from Hisoka-X/SPARK-44162_G1GC_on_JDK21.

Authored-by: Jia Fan <fanjiaeminem@qq.com>
Signed-off-by: Mridul Muralidharan <mridul<at>gmail.com>

(cherry picked from commit 74447ab)
@giggsoff giggsoff self-assigned this Jun 18, 2026
@giggsoff giggsoff marked this pull request as ready for review June 18, 2026 18:42
@giggsoff

Copy link
Copy Markdown
Collaborator Author

Seems not useful for Java 17.

@giggsoff giggsoff closed this Jun 19, 2026
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.

2 participants