You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexey Kuznetsov (JIRA)" <ji...@apache.org> on 2016/12/02 01:22:00 UTC

[jira] [Closed] (IGNITE-3443) Implement collecting what SQL statements executed on cluster and their metrics.

     [ https://issues.apache.org/jira/browse/IGNITE-3443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Kuznetsov closed IGNITE-3443.
------------------------------------

> Implement collecting what SQL statements executed on cluster and their metrics.
> -------------------------------------------------------------------------------
>
>                 Key: IGNITE-3443
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3443
>             Project: Ignite
>          Issue Type: Task
>          Components: SQL
>            Reporter: Alexey Kuznetsov
>            Assignee: Alexey Kuznetsov
>             Fix For: 1.8
>
>
> We could collect last 1000 (maybe configurable) sql statements with per  statement statistics: count, min time, max time, avg time,....
> May be execution plan (explain) ?
> -------------------
> Proposed API changes:
> So, I introduced interface org.apache.ignite.cache.query.QueryDetailsMetrics with metrics:
> {code}
> /**
>  * Query metrics aggregated by query type and its textual representation.
>  */
> public interface QueryDetailsMetrics {
>     /**
>      * @return Query type.
>      */
>     public String getQueryType();
>     /**
>      * @return Textual representation of query.
>      */
>     public String getQuery();
>     /**
>      * @return Cache where query was executed.
>      */
>     public String getCache();
>     /**
>      * Gets total number execution of query.
>      *
>      * @return Number of executions.
>      */
>     public int getExecutions();
>     /**
>      * Gets number of completed execution of query.
>      *
>      * @return Number of completed executions.
>      */
>     public int getCompletions();
>     /**
>      * Gets number of times a query execution failed.
>      *
>      * @return Number of times a query execution failed.
>      */
>     public int getFailures();
>     /**
>      * Gets minimum execution time of query.
>      *
>      * @return Minimum execution time of query.
>      */
>     public long getMinimumTime();
>     /**
>      * Gets maximum execution time of query.
>      *
>      * @return Maximum execution time of query.
>      */
>     public long getMaximumTime();
>     /**
>      * Gets average execution time of query.
>      *
>      * @return Average execution time of query.
>      */
>     public double getAverageTime();
>     /**
>      * Gets total time of all query executions.
>      *
>      * @return Total time of all query executions.
>      */
>     public long getTotalTime();
>     /**
>      * Gets latest query start time.
>      *
>      * @return Latest time query was stared.
>      */
>     public long getLastStartTime();
> }
> {code}
> And added method on org.apache.ignite.IgniteCache:
> {code}
> /**
>  * Gets query metrics details.
>  *
>  * @return Metrics.
>  */
> public Collection<? extends QueryDetailsMetrics> queryMetricsHistory();
> {code}
> And also I added new property on org.apache.ignite.configuration.CacheConfiguration:
> {code}
> /**
>  * Gets size of queries metrics history that will be stored in memory for monitoring purposes.
>  * If {@code 0} then history will not be collected.
>  * Note, Larger number may lead to higher memory consumption.
>  *
>  * @return Maximum number of query metrics that will be stored in memory.
>  */
> public int getQueryMetricsHistorySize() {
>     return qryMetricsHistSz;
> }
> /**
>  * Sets size of queries metrics history that will be stored in memory for monitoring purposes.
>  *
>  * @param qryMetricsHistSz Maximum number of latest queries metrics that will be stored in memory.
>  * @return {@code this} for chaining.
>  */
> public CacheConfiguration<K, V> setQueryMetricsHistorySize(int qryMetricsHistSz) {
>     this.qryMetricsHistSz = qryMetricsHistSz;
>     return this;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)