ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-3477 Code style.
Date Fri, 17 Feb 2017 08:23:07 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-3477 8f836cb0e -> dd82b891b


ignite-3477 Code style.


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

Branch: refs/heads/ignite-3477
Commit: dd82b891b79fe35b6a2c54169f2e0e33ca53ef81
Parents: 8f836cb
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Feb 17 11:23:00 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Feb 17 11:23:00 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/database/tree/io/PageIO.java | 16 ++++++++++------
 .../processors/query/h2/database/H2Tree.java      |  2 +-
 .../processors/query/h2/database/H2TreeIndex.java |  1 -
 .../query/h2/database/io/H2ExtrasInnerIO.java     | 17 +++++++++++++----
 .../query/h2/database/io/H2ExtrasLeafIO.java      | 18 +++++++++++++-----
 5 files changed, 37 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/dd82b891/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/PageIO.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/PageIO.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/PageIO.java
index 6f50bf7..06999cb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/PageIO.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/PageIO.java
@@ -160,10 +160,14 @@ public abstract class PageIO {
 
     /** Index for payload == 1. */
     public static final short T_H2_EX_REF_LEAF_START = 10000;
+
+    /** */
     public static final short T_H2_EX_REF_LEAF_END = T_H2_EX_REF_LEAF_START + MAX_PAYLOAD_SIZE
- 1;
 
     /** */
     public static final short T_H2_EX_REF_INNER_START = 20000;
+
+    /** */
     public static final short T_H2_EX_REF_INNER_END = T_H2_EX_REF_INNER_START + MAX_PAYLOAD_SIZE
- 1;
 
     /** */
@@ -310,19 +314,19 @@ public abstract class PageIO {
 
     /**
      * Registers extra inner IO versions.
+     *
+     * @param innerExtIOs Extra versions.
      */
-    public static void registerH2ExtraInner(
-        IOVersions<? extends BPlusInnerIO<?>> innerExtIOs
-    ) {
+    public static void registerH2ExtraInner(IOVersions<? extends BPlusInnerIO<?>>
innerExtIOs) {
         h2ExtraInnerIOs.add(innerExtIOs);
     }
 
     /**
      * Registers extra inner IO versions.
+     *
+     * @param leafExtIOs Extra versions.
      */
-    public static void registerH2ExtraLeaf(
-        IOVersions<? extends BPlusLeafIO<?>> leafExtIOs
-    ) {
+    public static void registerH2ExtraLeaf(IOVersions<? extends BPlusLeafIO<?>>
leafExtIOs) {
         h2ExtraLeafIOs.add(leafExtIOs);
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/dd82b891/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2Tree.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2Tree.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2Tree.java
index dd37492..2442722 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2Tree.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2Tree.java
@@ -104,7 +104,7 @@ public abstract class H2Tree extends BPlusTree<SearchRow, GridH2Row>
{
 
     /**
      * @return Inline size.
-     * @throws IgniteCheckedException
+     * @throws IgniteCheckedException If failed.
      */
     private int getMetaInlineSize() throws IgniteCheckedException {
         try (Page meta = page(metaPageId)) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/dd82b891/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
index be5be0a..2e9940b 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
@@ -108,7 +108,6 @@ public class H2TreeIndex extends GridH2IndexBase {
                 tbl.rowFactory(), page.pageId().pageId(), page.isAllocated(), computeInlineSize(inlineIdxs,
inlineSize)) {
                 @Override protected int compare(BPlusIO<SearchRow> io, long pageAddr,
int idx, SearchRow row)
                     throws IgniteCheckedException {
-
                     if (inlineSize() == 0)
                         return compareRows(getRow(io, pageAddr, idx), row);
                     else {

http://git-wip-us.apache.org/repos/asf/ignite/blob/dd82b891/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2ExtrasInnerIO.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2ExtrasInnerIO.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2ExtrasInnerIO.java
index 5a8a681..277c364 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2ExtrasInnerIO.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2ExtrasInnerIO.java
@@ -57,7 +57,11 @@ public class H2ExtrasInnerIO extends BPlusInnerIO<SearchRow> {
             return (IOVersions<BPlusInnerIO<SearchRow>>)PageIO.getInnerVersions((short)(payload
- 1));
     }
 
-    /** */
+    /**
+     * @param type Type.
+     * @param payload Payload size.
+     * @return
+     */
     private static IOVersions<H2ExtrasInnerIO> getVersions(short type, short payload)
{
         return new IOVersions<>(new H2ExtrasInnerIO(type, 1, payload));
     }
@@ -78,9 +82,11 @@ public class H2ExtrasInnerIO extends BPlusInnerIO<SearchRow> {
 
         assert row0.link != 0 : row0;
 
-        H2TreeIndex currentIdx = H2TreeIndex.getCurrentIndex();
-        assert currentIdx != null;
-        List<InlineIndexHelper> inlineIdx = currentIdx.inlineIndexes();
+        H2TreeIndex currIdx = H2TreeIndex.getCurrentIndex();
+
+        assert currIdx != null;
+
+        List<InlineIndexHelper> inlineIdx = currIdx.inlineIndexes();
 
         assert inlineIdx != null;
 
@@ -88,9 +94,12 @@ public class H2ExtrasInnerIO extends BPlusInnerIO<SearchRow> {
 
         for (int i = 0; i < inlineIdx.size(); i++) {
             InlineIndexHelper idx = inlineIdx.get(i);
+
             int size = idx.put(pageAddr, off + fieldOff, row.getValue(idx.columnIndex()),
payloadSize - fieldOff);
+
             if (size == 0)
                 break;
+
             fieldOff += size;
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/dd82b891/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2ExtrasLeafIO.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2ExtrasLeafIO.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2ExtrasLeafIO.java
index a874ad4..45558cf 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2ExtrasLeafIO.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/io/H2ExtrasLeafIO.java
@@ -35,7 +35,6 @@ import org.h2.result.SearchRow;
  * Leaf page for H2 row references.
  */
 public class H2ExtrasLeafIO extends BPlusLeafIO<SearchRow> {
-
     /** Payload size. */
     private final int payloadSize;
 
@@ -58,7 +57,11 @@ public class H2ExtrasLeafIO extends BPlusLeafIO<SearchRow> {
             return (IOVersions<BPlusLeafIO<SearchRow>>)PageIO.getLeafVersions((short)(payload
- 1));
     }
 
-    /** */
+    /**
+     * @param type Type.
+     * @param payload Payload size.
+     * @return Versions.
+     */
     private static IOVersions<H2ExtrasLeafIO> getVersions(short type, short payload)
{
         return new IOVersions<>(new H2ExtrasLeafIO(type, 1, payload));
     }
@@ -79,9 +82,11 @@ public class H2ExtrasLeafIO extends BPlusLeafIO<SearchRow> {
 
         assert row0.link != 0;
 
-        H2TreeIndex currentIdx = H2TreeIndex.getCurrentIndex();
-        assert currentIdx != null;
-        List<InlineIndexHelper> inlineIdxs = currentIdx.inlineIndexes();
+        H2TreeIndex currIdx = H2TreeIndex.getCurrentIndex();
+
+        assert currIdx != null;
+
+        List<InlineIndexHelper> inlineIdxs = currIdx.inlineIndexes();
 
         assert inlineIdxs != null;
 
@@ -89,9 +94,12 @@ public class H2ExtrasLeafIO extends BPlusLeafIO<SearchRow> {
 
         for (int i = 0; i < inlineIdxs.size(); i++) {
             InlineIndexHelper idx = inlineIdxs.get(i);
+
             int size = idx.put(pageAddr, off + fieldOff, row.getValue(idx.columnIndex()),
payloadSize - fieldOff);
+
             if (size == 0)
                 break;
+
             fieldOff += size;
         }
 


Mime
View raw message