Package org.kairosdb.client.builder.grouper

Examples of org.kairosdb.client.builder.grouper.ValueGrouper


    String json = Resources.toString(Resources.getResource("query_withGroupBys.json"), Charsets.UTF_8);

    QueryBuilder builder = QueryBuilder.getInstance();
    builder.setStart(2, TimeUnit.MONTHS);
    QueryMetric metric = builder.addMetric("metric1");
    metric.addGrouper(new ValueGrouper(10));
    metric.addGrouper(new TagGrouper("tag1", "tag2"));
    metric.addGrouper(new TimeGrouper(new RelativeTime(2, TimeUnit.HOURS), 3));

    assertThat(builder.build(), equalTo(json));
  }
View Full Code Here


      metric.addAggregator(AggregatorFactory.createMaxAggregator(1, TimeUnit.SECONDS));
      metric.addAggregator(AggregatorFactory.createMinAggregator(1, TimeUnit.SECONDS));

      metric.addGrouper(new TagGrouper(HTTP_TAG_NAME_1, HTTP_TAG_NAME_2));
      metric.addGrouper(new TimeGrouper(new RelativeTime(1, TimeUnit.MILLISECONDS), 3));
      metric.addGrouper(new ValueGrouper(4));

      QueryResponse query = client.query(builder);
      assertThat(query.getErrors().size(), equalTo(0));
    }
    finally
View Full Code Here

TOP

Related Classes of org.kairosdb.client.builder.grouper.ValueGrouper

Copyright © 2018 www.massapicom. 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.