private MetricsTimeVaryingRate get(String key) { return (MetricsTimeVaryingRate) registry.get(key); } private MetricsTimeVaryingRate create(String key) {
MetricsBase value = registry.get(metricName); value.pushMetric(metricsRecord);
private MetricsTimeVaryingRate getMethodTimeMetrics(String key) { return (MetricsTimeVaryingRate) registry.get(key); }
public void readFields(DataInput in) throws IOException { int version = in.readByte(); if (version > (int)SCANMETRICS_VERSION) { throw new IOException("version " + version + " not supported"); } int metricsCount = in.readInt(); for (int i=0; i<metricsCount; i++) { String metricsName = in.readUTF(); long v = in.readLong(); MetricsBase mb = registry.get(metricsName); if ( mb instanceof MetricsTimeVaryingLong) { ((MetricsTimeVaryingLong) mb).inc(v); } else { LOG.warn("unsupported metrics type. metrics name: " + mb.getName() + ", metrics description: " + mb.getDescription()); } } }
public synchronized void incrTimeVaryingMetric( String name, long amt, int numOps) { MetricsTimeVaryingRate m = (MetricsTimeVaryingRate)registry.get(name); if (m == null) { m = new MetricsTimeVaryingRate(name, this.registry); this.needsUpdateMessage = true; } if (numOps > 0) { m.inc(numOps, amt); } }
public synchronized void setNumericMetric(String name, long amt) { MetricsLongValue m = (MetricsLongValue)registry.get(name); if (m == null) { m = new MetricsLongValue(name, this.registry); this.needsUpdateMessage = true; } m.set(amt); }
if (metrics != null) { // Metrics is non-null only when used inside name node String metricsName = "sync_" + this.getName(); MetricsBase retrMetrics = metrics.registry.get(metricsName); if (retrMetrics != null) { sync = (MetricsTimeVaryingRate) retrMetrics;
o = metricsRegistry.get(attributeName);
o = metricsRegistry.get(attributeName);
o = metricsRegistry.get(attributeName);
o = metricsRegistry.get(attributeName);
o = metricsRegistry.get(attributeName);
o = metricsRegistry.get(attributeName);