nwangtw commented on a change in pull request #3107: Change concurrent Map
URL: https://github.com/apache/incubator-heron/pull/3107#discussion_r232738519
 
 

 ##########
 File path: 
heron/api/src/java/org/apache/heron/api/metric/LatencyStatAndMetric.java
 ##########
 @@ -225,7 +225,7 @@ private synchronized void rotate(long lat, long count, 
long timeSpent, long targ
   }
 
   synchronized Map<String, Double> getTimeLatAvg(long now) {
-    Map<String, Double> ret = new HashMap<>();
+    Map<String, Double> ret = new ConcurrentHashMap<>();
 
 Review comment:
   ConcurrentHashMap  is not needed here I think. This is a get function and it 
is already synchronized.

----------------------------------------------------------------
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

Reply via email to