use of org.apache.ignite.internal.processors.hadoop.impl.v2.HadoopV2Counter in project ignite by apache.
the class HadoopMapReduceCounters method findCounter.
/**
* Find a counter in the group.
*
* @param grpName The name of the counter group.
* @param cntrName The name of the counter.
* @param create Create the counter if not found if true.
* @return The counter that was found or added or {@code null} if create is false.
*/
public Counter findCounter(String grpName, String cntrName, boolean create) {
T2<String, String> key = new T2<>(grpName, cntrName);
HadoopLongCounter internalCntr = cntrs.get(key);
if (internalCntr == null & create) {
internalCntr = new HadoopLongCounter(grpName, cntrName);
cntrs.put(key, new HadoopLongCounter(grpName, cntrName));
}
return internalCntr == null ? null : new HadoopV2Counter(internalCntr);
}
Aggregations