Examples of PhoenixMetricTag


Examples of org.apache.phoenix.metrics.PhoenixMetricTag

      @Override
      public Collection<PhoenixMetricTag> tags() {
        Collection<PhoenixMetricTag> tags = new ArrayList<PhoenixMetricTag>();
        Collection<MetricsTag> origTags = record.tags();
        for (final MetricsTag tag : origTags) {
          tags.add(new PhoenixMetricTag() {

            @Override
            public String name() {
              return tag.name();
            }
View Full Code Here

Examples of org.apache.phoenix.metrics.PhoenixMetricTag

            Iterator<PhoenixMetricTag> tags = record.tags().iterator();

            int annotationCount = 0;
            while (tags.hasNext()) {
                // hostname is a tag, so we differentiate it
                PhoenixMetricTag tag = tags.next();
                if (tag.name().equals(MetricInfo.HOSTNAME.traceName)) {
                    assertEquals("Didn't store correct hostname value", tag.value(),
                        spanInfo.hostname);
                } else {
                    int count = annotationCount++;
                    assertEquals("Didn't get expected annotation", count + " - " + tag.value(),
                        spanInfo.annotations.get(count));
                }
            }
            assertEquals("Didn't get expected number of annotations", annotationCount,
                spanInfo.annotationCount);
View Full Code Here

Examples of org.apache.phoenix.metrics.PhoenixMetricTag

        PhoenixAbstractMetric end = new PhoenixMetricImpl(MetricInfo.END.traceName, endTime);
        record.addMetric(end);

        int tagCount = 0;
        for (String annotation : tags) {
            PhoenixMetricTag tag =
                    new PhoenixTagImpl(MetricInfo.ANNOTATION.traceName,
                            Integer.toString(tagCount++), annotation);
            record.addTag(tag);
        }
        String hostnameValue = "host-name.value";
        PhoenixMetricTag hostnameTag =
                new PhoenixTagImpl(MetricInfo.HOSTNAME.traceName, "", hostnameValue);
        record.addTag(hostnameTag);

        return record;
    }
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.