public Map<String, Object> getValueAndReset() { Map<String, Object> ret = new HashMap<>(); for (Map.Entry<String, CountMetric> e : _value.entrySet()) { ret.put(e.getKey(), e.getValue().getValueAndReset()); } return ret; } }
@Override public Map<String, Object> getMetricsData() { Map<String, Object> ret = new HashMap<>(); ret.put(partitionId + "/receiveApiLatencyMean", receiveApiLatencyMean.getValueAndReset()); ret.put(partitionId + "/receiveApiCallCount", receiveApiCallCount.getValueAndReset()); ret.put(partitionId + "/receiveMessageCount", receiveMessageCount.getValueAndReset()); return ret; } }
public Object getValueAndReset() { Map ret = new HashMap(); for(Map.Entry<String, CountMetric> e : _value.entrySet()) { ret.put(e.getKey(), e.getValue().getValueAndReset()); } return ret; } }
public Object getValueAndReset() { Map<String, Object> ret = new HashMap<>(); for (Map.Entry<String, CountMetric> e : value.entrySet()) { ret.put(e.getKey(), e.getValue().getValueAndReset()); } return ret; } }
public Map getMetricsDataMap() { String[] metricPrefixes = new String[] { _partition.getId(), // Correct metric prefix, see STORM-2775 _partition.toString() // Old prefix, kept for backwards compatibility }; Map<String, Object> ret = new HashMap<>(); for (String metricPrefix : metricPrefixes) { ret.put(metricPrefix + "/fetchAPILatencyMax", _fetchAPILatencyMax.getValueAndReset()); ret.put(metricPrefix + "/fetchAPILatencyMean", _fetchAPILatencyMean.getValueAndReset()); ret.put(metricPrefix + "/fetchAPICallCount", _fetchAPICallCount.getValueAndReset()); ret.put(metricPrefix + "/fetchAPIMessageCount", _fetchAPIMessageCount.getValueAndReset()); ret.put(metricPrefix + "/lostMessageCount", _lostMessageCount.getValueAndReset()); ret.put(metricPrefix + "/messageIneligibleForRetryCount", _messageIneligibleForRetryCount.getValueAndReset()); } return ret; }