You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/10/22 06:25:55 UTC

[GitHub] [hudi] prashantwason commented on a change in pull request #2152: [HUDI-1326] Added an API to force publish metrics and flush them.

prashantwason commented on a change in pull request #2152:
URL: https://github.com/apache/hudi/pull/2152#discussion_r509907667



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metrics/Metrics.java
##########
@@ -68,8 +69,20 @@ private void reportAndCloseReporter() {
     }
   }
 
+  private void reportAndFlushMetrics() {
+    try {
+      LOG.info("Reporting and flushing all metrics");
+
+      this.registerHoodieCommonMetrics();
+      this.reporter.report();
+      this.registry.getNames().forEach(name -> this.registry.remove(name));
+    } catch (Exception e) {
+      Metrics.LOG.warn((Object)"Error while reporting and flushing metrics", (Throwable)e);

Review comment:
       Done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org