Examples of tags()


Examples of org.apache.hadoop.metrics2.MetricsRecord.tags()

    expect(configuration.getPrefix()).andReturn("prefix");
    expect(configuration.getString("databaseUrl")).andReturn("url");

    expect(record.context()).andReturn("context");
    expect(record.name()).andReturn("typeName");
    expect(record.tags()).andReturn(new HashSet<MetricsTag>());
    expect(record.timestamp()).andReturn(9999L);

    expect(record.metrics()).andReturn(Collections.singleton(metric));

    expect(metric.name()).andReturn("name").anyTimes();
View Full Code Here

Examples of org.apache.hadoop.metrics2.MetricsRecord.tags()

   */
  private static MetricsRecord mockMetricsRecord(String name,
      List<MetricsTag> tags) {
    MetricsRecord record = mock(MetricsRecord.class);
    when(record.name()).thenReturn(name);
    when(record.tags()).thenReturn(tags);
    return record;
  }
}
View Full Code Here

Examples of org.apache.hadoop.metrics2.MetricsRecord.tags()

        expect(configuration.getPrefix()).andReturn("prefix");
        expect(configuration.getString("databaseUrl")).andReturn("url");

        expect(record.context()).andReturn("context");
        expect(record.name()).andReturn("typeName");
        expect(record.tags()).andReturn(new HashSet<MetricsTag>());
        expect(record.timestamp()).andReturn(9999L);

        expect(record.metrics()).andReturn(Collections.singleton(metric));

        expect(metric.name()).andReturn("name").anyTimes();
View Full Code Here

Examples of org.apache.hadoop.metrics2.MetricsRecord.tags()

        expect(configuration.getPrefix()).andReturn("prefix");
        expect(configuration.getString("databaseUrl")).andReturn("url");

        expect(record.context()).andReturn("context");
        expect(record.name()).andReturn("typeName");
        expect(record.tags()).andReturn(new HashSet<MetricsTag>());
        expect(record.timestamp()).andReturn(9999L);

        expect(record.metrics()).andReturn(Collections.singleton(metric));

        expect(metric.name()).andReturn("name").anyTimes();
View Full Code Here

Examples of org.apache.hadoop.metrics2.MetricsRecord.tags()

    LOG.debug(recs);
    MetricsRecord r = recs.get(0);
    assertEquals("name", "s1rec", r.name());
    assertEquals("tags", new MetricsTag[] {
      tag(MsInfo.Context, "test"),
      tag(MsInfo.Hostname, hostname)}, r.tags());
    assertEquals("metrics", MetricsLists.builder("")
      .addCounter(info("C1", "C1 desc"), 1L)
      .addGauge(info("G1", "G1 desc"), 2L)
      .addCounter(info("S1NumOps", "Number of ops for s1"), 1L)
      .addGauge(info("S1AvgTime", "Average time for s1"), 0.0)
View Full Code Here

Examples of org.apache.hadoop.metrics2.MetricsRecord.tags()

    LOG.debug(recs);
    MetricsRecord r = recs.get(0);
    assertEquals("name", expected, r.name());
    assertEquals("tags", new MetricsTag[] {
      new MetricsTag("context", "Metrics context", "test"),
      new MetricsTag("hostName", "Local hostname", hostname)}, r.tags());
    assertEquals("metrics", new Metric[] {
      new MetricCounterLong("c1", "c1 desc", 1),
      new MetricGaugeLong("g1", "g1 desc", 2),
      new MetricCounterLong("s1_num_ops", "Number of ops for s1 desc", 1),
      new MetricGaugeDouble("s1_avg_time", "Average time for s1 desc", 0)},
View Full Code Here

Examples of org.apache.hadoop.metrics2.impl.ExposedMetricsRecordImpl.tags()

          assertTrue("Didn't find an expected metric to match "+metric, found);
        }
        assertEquals("Number of metrics is received is wrong", metrics.size(), count);

        count = 0;
        for (PhoenixMetricTag tag : record.tags()) {
          count++;
          // find the matching metric in the list
          boolean found = false;
          for (MetricsTag expected : tags) {
            if (expected.name().equals(tag.name())) {
View Full Code Here

Examples of org.apache.phoenix.metrics.PhoenixMetricsRecord.tags()

          assertTrue("Didn't find an expected metric to match "+metric, found);
        }
        assertEquals("Number of metrics is received is wrong", metrics.size(), count);

        count = 0;
        for (PhoenixMetricTag tag : record.tags()) {
          count++;
          // find the matching metric in the list
          boolean found = false;
          for (MetricsTag expected : tags) {
            if (expected.name().equals(tag.name())) {
View Full Code Here

Examples of org.apache.tapestry5.ioc.annotations.Description.tags()

    }
   
    @Cached(watch = "logicalName")
    public String[] getTags() throws ClassNotFoundException {
        Description description = getDescription();
        return description != null ? description.tags() : EMTPY_STRING_ARRAY;
    }

    @Cached(watch = "logicalName")
    public Description getDescription() throws ClassNotFoundException
    {
View Full Code Here

Examples of org.apache.tapestry5.ioc.annotations.Description.tags()

                {
                    final Description description = getClass(className);
                    if (description != null)
                    {
                        putIfNotNull("description", description.text(), classJsonObject);
                        if (description.tags().length > 0)
                        {
                            for (String tag : description.tags())
                            {
                                classJsonObject.accumulate("tag", tag);
                            }
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.