Skip to content

Commit

Permalink
[HUDI-7107] Reused MetricsReporter fails to publish metrics in Spark …
Browse files Browse the repository at this point in the history
…streaming job (apache#10132)
  • Loading branch information
aajisaka authored Nov 21, 2023
1 parent 578e756 commit eaba114
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ public static synchronized Metrics getInstance(HoodieWriteConfig metricConfig) {

public static synchronized void shutdownAllMetrics() {
METRICS_INSTANCE_PER_BASEPATH.values().forEach(Metrics::shutdown);
// to avoid reusing already stopped metrics
METRICS_INSTANCE_PER_BASEPATH.clear();
}

private List<MetricsReporter> addAdditionalMetricsExporters(HoodieWriteConfig metricConfig) {
Expand Down

0 comments on commit eaba114

Please sign in to comment.