Examples of MetricMap


Examples of org.apache.hadoop.metrics.spi.AbstractMetricsContext.MetricMap

public class TestOutputRecord extends TestCase {
  public void testCopy() {
    TagMap tags = new TagMap();
    tags.put("tagkey", "tagval");
    MetricMap metrics = new MetricMap();
    metrics.put("metrickey", 123.4);
    OutputRecord r = new OutputRecord(tags, metrics);
   
    assertEquals(tags, r.getTagsCopy());   
    assertNotSame(tags, r.getTagsCopy());
    assertEquals(metrics, r.getMetricsCopy());
View Full Code Here

Examples of org.apache.hadoop.metrics.spi.AbstractMetricsContext.MetricMap

        List<TagsMetricsPair> metricsAndTags =
          new ArrayList<TagsMetricsPair>();
        records.put(r.getKey(), metricsAndTags);
        for (OutputRecord outputRecord : r.getValue()) {
          TagMap tagMap = outputRecord.getTagsCopy();
          MetricMap metricMap = outputRecord.getMetricsCopy();
          metricsAndTags.add(new TagsMetricsPair(tagMap, metricMap));
        }
      }
    }
    return map;
View Full Code Here

Examples of org.apache.hadoop.metrics.spi.AbstractMetricsContext.MetricMap

 
  /**
   * Returns a copy of this record's metrics.
   */
  public MetricMap getMetricsCopy() {
    return new MetricMap(metricMap);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.