1
0

[HUDI-1305] Added an API to shutdown and remove the metrics reporter. (#2132)

This helps in removing reporter once the test has complete. Prevents log pollution from un-necessary metric logs.

- Added an API to shutdown the metrics reporter after tests.
This commit is contained in:
Prashant Wason
2020-10-04 09:30:04 -07:00
committed by GitHub
parent 1f7add9291
commit 6c610b91ef
3 changed files with 30 additions and 9 deletions

View File

@@ -19,6 +19,7 @@
package org.apache.hudi.metrics;
import org.apache.hudi.config.HoodieWriteConfig;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -38,6 +39,11 @@ public class TestHoodieConsoleMetrics {
new HoodieMetrics(config, "raw_table");
}
@AfterEach
public void stop() {
Metrics.shutdown();
}
@Test
public void testRegisterGauge() {
registerGauge("metric1", 123L);