@Override public AbstractMap<String, Long> getCounters() { AbstractMap<String, Long> counters = super.getCounters(); // Allow endFunctionListeners to add any counters they have collected if (endFunctionListeners != null) { for (MetaStoreEndFunctionListener listener : endFunctionListeners) { listener.exportCounters(counters); } } return counters; }
private void endFunction(String function, MetaStoreEndFunctionContext context) { com.codahale.metrics.Timer.Context timerContext = timerContexts.get().remove(function); if (timerContext != null) { timerContext.close(); } Counter counter = Metrics.getOrCreateCounter(MetricsConstants.ACTIVE_CALLS + function); if (counter != null) { counter.dec(); } for (MetaStoreEndFunctionListener listener : endFunctionListeners) { listener.onEndFunction(function, context); } }
@Override public AbstractMap<String, Long> getCounters() { AbstractMap<String, Long> counters = super.getCounters(); // Allow endFunctionListeners to add any counters they have collected if (endFunctionListeners != null) { for (MetaStoreEndFunctionListener listener : endFunctionListeners) { listener.exportCounters(counters); } } return counters; }
private void endFunction(String function, MetaStoreEndFunctionContext context) { try { Metrics.endScope(function); } catch (IOException e) { LOG.debug("Exception when closing metrics scope" + e); } for (MetaStoreEndFunctionListener listener : endFunctionListeners) { listener.onEndFunction(function, context); } }
@Override public AbstractMap<String, Long> getCounters() { AbstractMap<String, Long> counters = super.getCounters(); // Allow endFunctionListeners to add any counters they have collected if (endFunctionListeners != null) { for (MetaStoreEndFunctionListener listener : endFunctionListeners) { listener.exportCounters(counters); } } return counters; }
private void endFunction(String function, MetaStoreEndFunctionContext context) { try { Metrics.endScope(function); } catch (IOException e) { LOG.debug("Exception when closing metrics scope" + e); } for (MetaStoreEndFunctionListener listener : endFunctionListeners) { listener.onEndFunction(function, context); } }
@Override public AbstractMap<String, Long> getCounters() { AbstractMap<String, Long> counters = super.getCounters(); // Allow endFunctionListeners to add any counters they have collected if (endFunctionListeners != null) { for (MetaStoreEndFunctionListener listener : endFunctionListeners) { listener.exportCounters(counters); } } return counters; }
private void endFunction(String function, MetaStoreEndFunctionContext context) { com.codahale.metrics.Timer.Context timerContext = timerContexts.get().remove(function); if (timerContext != null) { timerContext.close(); } Counter counter = Metrics.getOrCreateCounter(MetricsConstants.ACTIVE_CALLS + function); if (counter != null) { counter.dec(); } for (MetaStoreEndFunctionListener listener : endFunctionListeners) { listener.onEndFunction(function, context); } }
@Override public AbstractMap<String, Long> getCounters() { AbstractMap<String, Long> counters = super.getCounters(); // Allow endFunctionListeners to add any counters they have collected if (endFunctionListeners != null) { for (MetaStoreEndFunctionListener listener : endFunctionListeners) { listener.exportCounters(counters); } } return counters; }
public void endFunction(String function, MetaStoreEndFunctionContext context) { try { Metrics.endScope(function); } catch (IOException e) { LOG.debug("Exception when closing metrics scope" + e); } for (MetaStoreEndFunctionListener listener : endFunctionListeners) { listener.onEndFunction(function, context); } }