Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,12 @@ case object GarbageCollectionMetrics extends ExecutorMetricType with Logging {
"MinorGCTime",
"MajorGCCount",
"MajorGCTime",
"TotalGCTime"
"TotalGCTime",
"ConcurrentGCCount",
"ConcurrentGCTime"
)

/* We builtin some common GC collectors which categorized as young generation and old */
/* We builtin some common GC collectors */
private[spark] val YOUNG_GENERATION_BUILTIN_GARBAGE_COLLECTORS = Seq(
"Copy",
"PS Scavenge",
Expand All @@ -128,6 +130,8 @@ case object GarbageCollectionMetrics extends ExecutorMetricType with Logging {
"G1 Old Generation"
)

private[spark] val BUILTIN_CONCURRENT_GARBAGE_COLLECTOR = "G1 Concurrent GC"

private lazy val youngGenerationGarbageCollector: Seq[String] = {
SparkEnv.get.conf.get(config.EVENT_LOG_GC_METRICS_YOUNG_GENERATION_GARBAGE_COLLECTORS)
}
Expand All @@ -147,6 +151,9 @@ case object GarbageCollectionMetrics extends ExecutorMetricType with Logging {
} else if (oldGenerationGarbageCollector.contains(mxBean.getName)) {
gcMetrics(2) = mxBean.getCollectionCount
gcMetrics(3) = mxBean.getCollectionTime
} else if (BUILTIN_CONCURRENT_GARBAGE_COLLECTOR.equals(mxBean.getName)) {
gcMetrics(5) = mxBean.getCollectionCount
gcMetrics(6) = mxBean.getCollectionTime
} else if (!nonBuiltInCollectors.contains(mxBean.getName)) {
nonBuiltInCollectors = mxBean.getName +: nonBuiltInCollectors
// log it when first seen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ private[v1] class PrometheusResource extends ApiRequestContext {
names.foreach { name =>
sb.append(s"$prefix${name}_bytes$labels ${m.getMetricValue(name)}\n")
}
Seq("MinorGCCount", "MajorGCCount").foreach { name =>
Seq("MinorGCCount", "MajorGCCount", "ConcurrentGCCount").foreach { name =>
sb.append(s"$prefix${name}_total$labels ${m.getMetricValue(name)}\n")
}
Seq("MinorGCTime", "MajorGCTime").foreach { name =>
Seq("MinorGCTime", "MajorGCTime", "ConcurrentGCTime").foreach { name =>
sb.append(s"$prefix${name}_seconds_total$labels ${m.getMetricValue(name) * 0.001}\n")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
}
}, {
"status" : "COMPLETE",
Expand Down Expand Up @@ -156,7 +158,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
}
}, {
"status" : "COMPLETE",
Expand Down Expand Up @@ -236,6 +240,8 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
}
} ]
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"isExcludedForStage" : true
},
Expand Down Expand Up @@ -928,7 +930,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"isExcludedForStage" : false
}
Expand Down Expand Up @@ -956,6 +960,8 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"isExcludedForStage" : true
},
Expand Down Expand Up @@ -1062,7 +1064,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"isExcludedForStage" : true
},
Expand Down Expand Up @@ -1103,7 +1107,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"isExcludedForStage" : false
},
Expand Down Expand Up @@ -1144,7 +1150,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"isExcludedForStage" : false
},
Expand Down Expand Up @@ -1185,7 +1193,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"isExcludedForStage" : true
}
Expand Down Expand Up @@ -1213,6 +1223,8 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : { },
"resources" : { },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@
"MinorGCTime" : 55,
"MajorGCCount" : 3,
"MajorGCTime" : 144,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : { },
"resources" : { },
Expand Down Expand Up @@ -108,7 +110,9 @@
"MinorGCTime" : 145,
"MajorGCCount" : 2,
"MajorGCTime" : 63,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : {
"NM_HTTP_ADDRESS" : "test-3.vpc.company.com:8042",
Expand Down Expand Up @@ -178,7 +182,9 @@
"MinorGCTime" : 106,
"MajorGCCount" : 2,
"MajorGCTime" : 75,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : {
"NM_HTTP_ADDRESS" : "test-4.vpc.company.com:8042",
Expand Down Expand Up @@ -248,7 +254,9 @@
"MinorGCTime" : 140,
"MajorGCCount" : 2,
"MajorGCTime" : 60,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : {
"NM_HTTP_ADDRESS" : "test-2.vpc.company.com:8042",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : { },
"resources" : { },
Expand Down Expand Up @@ -145,7 +147,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : { },
"resources" : { },
Expand Down Expand Up @@ -205,7 +209,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : { },
"resources" : { },
Expand Down Expand Up @@ -265,7 +271,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : { },
"resources" : { },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : { },
"resources" : { },
Expand Down Expand Up @@ -145,7 +147,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : { },
"resources" : { },
Expand Down Expand Up @@ -205,7 +209,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : { },
"resources" : { },
Expand Down Expand Up @@ -265,7 +271,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : { },
"resources" : { },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : { },
"resources" : { },
Expand Down Expand Up @@ -127,7 +129,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : { },
"resources" : { },
Expand Down Expand Up @@ -181,7 +185,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : { },
"resources" : { },
Expand Down Expand Up @@ -235,7 +241,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"attributes" : { },
"resources" : { },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"isShufflePushEnabled" : false,
"shuffleMergersCount" : 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
},
"isExcludedForStage" : false
}
Expand Down Expand Up @@ -120,6 +122,8 @@
"MinorGCTime" : 0,
"MajorGCCount" : 0,
"MajorGCTime" : 0,
"TotalGCTime" : 0
"TotalGCTime" : 0,
"ConcurrentGCCount" : 0,
"ConcurrentGCTime" : 0
}
}
Loading
Loading