ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: Page memory integration WIP
Date Thu, 28 Jan 2016 16:16:56 GMT
Repository: ignite
Updated Branches:
  refs/heads/sql-store 0af910876 -> 7bec0b9c4


Page memory integration WIP


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

Branch: refs/heads/sql-store
Commit: 7bec0b9c4d3aa99e480727b8fcd5be0198a64eda
Parents: 0af9108
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Thu Jan 28 19:16:04 2016 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Thu Jan 28 19:16:04 2016 +0300

----------------------------------------------------------------------
 .../stream/v2/DirectByteBufferStreamImplV2.java |  1 +
 .../processors/query/h2/IgniteH2Indexing.java   | 26 +++++++++++++++++---
 .../query/h2/IgniteH2QueryIndexProvider.java    |  2 +-
 3 files changed, 24 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7bec0b9c/modules/core/src/main/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2.java
b/modules/core/src/main/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2.java
index 1a4c4bb..8f5fac1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.direct.stream.v2;
 
 import java.lang.reflect.Array;
 import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.BitSet;
 import java.util.Collection;

http://git-wip-us.apache.org/repos/asf/ignite/blob/7bec0b9c/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 aa79e7c..4cd7cb6 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
@@ -104,6 +104,7 @@ 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.T3;
+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;
@@ -1953,7 +1954,16 @@ public class IgniteH2Indexing implements GridQueryIndexing {
 
             ArrayList<Index> idxs = new ArrayList<>();
 
-            idxs.add(createSortedIndex("_key_PK", tbl, true, KEY_COL, VAL_COL, tbl.indexColumn(0,
ASCENDING)));
+            int cacheId = CU.cacheId(schema.ccfg.getName());
+
+            idxs.add(createSortedIndex(
+                cacheId,
+                "_key_PK",
+                tbl,
+                true,
+                KEY_COL,
+                VAL_COL,
+                tbl.indexColumn(0, ASCENDING)));
 
             if (type().valueClass() == String.class) {
                 try {
@@ -1993,7 +2003,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
                     }
 
                     if (idx.type() == SORTED)
-                        idxs.add(createSortedIndex(name, tbl, false, KEY_COL, VAL_COL, cols));
+                        idxs.add(createSortedIndex(cacheId, name, tbl, false, KEY_COL, VAL_COL,
cols));
                     else if (idx.type() == GEO_SPATIAL)
                         idxs.add(createH2SpatialIndex(tbl, name, cols, KEY_COL, VAL_COL));
                     else
@@ -2013,9 +2023,17 @@ public class IgniteH2Indexing implements GridQueryIndexing {
          * @param cols Columns.
          * @return Index.
          */
-        private Index createSortedIndex(String name, GridH2Table tbl, boolean pk, int keyCol,
int valCol, IndexColumn... cols) {
+        private Index createSortedIndex(
+            int cacheId,
+            String name,
+            GridH2Table tbl,
+            boolean pk,
+            int keyCol,
+            int valCol,
+            IndexColumn... cols
+        ) {
             if (idxProvider != null)
-                return idxProvider.createIndex(name, tbl, pk, keyCol, valCol, cols);
+                return idxProvider.createIndex(cacheId, name, tbl, pk, keyCol, valCol, cols);
 
             return new GridH2TreeIndex(name, tbl, pk, keyCol, valCol, cols);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/7bec0b9c/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2QueryIndexProvider.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2QueryIndexProvider.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2QueryIndexProvider.java
index de8016d..3fada9b 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2QueryIndexProvider.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2QueryIndexProvider.java
@@ -34,5 +34,5 @@ public interface IgniteH2QueryIndexProvider {
      * @param cols Index columns.
      * @return Created index.
      */
-    public Index createIndex(String name, GridH2Table tbl, boolean pk, int keyCol, int valCol,
IndexColumn... cols);
+    public Index createIndex(int cacheId, String name, GridH2Table tbl, boolean pk, int keyCol,
int valCol, IndexColumn... cols);
 }


Mime
View raw message