public class DataSourceMetadataQueryRunnerFactory extends Object implements QueryRunnerFactory<Result<DataSourceMetadataResultValue>,DataSourceMetadataQuery>
| Constructor and Description |
|---|
DataSourceMetadataQueryRunnerFactory(DataSourceQueryQueryToolChest toolChest,
QueryWatcher queryWatcher) |
| Modifier and Type | Method and Description |
|---|---|
QueryRunner<Result<DataSourceMetadataResultValue>> |
createRunner(Segment segment)
Given a specific segment, this method will create a
QueryRunner. |
QueryToolChest<Result<DataSourceMetadataResultValue>,DataSourceMetadataQuery> |
getToolchest()
Provides access to the
QueryToolChest for this specific Query type. |
QueryRunner<Result<DataSourceMetadataResultValue>> |
mergeRunners(QueryProcessingPool queryProcessingPool,
Iterable<QueryRunner<Result<DataSourceMetadataResultValue>>> queryRunners)
Runners generated with createRunner() and combined into an Iterable in (time,shardId) order are passed
along to this method with an
QueryProcessingPool. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmergeRunners@Inject public DataSourceMetadataQueryRunnerFactory(DataSourceQueryQueryToolChest toolChest, QueryWatcher queryWatcher)
public QueryRunner<Result<DataSourceMetadataResultValue>> createRunner(Segment segment)
QueryRunnerFactoryQueryRunner.
The QueryRunner, when asked, will generate a Sequence of
results based on the given segment. This is the meat of the Query processing and is where the results are
actually generated. Everything else is just merging and reduction logic.createRunner in interface QueryRunnerFactory<Result<DataSourceMetadataResultValue>,DataSourceMetadataQuery>segment - The segment to processQueryRunner that, when asked, will generate a
Sequence of results based on the given segmentpublic QueryRunner<Result<DataSourceMetadataResultValue>> mergeRunners(QueryProcessingPool queryProcessingPool, Iterable<QueryRunner<Result<DataSourceMetadataResultValue>>> queryRunners)
QueryRunnerFactoryQueryProcessingPool. The method should then return a QueryRunner that,
when asked, will use the QueryProcessingPool to run the base QueryRunners in some fashion.
The vast majority of the time, this should be implemented with ChainedExecutionQueryRunner:
return new ChainedExecutionQueryRunner<>(queryProcessingPool, toolChest.getOrdering(), queryWatcher, queryRunners);
Which will allow for parallel execution up to the maximum number of processing threads allowed.
Unlike QueryRunnerFactory.mergeRunners(ExecutorService, Iterable), this method takes a QueryProcessingPool instead
which allows custom implementations for prioritize query execution on segments.mergeRunners in interface QueryRunnerFactory<Result<DataSourceMetadataResultValue>,DataSourceMetadataQuery>queryProcessingPool - QueryProcessingPool to be used for parallel processingqueryRunners - Individual QueryRunner objects that produce some resultsQueryRunner that, when asked, will use the ExecutorService to run the base
QueryRunner collection.public QueryToolChest<Result<DataSourceMetadataResultValue>,DataSourceMetadataQuery> getToolchest()
QueryRunnerFactoryQueryToolChest for this specific Query type.getToolchest in interface QueryRunnerFactory<Result<DataSourceMetadataResultValue>,DataSourceMetadataQuery>Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.