Package org.apache.druid.query
Interface GenericQueryMetricsFactory
-
- All Known Implementing Classes:
DefaultGenericQueryMetricsFactory
public interface GenericQueryMetricsFactoryThis factory is used for DI of customQueryMetricsimplementations for all query types, which don't (yet) need to emit custom dimensions and/or metrics, i. e. they are good with the genericQueryMetricsinterface. Implementations could be injected using PolyBind .optionBinder(binder, Key.get(GenericQueryMetricsFactory.class)) .addBinding("myCustomGenericQueryMetricsFactory") .to(MyCustomGenericQueryMetricsFactory.class); And then setting property: druid.query.generic.queryMetricsFactory=myCustomGenericQueryMetricsFactory UnlikeQueryMetricsitself, this interface is considered stable and is expected to be injected into custom Query extensions that do not want to worry about the potential instability ofQueryMetrics.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
-
makeMetrics
QueryMetrics<Query<?>> makeMetrics(Query<?> query)
Creates 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.
-
makeMetrics
QueryMetrics<Query<?>> makeMetrics()
Creates 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.
-
-