Hello!

I think these metrics will be gathered for ScanQuery/SqlFieldsQuery
executed via native Java Query API, but they will not be gathered for
statements executed via JDBC.

One obvious reason is that Java Query API's queries are bound to a specific
cache. JDBC query is not bound to specific cache: JDBC query may operate on
zero or more caches. We could map these queries back to participating
caches, but I don't see that we do that.

You could still  use sql.queries.user. metrics:
SELECT * FROM sys.metrics WHERE name LIKE 'sql%' ORDER BY name;

Regards,
-- 
Ilya Kasnacheev


ср, 27 янв. 2021 г. в 15:29, 38797715 <[email protected]>:

> Hello Ilya,
>
> The test method is as follows:
>
> Start 2 nodes on the localhost.
> Use the CREATE TABLE statement to create a table;
> Use the COPY command to load some data;
> Access to cluster through sqlline;
> Execute select count (*) from T;
> Execute select * from sys.metrics  WHERE name LIKE '%cache.T%';
> At this time, you will find that the relevant data are all 0, but the
> value of OffHeapEntriesCount is still correct.
>
> If you use sqlline to access another node, the result is the same.
>
> The configuration file to start the cluster is as follows:
> <bean id="ignite.cfg" class=
> "org.apache.ignite.configuration.IgniteConfiguration">
> <property name="peerClassLoadingEnabled" value="true"/>
> <property name="consistentId" value="#{systemEnvironment['CONSISTENTID']}"
> />
> <property name="metricExporterSpi">
> <list>
> <bean class="org.apache.ignite.spi.metric.sql.SqlViewMetricExporterSpi"/>
> </list>
> </property>
> <property name="cacheConfiguration">
> <list>
> <bean id="partitioned-cache-template" abstract="true" class=
> "org.apache.ignite.configuration.CacheConfiguration">
> <property name="name" value="cache-partitioned*"/>
> <property name="cacheMode" value="PARTITIONED" />
> <property name="backups" value="0" />
> <property name="statisticsEnabled" value="true"/>
> <property name="queryParallelism" value="2"/>
> <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
> </bean>
> <bean id="replicated-cache-template" abstract="true" class=
> "org.apache.ignite.configuration.CacheConfiguration">
> <property name="name" value="cache-replicated*"/>
> <property name="cacheMode" value="REPLICATED" />
> <property name="statisticsEnabled" value="true"/>
> <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
> </bean>
> </list>
> </property>
> <!-- Enabling Apache Ignite Persistent Store. -->
> <property name="dataStorageConfiguration">
> <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
> <property name="metricsEnabled" value="true"/>
> <property name="defaultDataRegionConfiguration">
> <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
> <property name="persistenceEnabled" value="true"/>
> <property name="metricsEnabled" value="true"/>
> <property name="maxSize" value="#{2L * 1024 * 1024 * 1024}"/>
> </bean>
> </property>
> </bean>
> </property>
> </bean>
> 在 2021/1/27 下午6:24, Ilya Kasnacheev 写道:
>
> Hello!
>
> These values are per-node, as far as I know. Is it possible that you have
> connected to a node which does not handle any queries (as reducer, anyway)?
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> вт, 26 янв. 2021 г. в 13:48, 38797715 <[email protected]>:
>
>> Hi,
>>
>> We found that SYS.METRICS View some data is always 0, such as
>> QueryCompleted,QueryExecuted,QuerySumTime,QueryCompleted,QuerySumTime
>> and QueryMaximumTime. This is a bug? Or what configuration is needed? Or
>> the related functions have not been implemented yet?
>>
>>

Reply via email to