Lemarais commented on a change in pull request #307:
URL: https://github.com/apache/incubator-nemo/pull/307#discussion_r604737345
##########
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() {
+ try {
+ if (!metricCountDownLatch.await(METRIC_ARRIVE_TIMEOUT,
TimeUnit.MILLISECONDS)) {
Review comment:
Actually i check about it now, It seems that metric does not affect to
the job completion time. job completion time is checked in the
UserApplication.run Function before RuntimeMaster send the flushMetric signal.
But it can be possible waiting metric with doubled duration at the end of
program, when first wait over timeout. But i think it is not a big deal
--
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]