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
  • Loading branch information
aajisaka committed Nov 17, 2023
1 parent 216aeb4 commit ba90a19
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 ba90a19

Please sign in to comment.