ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [16/31] incubator-ignite git commit: ignite-341 - tests
Date Fri, 27 Mar 2015 11:34:10 GMT
ignite-341 - tests


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

Branch: refs/heads/ignite-611
Commit: 5771dcae0def87a248172f28a78f5e4a48e1278d
Parents: ccea391
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Wed Mar 25 16:50:20 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Wed Mar 25 16:50:20 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/query/h2/IgniteH2Indexing.java   | 5 ++++-
 .../processors/query/h2/opt/GridH2AbstractKeyValueRow.java      | 2 +-
 .../internal/processors/query/h2/opt/GridH2RowDescriptor.java   | 2 +-
 .../ignite/internal/processors/query/h2/opt/GridH2Table.java    | 4 ++--
 .../internal/processors/query/h2/opt/GridH2TreeIndex.java       | 4 ++--
 5 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5771dcae/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 01b0db6..46dd226 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
@@ -1891,9 +1891,12 @@ public class IgniteH2Indexing implements GridQueryIndexing {
         }
 
         /** {@inheritDoc} */
-        @Override public GridH2AbstractKeyValueRow createRow(Object key, @Nullable Object
val, long expirationTime)
+        @Override public GridH2Row createRow(Object key, @Nullable Object val, long expirationTime)
             throws IgniteCheckedException {
             try {
+                if (val == null) // Only can happen for remove operation, can create simple
search row.
+                    return new GridH2Row(wrap(key, keyType), null);
+
                 return schema.offheap == null ?
                     new GridH2KeyValueRowOnheap(this, key, keyType, val, valType, expirationTime)
:
                     new GridH2KeyValueRowOffheap(this, key, keyType, val, valType, expirationTime);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5771dcae/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
index e85d1fb..e6eae5c 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
@@ -91,7 +91,7 @@ public abstract class GridH2AbstractKeyValueRow extends GridH2Row {
      * @return Value.
      * @throws IgniteSpiException If failed.
      */
-    private static Value wrap(Object obj, int type) throws IgniteSpiException {
+    public static Value wrap(Object obj, int type) throws IgniteSpiException {
         switch (type) {
             case Value.BOOLEAN:
                 return ValueBoolean.get((Boolean)obj);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5771dcae/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2RowDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2RowDescriptor.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2RowDescriptor.java
index b79d897..c5f9551 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2RowDescriptor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2RowDescriptor.java
@@ -40,7 +40,7 @@ public interface GridH2RowDescriptor extends GridOffHeapSmartPointerFactory<Grid
      * @return Row.
      * @throws IgniteCheckedException If failed.
      */
-    public GridH2AbstractKeyValueRow createRow(Object key, @Nullable Object val, long expirationTime)
+    public GridH2Row createRow(Object key, @Nullable Object val, long expirationTime)
         throws IgniteCheckedException;
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5771dcae/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
index 95ecc13..e686c5e 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
@@ -139,7 +139,7 @@ public class GridH2Table extends TableBase {
 
         assert desc != null;
 
-        GridH2AbstractKeyValueRow row = desc.createRow(key, null, 0); // Create search row.
+        GridH2Row searchRow = desc.createRow(key, null, 0);
 
         GridUnsafeMemory mem = desc.memory();
 
@@ -149,7 +149,7 @@ public class GridH2Table extends TableBase {
             desc.guard().begin();
 
         try {
-            row = pk.findOne(row);
+            GridH2AbstractKeyValueRow row = (GridH2AbstractKeyValueRow)pk.findOne(searchRow);
 
             if (row == null)
                 return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5771dcae/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
index 7528498..eee624b 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
@@ -247,8 +247,8 @@ public class GridH2TreeIndex extends GridH2IndexBase implements Comparator<GridS
      * @param row Search row.
      * @return Row.
      */
-    public GridH2AbstractKeyValueRow findOne(GridSearchRowPointer row) {
-        return (GridH2AbstractKeyValueRow)tree.get(row);
+    public GridH2Row findOne(GridSearchRowPointer row) {
+        return tree.get(row);
     }
 
     /**


Mime
View raw message