ignite-sql-old - rename
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5cb1fb4c Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5cb1fb4c Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5cb1fb4c Branch: refs/heads/ignite-nio Commit: 5cb1fb4c394a5a0e26eec6a145b8af72ed40545f Parents: 5504579 Author: S.Vladykin <svlady...@gridgain.com> Authored: Sat Feb 14 01:16:50 2015 +0300 Committer: S.Vladykin <svlady...@gridgain.com> Committed: Sat Feb 14 01:16:50 2015 +0300 ---------------------------------------------------------------------- .../apache/ignite/cache/query/CacheQueries.java | 2 +- .../apache/ignite/cache/query/CacheQuery.java | 2 +- .../cache/query/CacheQueryConfiguration.java | 180 ------------------ .../ignite/cache/query/CacheQueryMetrics.java | 60 ------ .../cache/query/CacheQueryTypeResolver.java | 32 ---- .../apache/ignite/cache/query/QueryMetrics.java | 60 ++++++ .../ignite/cache/query/QueryTypeResolver.java | 32 ++++ .../configuration/CacheConfiguration.java | 1 - .../configuration/CacheQueryConfiguration.java | 182 +++++++++++++++++++ .../cache/query/GridCacheQueriesImpl.java | 2 +- .../cache/query/GridCacheQueriesProxy.java | 2 +- .../cache/query/GridCacheQueryAdapter.java | 2 +- .../cache/query/GridCacheQueryManager.java | 2 +- .../query/GridCacheQueryMetricsAdapter.java | 4 +- .../processors/query/GridQueryProcessor.java | 4 +- .../visor/cache/VisorCacheQueryMetrics.java | 2 +- .../cache/GridCacheQueryMetricsSelfTest.java | 4 +- 17 files changed, 287 insertions(+), 286 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueries.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueries.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueries.java index 36ae24b..2003172 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueries.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueries.java @@ -143,7 +143,7 @@ public interface CacheQueries<K, V> { * * @return Cache query metrics. */ - public CacheQueryMetrics metrics(); + public QueryMetrics metrics(); /** * Resets accumulated metrics. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java index 1d4a3a7..f16eba2 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java @@ -286,7 +286,7 @@ public interface CacheQuery<T> { * * @return Query metrics. */ - public CacheQueryMetrics metrics(); + public QueryMetrics metrics(); /** * Resets metrics for this query. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java deleted file mode 100644 index e96e222..0000000 --- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryConfiguration.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache.query; - -import java.io.*; - -/** - * Query configuration object. - */ -public class CacheQueryConfiguration implements Serializable { - /** */ - private static final long serialVersionUID = 0L; - - /** Query type resolver. */ - private CacheQueryTypeResolver typeRslvr; - - /** */ - private boolean idxPrimitiveKey; - - /** */ - private boolean idxPrimitiveVal; - - /** */ - private boolean idxFixedTyping; - - /** */ - private boolean escapeAll; - - /** - * Default constructor. - */ - public CacheQueryConfiguration() { - // No-op. - } - - /** - * @param cfg Configuration to copy. - */ - public CacheQueryConfiguration(CacheQueryConfiguration cfg) { - typeRslvr = cfg.getTypeResolver(); - idxPrimitiveKey = cfg.isIndexPrimitiveKey(); - idxPrimitiveVal = cfg.isIndexPrimitiveValue(); - idxFixedTyping = cfg.isIndexFixedTyping(); - escapeAll = cfg.isEscapeAll(); - } - - /** - * Gets query type resolver. - * - * @return Query type resolver. - */ - public CacheQueryTypeResolver getTypeResolver() { - return typeRslvr; - } - - /** - * Sets query type resolver. - * - * @param typeRslvr Query type resolver. - */ - public void setTypeResolver(CacheQueryTypeResolver typeRslvr) { - this.typeRslvr = typeRslvr; - } - - /** - * Gets flag indicating whether SQL engine should index by key in cases - * where key is primitive type - * - * @return {@code True} if primitive keys should be indexed. - */ - public boolean isIndexPrimitiveKey() { - return idxPrimitiveKey; - } - - /** - * Sets flag indicating whether SQL engine should index by key in cases - * where key is primitive type. - * - * @param idxPrimitiveKey {@code True} if primitive keys should be indexed. - */ - public void setIndexPrimitiveKey(boolean idxPrimitiveKey) { - this.idxPrimitiveKey = idxPrimitiveKey; - } - - /** - * Gets flag indicating whether SQL engine should index by value in cases - * where value is primitive type - * - * @return {@code True} if primitive values should be indexed. - */ - public boolean isIndexPrimitiveValue() { - return idxPrimitiveVal; - } - - /** - * Sets flag indexing whether SQL engine should index by value in cases - * where value is primitive type. - * - * @param idxPrimitiveVal {@code True} if primitive values should be indexed. - */ - public void setIndexPrimitiveValue(boolean idxPrimitiveVal) { - this.idxPrimitiveVal = idxPrimitiveVal; - } - - /** - * This flag essentially controls whether all values of the same type have - * identical key type. - * <p> - * If {@code false}, SQL engine will store all keys in BINARY form to make it possible to store - * the same value type with different key types. If {@code true}, key type will be converted - * to respective SQL type if it is possible, hence, improving performance of queries. - * <p> - * Setting this value to {@code false} also means that {@code '_key'} column cannot be indexed and - * cannot participate in query where clauses. The behavior of using '_key' column in where - * clauses with this flag set to {@code false} is undefined. - * - * @return {@code True} if SQL engine should try to convert values to their respective SQL - * types for better performance. - */ - public boolean isIndexFixedTyping() { - return idxFixedTyping; - } - - /** - * This flag essentially controls whether key type is going to be identical - * for all values of the same type. - * <p> - * If false, SQL engine will store all keys in BINARY form to make it possible to store - * the same value type with different key types. If true, key type will be converted - * to respective SQL type if it is possible, which may provide significant performance - * boost. - * - * @param idxFixedTyping {@code True} if SQL engine should try to convert values to their respective SQL - * types for better performance. - */ - public void setIndexFixedTyping(boolean idxFixedTyping) { - this.idxFixedTyping = idxFixedTyping; - } - - /** - * If {@code true}, then table name and all column names in 'create table' SQL - * generated for SQL engine are escaped with double quotes. This flag should be set if table name of - * column name is H2 reserved word or is not valid H2 identifier (e.g. contains space or hyphen). - * <p> - * Note if this flag is set then table and column name in SQL queries also must be escaped with double quotes. - - * @return Flag value. - */ - public boolean isEscapeAll() { - return escapeAll; - } - - /** - * If {@code true}, then table name and all column names in 'create table' SQL - * generated for SQL engine are escaped with double quotes. This flag should be set if table name of - * column name is H2 reserved word or is not valid H2 identifier (e.g. contains space or hyphen). - * <p> - * Note if this flag is set then table and column name in SQL queries also must be escaped with double quotes. - - * @param escapeAll Flag value. - */ - public void setEscapeAll(boolean escapeAll) { - this.escapeAll = escapeAll; - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryMetrics.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryMetrics.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryMetrics.java deleted file mode 100644 index 6c99aef..0000000 --- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryMetrics.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache.query; - -/** - * Cache query metrics used to obtain statistics on query. You can get metrics for - * particular query via {@link CacheQuery#metrics()} method or accumulated metrics - * for all queries via {@link CacheQueries#metrics()}. - */ -public interface CacheQueryMetrics { - /** - * Gets minimum execution time of query. - * - * @return Minimum execution time of query. - */ - public long minimumTime(); - - /** - * Gets maximum execution time of query. - * - * @return Maximum execution time of query. - */ - public long maximumTime(); - - /** - * Gets average execution time of query. - * - * @return Average execution time of query. - */ - public double averageTime(); - - /** - * Gets total number execution of query. - * - * @return Number of executions. - */ - public int executions(); - - /** - * Gets total number of times a query execution failed. - * - * @return Total number of times a query execution failed. - */ - public int fails(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTypeResolver.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTypeResolver.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTypeResolver.java deleted file mode 100644 index 9fea55e..0000000 --- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQueryTypeResolver.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.cache.query; - -/** - * Interface allowing to override table name for portable objects stored in cache. - */ -public interface CacheQueryTypeResolver { - /** - * Allows to override type name for portable objects being stored in cache. - * - * @param key Key. - * @param val Value. - * @return Type name. - */ - public String resolveTypeName(Object key, Object val); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java new file mode 100644 index 0000000..b0eea8d --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.cache.query; + +/** + * Cache query metrics used to obtain statistics on query. You can get metrics for + * particular query via {@link CacheQuery#metrics()} method or accumulated metrics + * for all queries via {@link CacheQueries#metrics()}. + */ +public interface QueryMetrics { + /** + * Gets minimum execution time of query. + * + * @return Minimum execution time of query. + */ + public long minimumTime(); + + /** + * Gets maximum execution time of query. + * + * @return Maximum execution time of query. + */ + public long maximumTime(); + + /** + * Gets average execution time of query. + * + * @return Average execution time of query. + */ + public double averageTime(); + + /** + * Gets total number execution of query. + * + * @return Number of executions. + */ + public int executions(); + + /** + * Gets total number of times a query execution failed. + * + * @return Total number of times a query execution failed. + */ + public int fails(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/cache/query/QueryTypeResolver.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryTypeResolver.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryTypeResolver.java new file mode 100644 index 0000000..f8bb017 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryTypeResolver.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.cache.query; + +/** + * Interface allowing to override table name for portable objects stored in cache. + */ +public interface QueryTypeResolver { + /** + * Allows to override type name for portable objects being stored in cache. + * + * @param key Key. + * @param val Value. + * @return Type name. + */ + public String resolveTypeName(Object key, Object val); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java index 6105f26..6fb74ad 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java @@ -1593,7 +1593,6 @@ public class CacheConfiguration extends MutableConfiguration { * Sets query configuration. * * @param qryCfg Query configuration. - * @see org.apache.ignite.cache.query.CacheQueryConfiguration */ public void setQueryConfiguration(CacheQueryConfiguration qryCfg) { this.qryCfg = qryCfg; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/configuration/CacheQueryConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheQueryConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheQueryConfiguration.java new file mode 100644 index 0000000..e35d910 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheQueryConfiguration.java @@ -0,0 +1,182 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration; + +import org.apache.ignite.cache.query.*; + +import java.io.*; + +/** + * Query configuration object. + */ +public class CacheQueryConfiguration implements Serializable { + /** */ + private static final long serialVersionUID = 0L; + + /** Query type resolver. */ + private QueryTypeResolver typeRslvr; + + /** */ + private boolean idxPrimitiveKey; + + /** */ + private boolean idxPrimitiveVal; + + /** */ + private boolean idxFixedTyping; + + /** */ + private boolean escapeAll; + + /** + * Default constructor. + */ + public CacheQueryConfiguration() { + // No-op. + } + + /** + * @param cfg Configuration to copy. + */ + public CacheQueryConfiguration(CacheQueryConfiguration cfg) { + typeRslvr = cfg.getTypeResolver(); + idxPrimitiveKey = cfg.isIndexPrimitiveKey(); + idxPrimitiveVal = cfg.isIndexPrimitiveValue(); + idxFixedTyping = cfg.isIndexFixedTyping(); + escapeAll = cfg.isEscapeAll(); + } + + /** + * Gets query type resolver. + * + * @return Query type resolver. + */ + public QueryTypeResolver getTypeResolver() { + return typeRslvr; + } + + /** + * Sets query type resolver. + * + * @param typeRslvr Query type resolver. + */ + public void setTypeResolver(QueryTypeResolver typeRslvr) { + this.typeRslvr = typeRslvr; + } + + /** + * Gets flag indicating whether SQL engine should index by key in cases + * where key is primitive type + * + * @return {@code True} if primitive keys should be indexed. + */ + public boolean isIndexPrimitiveKey() { + return idxPrimitiveKey; + } + + /** + * Sets flag indicating whether SQL engine should index by key in cases + * where key is primitive type. + * + * @param idxPrimitiveKey {@code True} if primitive keys should be indexed. + */ + public void setIndexPrimitiveKey(boolean idxPrimitiveKey) { + this.idxPrimitiveKey = idxPrimitiveKey; + } + + /** + * Gets flag indicating whether SQL engine should index by value in cases + * where value is primitive type + * + * @return {@code True} if primitive values should be indexed. + */ + public boolean isIndexPrimitiveValue() { + return idxPrimitiveVal; + } + + /** + * Sets flag indexing whether SQL engine should index by value in cases + * where value is primitive type. + * + * @param idxPrimitiveVal {@code True} if primitive values should be indexed. + */ + public void setIndexPrimitiveValue(boolean idxPrimitiveVal) { + this.idxPrimitiveVal = idxPrimitiveVal; + } + + /** + * This flag essentially controls whether all values of the same type have + * identical key type. + * <p> + * If {@code false}, SQL engine will store all keys in BINARY form to make it possible to store + * the same value type with different key types. If {@code true}, key type will be converted + * to respective SQL type if it is possible, hence, improving performance of queries. + * <p> + * Setting this value to {@code false} also means that {@code '_key'} column cannot be indexed and + * cannot participate in query where clauses. The behavior of using '_key' column in where + * clauses with this flag set to {@code false} is undefined. + * + * @return {@code True} if SQL engine should try to convert values to their respective SQL + * types for better performance. + */ + public boolean isIndexFixedTyping() { + return idxFixedTyping; + } + + /** + * This flag essentially controls whether key type is going to be identical + * for all values of the same type. + * <p> + * If false, SQL engine will store all keys in BINARY form to make it possible to store + * the same value type with different key types. If true, key type will be converted + * to respective SQL type if it is possible, which may provide significant performance + * boost. + * + * @param idxFixedTyping {@code True} if SQL engine should try to convert values to their respective SQL + * types for better performance. + */ + public void setIndexFixedTyping(boolean idxFixedTyping) { + this.idxFixedTyping = idxFixedTyping; + } + + /** + * If {@code true}, then table name and all column names in 'create table' SQL + * generated for SQL engine are escaped with double quotes. This flag should be set if table name of + * column name is H2 reserved word or is not valid H2 identifier (e.g. contains space or hyphen). + * <p> + * Note if this flag is set then table and column name in SQL queries also must be escaped with double quotes. + + * @return Flag value. + */ + public boolean isEscapeAll() { + return escapeAll; + } + + /** + * If {@code true}, then table name and all column names in 'create table' SQL + * generated for SQL engine are escaped with double quotes. This flag should be set if table name of + * column name is H2 reserved word or is not valid H2 identifier (e.g. contains space or hyphen). + * <p> + * Note if this flag is set then table and column name in SQL queries also must be escaped with double quotes. + + * @param escapeAll Flag value. + */ + public void setEscapeAll(boolean escapeAll) { + this.escapeAll = escapeAll; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java index e2ab01a..82f021d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java @@ -206,7 +206,7 @@ public class GridCacheQueriesImpl<K, V> implements GridCacheQueriesEx<K, V>, Ext } /** {@inheritDoc} */ - @Override public CacheQueryMetrics metrics() { + @Override public QueryMetrics metrics() { return ctx.queries().metrics(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java index d9ad3cd..d7c3f4c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java @@ -235,7 +235,7 @@ public class GridCacheQueriesProxy<K, V> implements GridCacheQueriesEx<K, V>, Ex } /** {@inheritDoc} */ - @Override public CacheQueryMetrics metrics() { + @Override public QueryMetrics metrics() { GridCacheProjectionImpl<K, V> prev = gate.enter(prj); try { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java index 5df1085..0c81e5e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java @@ -393,7 +393,7 @@ public class GridCacheQueryAdapter<T> implements CacheQuery<T> { return execute(null, rmtTransform, args); } - @Override public CacheQueryMetrics metrics() { + @Override public QueryMetrics metrics() { return metrics.copy(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java index af5031e..673ac59 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java @@ -1726,7 +1726,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte * * @return Cache queries metrics. */ - public CacheQueryMetrics metrics() { + public QueryMetrics metrics() { return metrics.copy(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java index ddff0cc..7dca343 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java @@ -23,9 +23,9 @@ import org.apache.ignite.internal.util.typedef.internal.*; import java.io.*; /** - * Adapter for {@link org.apache.ignite.cache.query.CacheQueryMetrics}. + * Adapter for {@link QueryMetrics}. */ -public class GridCacheQueryMetricsAdapter implements CacheQueryMetrics, Externalizable { +public class GridCacheQueryMetricsAdapter implements QueryMetrics, Externalizable { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java index 759bcfb..0b2c2f1 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java @@ -76,7 +76,7 @@ public class GridQueryProcessor extends GridProcessorAdapter { private Map<Integer, String> portableIds; /** Type resolvers per space name. */ - private Map<String, CacheQueryTypeResolver> typeResolvers = new HashMap<>(); + private Map<String,QueryTypeResolver> typeResolvers = new HashMap<>(); /** * @param ctx Kernal context. @@ -280,7 +280,7 @@ public class GridQueryProcessor extends GridProcessorAdapter { TypeId id = null; - CacheQueryTypeResolver rslvr = typeResolvers.get(space); + QueryTypeResolver rslvr = typeResolvers.get(space); if (rslvr != null) { String typeName = rslvr.resolveTypeName(key, val); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryMetrics.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryMetrics.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryMetrics.java index 0d22320..ea051e4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryMetrics.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryMetrics.java @@ -48,7 +48,7 @@ public class VisorCacheQueryMetrics implements Serializable { * @param m Cache query metrics. * @return Data transfer object for given cache metrics. */ - public static VisorCacheQueryMetrics from(CacheQueryMetrics m) { + public static VisorCacheQueryMetrics from(QueryMetrics m) { VisorCacheQueryMetrics qm = new VisorCacheQueryMetrics(); qm.minTime = m.minimumTime(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5cb1fb4c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java index 0122336..71930f2 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMetricsSelfTest.java @@ -93,7 +93,7 @@ public class GridCacheQueryMetricsSelfTest extends GridCommonAbstractTest { // Execute query. qry.execute().get(); - CacheQueryMetrics m = cache.queries().metrics(); + QueryMetrics m = cache.queries().metrics(); assert m != null; @@ -135,7 +135,7 @@ public class GridCacheQueryMetricsSelfTest extends GridCommonAbstractTest { // Execute. qry.execute().get(); - CacheQueryMetrics m = qry.metrics(); + QueryMetrics m = qry.metrics(); info("Metrics: " + m);