ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [25/43] incubator-ignite git commit: ignite-sprint-3 - minor fix for query events
Date Mon, 06 Apr 2015 10:45:34 GMT
ignite-sprint-3 - minor fix for query events


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/cef5227a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/cef5227a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/cef5227a

Branch: refs/heads/gg-10036
Commit: cef5227afb48638c1c4aa0ce26eaaa2244a5edc1
Parents: ea777d4
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Fri Apr 3 18:38:02 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Fri Apr 3 18:38:02 2015 +0300

----------------------------------------------------------------------
 .../ignite/events/CacheQueryExecutedEvent.java    | 11 +++++------
 .../apache/ignite/events/CacheQueryReadEvent.java | 11 +++++------
 .../cache/query/GridCacheQueryManager.java        | 18 +++++++++---------
 .../continuous/CacheContinuousQueryHandler.java   |  4 ++--
 .../processors/query/GridQueryProcessor.java      |  4 ++--
 .../GridCacheContinuousQueryAbstractSelfTest.java |  4 ++--
 .../query/h2/twostep/GridMapQueryExecutor.java    |  4 ++--
 .../cache/IgniteCacheAbstractQuerySelfTest.java   |  8 ++++----
 8 files changed, 31 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cef5227a/modules/core/src/main/java/org/apache/ignite/events/CacheQueryExecutedEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/events/CacheQueryExecutedEvent.java
b/modules/core/src/main/java/org/apache/ignite/events/CacheQueryExecutedEvent.java
index 04f83c2..22892bf 100644
--- a/modules/core/src/main/java/org/apache/ignite/events/CacheQueryExecutedEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/events/CacheQueryExecutedEvent.java
@@ -19,10 +19,9 @@ package org.apache.ignite.events;
 
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cluster.*;
-import org.apache.ignite.internal.processors.cache.query.*;
-import org.apache.ignite.lang.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
 import org.jetbrains.annotations.*;
 
 import java.util.*;
