Search in sources :

Example 1 with LegacyDataSource

use of io.druid.query.LegacyDataSource in project druid by druid-io.

the class SegmentAnalyzerTest method getSegmentAnalysises.

/**
   * *Awesome* method name auto-generated by IntelliJ!  I love IntelliJ!
   *
   * @param index
   *
   * @return
   */
private List<SegmentAnalysis> getSegmentAnalysises(Segment index, EnumSet<SegmentMetadataQuery.AnalysisType> analyses) {
    final QueryRunner runner = QueryRunnerTestHelper.makeQueryRunner((QueryRunnerFactory) new SegmentMetadataQueryRunnerFactory(new SegmentMetadataQueryQueryToolChest(new SegmentMetadataQueryConfig()), QueryRunnerTestHelper.NOOP_QUERYWATCHER), index, null);
    final SegmentMetadataQuery query = new SegmentMetadataQuery(new LegacyDataSource("test"), QuerySegmentSpecs.create("2011/2012"), null, null, null, analyses, false, false);
    HashMap<String, Object> context = new HashMap<String, Object>();
    return Sequences.toList(query.run(runner, context), Lists.<SegmentAnalysis>newArrayList());
}
Also used : HashMap(java.util.HashMap) SegmentMetadataQuery(io.druid.query.metadata.metadata.SegmentMetadataQuery) LegacyDataSource(io.druid.query.LegacyDataSource) QueryRunner(io.druid.query.QueryRunner)

Aggregations

LegacyDataSource (io.druid.query.LegacyDataSource)1 QueryRunner (io.druid.query.QueryRunner)1 SegmentMetadataQuery (io.druid.query.metadata.metadata.SegmentMetadataQuery)1 HashMap (java.util.HashMap)1