1
0

[HUDI-1326] Added an API to force publish metrics and flush them. (#2152)

* [HUDI-1326] Added an API to force publish metrics and flush them.

Using the added API, publish metrics after each level of the DAG completed in hudi-test-suite.

* Code cleanups

Co-authored-by: Vinoth Chandar <vinoth@apache.org>
This commit is contained in:
Prashant Wason
2020-10-24 16:47:24 -07:00
committed by GitHub
parent 14c4611857
commit 49e855c348
2 changed files with 30 additions and 6 deletions

View File

@@ -30,6 +30,7 @@ import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import org.apache.hudi.exception.HoodieException;
import org.apache.hudi.integ.testsuite.dag.nodes.DagNode;
import org.apache.hudi.metrics.Metrics;
import org.apache.hudi.integ.testsuite.dag.ExecutionContext;
import org.apache.hudi.integ.testsuite.dag.WorkflowDag;
import org.apache.hudi.integ.testsuite.dag.WriterContext;
@@ -95,6 +96,9 @@ public class DagScheduler {
for (Future future : futures) {
future.get(1, TimeUnit.HOURS);
}
// After each level, report and flush the metrics
Metrics.flush();
} while (queue.size() > 0);
log.info("Finished workloads");
}