@@ -67,7 +66,7 @@ public class CacheQueryExecutedEvent<K, V> extends EventAdapter {
     private static final long serialVersionUID = 3738753361235304496L;
 
     /** Query type. */
-    private final CacheQueryType qryType;
+    private final String qryType;
 
     /** Cache name. */
     private final String cacheName;
@@ -112,7 +111,7 @@ public class CacheQueryExecutedEvent<K, V> extends EventAdapter
{
         ClusterNode node,
         String msg,
         int type,
-        CacheQueryType qryType,
+        String qryType,
         @Nullable String cacheName,
         @Nullable String clsName,
         @Nullable String clause,
@@ -139,9 +138,9 @@ public class CacheQueryExecutedEvent<K, V> extends EventAdapter
{
     /**
      * Gets query type.
      *
-     * @return Query type.
+     * @return Query type. Can be {@code "SQL"}, {@code "TEXT"}, {@code "SCAN"} or {@code
"SPI"}.
      */
-    public CacheQueryType queryType() {
+    public String queryType() {
         return qryType;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cef5227a/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java
b/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java
index a399d8a..78acdc1 100644
--- a/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java
@@ -19,10 +19,9 @@ package org.apache.ignite.events;
 
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cluster.*;
-import org.apache.ignite.internal.processors.cache.query.*;
-import org.apache.ignite.lang.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
 import org.jetbrains.annotations.*;
 
 import java.util.*;
@@ -67,7 +66,7 @@ public class CacheQueryReadEvent<K, V> extends EventAdapter {
     private static final long serialVersionUID = -1984731272984397445L;
 
     /** Query type. */
-    private final CacheQueryType qryType;
+    private final String qryType;
 
     /** Cache name. */
     private final String cacheName;
@@ -130,7 +129,7 @@ public class CacheQueryReadEvent<K, V> extends EventAdapter {
         ClusterNode node,
         String msg,
         int type,
-        CacheQueryType qryType,
+        String qryType,
         @Nullable String cacheName,
         @Nullable String clsName,
         @Nullable String clause,
@@ -165,9 +164,9 @@ public class CacheQueryReadEvent<K, V> extends EventAdapter {
     /**
      * Gets query type.
      *
-     * @return Query type.
+     * @return Query type. Can be {@code "SQL"}, {@code "TEXT"}, {@code "SCAN"} or {@code
"SPI"}.
      */
-    public CacheQueryType queryType() {
+    public String queryType() {
         return qryType;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cef5227a/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 6c8cf9a..d571243 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
@@ -511,7 +511,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                             cctx.localNode(),
                             "SQL query executed.",
                             EVT_CACHE_QUERY_EXECUTED,
-                            CacheQueryType.SQL,
+                            CacheQueryType.SQL.name(),
                             cctx.namex(),
                             qry.queryClassName(),
                             qry.clause(),
@@ -533,7 +533,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                             cctx.localNode(),
                             "Scan query executed.",
                             EVT_CACHE_QUERY_EXECUTED,
-                            CacheQueryType.SCAN,
+                            CacheQueryType.SCAN.name(),
                             cctx.namex(),
                             null,
                             null,
@@ -554,7 +554,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                             cctx.localNode(),
                             "Full text query executed.",
                             EVT_CACHE_QUERY_EXECUTED,
-                            CacheQueryType.FULL_TEXT,
+                            CacheQueryType.FULL_TEXT.name(),
                             cctx.namex(),
                             qry.queryClassName(),
                             qry.clause(),
@@ -628,7 +628,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                     cctx.localNode(),
                     "SQL fields query executed.",
                     EVT_CACHE_QUERY_EXECUTED,
-                    CacheQueryType.SQL_FIELDS,
+                    CacheQueryType.SQL_FIELDS.name(),
                     cctx.namex(),
                     null,
                     qry.clause(),
@@ -660,7 +660,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                     cctx.localNode(),
                     "SPI query executed.",
                     EVT_CACHE_QUERY_EXECUTED,
-                    CacheQueryType.SPI,
+                    CacheQueryType.SPI.name(),
                     cctx.namex(),
                     null,
                     null,
@@ -1119,7 +1119,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                             cctx.localNode(),
                             "SQL fields query result set row read.",
                             EVT_CACHE_QUERY_OBJECT_READ,
-                            CacheQueryType.SQL_FIELDS,
+                            CacheQueryType.SQL_FIELDS.name(),
                             cctx.namex(),
                             null,
                             qry.clause(),
@@ -1318,7 +1318,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                                     cctx.localNode(),
                                     "SQL query entry read.",
                                     EVT_CACHE_QUERY_OBJECT_READ,
-                                    CacheQueryType.SQL,
+                                    CacheQueryType.SQL.name(),
                                     cctx.namex(),
                                     qry.queryClassName(),
                                     qry.clause(),
@@ -1339,7 +1339,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                                     cctx.localNode(),
                                     "Full text query entry read.",
                                     EVT_CACHE_QUERY_OBJECT_READ,
-                                    CacheQueryType.FULL_TEXT,
+                                    CacheQueryType.FULL_TEXT.name(),
                                     cctx.namex(),
                                     qry.queryClassName(),
                                     qry.clause(),
@@ -1360,7 +1360,7 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                                     cctx.localNode(),
                                     "Scan query entry read.",
                                     EVT_CACHE_QUERY_OBJECT_READ,
-                                    CacheQueryType.SCAN,
+                                    CacheQueryType.SCAN.name(),
                                     cctx.namex(),
                                     null,
                                     null,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cef5227a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
index 1fd1ded..ad78b92 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
@@ -172,7 +172,7 @@ class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler
{
                         ctx.discovery().localNode(),
                         "Continuous query executed.",
                         EVT_CACHE_QUERY_EXECUTED,
-                        CacheQueryType.CONTINUOUS,
+                        CacheQueryType.CONTINUOUS.name(),
                         cacheName,
                         null,
                         null,
@@ -236,7 +236,7 @@ class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler
{
                             ctx.discovery().localNode(),
                             "Continuous query executed.",
                             EVT_CACHE_QUERY_OBJECT_READ,
-                            CacheQueryType.CONTINUOUS,
+                            CacheQueryType.CONTINUOUS.name(),
                             cacheName,
                             null,
                             null,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cef5227a/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 048a0c8..ba8479f 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
@@ -564,7 +564,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                     ctx.discovery().localNode(),
                     "SQL query executed.",
                     EVT_CACHE_QUERY_EXECUTED,
-                    CacheQueryType.SQL,
+                    CacheQueryType.SQL.name(),
                     null,
                     null,
                     sqlQry,
@@ -631,7 +631,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                         ctx.discovery().localNode(),
                         "SQL query executed.",
                         EVT_CACHE_QUERY_EXECUTED,
-                        CacheQueryType.SQL,
+                        CacheQueryType.SQL.name(),
                         null,
                         null,
                         sql,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cef5227a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index a22e0c7..5a78f9f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -909,7 +909,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends
GridCommo
 
                 CacheQueryReadEvent qe = (CacheQueryReadEvent)evt;
 
-                assertEquals(CONTINUOUS, qe.queryType());
+                assertEquals(CONTINUOUS.name(), qe.queryType());
                 assertNull(qe.cacheName());
 
                 assertEquals(grid(0).localNode().id(), qe.subjectId());
@@ -933,7 +933,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends
GridCommo
 
                 CacheQueryExecutedEvent qe = (CacheQueryExecutedEvent)evt;
 
-                assertEquals(CONTINUOUS, qe.queryType());
+                assertEquals(CONTINUOUS.name(), qe.queryType());
                 assertNull(qe.cacheName());
 
                 assertEquals(grid(0).localNode().id(), qe.subjectId());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cef5227a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
index 959d1cc..08ad38d 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
@@ -209,7 +209,7 @@ public class GridMapQueryExecutor implements GridMessageListener {
                         node,
                         "SQL query executed.",
                         EVT_CACHE_QUERY_EXECUTED,
-                        CacheQueryType.SQL,
+                        CacheQueryType.SQL.name(),
                         cctx.namex(),
                         null,
                         qry.query(),
@@ -537,7 +537,7 @@ public class GridMapQueryExecutor implements GridMessageListener {
                         cctx.localNode(),
                         "SQL fields query result set row read.",
                         EVT_CACHE_QUERY_OBJECT_READ,
-                        CacheQueryType.SQL,
+                        CacheQueryType.SQL.name(),
                         cctx.namex(),
                         null,
                         qry.query(),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cef5227a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
index 88effe1..3dcf9ac 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
@@ -1004,7 +1004,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
 
                     CacheQueryReadEvent<Integer, Integer> qe = (CacheQueryReadEvent<Integer,
Integer>)evt;
 
-                    assertEquals(SCAN, qe.queryType());
+                    assertEquals(SCAN.name(), qe.queryType());
                     assertNull(qe.cacheName());
 
                     assertNull(qe.className());
@@ -1027,7 +1027,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
 
                     CacheQueryExecutedEvent qe = (CacheQueryExecutedEvent)evt;
 
-                    assertEquals(SCAN, qe.queryType());
+                    assertEquals(SCAN.name(), qe.queryType());
                     assertNull(qe.cacheName());
 
                     assertNull(qe.className());
@@ -1080,7 +1080,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
 
                     CacheQueryReadEvent<UUID, Person> qe = (CacheQueryReadEvent<UUID,
Person>)evt;
 
-                    assertEquals(FULL_TEXT, qe.queryType());
+                    assertEquals(FULL_TEXT.name(), qe.queryType());
                     assertNull(qe.cacheName());
 
                     assertEquals("Person", qe.className());
@@ -1103,7 +1103,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
 
                     CacheQueryExecutedEvent qe = (CacheQueryExecutedEvent)evt;
 
-                    assertEquals(FULL_TEXT, qe.queryType());
+                    assertEquals(FULL_TEXT.name(), qe.queryType());
                     assertNull(qe.cacheName());
 
                     assertEquals("Person", qe.className());


Mime
View raw message