Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AF64B1864C for ; Tue, 19 Apr 2016 12:58:19 +0000 (UTC) Received: (qmail 8407 invoked by uid 500); 19 Apr 2016 12:58:19 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 8322 invoked by uid 500); 19 Apr 2016 12:58:19 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 8121 invoked by uid 99); 19 Apr 2016 12:58:19 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2016 12:58:19 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 49838E02A2; Tue, 19 Apr 2016 12:58:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.apache.org Date: Tue, 19 Apr 2016 12:58:31 -0000 Message-Id: <508ae6948f8f415091288ca63265e3af@git.apache.org> In-Reply-To: <4f408e32fde8498d8f180871ecbd0990@git.apache.org> References: <4f408e32fde8498d8f180871ecbd0990@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [14/50] [abbrv] ignite git commit: ignite-db - types2 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 Authored: Tue Apr 12 10:52:57 2016 +0300 Committer: S.Vladykin 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 { // 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 { 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 { * @param rightId Right page ID. * @throws IgniteCheckedException If failed. */ - private void insertSimple(BPlusIO io, ByteBuffer buf, T row, int idx, long rightId) + private void insertSimple(BPlusIO io, ByteBuffer buf, L row, int idx, long rightId) throws IgniteCheckedException { int cnt = io.getCount(buf); @@ -1279,7 +1279,7 @@ public abstract class BPlusTree { * @return Move up row. * @throws IgniteCheckedException If failed. */ - private T insertWithSplit(Page meta, BPlusIO io, final ByteBuffer buf, T row, + private L insertWithSplit(Page meta, BPlusIO 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 { * @return Move up row. * @throws IgniteCheckedException If failed. */ - private T insert(Page meta, BPlusIO io, ByteBuffer buf, T row, int idx, long rightId, int lvl) + private L insert(Page meta, BPlusIO 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 { super(row); } - /** - * @return Row. - */ - @SuppressWarnings("unchecked") - T row() { - return (T)row; - } - /** {@inheritDoc} */ @Override boolean found(BPlusIO io, ByteBuffer buf, int idx, int lvl) throws IgniteCheckedException { if (io.isLeaf())