private void doGarbageCollectionUpdates() { List<GarbageCollectorMXBean> gcBeans = ManagementFactory.getGarbageCollectorMXBeans(); long count = 0; long timeMillis = 0; for (GarbageCollectorMXBean gcBean : gcBeans) { count += gcBean.getCollectionCount(); timeMillis += gcBean.getCollectionTime(); } metrics.incrMetric("gcCount", (int)(count - gcCount)); metrics.incrMetric("gcTimeMillis", (int)(timeMillis - gcTimeMillis)); gcCount = count; gcTimeMillis = timeMillis; }
private void doGarbageCollectionUpdates() { List<GarbageCollectorMXBean> gcBeans = ManagementFactory.getGarbageCollectorMXBeans(); long count = 0; long timeMillis = 0; for (GarbageCollectorMXBean gcBean : gcBeans) { count += gcBean.getCollectionCount(); timeMillis += gcBean.getCollectionTime(); } metrics.incrMetric("gcCount", (int)(count - gcCount)); metrics.incrMetric("gcTimeMillis", (int)(timeMillis - gcTimeMillis)); gcCount = count; gcTimeMillis = timeMillis; }
private void doGarbageCollectionUpdates() { List<GarbageCollectorMXBean> gcBeans = ManagementFactory.getGarbageCollectorMXBeans(); long count = 0; long timeMillis = 0; for (GarbageCollectorMXBean gcBean : gcBeans) { count += gcBean.getCollectionCount(); timeMillis += gcBean.getCollectionTime(); } metrics.incrMetric("gcCount", (int)(count - gcCount)); metrics.incrMetric("gcTimeMillis", (int)(timeMillis - gcTimeMillis)); gcCount = count; gcTimeMillis = timeMillis; }
private void doGarbageCollectionUpdates() { List<GarbageCollectorMXBean> gcBeans = ManagementFactory.getGarbageCollectorMXBeans(); long count = 0; long timeMillis = 0; for (GarbageCollectorMXBean gcBean : gcBeans) { count += gcBean.getCollectionCount(); timeMillis += gcBean.getCollectionTime(); } metrics.incrMetric("gcCount", (int)(count - gcCount)); metrics.incrMetric("gcTimeMillis", (int)(timeMillis - gcTimeMillis)); gcCount = count; gcTimeMillis = timeMillis; }
private void doGarbageCollectionUpdates() { List<GarbageCollectorMXBean> gcBeans = ManagementFactory.getGarbageCollectorMXBeans(); long count = 0; long timeMillis = 0; for (GarbageCollectorMXBean gcBean : gcBeans) { count += gcBean.getCollectionCount(); timeMillis += gcBean.getCollectionTime(); } metrics.incrMetric("gcCount", (int)(count - gcCount)); metrics.incrMetric("gcTimeMillis", (int)(timeMillis - gcTimeMillis)); gcCount = count; gcTimeMillis = timeMillis; }
private void doGarbageCollectionUpdates() { List<GarbageCollectorMXBean> gcBeans = ManagementFactory.getGarbageCollectorMXBeans(); long count = 0; long timeMillis = 0; for (GarbageCollectorMXBean gcBean : gcBeans) { count += gcBean.getCollectionCount(); timeMillis += gcBean.getCollectionTime(); } metrics.incrMetric("gcCount", (int)(count - gcCount)); metrics.incrMetric("gcTimeMillis", (int)(timeMillis - gcTimeMillis)); gcCount = count; gcTimeMillis = timeMillis; }
private void incrDeletedFileCount(int count) { directoryMetrics.incrMetric("files_deleted", count); directoryMetrics.update(); }
private void doEventCountUpdates() { long newFatal = EventCounter.getFatal(); long newError = EventCounter.getError(); long newWarn = EventCounter.getWarn(); long newInfo = EventCounter.getInfo(); metrics.incrMetric("logFatal", (int)(newFatal - fatalCount)); metrics.incrMetric("logError", (int)(newError - errorCount)); metrics.incrMetric("logWarn", (int)(newWarn - warnCount)); metrics.incrMetric("logInfo", (int)(newInfo - infoCount)); fatalCount = newFatal; errorCount = newError; warnCount = newWarn; infoCount = newInfo; } }
private void doEventCountUpdates() { long newFatal = EventCounter.getFatal(); long newError = EventCounter.getError(); long newWarn = EventCounter.getWarn(); long newInfo = EventCounter.getInfo(); metrics.incrMetric("logFatal", (int)(newFatal - fatalCount)); metrics.incrMetric("logError", (int)(newError - errorCount)); metrics.incrMetric("logWarn", (int)(newWarn - warnCount)); metrics.incrMetric("logInfo", (int)(newInfo - infoCount)); fatalCount = newFatal; errorCount = newError; warnCount = newWarn; infoCount = newInfo; } }
private void doEventCountUpdates() { long newFatal = EventCounter.getFatal(); long newError = EventCounter.getError(); long newWarn = EventCounter.getWarn(); long newInfo = EventCounter.getInfo(); metrics.incrMetric("logFatal", (int)(newFatal - fatalCount)); metrics.incrMetric("logError", (int)(newError - errorCount)); metrics.incrMetric("logWarn", (int)(newWarn - warnCount)); metrics.incrMetric("logInfo", (int)(newInfo - infoCount)); fatalCount = newFatal; errorCount = newError; warnCount = newWarn; infoCount = newInfo; } }
private void doEventCountUpdates() { long newFatal = EventCounter.getFatal(); long newError = EventCounter.getError(); long newWarn = EventCounter.getWarn(); long newInfo = EventCounter.getInfo(); metrics.incrMetric("logFatal", (int)(newFatal - fatalCount)); metrics.incrMetric("logError", (int)(newError - errorCount)); metrics.incrMetric("logWarn", (int)(newWarn - warnCount)); metrics.incrMetric("logInfo", (int)(newInfo - infoCount)); fatalCount = newFatal; errorCount = newError; warnCount = newWarn; infoCount = newInfo; } }
private void doEventCountUpdates() { long newFatal = EventCounter.getFatal(); long newError = EventCounter.getError(); long newWarn = EventCounter.getWarn(); long newInfo = EventCounter.getInfo(); metrics.incrMetric("logFatal", (int)(newFatal - fatalCount)); metrics.incrMetric("logError", (int)(newError - errorCount)); metrics.incrMetric("logWarn", (int)(newWarn - warnCount)); metrics.incrMetric("logInfo", (int)(newInfo - infoCount)); fatalCount = newFatal; errorCount = newError; warnCount = newWarn; infoCount = newInfo; } }
private void doEventCountUpdates() { long newFatal = EventCounter.getFatal(); long newError = EventCounter.getError(); long newWarn = EventCounter.getWarn(); long newInfo = EventCounter.getInfo(); metrics.incrMetric("logFatal", (int)(newFatal - fatalCount)); metrics.incrMetric("logError", (int)(newError - errorCount)); metrics.incrMetric("logWarn", (int)(newWarn - warnCount)); metrics.incrMetric("logInfo", (int)(newInfo - infoCount)); fatalCount = newFatal; errorCount = newError; warnCount = newWarn; infoCount = newInfo; } }
/** * Push the delta metrics to the mr. * The delta is since the last push/interval. * * Note this does NOT push to JMX * (JMX gets the info via {@link #previousIntervalValue} * * @param mr */ public synchronized void pushMetric(final MetricsRecord mr) { intervalHeartBeat(); try { mr.incrMetric(name, getPreviousIntervalValue()); } catch (Exception e) { LOG.info("pushMetric failed for " + name + "\n" + StringUtils.stringifyException(e)); } }
/** * Push the delta metrics to the mr. * The delta is since the last push/interval. * * Note this does NOT push to JMX * (JMX gets the info via {@link #previousIntervalValue} * * @param mr */ public synchronized void pushMetric(final MetricsRecord mr) { intervalHeartBeat(); try { mr.incrMetric(getName(), getPreviousIntervalValue()); } catch (Exception e) { LOG.info("pushMetric failed for " + getName() + "\n" , e); } }
/** * Push the delta metrics to the mr. * The delta is since the last push/interval. * * Note this does NOT push to JMX * (JMX gets the info via {@link #previousIntervalValue} * * @param mr */ public synchronized void pushMetric(final MetricsRecord mr) { intervalHeartBeat(); try { mr.incrMetric(getName(), getPreviousIntervalValue()); } catch (Exception e) { LOG.info("pushMetric failed for " + getName() + "\n" , e); } }
/** * Push the delta metrics to the mr. * The delta is since the last push/interval. * * Note this does NOT push to JMX * (JMX gets the info via {@link #previousIntervalValue} * * @param mr */ public synchronized void pushMetric(final MetricsRecord mr) { intervalHeartBeat(); try { mr.incrMetric(getName(), getPreviousIntervalValue()); } catch (Exception e) { LOG.info("pushMetric failed for " + getName() + "\n" , e); } }
/** * Push the delta metrics to the mr. * The delta is since the last push/interval. * * Note this does NOT push to JMX * (JMX gets the info via {@link #previousIntervalValue} * * @param mr */ public synchronized void pushMetric(final MetricsRecord mr) { intervalHeartBeat(); try { mr.incrMetric(getName(), getPreviousIntervalValue()); } catch (Exception e) { LOG.info("pushMetric failed for " + getName() + "\n" , e); } }
/** * Push the delta metrics to the mr. * The delta is since the last push/interval. * * Note this does NOT push to JMX * (JMX gets the info via {@link #previousIntervalValue} * * @param mr */ public synchronized void pushMetric(final MetricsRecord mr) { intervalHeartBeat(); try { mr.incrMetric(getName(), getPreviousIntervalValue()); } catch (Exception e) { LOG.info("pushMetric failed for " + getName() + "\n" , e); } }
/** * Push the delta metrics to the mr. * The delta is since the last push/interval. * * Note this does NOT push to JMX * (JMX gets the info via {@link #previousIntervalValue} * * @param mr */ public synchronized void pushMetric(final MetricsRecord mr) { intervalHeartBeat(); try { mr.incrMetric(getName(), getPreviousIntervalValue()); } catch (Exception e) { LOG.info("pushMetric failed for " + getName() + "\n" , e); } }