Package io.druid.query.groupby

Examples of io.druid.query.groupby.GroupByQueryEngine$PositionMaintainer


    final GroupByQueryConfig config = new GroupByQueryConfig();
    config.setMaxIntermediateRows(10000);

    final Supplier<GroupByQueryConfig> configSupplier = Suppliers.ofInstance(config);
    final GroupByQueryEngine engine = new GroupByQueryEngine(configSupplier, pool);

    final GroupByQueryRunnerFactory factory = new GroupByQueryRunnerFactory(
        engine,
        QueryRunnerTestHelper.NOOP_QUERYWATCHER,
        configSupplier,
        new GroupByQueryQueryToolChest(configSupplier, mapper, engine, pool),
        pool
    );

    GroupByQueryConfig singleThreadedConfig = new GroupByQueryConfig()
    {
      @Override
      public boolean isSingleThreaded()
      {
        return true;
      }
    };
    singleThreadedConfig.setMaxIntermediateRows(10000);

    final Supplier<GroupByQueryConfig> singleThreadedConfigSupplier = Suppliers.ofInstance(singleThreadedConfig);
    final GroupByQueryEngine singleThreadEngine = new GroupByQueryEngine(singleThreadedConfigSupplier, pool);

    final GroupByQueryRunnerFactory singleThreadFactory = new GroupByQueryRunnerFactory(
        singleThreadEngine,
        QueryRunnerTestHelper.NOOP_QUERYWATCHER,
        singleThreadedConfigSupplier,
View Full Code Here


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

    GroupByQueryEngine engine = makeGroupByQueryEngine();

    final Sequence<Row> rows = engine.process(
        GroupByQuery.builder()
                    .setDataSource("test")
                    .setGranularity(QueryGranularity.ALL)
                    .setInterval(new Interval(0, new DateTime().getMillis()))
                    .addDimension("billy")
View Full Code Here

                "sally", "hop"
            )
        )
    );

    GroupByQueryEngine engine = makeGroupByQueryEngine();

    final Sequence<Row> rows = engine.process(
        GroupByQuery.builder()
                    .setDataSource("test")
                    .setGranularity(QueryGranularity.ALL)
                    .setInterval(new Interval(0, new DateTime().getMillis()))
                    .addDimension("billy")
View Full Code Here

    Assert.assertEquals(ImmutableMap.of("billy", "hip", "sally", "hop", "cnt", 1l, "fieldLength", 6.0), row.getEvent());
  }

  private static GroupByQueryEngine makeGroupByQueryEngine()
  {
    return new GroupByQueryEngine(
          Suppliers.<GroupByQueryConfig>ofInstance(
              new GroupByQueryConfig()
              {
                @Override
                public int getMaxIntermediateRows()
View Full Code Here

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

    GroupByQueryEngine engine = makeGroupByQueryEngine();

    final Sequence<Row> rows = engine.process(
        GroupByQuery.builder()
                    .setDataSource("test")
                    .setGranularity(QueryGranularity.ALL)
                    .setInterval(new Interval(0, new DateTime().getMillis()))
                    .addDimension("billy")
View Full Code Here

    QueryRunner runner = new FinalizeResultsQueryRunner(
        client,
        new GroupByQueryQueryToolChest(
            configSupplier,
            jsonMapper,
            new GroupByQueryEngine(
                configSupplier,
                new StupidPool<>(
                    new Supplier<ByteBuffer>()
                    {
                      @Override
View Full Code Here

                        .put(
                            GroupByQuery.class,
                            new GroupByQueryQueryToolChest(
                                groupByQueryConfigSupplier,
                                jsonMapper,
                                new GroupByQueryEngine(
                                    groupByQueryConfigSupplier,
                                    new StupidPool<>(
                                        new Supplier<ByteBuffer>()
                                        {
                                          @Override
View Full Code Here

TOP

Related Classes of io.druid.query.groupby.GroupByQueryEngine$PositionMaintainer

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.