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_r195299727
##########
File path:
common/src/main/java/edu/snu/nemo/common/ir/vertex/MetricCollectionBarrierVertex.java
##########
@@ -71,21 +75,36 @@ 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 map of hash value of the key of the block to the block size.
*/
- public void accumulateMetric(final String key, final List<T> values) {
- metricData.putIfAbsent(key, values);
+ public void updateMetricData(final Map<K, V> metric) {
Review comment:
I'm not too happy about making the method seem like it has some kind of an
updating logic inside it and when it's just setting the metric value as the one
given through the parameter. AFAIK, refactoring only requires a couple of
clicks on the IDE, so it's not terribly difficult to change it back and forth.
Why not change it as `setMetricData` and leave a TODO note to change the method
name again after including an updating logic with NEMO-96? I wouldn't like to
leave things like this, where it can be misleading for others.
----------------------------------------------------------------
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