Package io.druid.query.topn

Examples of io.druid.query.topn.TopNQueryEngine


            Lists.newArrayList("sally"),
            ImmutableMap.<String, Object>of("sally", "bo")
        )
    );

    TopNQueryEngine engine = new TopNQueryEngine(
        new StupidPool<ByteBuffer>(
            new Supplier<ByteBuffer>()
            {
              @Override
              public ByteBuffer get()
              {
                return ByteBuffer.allocate(50000);
              }
            }
        )
    );

    final Iterable<Result<TopNResultValue>> results = Sequences.toList(
        engine.query(
            new TopNQueryBuilder().dataSource("test")
                                  .granularity(QueryGranularity.ALL)
                                  .intervals(Lists.newArrayList(new Interval(0, new DateTime().getMillis())))
                                  .dimension("sally")
                                  .metric("cnt")
View Full Code Here

TOP

Related Classes of io.druid.query.topn.TopNQueryEngine

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.