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); }
final int minTopNThreshold = query.getContextValue("minTopNThreshold", config.getMinTopNThreshold()); if (query.getThreshold() > minTopNThreshold) { return runner.run(queryPlus, responseContext);
defaultPool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.sameThreadIntervalChunkingQueryRunnerDecorator() ), customPool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.sameThreadIntervalChunkingQueryRunnerDecorator() ),
final int minTopNThreshold = query.getContextValue("minTopNThreshold", config.getMinTopNThreshold()); if (query.getThreshold() > minTopNThreshold) { return runner.run(queryPlus, responseContext);
Integer.MAX_VALUE ), new TopNQueryQueryToolChest(new TopNQueryConfig(), QueryBenchmarkUtil.NoopIntervalChunkingQueryRunnerDecorator()), QueryBenchmarkUtil.NOOP_QUERYWATCHER );
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); }
Integer.MAX_VALUE ), new TopNQueryQueryToolChest(new TopNQueryConfig(), QueryBenchmarkUtil.NoopIntervalChunkingQueryRunnerDecorator()), QueryBenchmarkUtil.NOOP_QUERYWATCHER );
defaultPool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator() ),
defaultPool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator() ),
new TopNQueryQueryToolChest(new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()), QueryRunnerTestHelper.NOOP_QUERYWATCHER );
Integer.MAX_VALUE ), new TopNQueryQueryToolChest(new TopNQueryConfig(), QueryBenchmarkUtil.NoopIntervalChunkingQueryRunnerDecorator()), QueryBenchmarkUtil.NOOP_QUERYWATCHER );
TopNQuery.class, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()
defaultPool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator() ),
getDefaultQueryRunner(), new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()
new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator() );
pool, 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); }
stupidPool, new TopNQueryQueryToolChest( new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator() ),
@Test public void testMinTopNThreshold() TopNQueryConfig config = new TopNQueryConfig(); final TopNQueryQueryToolChest chest = new TopNQueryQueryToolChest( config,
new TopNQueryConfig(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator()