Package org.apache.druid.query.topn
Interface TopNQueryMetrics
- All Superinterfaces:
QueryMetrics<TopNQuery>
- All Known Implementing Classes:
DefaultTopNQueryMetrics
Specialization of
QueryMetrics for TopNQuery.-
Method Summary
Modifier and TypeMethodDescriptionaddProcessedRows(long numRows) Called with the number of rows, processed via each cursor, processed for the query within the segment.voidalgorithm(TopNAlgorithm algorithm) voidcolumnValueSelector(ColumnValueSelector columnValueSelector) This method is called exactly once with the columnValueSelector object of each cursor, processed for the query.voidThis method is called exactly once with each cursor, processed for the query.voidSetsTopNQuery.getDimensionSpec().getDimension()of the given query as dimension.voiddimensionCardinality(int cardinality) voidgranularity(TopNQuery query) Sets the granularity ofBaseQuery.getGranularity()of the given query as dimension.voidnumComplexMetrics(TopNQuery query) Sets the number of "complex" metrics of the given topN query as dimension.voidnumMetrics(TopNQuery query) Sets the number of metrics of the given topN query as dimension.voidnumValuesPerPass(TopNParams params) This method may setTopNParams.getNumValuesPerPass()of the query as dimension.voidCalls to this method andstopRecordingScanTime()wrap scanning of each cursor, processed for the query.Calls ofstartRecordingScanTime()and this method wrap scanning of each cursor, processed for the query.voidSetsTopNQuery.getThreshold()of the given query as dimension.Methods inherited from interface org.apache.druid.query.QueryMetrics
context, dataSource, duration, emit, filterBundle, hasFilters, identity, interval, makeBitmapResultFactory, parallelMergeParallelism, postFilters, preFilters, projection, query, queryId, queryId, queryType, remoteAddress, reportBackPressureTime, reportBitmapConstructionTime, reportCpuTime, reportNodeBytes, reportNodeTime, reportNodeTimeToFirstByte, reportParallelMergeFastestPartitionTime, reportParallelMergeInputRows, reportParallelMergeInputSequences, reportParallelMergeOutputRows, reportParallelMergeParallelism, reportParallelMergeSlowestPartitionTime, reportParallelMergeTaskCount, reportParallelMergeTotalCpuTime, reportParallelMergeTotalTime, reportPreFilteredRows, reportQueriedSegmentCount, reportQueryBytes, reportQueryTime, reportResultCachePoll, reportSegmentAndCacheTime, reportSegmentOnDemandLoadBytes, reportSegmentOnDemandLoadCount, reportSegmentOnDemandLoadTime, reportSegmentOnDemandLoadTimeAvg, reportSegmentOnDemandLoadTimeMax, reportSegmentOnDemandLoadWaitTimeAvg, reportSegmentOnDemandLoadWaitTimeMax, reportSegmentRows, reportSegmentTime, reportWaitTime, segment, server, sqlQueryId, sqlQueryId, status, statusCode, subQueryId, success, vectorized
-
Method Details
-
threshold
SetsTopNQuery.getThreshold()of the given query as dimension. -
dimension
SetsTopNQuery.getDimensionSpec().getDimension()of the given query as dimension. -
numMetrics
Sets the number of metrics of the given topN query as dimension. -
numComplexMetrics
Sets the number of "complex" metrics of the given topN query as dimension. By default it is assumed that "complex" metric is a metric of not long or double type, but it could be redefined in the implementation of this method. -
granularity
Sets the granularity ofBaseQuery.getGranularity()of the given query as dimension. -
dimensionCardinality
void dimensionCardinality(int cardinality) -
algorithm
-
cursor
This method is called exactly once with each cursor, processed for the query. -
columnValueSelector
This method is called exactly once with the columnValueSelector object of each cursor, processed for the query. -
numValuesPerPass
This method may setTopNParams.getNumValuesPerPass()of the query as dimension. -
addProcessedRows
Called with the number of rows, processed via each cursor, processed for the query within the segment. The total number of processed rows, reported via this method for a TopNQueryMetrics instance, is smaller or equal toQueryMetrics.reportPreFilteredRows(long), because matchers fromQueryMetrics.filterBundle(FilterBundle.BundleInfo)are additionally applied. If there are no postFilters, preFilteredRows and processedRows are equal. -
startRecordingScanTime
void startRecordingScanTime()Calls to this method andstopRecordingScanTime()wrap scanning of each cursor, processed for the query. -
stopRecordingScanTime
TopNQueryMetrics stopRecordingScanTime()Calls ofstartRecordingScanTime()and this method wrap scanning of each cursor, processed for the query.
-