public static <T> QueryRunner<T> makeTopNQueryRunner(Segment adapter, NonBlockingPool<ByteBuffer> pool) { QueryRunnerFactory factory = new TopNQueryRunnerFactory( pool, new TopNQueryQueryToolChest( topNConfig, QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator() ), QueryRunnerTestHelper.NOOP_QUERYWATCHER ); return new FinalizeResultsQueryRunner<T>( factory.createRunner(adapter), factory.getToolchest() ); }
Integer.MAX_VALUE ), new TopNQueryQueryToolChest(new TopNQueryConfig(), QueryBenchmarkUtil.NoopIntervalChunkingQueryRunnerDecorator()), QueryBenchmarkUtil.NOOP_QUERYWATCHER );
Integer.MAX_VALUE ), new TopNQueryQueryToolChest(new TopNQueryConfig(), QueryBenchmarkUtil.NoopIntervalChunkingQueryRunnerDecorator()), QueryBenchmarkUtil.NOOP_QUERYWATCHER );
new TopNQueryRunnerFactory( defaultPool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.sameThreadIntervalChunkingQueryRunnerDecorator() new TopNQueryRunnerFactory( customPool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.sameThreadIntervalChunkingQueryRunnerDecorator()
new TopNQueryRunnerFactory( defaultPool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator() new TopNQueryRunnerFactory( customPool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()
new TopNQueryRunnerFactory( defaultPool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator() new TopNQueryRunnerFactory( customPool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()
new TopNQueryRunnerFactory( defaultPool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator() new TopNQueryRunnerFactory( customPool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()
private Sequence<Result<TopNResultValue>> runWithMerge(TopNQuery query, Map<String, Object> context) { final TopNQueryQueryToolChest chest = new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator() ); final QueryRunner<Result<TopNResultValue>> mergeRunner = new FinalizeResultsQueryRunner( chest.mergeResults(runner), chest ); return mergeRunner.run(QueryPlus.wrap(query), context); }
private Sequence<Result<TopNResultValue>> runWithPreMergeAndMerge(TopNQuery query, Map<String, Object> context) { final TopNQueryQueryToolChest chest = new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator() ); final QueryRunner<Result<TopNResultValue>> Runner = new FinalizeResultsQueryRunner( chest.mergeResults(chest.preMergeQueryDecoration(runner)), chest ); return Runner.run(QueryPlus.wrap(query), context); }
new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()
new TopNQueryQueryToolChest(new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()), QueryRunnerTestHelper.NOOP_QUERYWATCHER );
new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()
QueryRunnerFactory factory = new TopNQueryRunnerFactory( pool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()
); final CacheStrategy<Result<TopNResultValue>, Object, TopNQuery> strategy1 = new TopNQueryQueryToolChest( null, null ).getCacheStrategy(query1); final CacheStrategy<Result<TopNResultValue>, Object, TopNQuery> strategy2 = new TopNQueryQueryToolChest( null, null
final TopNQueryQueryToolChest chest = new TopNQueryQueryToolChest( config, QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()
TopNQueryQueryToolChest toolchest = new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()
@Test public void testCloseAndPopulate() throws Exception { List<Result> expectedRes = makeTopNResults(false, objects); List<Result> expectedCacheRes = makeTopNResults(true, objects); TopNQueryBuilder builder = new TopNQueryBuilder() .dataSource("ds") .dimension("top_dim") .metric("imps") .threshold(3) .intervals("2011-01-05/2011-01-10") .aggregators(AGGS) .granularity(Granularities.ALL); QueryToolChest toolchest = new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator() ); testCloseAndPopulate(expectedRes, expectedCacheRes, builder.build(), toolchest); testUseCache(expectedCacheRes, builder.build(), toolchest); }
getDefaultQueryRunner(), new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()
getDefaultQueryRunner(), new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()
new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()