Hi Igniters,

I've started to work on adding QueryDetailMetrics for cache-less SQL
queries(issue https://issues.apache.org/jira/browse/IGNITE-6677) and found
that it's required to change API. I don't think that adding methods like
queryDetailMetrics, resetQueryDetailMetrics, as in IgniteCache to Ignite
class is a good idea. So, I see 2 possible solutions here:

1. Create IgniteMetrics(ignite.metrics()) and move metrics from
Ignite(like dataRegionMetrics and dataStorageMetrics) and add a new
metric "queryDetailMetrics" to it. Of course, old methods will be
deprecated.

2. Finally create Ignite.sql() API, which was already discussed here:
http://apache-ignite-developers.2346864.n4.nabble.com/Rethink-native-SQL-API-in-Apache-Ignite-2-0-td14335.html
and place "queryDetailMetrics" metric there. Here is the ticket for this
change: https://issues.apache.org/jira/browse/IGNITE-4701

Personally, I think that the second solution looks better in this case,
however, moving dataRegionMetrics and dataStorageMetrics to
ignite.matrics() is still a good idea - IMO, Ignite class is not the right
place for them - we shouldn't change our main API class so often.

What do you think?

Thank you,
Evgenii

Reply via email to