Package org.apache.druid.query.topn
Interface TopNQueryMetrics
-
- All Superinterfaces:
QueryMetrics<TopNQuery>
- All Known Implementing Classes:
DefaultTopNQueryMetrics
public interface TopNQueryMetrics extends QueryMetrics<TopNQuery>
Specialization ofQueryMetrics
forTopNQuery
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TopNQueryMetrics
addProcessedRows(long numRows)
Called with the number of rows, processed via each cursor, processed for the query within the segment.void
algorithm(TopNAlgorithm algorithm)
void
columnValueSelector(ColumnValueSelector columnValueSelector)
This method is called exactly once with the columnValueSelector object of each cursor, processed for the query.void
cursor(Cursor cursor)
This method is called exactly once with each cursor, processed for the query.void
dimension(TopNQuery query)
SetsTopNQuery.getDimensionSpec()
.getDimension()
of the given query as dimension.void
dimensionCardinality(int cardinality)
void
granularity(TopNQuery query)
Sets the granularity ofBaseQuery.getGranularity()
of the given query as dimension.void
numComplexMetrics(TopNQuery query)
Sets the number of "complex" metrics of the given topN query as dimension.void
numMetrics(TopNQuery query)
Sets the number of metrics of the given topN query as dimension.void
numValuesPerPass(TopNParams params)
This method may setTopNParams.getNumValuesPerPass()
of the query as dimension.void
startRecordingScanTime()
Calls to this method andstopRecordingScanTime()
wrap scanning of each cursor, processed for the query.TopNQueryMetrics
stopRecordingScanTime()
Calls ofstartRecordingScanTime()
and this method wrap scanning of each cursor, processed for the query.void
threshold(TopNQuery query)
SetsTopNQuery.getThreshold()
of the given query as dimension.-
Methods inherited from interface org.apache.druid.query.QueryMetrics
context, dataSource, duration, emit, hasFilters, identity, interval, makeBitmapResultFactory, parallelMergeParallelism, postFilters, preFilters, query, queryId, queryId, queryType, remoteAddress, reportBackPressureTime, reportBitmapConstructionTime, reportCpuTime, reportNodeBytes, reportNodeTime, reportNodeTimeToFirstByte, reportParallelMergeFastestPartitionTime, reportParallelMergeInputRows, reportParallelMergeInputSequences, reportParallelMergeOutputRows, reportParallelMergeParallelism, reportParallelMergeSlowestPartitionTime, reportParallelMergeTaskCount, reportParallelMergeTotalCpuTime, reportParallelMergeTotalTime, reportPreFilteredRows, reportQueriedSegmentCount, reportQueryBytes, reportQueryTime, reportSegmentAndCacheTime, reportSegmentRows, reportSegmentTime, reportWaitTime, segment, server, sqlQueryId, sqlQueryId, status, subQueryId, success, vectorized
-
-
-
-
Method Detail
-
threshold
void threshold(TopNQuery query)
SetsTopNQuery.getThreshold()
of the given query as dimension.
-
dimension
void dimension(TopNQuery query)
SetsTopNQuery.getDimensionSpec()
.getDimension()
of the given query as dimension.
-
numMetrics
void numMetrics(TopNQuery query)
Sets the number of metrics of the given topN query as dimension.
-
numComplexMetrics
void numComplexMetrics(TopNQuery query)
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
void granularity(TopNQuery query)
Sets the granularity ofBaseQuery.getGranularity()
of the given query as dimension.
-
dimensionCardinality
void dimensionCardinality(int cardinality)
-
algorithm
void algorithm(TopNAlgorithm algorithm)
-
cursor
void cursor(Cursor cursor)
This method is called exactly once with each cursor, processed for the query.
-
columnValueSelector
void columnValueSelector(ColumnValueSelector columnValueSelector)
This method is called exactly once with the columnValueSelector object of each cursor, processed for the query.
-
numValuesPerPass
void numValuesPerPass(TopNParams params)
This method may setTopNParams.getNumValuesPerPass()
of the query as dimension.
-
addProcessedRows
TopNQueryMetrics addProcessedRows(long numRows)
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)
, becauseQueryMetrics.postFilters(java.util.List<org.apache.druid.query.filter.Filter>)
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.
-
-