NationalSecurityAgency / datawave

DataWave is an ingest/query framework that leverages Apache Accumulo to provide fast, secure data access.
https://code.nsa.gov/datawave
Apache License 2.0
561 stars 243 forks source link

CompositeQueryLogicTransformer must implement WritesQueryMetrics interface, gather stats from delegates #2479

Closed billoley closed 1 month ago

billoley commented 2 months ago

Query logics using the CompositeQueryLogicTransformer are not populating sourceCount, seekCount, nextCount, yieldCount, fiRanges, docRanges in the query metric because CompositeQueryLogicTransformer doesn't implement the WritesQueryMetrics interface.

I considered delegating the totaling of the various fields to the metric-api module, but after adding "implements WritesQueryMetrics," to CompositeQueryLogicTransformer the class must implement the getters for sources, seeks, nexts, etc which iterate over the delegates to total these values.

With those methods in place, it is just simpler to use those totals in writeQueryMetrics. Any future metric field counts held by a transformer would have to be added to the WritesQueryMetrics interface.