giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [giraph] dlogothetis commented on a change in pull request #110: Counter Mechanism
Date Fri, 08 Nov 2019 03:14:00 GMT
dlogothetis commented on a change in pull request #110: Counter Mechanism
URL: https://github.com/apache/giraph/pull/110#discussion_r343970156
 
 

 ##########
 File path: giraph-core/src/main/java/org/apache/giraph/master/input/MasterInputSplitsHandler.java
 ##########
 @@ -225,7 +231,16 @@ private void splitFractionReached(
    */
   public static Counter getSplitFractionDoneTimestampCounter(
       InputType inputType, double fraction, Mapper.Context context) {
-    return context.getCounter(inputType.name() + " input",
-        String.format("%.2f%% done time (ms)", fraction * 100));
+    String groupName = inputType.name() + " input";
+    String counterName = String.format("%.2f%% done time (ms)", fraction * 100);
+    Set<String> counters = COUNTER_GROUP_AND_NAMES.getOrDefault(
 
 Review comment:
   Since the set of counters is known in advance (check the MasterInputSplitsHandler constructor),
you can register them upon initialization. Otherwise, because this can be called from multiple
threads, this map has to be synchronized too.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message