ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [3/3] ignite git commit: ignite-1232
Date Tue, 19 Jul 2016 15:07:16 GMT
ignite-1232


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

Branch: refs/heads/ignite-1232-1
Commit: 81c58658310f875843561ebb4e836e54ba6515e0
Parents: 5579048
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Jul 19 16:21:36 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Jul 19 17:07:50 2016 +0300

----------------------------------------------------------------------
 .../cache/query/GridCacheTwoStepQuery.java      | 36 ++++++++
 .../processors/query/h2/IgniteH2Indexing.java   | 31 ++++++-
 .../query/h2/twostep/GridMapQueryExecutor.java  | 53 ++++++------
 .../h2/twostep/GridReduceQueryExecutor.java     | 87 +++++++++-----------
 .../h2/twostep/msg/GridH2QueryRequest.java      | 12 +--
 5 files changed, 134 insertions(+), 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/81c58658/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
index eacf59c..8dcba2f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheTwoStepQuery.java
@@ -60,6 +60,12 @@ public class GridCacheTwoStepQuery {
     /** */
     private boolean skipMergeTbl;
 
+    /** */
+    private List<Integer> caches;
+
+    /** */
+    private List<Integer> extraCaches;
+
     /**
      * @param schemas Schema names in query.
      * @param tbls Tables in query.
@@ -162,6 +168,34 @@ public class GridCacheTwoStepQuery {
     }
 
     /**
+     * @return Caches.
+     */
+    public List<Integer> caches() {
+        return caches;
+    }
+
+    /**
+     * @param caches Caches.
+     */
+    public void caches(List<Integer> caches) {
+        this.caches = caches;
+    }
+
+    /**
+     * @return Caches.
+     */
+    public List<Integer> extraCaches() {
+        return extraCaches;
+    }
+
+    /**
+     * @param extraCaches Caches.
+     */
+    public void extraCaches(List<Integer> extraCaches) {
+        this.extraCaches = extraCaches;
+    }
+
+    /**
      * @return Spaces.
      */
     public Collection<String> spaces() {
@@ -191,6 +225,8 @@ public class GridCacheTwoStepQuery {
 
         GridCacheTwoStepQuery cp = new GridCacheTwoStepQuery(schemas, tbls);
 
+        cp.caches = caches;
+        cp.extraCaches = extraCaches;
         cp.spaces = spaces;
         cp.rdc = rdc.copy(args);
         cp.skipMergeTbl = skipMergeTbl;

http://git-wip-us.apache.org/repos/asf/ignite/blob/81c58658/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 2153c18..3012f79 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -107,6 +107,7 @@ import org.apache.ignite.internal.util.lang.IgniteInClosure2X;
 import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeGuard;
 import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeMemory;
 import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.LT;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.SB;
@@ -1147,15 +1148,41 @@ public class IgniteH2Indexing implements GridQueryIndexing {
                 twoStepQry = GridSqlQuerySplitter.split((JdbcPreparedStatement)stmt, qry.getArgs(),
grpByCollocated,
                     distributedJoins);
 
+                List<Integer> caches;
+                List<Integer> extraCaches = null;
+
                 // Setup spaces from schemas.
                 if (!twoStepQry.schemas().isEmpty()) {
                     Collection<String> spaces = new ArrayList<>(twoStepQry.schemas().size());
+                    caches = new ArrayList<>(twoStepQry.schemas().size() + 1);
+                    caches.add(cctx.cacheId());
+
+                    for (String schema : twoStepQry.schemas()) {
+                        String space0 = space(schema);
+
+                        spaces.add(space0);
 
-                    for (String schema : twoStepQry.schemas())
-                        spaces.add(space(schema));
+                        if (!F.eq(space0, space)) {
+                            int cacheId = CU.cacheId(space0);
+
+                            caches.add(cacheId);
+
+                            if (extraCaches == null)
+                                extraCaches = new ArrayList<>();
+
+                            extraCaches.add(cacheId);
+                        }
+                    }
 
                     twoStepQry.spaces(spaces);
                 }
+                else {
+                    caches = Collections.singletonList(cctx.cacheId());
+                    extraCaches = null;
+                }
+
+                twoStepQry.caches(caches);
+                twoStepQry.extraCaches(extraCaches);
 
                 meta = meta(stmt.getMetaData());
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/81c58658/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 3238134..d7b6cb0 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
@@ -70,6 +70,7 @@ import org.apache.ignite.internal.util.typedef.CI1;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.X;
+import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.plugin.extensions.communication.Message;
@@ -265,19 +266,6 @@ public class GridMapQueryExecutor {
     }
 
     /**
-     * @param cacheName Cache name.
-     * @return Cache context or {@code null} if none.
-     */
-    @Nullable private GridCacheContext<?,?> cacheContext(String cacheName) {
-        GridCacheAdapter<?,?> cache = ctx.cache().internalCache(cacheName);
-
-        if (cache == null)
-            return null;
-
-        return cache.context();
-    }
-
-    /**
      * @param cctx Cache context.
      * @param p Partition ID.
      * @return Partition.
@@ -287,7 +275,7 @@ public class GridMapQueryExecutor {
     }
 
     /**
-     * @param cacheNames Cache names.
+     * @param cacheIds Cache IDs.
      * @param topVer Topology version.
      * @param explicitParts Explicit partitions list.
      * @param reserved Reserved list.
@@ -295,7 +283,7 @@ public class GridMapQueryExecutor {
      * @throws IgniteCheckedException If failed.
      */
     private boolean reservePartitions(
-        Collection<String> cacheNames,
+        List<Integer> cacheIds,
         AffinityTopologyVersion topVer,
         final int[] explicitParts,
         List<GridReservable> reserved
@@ -304,8 +292,8 @@ public class GridMapQueryExecutor {
 
         Collection<Integer> partIds = wrap(explicitParts);
 
-        for (String cacheName : cacheNames) {
-            GridCacheContext<?, ?> cctx = cacheContext(cacheName);
+        for (int i = 0; i < cacheIds.size(); i++) {
+            GridCacheContext<?, ?> cctx = ctx.cache().context().cacheContext(cacheIds.get(i));
 
             if (cctx == null) // Cache was not found, probably was not deployed yet.
                 return false;
@@ -427,12 +415,23 @@ public class GridMapQueryExecutor {
      * @param req Query request.
      */
     private void onQueryRequest(ClusterNode node, GridQueryRequest req) {
-        List<String> caches = (List<String>)F.concat(true, req.space(), req.extraSpaces());
+        List<Integer> cacheIds;
+
+        if (req.extraSpaces() != null) {
+            cacheIds = new ArrayList<>(req.extraSpaces().size() + 1);
+
+            cacheIds.add(CU.cacheId(req.space()));
+
+            for (String extraSpace : req.extraSpaces())
+                cacheIds.add(CU.cacheId(extraSpace));
+        }
+        else
+            cacheIds = Collections.singletonList(CU.cacheId(req.space()));
 
         onQueryRequest0(node,
             req.requestId(),
             req.queries(),
-            caches,
+            cacheIds,
             req.topologyVersion(),
             null,
             req.partitions(),
@@ -465,7 +464,7 @@ public class GridMapQueryExecutor {
      * @param node Node authored request.
      * @param reqId Request ID.
      * @param qrys Queries to execute.
-     * @param caches Caches which will be affected by these queries.
+     * @param cacheIds Caches which will be affected by these queries.
      * @param topVer Topology version.
      * @param partsMap Partitions map for unstable topology.
      * @param parts Explicit partitions for current node.
@@ -477,7 +476,7 @@ public class GridMapQueryExecutor {
         ClusterNode node,
         long reqId,
         Collection<GridCacheSqlQuery> qrys,
-        List<String> caches,
+        List<Integer> cacheIds,
         AffinityTopologyVersion topVer,
         Map<UUID, int[]> partsMap,
         int[] parts,
@@ -494,20 +493,18 @@ public class GridMapQueryExecutor {
         try {
             if (topVer != null) {
                 // Reserve primary for topology version or explicit partitions.
-                if (!reservePartitions(caches, topVer, parts, reserved)) {
+                if (!reservePartitions(cacheIds, topVer, parts, reserved)) {
                     sendRetry(node, reqId);
 
                     return;
                 }
             }
 
-            String mainCache = caches.get(0);
-
             // Prepare to run queries.
-            GridCacheContext<?,?> mainCctx = cacheContext(mainCache);
+            GridCacheContext<?, ?> mainCctx = ctx.cache().context().cacheContext(cacheIds.get(0));
 
             if (mainCctx == null)
-                throw new CacheException("Failed to find cache: " + mainCache);
+                throw new CacheException("Failed to find cache.");
 
             qr = new QueryResults(reqId, qrys.size(), mainCctx);
 
@@ -542,7 +539,7 @@ public class GridMapQueryExecutor {
                 }
             }
 
-            Connection conn = h2.connectionForSpace(mainCache);
+            Connection conn = h2.connectionForSpace(mainCctx.name());
 
             // Here we enforce join order to have the same behavior on all the nodes.
             h2.setupConnection(conn, distributedJoins, true);
@@ -569,7 +566,7 @@ public class GridMapQueryExecutor {
                 int i = 0;
 
                 for (GridCacheSqlQuery qry : qrys) {
-                    ResultSet rs = h2.executeSqlQueryWithTimer(mainCache, conn, qry.query(),
+                    ResultSet rs = h2.executeSqlQueryWithTimer(mainCctx.name(), conn, qry.query(),
                         F.asList(qry.parameters()), true);
 
                     if (ctx.event().isRecordable(EVT_CACHE_QUERY_EXECUTED)) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/81c58658/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index 5c2ff29..7727b46 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -362,13 +362,13 @@ public class GridReduceQueryExecutor {
      * @param extraSpaces Extra spaces.
      * @return {@code true} If preloading is active.
      */
-    private boolean isPreloadingActive(final GridCacheContext<?,?> cctx, List<String>
extraSpaces) {
+    private boolean isPreloadingActive(final GridCacheContext<?,?> cctx, List<Integer>
extraSpaces) {
         if (hasMovingPartitions(cctx))
             return true;
 
         if (extraSpaces != null) {
-            for (String extraSpace : extraSpaces) {
-                if (hasMovingPartitions(cacheContext(extraSpace)))
+            for (int i = 0; i < extraSpaces.size(); i++) {
+                if (hasMovingPartitions(cacheContext(extraSpaces.get(i))))
                     return true;
             }
         }
@@ -392,11 +392,11 @@ public class GridReduceQueryExecutor {
     }
 
     /**
-     * @param name Cache name.
+     * @param cacheId Cache ID.
      * @return Cache context.
      */
-    private GridCacheContext<?,?> cacheContext(String name) {
-        return ctx.cache().internalCache(name).context();
+    private GridCacheContext<?,?> cacheContext(Integer cacheId) {
+        return ctx.cache().context().cacheContext(cacheId);
     }
 
     /**
@@ -407,19 +407,19 @@ public class GridReduceQueryExecutor {
      */
     private Collection<ClusterNode> stableDataNodes(
         AffinityTopologyVersion topVer,
-        final GridCacheContext<?,?> cctx,
-        List<String> extraSpaces
+        final GridCacheContext<?, ?> cctx,
+        List<Integer> extraSpaces
     ) {
-        String space = cctx.name();
-
         Set<ClusterNode> nodes = new HashSet<>(cctx.affinity().assignment(topVer).primaryPartitionNodes());
 
         if (F.isEmpty(nodes))
-            throw new CacheException("Failed to find data nodes for cache: " + space);
+            throw new CacheException("Failed to find data nodes for cache: " + cctx.name());
 
         if (!F.isEmpty(extraSpaces)) {
-            for (String extraSpace : extraSpaces) {
-                GridCacheContext<?,?> extraCctx = cacheContext(extraSpace);
+            for (int i = 0; i < extraSpaces.size(); i++) {
+                GridCacheContext<?,?> extraCctx = cacheContext(extraSpaces.get(i));
+
+                String extraSpace = extraCctx.name();
 
                 if (extraCctx.isLocal())
                     continue; // No consistency guaranties for local caches.
@@ -503,7 +503,7 @@ public class GridReduceQueryExecutor {
      * @return Cursor.
      */
     public Iterator<List<?>> query(
-        GridCacheContext<?,?> cctx,
+        GridCacheContext<?, ?> cctx,
         GridCacheTwoStepQuery qry,
         boolean keepPortable,
         boolean enforceJoinOrder
@@ -528,7 +528,7 @@ public class GridReduceQueryExecutor {
 
             AffinityTopologyVersion topVer = h2.readyTopologyVersion();
 
-            List<String> extraSpaces = extraSpaces(space, qry.spaces());
+            List<Integer> extraSpaces = qry.extraCaches();
 
             Collection<ClusterNode> nodes;
 
@@ -619,12 +619,18 @@ public class GridReduceQueryExecutor {
 
                 if (send(nodes,
                     oldStyle ?
-                        new GridQueryRequest(qryReqId, r.pageSize, space, mapQrys, topVer,
extraSpaces, null) :
+                        new GridQueryRequest(qryReqId,
+                            r.pageSize,
+                            space,
+                            mapQrys,
+                            topVer,
+                            extraSpaces(space, qry.spaces()),
+                            null) :
                         new GridH2QueryRequest()
                             .requestId(qryReqId)
                             .topologyVersion(topVer)
                             .pageSize(r.pageSize)
-                            .caches(join(space, extraSpaces))
+                            .caches(qry.caches())
                             .tables(distributedJoins ? qry.tables() : null)
                             .partitions(convert(partsMap))
                             .queries(mapQrys)
@@ -851,8 +857,8 @@ public class GridReduceQueryExecutor {
      * @param extraSpaces Extra spaces.
      * @return Collection of all data nodes owning all the caches or {@code null} for retry.
      */
-    private Collection<ClusterNode> replicatedUnstableDataNodes(final GridCacheContext<?,?>
cctx,
-        List<String> extraSpaces) {
+    private Collection<ClusterNode> replicatedUnstableDataNodes(final GridCacheContext<?,
?> cctx,
+        List<Integer> extraSpaces) {
         assert cctx.isReplicated() : cctx.name() + " must be replicated";
 
         Set<ClusterNode> nodes = replicatedUnstableDataNodes(cctx);
@@ -861,15 +867,15 @@ public class GridReduceQueryExecutor {
             return null; // Retry.
 
         if (!F.isEmpty(extraSpaces)) {
-            for (String extraSpace : extraSpaces) {
-                GridCacheContext<?,?> extraCctx = cacheContext(extraSpace);
+            for (int i = 0; i < extraSpaces.size(); i++) {
+                GridCacheContext<?, ?> extraCctx = cacheContext(extraSpaces.get(i));
 
                 if (extraCctx.isLocal())
                     continue;
 
                 if (!extraCctx.isReplicated())
                     throw new CacheException("Queries running on replicated cache should
not contain JOINs " +
-                        "with tables in partitioned caches [rCache=" + cctx.name() + ", pCache="
+ extraSpace + "]");
+                        "with tables in partitioned caches [rCache=" + cctx.name() + ", pCache="
+ extraCctx.name() + "]");
 
                 Set<ClusterNode> extraOwners = replicatedUnstableDataNodes(extraCctx);
 
@@ -938,14 +944,14 @@ public class GridReduceQueryExecutor {
      */
     @SuppressWarnings("unchecked")
     private Map<ClusterNode, IntArray> partitionedUnstableDataNodes(final GridCacheContext<?,?>
cctx,
-        List<String> extraSpaces) {
+        List<Integer> extraSpaces) {
         assert !cctx.isReplicated() && !cctx.isLocal() : cctx.name() + " must be
partitioned";
 
         final int partsCnt = cctx.affinity().partitions();
 
         if (extraSpaces != null) { // Check correct number of partitions for partitioned
caches.
-            for (String extraSpace : extraSpaces) {
-                GridCacheContext<?,?> extraCctx = cacheContext(extraSpace);
+            for (int i = 0; i < extraSpaces.size(); i++) {
+                GridCacheContext<?, ?> extraCctx = cacheContext(extraSpaces.get(i));
 
                 if (extraCctx.isReplicated() || extraCctx.isLocal())
                     continue;
@@ -954,7 +960,7 @@ public class GridReduceQueryExecutor {
 
                 if (parts != partsCnt)
                     throw new CacheException("Number of partitions must be the same for correct
collocation [cache1=" +
-                        cctx.name() + ", parts1=" + partsCnt + ", cache2=" + extraSpace +
", parts2=" + parts + "]");
+                        cctx.name() + ", parts1=" + partsCnt + ", cache2=" + extraCctx.name()
+ ", parts2=" + parts + "]");
             }
         }
 
@@ -977,8 +983,8 @@ public class GridReduceQueryExecutor {
         if (extraSpaces != null) {
             // Find owner intersections for each participating partitioned cache partition.
             // We need this for logical collocation between different partitioned caches
with the same affinity.
-            for (String extraSpace : extraSpaces) {
-                GridCacheContext<?,?> extraCctx = cacheContext(extraSpace);
+            for (int i = 0; i < extraSpaces.size(); i++) {
+                GridCacheContext<?, ?> extraCctx = cacheContext(extraSpaces.get(i));
 
                 if (extraCctx.isReplicated() || extraCctx.isLocal())
                     continue;
@@ -987,10 +993,10 @@ public class GridReduceQueryExecutor {
                     List<ClusterNode> owners = extraCctx.topology().owners(p);
 
                     if (F.isEmpty(owners)) {
-                        if (!F.isEmpty(dataNodes(extraSpace, NONE)))
+                        if (!F.isEmpty(dataNodes(extraCctx.name(), NONE)))
                             return null; // Retry.
 
-                        throw new CacheException("Failed to find data nodes [cache=" + extraSpace
+ ", part=" + p + "]");
+                        throw new CacheException("Failed to find data nodes [cache=" + extraCctx.name()
+ ", part=" + p + "]");
                     }
 
                     if (partLocs[p] == null)
@@ -1005,8 +1011,8 @@ public class GridReduceQueryExecutor {
             }
 
             // Filter nodes where not all the replicated caches loaded.
-            for (String extraSpace : extraSpaces) {
-                GridCacheContext<?,?> extraCctx = cacheContext(extraSpace);
+            for (int i = 0; i < extraSpaces.size(); i++) {
+                GridCacheContext<?,?> extraCctx = cacheContext(extraSpaces.get(i));
 
                 if (!extraCctx.isReplicated())
                     continue;
@@ -1161,23 +1167,6 @@ public class GridReduceQueryExecutor {
     }
 
     /**
-     * @param first First element.
-     * @param rest Other elements.
-     * @return New joined list.
-     */
-    private static <Z> List<Z> join(Z first, List<Z> rest) {
-        if (F.isEmpty(rest))
-            return Collections.singletonList(first);
-
-        List<Z> res = new ArrayList<>(rest.size() + 1);
-
-        res.add(first);
-        res.addAll(rest);
-
-        return res;
-    }
-
-    /**
      * @param ints Ints.
      * @return Array.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/81c58658/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
index 3b200c5..dc82b2c 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/msg/GridH2QueryRequest.java
@@ -55,8 +55,8 @@ public class GridH2QueryRequest implements Message, GridCacheQueryMarshallable
{
 
     /** */
     @GridToStringInclude
-    @GridDirectCollection(String.class)
-    private List<String> caches;
+    @GridDirectCollection(Integer.class)
+    private List<Integer> caches;
 
     /** Topology version. */
     private AffinityTopologyVersion topVer;
@@ -120,7 +120,7 @@ public class GridH2QueryRequest implements Message, GridCacheQueryMarshallable
{
      * @param caches Caches.
      * @return {@code this}.
      */
-    public GridH2QueryRequest caches(List<String> caches) {
+    public GridH2QueryRequest caches(List<Integer> caches) {
         this.caches = caches;
 
         return this;
@@ -129,7 +129,7 @@ public class GridH2QueryRequest implements Message, GridCacheQueryMarshallable
{
     /**
      * @return Caches.
      */
-    public List<String> caches() {
+    public List<Integer> caches() {
         return caches;
     }
 
@@ -250,7 +250,7 @@ public class GridH2QueryRequest implements Message, GridCacheQueryMarshallable
{
 
         switch (writer.state()) {
             case 0:
-                if (!writer.writeCollection("caches", caches, MessageCollectionItemType.STRING))
+                if (!writer.writeCollection("caches", caches, MessageCollectionItemType.INT))
                     return false;
 
                 writer.incrementState();
@@ -311,7 +311,7 @@ public class GridH2QueryRequest implements Message, GridCacheQueryMarshallable
{
 
         switch (reader.state()) {
             case 0:
-                caches = reader.readCollection("caches", MessageCollectionItemType.STRING);
+                caches = reader.readCollection("caches", MessageCollectionItemType.INT);
 
                 if (!reader.isLastRead())
                     return false;


Mime
View raw message