ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [14/50] [abbrv] ignite git commit: ignite-db - types2
Date Tue, 19 Apr 2016 12:58:31 GMT
ignite-db - types2


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

Branch: refs/heads/ignite-db-x-10884
Commit: d7832791b0f0ecb7abd33e9d733584b1469d28e0
Parents: 4bf8b28
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Tue Apr 12 10:52:57 2016 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Tue Apr 12 10:52:57 2016 +0300

----------------------------------------------------------------------
 .../processors/query/h2/database/BPlusTree.java   | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d7832791/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/BPlusTree.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/BPlusTree.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/BPlusTree.java
index d34dc73..4fde3f4 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/BPlusTree.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/BPlusTree.java
@@ -226,7 +226,7 @@ public abstract class BPlusTree<L, T extends L> {
 
             // Replace link at idx with new one.
             // Need to read link here because `p.finish()` will clear row.
-            T newRow = p.row();
+            L newRow = p.row;
 
             if (io.isLeaf()) { // Get old row in leaf page to reduce contention at upper
level.
                 assert p.oldRow == null;
@@ -262,7 +262,7 @@ public abstract class BPlusTree<L, T extends L> {
                 return Put.RETRY;
 
             // Do insert.
-            T moveUpRow = insert(p.meta, io, buf, p.row(), idx, p.rightId, lvl);
+            L moveUpRow = insert(p.meta, io, buf, p.row, idx, p.rightId, lvl);
 
             // Check if split happened.
             if (moveUpRow != null) {
@@ -1254,7 +1254,7 @@ public abstract class BPlusTree<L, T extends L> {
      * @param rightId Right page ID.
      * @throws IgniteCheckedException If failed.
      */
-    private void insertSimple(BPlusIO<L> io, ByteBuffer buf, T row, int idx, long rightId)
+    private void insertSimple(BPlusIO<L> io, ByteBuffer buf, L row, int idx, long rightId)
         throws IgniteCheckedException {
         int cnt = io.getCount(buf);
 
@@ -1279,7 +1279,7 @@ public abstract class BPlusTree<L, T extends L> {
      * @return Move up row.
      * @throws IgniteCheckedException If failed.
      */
-    private T insertWithSplit(Page meta, BPlusIO<L> io, final ByteBuffer buf, T row,
+    private L insertWithSplit(Page meta, BPlusIO<L> io, final ByteBuffer buf, L row,
         int idx, long rightId, int lvl) throws IgniteCheckedException {
         try (Page fwd = allocatePage()) {
             // Need to check this before the actual split, because after the split we will
have new forward page here.
@@ -1354,7 +1354,7 @@ public abstract class BPlusTree<L, T extends L> {
      * @return Move up row.
      * @throws IgniteCheckedException If failed.
      */
-    private T insert(Page meta, BPlusIO<L> io, ByteBuffer buf, T row, int idx, long
rightId, int lvl)
+    private L insert(Page meta, BPlusIO<L> io, ByteBuffer buf, L row, int idx, long
rightId, int lvl)
         throws IgniteCheckedException {
         int maxCnt = io.getMaxCount(buf);
         int cnt = io.getCount(buf);
@@ -1719,14 +1719,6 @@ public abstract class BPlusTree<L, T extends L> {
             super(row);
         }
 
-        /**
-         * @return Row.
-         */
-        @SuppressWarnings("unchecked")
-        T row() {
-            return (T)row;
-        }
-
         /** {@inheritDoc} */
         @Override boolean found(BPlusIO<L> io, ByteBuffer buf, int idx, int lvl) throws
IgniteCheckedException {
             if (io.isLeaf())


Mime
View raw message