Package org.apache.druid.query
Class DefaultGenericQueryMetricsFactory
- java.lang.Object
-
- org.apache.druid.query.DefaultGenericQueryMetricsFactory
-
- All Implemented Interfaces:
GenericQueryMetricsFactory
public class DefaultGenericQueryMetricsFactory extends Object implements GenericQueryMetricsFactory
-
-
Constructor Summary
Constructors Constructor Description DefaultGenericQueryMetricsFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GenericQueryMetricsFactoryinstance()Should be used only in tests, directly or indirectly (e.QueryMetrics<Query<?>>makeMetrics()Creates aQueryMetricswhich doesn't have predefined QueryMetrics subclass.QueryMetrics<Query<?>>makeMetrics(Query<?> query)Creates aQueryMetricsfor query, which doesn't have predefined QueryMetrics subclass.
-
-
-
Method Detail
-
instance
public static GenericQueryMetricsFactory instance()
Should be used only in tests, directly or indirectly (e. g. inSearchQueryQueryToolChest(org.apache.druid.query.search.SearchQueryConfig, org.apache.druid.query.search.SearchQueryMetricsFactory)).
-
makeMetrics
public QueryMetrics<Query<?>> makeMetrics(Query<?> query)
Description copied from interface:GenericQueryMetricsFactoryCreates aQueryMetricsfor query, which doesn't have predefined QueryMetrics subclass. This method must callQueryMetrics.query(Query)with the given query on the created QueryMetrics object before returning.- Specified by:
makeMetricsin interfaceGenericQueryMetricsFactory
-
makeMetrics
public QueryMetrics<Query<?>> makeMetrics()
Description copied from interface:GenericQueryMetricsFactoryCreates aQueryMetricswhich doesn't have predefined QueryMetrics subclass. This method is used by the router to build aQueryMetricsfor SQL queries. It is needed since at router, there is no native query linked to a SQL query.- Specified by:
makeMetricsin interfaceGenericQueryMetricsFactory
-
-