Lemarais commented on a change in pull request #307:
URL: https://github.com/apache/incubator-nemo/pull/307#discussion_r604751016
##########
File path:
runtime/master/src/main/java/org/apache/nemo/runtime/master/RuntimeMaster.java
##########
@@ -219,11 +224,32 @@ public void recordIRDAGMetrics(final IRDAG irdag, final
String planId) {
* Flush metrics.
*/
public void flushMetrics() {
- // send metric flush request to all executors
- metricManagerMaster.sendMetricFlushRequest();
+ if (metricCountDownLatch.getCount() == 0) {
+ metricCountDownLatch = new
CountDownLatch(executorRegistry.getNumberOfRunningExecutors());
+ // send metric flush request to all executors
+ metricManagerMaster.sendMetricFlushRequest();
+ }
+ }
+ /**
+ * Save metrics.
+ */
+ public void saveMetrics() {
Review comment:
Okay, that's make sense, but if i move location of this function to nemo
driver, The running thread maybe different. And MetricStrore seems not thread
safe. so i will check more about this.
--
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:
[email protected]