wonook commented on a change in pull request #30: [NEMO-63] On-demand dynamic
optimization metric aggregation
URL: https://github.com/apache/incubator-nemo/pull/30#discussion_r194622133
##########
File path:
common/src/main/java/edu/snu/nemo/common/ir/vertex/MetricCollectionBarrierVertex.java
##########
@@ -71,21 +74,28 @@ public void setDAGSnapshot(final DAG<IRVertex, IREdge>
dag) {
/**
* Method for accumulating metrics in the vertex.
- * @param key metric key, e.g. ID of the partition.
- * @param values metric values, e.g. the block size information of the
partition data.
+ * @param metric the block size information of the partition.
*/
- public void accumulateMetric(final String key, final List<T> values) {
- metricData.putIfAbsent(key, values);
+ public void updateMetricData(final T metric) {
+ metricData = metric;
Review comment:
The comment makes it seem like it's narrowing down the functionality just
for keeping track of block sizes. Would there be a particular reason? Also,
what this code does is 'set' instead of 'update'. I think this makes everything
manual, and leaves the implementation of the metric accumulation to the part
using the APIs, instead of factoring out the repetitive step in this class. I
would like to hear a bit more about the rational behind this change.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services