You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dm...@apache.org on 2017/04/11 01:38:01 UTC

[01/50] [abbrv] ignite git commit: ignite-2913 - SQL: EXISTS support added

Repository: ignite
Updated Branches:
  refs/heads/ignite-1192 9017ab483 -> 362700c6a


ignite-2913 - SQL: EXISTS support added


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

Branch: refs/heads/ignite-1192
Commit: f726dc483a9e406b0149a6afffc38026b43ccbc5
Parents: f66be1a
Author: Sergi Vladykin <se...@gmail.com>
Authored: Sun Apr 2 15:35:04 2017 +0300
Committer: Sergi Vladykin <se...@gmail.com>
Committed: Sun Apr 2 15:35:04 2017 +0300

----------------------------------------------------------------------
 .../query/h2/sql/GridSqlOperationType.java      | 23 +++++++++--
 .../query/h2/sql/GridSqlQueryParser.java        | 19 ++++++++-
 .../query/IgniteSqlSplitterSelfTest.java        | 43 ++++++++++++++++++++
 .../query/h2/sql/GridQueryParsingTest.java      | 27 +++++++++++-
 4 files changed, 105 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f726dc48/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlOperationType.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlOperationType.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlOperationType.java
index 07a6f6b..5009c0c 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlOperationType.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlOperationType.java
@@ -31,7 +31,7 @@ public enum GridSqlOperationType {
     MULTIPLY(2, new BiExpressionSqlGenerator("*")),
     DIVIDE(2, new BiExpressionSqlGenerator("/")),
     MODULUS(2, new BiExpressionSqlGenerator("%")),
-    NEGATE(1, new PrefixSqlGenerator("-")),
+    NEGATE(1, new PrefixSqlGenerator("-", true)),
 
     // from org.h2.expression.Comparison
     EQUAL(2, new BiExpressionSqlGenerator("=")),
@@ -47,7 +47,7 @@ public enum GridSqlOperationType {
     IS_NULL(1, new SuffixSqlGenerator("IS NULL")),
     IS_NOT_NULL(1, new SuffixSqlGenerator("IS NOT NULL")),
 
-    NOT(1, new PrefixSqlGenerator("NOT")),
+    NOT(1, new PrefixSqlGenerator("NOT", true)),
 
     // from org.h2.expression.ConditionAndOr
     AND(2, new BiExpressionSqlGenerator("AND")),
@@ -58,6 +58,7 @@ public enum GridSqlOperationType {
     LIKE(2, new BiExpressionSqlGenerator("LIKE")),
 
     IN(-1, new ConditionInSqlGenerator()),
+    EXISTS(1, new PrefixSqlGenerator("EXISTS", false)),
 
     ;
     /** */
@@ -145,18 +146,32 @@ public enum GridSqlOperationType {
         /** */
         private final String text;
 
+        /** */
+        private final boolean addSpace;
+
         /**
          * @param text Text.
+         * @param addSpace Add space char after the prefix.
          */
-        private PrefixSqlGenerator(String text) {
+        private PrefixSqlGenerator(String text, boolean addSpace) {
             this.text = text;
+            this.addSpace = addSpace;
         }
 
         /** {@inheritDoc} */
         @Override public String getSql(GridSqlOperation operation) {
             assert operation.operationType().childrenCnt == 1;
 
-            return '(' + text + ' ' + operation.child(0).getSQL() + ')';
+            StringBuilder b = new StringBuilder();
+
+            b.append('(').append(text);
+
+            if (addSpace)
+                b.append(' ');
+
+            b.append(operation.child(0).getSQL()).append(')');
+
+            return b.toString();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f726dc48/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
index 16d7105..0f940e9 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java
@@ -45,6 +45,7 @@ import org.h2.expression.Alias;
 import org.h2.expression.CompareLike;
 import org.h2.expression.Comparison;
 import org.h2.expression.ConditionAndOr;
+import org.h2.expression.ConditionExists;
 import org.h2.expression.ConditionIn;
 import org.h2.expression.ConditionInConstantSet;
 import org.h2.expression.ConditionInSelect;
@@ -78,6 +79,7 @@ import static org.apache.ignite.internal.processors.query.h2.sql.GridSqlOperatio
 import static org.apache.ignite.internal.processors.query.h2.sql.GridSqlOperationType.DIVIDE;
 import static org.apache.ignite.internal.processors.query.h2.sql.GridSqlOperationType.EQUAL;
 import static org.apache.ignite.internal.processors.query.h2.sql.GridSqlOperationType.EQUAL_NULL_SAFE;
+import static org.apache.ignite.internal.processors.query.h2.sql.GridSqlOperationType.EXISTS;
 import static org.apache.ignite.internal.processors.query.h2.sql.GridSqlOperationType.IN;
 import static org.apache.ignite.internal.processors.query.h2.sql.GridSqlOperationType.IS_NOT_NULL;
 import static org.apache.ignite.internal.processors.query.h2.sql.GridSqlOperationType.IS_NULL;
@@ -184,7 +186,10 @@ public class GridSqlQueryParser {
         "compareType");
 
     /** */
-    private static final Getter<ConditionInSelect, Query> QUERY = getter(ConditionInSelect.class, "query");
+    private static final Getter<ConditionInSelect, Query> QUERY_IN = getter(ConditionInSelect.class, "query");
+
+    /** */
+    private static final Getter<ConditionExists, Query> QUERY_EXISTS = getter(ConditionExists.class, "query");
 
     /** */
     private static final Getter<CompareLike, Expression> LEFT = getter(CompareLike.class, "left");
@@ -940,7 +945,7 @@ public class GridSqlQueryParser {
 
             res.addChild(parseExpression(LEFT_CIS.get((ConditionInSelect)expression), calcTypes));
 
-            Query qry = QUERY.get((ConditionInSelect)expression);
+            Query qry = QUERY_IN.get((ConditionInSelect)expression);
 
             res.addChild(parseQueryExpression(qry));
 
@@ -1043,6 +1048,16 @@ public class GridSqlQueryParser {
             return res;
         }
 
+        if (expression instanceof ConditionExists) {
+            Query qry = QUERY_EXISTS.get((ConditionExists)expression);
+
+            GridSqlOperation res = new GridSqlOperation(EXISTS);
+
+            res.addChild(parseQueryExpression(qry));
+
+            return res;
+        }
+
         throw new IgniteException("Unsupported expression: " + expression + " [type=" +
             expression.getClass().getSimpleName() + ']');
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f726dc48/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
index 8c880a3..2e1887e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
@@ -21,9 +21,11 @@ import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Random;
+import java.util.Set;
 import java.util.concurrent.Callable;
 import java.util.concurrent.atomic.AtomicLong;
 import javax.cache.CacheException;
@@ -191,6 +193,47 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
         }
     }
 
+    @SuppressWarnings("SuspiciousMethodCalls")
+    public void testExists() {
+        IgniteCache<Integer,Person2> x = ignite(0).getOrCreateCache(cacheConfig("x", true,
+            Integer.class, Person2.class));
+        IgniteCache<Integer,Person2> y = ignite(0).getOrCreateCache(cacheConfig("y", true,
+            Integer.class, Person2.class));
+
+        try {
+            GridRandom rnd = new GridRandom();
+
+            Set<Integer> intersects = new HashSet<>();
+
+            for (int i = 0; i < 3000; i++) {
+                int r = rnd.nextInt(3);
+
+                if (r != 0)
+                    x.put(i, new Person2(i, "pers_x_" + i));
+
+                if (r != 1)
+                    y.put(i, new Person2(i, "pers_y_" + i));
+
+                if (r == 2)
+                    intersects.add(i);
+            }
+
+            assertFalse(intersects.isEmpty());
+
+            List<List<?>> res = x.query(new SqlFieldsQuery("select _key from \"x\".Person2 px " +
+                "where exists(select 1 from \"y\".Person2 py where px._key = py._key)")).getAll();
+
+            assertEquals(intersects.size(), res.size());
+
+            for (List<?> row : res)
+                assertTrue(intersects.contains(row.get(0)));
+        }
+        finally {
+            x.destroy();
+            y.destroy();
+        }
+    }
+
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f726dc48/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
index 1c2ffd7..477451a 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
@@ -114,6 +114,12 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testParseSelectAndUnion() throws Exception {
+        checkQuery("select 1 from Person p where addrIds in ((1,2,3), (3,4,5))");
+        checkQuery("select 1 from Person p where addrId in ((1,))");
+        checkQuery("select 1 from Person p " +
+            "where p.addrId in (select a.id from Address a)");
+        checkQuery("select 1 from Person p " +
+            "where exists(select 1 from Address a where p.addrId = a.id)");
         checkQuery("select 42");
         checkQuery("select ()");
         checkQuery("select (1)");
@@ -289,7 +295,8 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testParseTableFilter() throws Exception {
-        Prepared prepared = parse("select Person.old, p1.old from Person, Person p1");
+        Prepared prepared = parse("select Person.old, p1.old, p1.addrId from Person, Person p1 " +
+            "where exists(select 1 from Address a where a.id = p1.addrId)");
 
         GridSqlSelect select = (GridSqlSelect)new GridSqlQueryParser(false).parse(prepared);
 
@@ -312,6 +319,21 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
 
         // Alias in FROM must be included in column.
         assertSame(tbl2Alias, col2.expressionInFrom());
+
+        // In EXISTS we must correctly reference the column from the outer query.
+        GridSqlAst exists = select.where();
+        GridSqlSubquery subqry = exists.child();
+        GridSqlSelect subSelect = subqry.child();
+
+        GridSqlColumn p1AddrIdCol = (GridSqlColumn)select.column(2);
+
+        assertEquals("ADDRID", p1AddrIdCol.column().getName());
+        assertSame(tbl2Alias, p1AddrIdCol.expressionInFrom());
+
+        GridSqlColumn p1AddrIdColExists = subSelect.where().child(1);
+        assertEquals("ADDRID", p1AddrIdCol.column().getName());
+
+        assertSame(tbl2Alias, p1AddrIdColExists.expressionInFrom());
     }
 
     /** */
@@ -501,6 +523,9 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
         @QuerySqlField(index = true)
         public int addrId;
 
+        @QuerySqlField
+        public Integer[] addrIds;
+
         @QuerySqlField(index = true)
         public int old;
     }


[26/50] [abbrv] ignite git commit: IGNITE-3531: Renamed IgniteFileSystem.format() to clear().

Posted by dm...@apache.org.
IGNITE-3531: Renamed IgniteFileSystem.format() to clear().


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

Branch: refs/heads/ignite-1192
Commit: 0ccb8569bd3f7b4bbcdb435612867a6723d4a506
Parents: b465301
Author: devozerov <vo...@gridgain.com>
Authored: Thu Apr 6 14:02:09 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Thu Apr 6 14:02:09 2017 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/IgniteFileSystem.java     | 26 ++++++--------------
 .../internal/processors/igfs/IgfsAsyncImpl.java |  8 +++---
 .../internal/processors/igfs/IgfsImpl.java      | 10 ++++----
 .../visor/igfs/VisorIgfsFormatTask.java         |  2 +-
 .../ignite/igfs/IgfsEventsAbstractSelfTest.java |  2 +-
 .../igfs/IgfsFragmentizerAbstractSelfTest.java  |  2 +-
 .../ignite/igfs/IgfsFragmentizerSelfTest.java   |  2 +-
 ...faultIgfsSecondaryFileSystemTestAdapter.java |  2 +-
 .../igfs/IgfsAbstractBaseSelfTest.java          |  2 +-
 .../processors/igfs/IgfsAbstractSelfTest.java   |  4 +--
 ...sCachePerBlockLruEvictionPolicySelfTest.java |  2 +-
 .../igfs/IgfsMetaManagerSelfTest.java           |  2 +-
 .../processors/igfs/IgfsMetricsSelfTest.java    |  2 +-
 .../internal/processors/igfs/IgfsMock.java      |  4 +--
 .../processors/igfs/IgfsProcessorSelfTest.java  |  8 +++---
 .../processors/igfs/IgfsStreamsSelfTest.java    |  2 +-
 .../processors/igfs/IgfsTaskSelfTest.java       |  2 +-
 .../IgfsAbstractRecordResolverSelfTest.java     |  2 +-
 .../impl/HadoopTaskExecutionSelfTest.java       |  2 +-
 ...opClientProtocolMultipleServersSelfTest.java |  2 +-
 .../client/HadoopClientProtocolSelfTest.java    |  2 +-
 .../hadoop/impl/igfs/IgfsEventsTestSuite.java   |  2 +-
 22 files changed, 41 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/main/java/org/apache/ignite/IgniteFileSystem.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteFileSystem.java b/modules/core/src/main/java/org/apache/ignite/IgniteFileSystem.java
index 78c86dc..0100c7b 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteFileSystem.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteFileSystem.java
@@ -31,7 +31,6 @@ import org.apache.ignite.igfs.IgfsPathSummary;
 import org.apache.ignite.igfs.mapreduce.IgfsRecordResolver;
 import org.apache.ignite.igfs.mapreduce.IgfsTask;
 import org.apache.ignite.lang.IgniteAsyncSupport;
-import org.apache.ignite.lang.IgniteAsyncSupported;
 import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.lang.IgniteUuid;
 import org.jetbrains.annotations.Nullable;
@@ -266,28 +265,23 @@ public interface IgniteFileSystem extends IgniteAsyncSupport {
     public long size(IgfsPath path) throws IgniteException;
 
     /**
-     * Formats the file system removing all existing entries from it.
-     * <p>
-     * Supports asynchronous execution (see {@link IgniteAsyncSupport}).
+     * Formats the file system removing all existing entries from it, but not removing anything in secondary
+     * file system (if any).
      *
-     * @throws IgniteException In case format has failed.
+     * @throws IgniteException In case clear failed.
      */
-    @IgniteAsyncSupported
-    public void format() throws IgniteException;
+    public void clear() throws IgniteException;
 
     /**
-     * Asynchronously formats the file system removing all existing entries from it.
-     * <p>
+     * Formats the file system removing all existing entries from it, but not removing anything in secondary
+     * file system (if any).
      *
-     * @return a Future representing pending completion of the format operation.
-     * @throws IgniteException In case format has failed.
+     * @return Future representing pending completion of the clear operation.
      */
-    public IgniteFuture<Void> formatAsync() throws IgniteException;
+    public IgniteFuture<Void> clearAsync() throws IgniteException;
 
     /**
      * Executes IGFS task.
-     * <p>
-     * Supports asynchronous execution (see {@link IgniteAsyncSupport}).
      *
      * @param task Task to execute.
      * @param rslvr Optional resolver to control split boundaries.
@@ -296,7 +290,6 @@ public interface IgniteFileSystem extends IgniteAsyncSupport {
      * @return Task result.
      * @throws IgniteException If execution failed.
      */
-    @IgniteAsyncSupported
     public <T, R> R execute(IgfsTask<T, R> task, @Nullable IgfsRecordResolver rslvr,
         Collection<IgfsPath> paths, @Nullable T arg) throws IgniteException;
 
@@ -331,7 +324,6 @@ public interface IgniteFileSystem extends IgniteAsyncSupport {
      * @return Task result.
      * @throws IgniteException If execution failed.
      */
-    @IgniteAsyncSupported
     public <T, R> R execute(IgfsTask<T, R> task, @Nullable IgfsRecordResolver rslvr,
         Collection<IgfsPath> paths, boolean skipNonExistentFiles, long maxRangeLen, @Nullable T arg)
         throws IgniteException;
@@ -367,7 +359,6 @@ public interface IgniteFileSystem extends IgniteAsyncSupport {
      * @return Task result.
      * @throws IgniteException If execution failed.
      */
-    @IgniteAsyncSupported
     public <T, R> R execute(Class<? extends IgfsTask<T, R>> taskCls,
         @Nullable IgfsRecordResolver rslvr, Collection<IgfsPath> paths, @Nullable T arg) throws IgniteException;
 
@@ -401,7 +392,6 @@ public interface IgniteFileSystem extends IgniteAsyncSupport {
      * @return Task result.
      * @throws IgniteException If execution failed.
      */
-    @IgniteAsyncSupported
     public <T, R> R execute(Class<? extends IgfsTask<T, R>> taskCls,
         @Nullable IgfsRecordResolver rslvr, Collection<IgfsPath> paths, boolean skipNonExistentFiles,
         long maxRangeLen, @Nullable T arg) throws IgniteException;

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAsyncImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAsyncImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAsyncImpl.java
index b5289a3..528c18f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAsyncImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAsyncImpl.java
@@ -58,9 +58,9 @@ public class IgfsAsyncImpl extends AsyncSupportAdapter<IgniteFileSystem> impleme
     }
 
     /** {@inheritDoc} */
-    @Override public void format() {
+    @Override public void clear() {
         try {
-            saveOrGet(igfs.formatAsync0());
+            saveOrGet(igfs.clearAsync0());
         }
         catch (IgniteCheckedException e) {
             throw U.convertException(e);
@@ -68,8 +68,8 @@ public class IgfsAsyncImpl extends AsyncSupportAdapter<IgniteFileSystem> impleme
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteFuture<Void> formatAsync() throws IgniteException {
-        return igfs.formatAsync();
+    @Override public IgniteFuture<Void> clearAsync() throws IgniteException {
+        return igfs.clearAsync();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
index 18506cd..6ffa202 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
@@ -1404,7 +1404,7 @@ public final class IgfsImpl implements IgfsEx {
     }
 
     /** {@inheritDoc} */
-    @Override public void format() {
+    @Override public void clear() {
         try {
             IgniteUuid id = meta.format();
 
@@ -1432,8 +1432,8 @@ public final class IgfsImpl implements IgfsEx {
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteFuture<Void> formatAsync() throws IgniteException {
-        return (IgniteFuture<Void>)createFuture(formatAsync0());
+    @Override public IgniteFuture<Void> clearAsync() throws IgniteException {
+        return (IgniteFuture<Void>)createFuture(clearAsync0());
     }
 
     /**
@@ -1441,7 +1441,7 @@ public final class IgfsImpl implements IgfsEx {
      *
      * @return Future.
      */
-    IgniteInternalFuture<?> formatAsync0() {
+    IgniteInternalFuture<?> clearAsync0() {
         GridFutureAdapter<?> fut = new GridFutureAdapter<>();
 
         Thread t = new Thread(new FormatRunnable(fut), "igfs-format-" + cfg.getName() + "-" +
@@ -1871,7 +1871,7 @@ public final class IgfsImpl implements IgfsEx {
             IgfsException err = null;
 
             try {
-                format();
+                clear();
             }
             catch (Throwable err0) {
                 err = IgfsUtils.toIgfsException(err0);

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsFormatTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsFormatTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsFormatTask.java
index e2b1c6e..3a9f683 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsFormatTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsFormatTask.java
@@ -54,7 +54,7 @@ public class VisorIgfsFormatTask extends VisorOneNodeTask<String, Void> {
         /** {@inheritDoc} */
         @Override protected Void run(String igfsName) {
             try {
-                ignite.fileSystem(igfsName).format();
+                ignite.fileSystem(igfsName).clear();
             }
             catch (IllegalArgumentException iae) {
                 throw new IgniteException("Failed to format IGFS: " + igfsName, iae);

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java
index 3bbb3f9..5593493 100644
--- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java
@@ -176,7 +176,7 @@ public abstract class IgfsEventsAbstractSelfTest extends GridCommonAbstractTest
 
         // Clean up file system.
         if (igfs != null)
-            igfs.format();
+            igfs.clear();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerAbstractSelfTest.java
index 91d5d5c..a409ece 100644
--- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerAbstractSelfTest.java
@@ -156,6 +156,6 @@ public class IgfsFragmentizerAbstractSelfTest extends IgfsCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        grid(0).fileSystem("igfs").format();
+        grid(0).fileSystem("igfs").clear();
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java
index 5149493..b95fc9c 100644
--- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java
@@ -237,7 +237,7 @@ public class IgfsFragmentizerSelfTest extends IgfsFragmentizerAbstractSelfTest {
             U.sleep(200);
         }
 
-        igfs.format();
+        igfs.clear();
 
         GridTestUtils.retryAssert(log, 50, 100, new CA() {
             @Override public void apply() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/DefaultIgfsSecondaryFileSystemTestAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/DefaultIgfsSecondaryFileSystemTestAdapter.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/DefaultIgfsSecondaryFileSystemTestAdapter.java
index 7fe587d..93e0827 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/DefaultIgfsSecondaryFileSystemTestAdapter.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/DefaultIgfsSecondaryFileSystemTestAdapter.java
@@ -59,7 +59,7 @@ public class DefaultIgfsSecondaryFileSystemTestAdapter implements IgfsSecondaryF
 
     /** {@inheritDoc} */
     @Override public void format() throws IOException {
-        igfsEx.format();
+        igfsEx.clear();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java
index 38d6c7b..6a2af15 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java
@@ -990,7 +990,7 @@ public abstract class IgfsAbstractBaseSelfTest extends IgfsCommonAbstractTest {
         }
 
         // Clear igfs.
-        igfs.format();
+        igfs.clear();
 
         int prevDifferentSize = Integer.MAX_VALUE; // Previous different size.
         int constCnt = 0, totalCnt = 0;

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
index 0e776b1..5d3b062 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
@@ -693,7 +693,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
 
         assert dataCache.size(new CachePeekMode[] {CachePeekMode.ALL}) > 0;
 
-        igfs.format();
+        igfs.clear();
 
         // Ensure format is not propagated to the secondary file system.
         if (dual) {
@@ -756,7 +756,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
     private void checkRootPropertyUpdate(String prop, String setVal, String expGetVal) throws Exception {
         igfs.update(IgfsPath.ROOT, Collections.singletonMap(prop, setVal));
 
-        igfs.format();
+        igfs.clear();
 
         IgfsFile file = igfs.info(IgfsPath.ROOT);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
index 32e7e17..ddddeca 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
@@ -211,7 +211,7 @@ public class IgfsCachePerBlockLruEvictionPolicySelfTest extends IgfsCommonAbstra
     @Override protected void afterTest() throws Exception {
         try {
             // Cleanup.
-            igfsPrimary.format();
+            igfsPrimary.clear();
 
             while (!dataCache.isEmpty())
                 U.sleep(100);

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java
index cf1f37d..f77c1d1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java
@@ -117,7 +117,7 @@ public class IgfsMetaManagerSelfTest extends IgfsCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        mgr.igfsCtx.igfs().format();
+        mgr.igfsCtx.igfs().clear();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetricsSelfTest.java
index 1ff0c00..76398f5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetricsSelfTest.java
@@ -346,7 +346,7 @@ public class IgfsMetricsSelfTest extends IgfsCommonAbstractTest {
         assertEquals(0, m.filesOpenedForRead());
         assertEquals(0, m.filesOpenedForWrite());
 
-        fs.format();
+        fs.clear();
 
         m = fs.metrics();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMock.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMock.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMock.java
index 1217005..833ab4c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMock.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMock.java
@@ -261,12 +261,12 @@ public class IgfsMock implements IgfsEx {
     }
 
     /** {@inheritDoc} */
-    @Override public void format() throws IgniteException {
+    @Override public void clear() throws IgniteException {
         throwUnsupported();
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteFuture<Void> formatAsync() throws IgniteException {
+    @Override public IgniteFuture<Void> clearAsync() throws IgniteException {
         throwUnsupported();
 
         return null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java
index 2fb2b84..375478f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java
@@ -101,7 +101,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest {
     @Override protected void afterTest() throws Exception {
         super.afterTest();
 
-        igfs.format();
+        igfs.clear();
     }
 
     /** {@inheritDoc} */
@@ -595,7 +595,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest {
         assertEquals(text, read("/b"));
 
         // Cleanup.
-        igfs.format();
+        igfs.clear();
 
         assertTrue(F.isEmpty(igfs.listPaths(root)));
     }
@@ -772,7 +772,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest {
 
         create(filePath, false, "Some text.");
 
-        igfs.format();
+        igfs.clear();
 
         assert !igfs.exists(path(dirPath));
         assert !igfs.exists(path(filePath));
@@ -798,7 +798,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testFormatEmpty() throws Exception {
-        igfs.format();
+        igfs.clear();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java
index cc1b53b..0e749f3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java
@@ -108,7 +108,7 @@ public class IgfsStreamsSelfTest extends IgfsCommonAbstractTest {
         fs = grid(0).fileSystem("igfs");
 
         // Cleanup FS.
-        fs.format();
+        fs.clear();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java
index 36c99dc..fcc8fd7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java
@@ -100,7 +100,7 @@ public class IgfsTaskSelfTest extends IgfsCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
-        igfs.format();
+        igfs.clear();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsAbstractRecordResolverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsAbstractRecordResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsAbstractRecordResolverSelfTest.java
index b8e1e3b..bd3d7a0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsAbstractRecordResolverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/split/IgfsAbstractRecordResolverSelfTest.java
@@ -103,7 +103,7 @@ public class IgfsAbstractRecordResolverSelfTest extends GridCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
-        igfs.format();
+        igfs.clear();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopTaskExecutionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopTaskExecutionSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopTaskExecutionSelfTest.java
index feb5a1f..f25d78a 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopTaskExecutionSelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopTaskExecutionSelfTest.java
@@ -96,7 +96,7 @@ public class HadoopTaskExecutionSelfTest extends HadoopAbstractSelfTest {
 
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
-        grid(0).fileSystem(igfsName).format();
+        grid(0).fileSystem(igfsName).clear();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolMultipleServersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolMultipleServersSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolMultipleServersSelfTest.java
index abc3701..7767ec1 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolMultipleServersSelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolMultipleServersSelfTest.java
@@ -97,7 +97,7 @@ public class HadoopClientProtocolMultipleServersSelfTest extends HadoopAbstractS
     private void beforeJob() throws Exception {
         IgniteFileSystem igfs = grid(0).fileSystem(HadoopAbstractSelfTest.igfsName);
 
-        igfs.format();
+        igfs.clear();
 
         igfs.mkdirs(new IgfsPath(PATH_INPUT));
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolSelfTest.java
index b3ff3e4..7241506 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolSelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolSelfTest.java
@@ -129,7 +129,7 @@ public class HadoopClientProtocolSelfTest extends HadoopAbstractSelfTest {
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        grid(0).fileSystem(HadoopAbstractSelfTest.igfsName).format();
+        grid(0).fileSystem(HadoopAbstractSelfTest.igfsName).clear();
 
         setupLockFile.delete();
         mapLockFile.delete();

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ccb8569/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsEventsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsEventsTestSuite.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsEventsTestSuite.java
index 2395338..6934587 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsEventsTestSuite.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/IgfsEventsTestSuite.java
@@ -175,7 +175,7 @@ public class IgfsEventsTestSuite extends TestSuite {
             super.afterTest();
 
             // Clean up secondary file system.
-            igfsSec.format();
+            igfsSec.clear();
         }
 
         /**


[02/50] [abbrv] ignite git commit: Merge branch 'ignite-1.8.5'

Posted by dm...@apache.org.
Merge branch 'ignite-1.8.5'

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/IgniteJdbcDriver.java
#	modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcConnection.java
#	modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/pool/PoolProcessor.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
#	modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
#	modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
#	modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
#	modules/web-console/frontend/app/helpers/jade/mixins.pug
#	modules/yardstick/config/benchmark-failover.properties
#	modules/yardstick/config/benchmark-full.properties
#	modules/yardstick/config/benchmark-multicast.properties
#	modules/yardstick/config/benchmark.properties
#	modules/yardstick/config/test-max-int-values-offheap.properties


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

Branch: refs/heads/ignite-1192
Commit: e9bc0382dc0b785de6f362dadf4fc685586e23a8
Parents: f726dc4 2e6bc44
Author: dkarachentsev <dk...@gridgain.com>
Authored: Mon Apr 3 11:18:27 2017 +0300
Committer: dkarachentsev <dk...@gridgain.com>
Committed: Mon Apr 3 11:18:27 2017 +0300

----------------------------------------------------------------------
 assembly/release-fabric-base.xml                |   6 +
 .../internal/jdbc2/JdbcConnectionSelfTest.java  |  34 +++++
 .../org/apache/ignite/IgniteJdbcDriver.java     |  11 +-
 .../configuration/IgniteConfiguration.java      |  30 ++++
 .../ignite/internal/GridKernalContext.java      |   7 +
 .../ignite/internal/GridKernalContextImpl.java  |  11 ++
 .../apache/ignite/internal/IgniteKernal.java    |   2 +
 .../org/apache/ignite/internal/IgnitionEx.java  |  16 +++
 .../ignite/internal/jdbc2/JdbcConnection.java   |  50 ++++---
 .../managers/communication/GridIoManager.java   |   2 +
 .../managers/communication/GridIoPolicy.java    |   5 +-
 .../continuous/GridContinuousProcessor.java     |   3 +-
 .../internal/processors/pool/PoolProcessor.java |  10 +-
 .../processors/service/GridServiceProxy.java    |  10 ++
 .../task/GridTaskThreadContextKey.java          |   7 +-
 .../processors/task/GridTaskWorker.java         |  16 ++-
 .../ignite/spi/collision/CollisionSpi.java      |  11 +-
 .../ignite/custom/DummyEventFilterFactory.java  |  47 ++++++
 .../ContinuousQueryPeerClassLoadingTest.java    | 142 +++++++++++++++++++
 .../services/ServiceThreadPoolSelfTest.java     | 133 +++++++++++++++++
 .../testsuites/IgniteKernalSelfTestSuite.java   |   2 +
 .../IgniteCacheObjectKeyIndexingSelfTest.java   | 124 ++++++++++++++++
 .../IgniteCacheQuerySelfTestSuite2.java         |   2 +
 .../IgniteCacheQuerySelfTestSuite3.java         |   2 +
 .../config/benchmark-multicast.properties       |   4 +-
 25 files changed, 656 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/assembly/release-fabric-base.xml
----------------------------------------------------------------------
diff --cc assembly/release-fabric-base.xml
index 4f2a795,78c7777..7a25594
--- a/assembly/release-fabric-base.xml
+++ b/assembly/release-fabric-base.xml
@@@ -178,13 -173,13 +178,19 @@@
              <directory>modules/clients/target/cppdoc/html</directory>
              <outputDirectory>/platforms/cpp/docs</outputDirectory>
          </fileSet>
 +		
 +        <!-- Move CPP binaries. -->
 +        <fileSet>
 +            <directory>modules/platforms/cpp/bin</directory>
 +            <outputDirectory>/platforms/cpp/bin</outputDirectory>
 +        </fileSet>
  
+         <!-- Move CPP binaries. -->
+         <fileSet>
+             <directory>modules/platforms/cpp/bin</directory>
+             <outputDirectory>/platforms/cpp/bin</outputDirectory>
+         </fileSet>
+ 
          <!-- Other files. -->
          <fileSet>
              <directory>bin</directory>

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/core/src/main/java/org/apache/ignite/IgniteJdbcDriver.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/IgniteJdbcDriver.java
index 9790b8f,c511d5f..0ee41c0
--- a/modules/core/src/main/java/org/apache/ignite/IgniteJdbcDriver.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteJdbcDriver.java
@@@ -292,21 -292,9 +292,24 @@@ public class IgniteJdbcDriver implement
      /** Distributed joins parameter name. */
      private static final String PARAM_DISTRIBUTED_JOINS = "distributedJoins";
  
+     /** Transactions allowed parameter name. */
+     private static final String PARAM_TX_ALLOWED = "transactionsAllowed";
+ 
 +    /** DML streaming parameter name. */
 +    private static final String PARAM_STREAMING = "streaming";
 +
 +    /** DML streaming auto flush frequency. */
 +    private static final String PARAM_STREAMING_FLUSH_FREQ = "streamingFlushFrequency";
 +
 +    /** DML streaming node buffer size. */
 +    private static final String PARAM_STREAMING_PER_NODE_BUF_SIZE = "streamingPerNodeBufferSize";
 +
 +    /** DML streaming parallel operations per node. */
 +    private static final String PARAM_STREAMING_PER_NODE_PAR_OPS = "streamingPerNodeParallelOperations";
 +
 +    /** Whether DML streaming will overwrite existing cache entries. */
-      private static final String PARAM_STREAMING_ALLOW_OVERWRITE = "streamingAllowOverwrite";
++    private static final String PARAM_STREAMING_ALLOW_OVERWRITE = "streamingAllowOverwrite";
 +
      /** Hostname property name. */
      public static final String PROP_HOST = PROP_PREFIX + "host";
  
@@@ -328,21 -316,9 +331,24 @@@
      /** Distributed joins property name. */
      public static final String PROP_DISTRIBUTED_JOINS = PROP_PREFIX + PARAM_DISTRIBUTED_JOINS;
  
+     /** Transactions allowed property name. */
+     public static final String PROP_TX_ALLOWED = PROP_PREFIX + PARAM_TX_ALLOWED;
+ 
 +    /** DML streaming property name. */
 +    public static final String PROP_STREAMING = PROP_PREFIX + PARAM_STREAMING;
 +
 +    /** DML stream auto flush frequency property name. */
 +    public static final String PROP_STREAMING_FLUSH_FREQ = PROP_PREFIX + PARAM_STREAMING_FLUSH_FREQ;
 +
 +    /** DML stream node buffer size property name. */
 +    public static final String PROP_STREAMING_PER_NODE_BUF_SIZE = PROP_PREFIX + PARAM_STREAMING_PER_NODE_BUF_SIZE;
 +
 +    /** DML stream parallel operations per node property name. */
 +    public static final String PROP_STREAMING_PER_NODE_PAR_OPS = PROP_PREFIX + PARAM_STREAMING_PER_NODE_PAR_OPS;
 +
 +    /** Whether DML streaming will overwrite existing cache entries. */
 +    public static final String PROP_STREAMING_ALLOW_OVERWRITE = PROP_PREFIX + PARAM_STREAMING_ALLOW_OVERWRITE;
 +
      /** Cache name property name. */
      public static final String PROP_CFG = PROP_PREFIX + "cfg";
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
index 60b368c,8e1fd7e..277f723
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
@@@ -417,7 -407,9 +421,8 @@@ public class GridKernalContextImpl impl
          IgniteConfiguration cfg,
          GridKernalGateway gw,
          ExecutorService utilityCachePool,
 -        ExecutorService marshCachePool,
          ExecutorService execSvc,
+         ExecutorService svcExecSvc,
          ExecutorService sysExecSvc,
          StripedExecutor stripedExecSvc,
          ExecutorService p2pExecSvc,
@@@ -439,7 -429,9 +444,8 @@@
          this.cfg = cfg;
          this.gw = gw;
          this.utilityCachePool = utilityCachePool;
 -        this.marshCachePool = marshCachePool;
          this.execSvc = execSvc;
+         this.svcExecSvc = svcExecSvc;
          this.sysExecSvc = sysExecSvc;
          this.stripedExecSvc = stripedExecSvc;
          this.p2pExecSvc = p2pExecSvc;

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 0ea6ea4,7161166..6705393
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@@ -701,7 -684,9 +701,8 @@@ public class IgniteKernal implements Ig
      public void start(
          final IgniteConfiguration cfg,
          ExecutorService utilityCachePool,
 -        ExecutorService marshCachePool,
          final ExecutorService execSvc,
+         final ExecutorService svcExecSvc,
          final ExecutorService sysExecSvc,
          final StripedExecutor stripedExecSvc,
          ExecutorService p2pExecSvc,
@@@ -811,7 -794,9 +812,8 @@@
                  cfg,
                  gw,
                  utilityCachePool,
 -                marshCachePool,
                  execSvc,
+                 svcExecSvc,
                  sysExecSvc,
                  stripedExecSvc,
                  p2pExecSvc,

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index f6cfe12,8212dd0..1b8f920
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@@ -1846,7 -1814,9 +1861,8 @@@ public class IgnitionEx 
                  grid0.start(
                      myCfg,
                      utilityCacheExecSvc,
 -                    marshCacheExecSvc,
                      execSvc,
+                     svcExecSvc,
                      sysExecSvc,
                      stripedExecSvc,
                      p2pExecSvc,

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcConnection.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcConnection.java
index 5ee28f7,dc3fe7f..8da385a
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcConnection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcConnection.java
@@@ -77,11 -73,7 +77,12 @@@ import static org.apache.ignite.IgniteJ
  import static org.apache.ignite.IgniteJdbcDriver.PROP_DISTRIBUTED_JOINS;
  import static org.apache.ignite.IgniteJdbcDriver.PROP_LOCAL;
  import static org.apache.ignite.IgniteJdbcDriver.PROP_NODE_ID;
+ import static org.apache.ignite.IgniteJdbcDriver.PROP_TX_ALLOWED;
 +import static org.apache.ignite.IgniteJdbcDriver.PROP_STREAMING;
 +import static org.apache.ignite.IgniteJdbcDriver.PROP_STREAMING_ALLOW_OVERWRITE;
 +import static org.apache.ignite.IgniteJdbcDriver.PROP_STREAMING_FLUSH_FREQ;
 +import static org.apache.ignite.IgniteJdbcDriver.PROP_STREAMING_PER_NODE_BUF_SIZE;
 +import static org.apache.ignite.IgniteJdbcDriver.PROP_STREAMING_PER_NODE_PAR_OPS;
  
  /**
   * JDBC connection implementation.
@@@ -127,21 -119,12 +128,27 @@@ public class JdbcConnection implements 
      /** Distributed joins flag. */
      private boolean distributedJoins;
  
+     /** Transactions allowed flag. */
+     private boolean txAllowed;
+ 
+     /** Current transaction isolation. */
+     private int txIsolation;
+ 
 +    /** Make this connection streaming oriented, and prepared statements - data streamer aware. */
 +    private final boolean stream;
 +
 +    /** Auto flush frequency for streaming. */
 +    private final long streamFlushTimeout;
 +
 +    /** Node buffer size for data streamer. */
 +    private final int streamNodeBufSize;
 +
 +    /** Parallel ops count per node for data streamer. */
 +    private final int streamNodeParOps;
 +
 +    /** Allow overwrites for duplicate keys on streamed {@code INSERT}s. */
 +    private final boolean streamAllowOverwrite;
 +
      /** Statements. */
      final Set<JdbcStatement> statements = new HashSet<>();
  
@@@ -158,19 -141,12 +165,20 @@@
  
          this.url = url;
  
-         this.cacheName = props.getProperty(PROP_CACHE);
-         this.locQry = Boolean.parseBoolean(props.getProperty(PROP_LOCAL));
-         this.collocatedQry = Boolean.parseBoolean(props.getProperty(PROP_COLLOCATED));
-         this.distributedJoins = Boolean.parseBoolean(props.getProperty(PROP_DISTRIBUTED_JOINS));
+         cacheName = props.getProperty(PROP_CACHE);
+         locQry = Boolean.parseBoolean(props.getProperty(PROP_LOCAL));
+         collocatedQry = Boolean.parseBoolean(props.getProperty(PROP_COLLOCATED));
+         distributedJoins = Boolean.parseBoolean(props.getProperty(PROP_DISTRIBUTED_JOINS));
+         txAllowed = Boolean.parseBoolean(props.getProperty(PROP_TX_ALLOWED));
  
 +        stream = Boolean.parseBoolean(props.getProperty(PROP_STREAMING));
 +        streamAllowOverwrite = Boolean.parseBoolean(props.getProperty(PROP_STREAMING_ALLOW_OVERWRITE));
 +        streamFlushTimeout = Long.parseLong(props.getProperty(PROP_STREAMING_FLUSH_FREQ, "0"));
 +        streamNodeBufSize = Integer.parseInt(props.getProperty(PROP_STREAMING_PER_NODE_BUF_SIZE,
 +            String.valueOf(IgniteDataStreamer.DFLT_PER_NODE_BUFFER_SIZE)));
 +        streamNodeParOps = Integer.parseInt(props.getProperty(PROP_STREAMING_PER_NODE_PAR_OPS,
 +            String.valueOf(IgniteDataStreamer.DFLT_MAX_PARALLEL_OPS)));
 +
          String nodeIdProp = props.getProperty(PROP_NODE_ID);
  
          if (nodeIdProp != null)
@@@ -521,21 -500,10 +537,21 @@@
          if (resSetConcurrency != CONCUR_READ_ONLY)
              throw new SQLFeatureNotSupportedException("Invalid concurrency (updates are not supported).");
  
-         if (resSetHoldability != HOLD_CURSORS_OVER_COMMIT)
+         if (!txAllowed && resSetHoldability != HOLD_CURSORS_OVER_COMMIT)
              throw new SQLFeatureNotSupportedException("Invalid holdability (transactions are not supported).");
  
 -        JdbcPreparedStatement stmt = new JdbcPreparedStatement(this, sql);
 +        JdbcPreparedStatement stmt;
 +
 +        if (!stream)
 +            stmt = new JdbcPreparedStatement(this, sql);
 +        else {
 +            PreparedStatement nativeStmt = prepareNativeStatement(sql);
 +
 +            IgniteDataStreamer<?, ?> streamer = ((IgniteEx) ignite).context().query().createStreamer(cacheName,
 +                nativeStmt, streamFlushTimeout, streamNodeBufSize, streamNodeParOps, streamAllowOverwrite);
 +
 +            stmt = new JdbcStreamedPreparedStatement(this, sql, streamer, nativeStmt);
 +        }
  
          statements.add(stmt);
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index 23738d7,2eda4b7..b64027b
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@@ -95,11 -93,12 +95,12 @@@ import static org.apache.ignite.interna
  import static org.apache.ignite.internal.managers.communication.GridIoPolicy.IDX_POOL;
  import static org.apache.ignite.internal.managers.communication.GridIoPolicy.IGFS_POOL;
  import static org.apache.ignite.internal.managers.communication.GridIoPolicy.MANAGEMENT_POOL;
 -import static org.apache.ignite.internal.managers.communication.GridIoPolicy.MARSH_CACHE_POOL;
  import static org.apache.ignite.internal.managers.communication.GridIoPolicy.P2P_POOL;
  import static org.apache.ignite.internal.managers.communication.GridIoPolicy.PUBLIC_POOL;
+ import static org.apache.ignite.internal.managers.communication.GridIoPolicy.SERVICE_POOL;
  import static org.apache.ignite.internal.managers.communication.GridIoPolicy.SYSTEM_POOL;
  import static org.apache.ignite.internal.managers.communication.GridIoPolicy.UTILITY_CACHE_POOL;
 +import static org.apache.ignite.internal.managers.communication.GridIoPolicy.QUERY_POOL;
  import static org.apache.ignite.internal.managers.communication.GridIoPolicy.isReservedGridIoPolicy;
  import static org.apache.ignite.internal.util.nio.GridNioBackPressureControl.threadProcessingMessage;
  import static org.jsr166.ConcurrentLinkedHashMap.QueuePolicy.PER_SEGMENT_Q_OPTIMIZED_RMV;
@@@ -695,10 -684,10 +696,11 @@@ public class GridIoManager extends Grid
                  case MANAGEMENT_POOL:
                  case AFFINITY_POOL:
                  case UTILITY_CACHE_POOL:
 -                case MARSH_CACHE_POOL:
                  case IDX_POOL:
                  case IGFS_POOL:
 +                case DATA_STREAMER_POOL:
 +                case QUERY_POOL:
+                 case SERVICE_POOL:
                  {
                      if (msg.isOrdered())
                          processOrderedMessage(nodeId, msg, plc, msgC);

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoPolicy.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoPolicy.java
index a3fb370,bb64f6a..0fca817
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoPolicy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoPolicy.java
@@@ -40,18 -40,18 +40,21 @@@ public class GridIoPolicy 
      /** Utility cache execution pool. */
      public static final byte UTILITY_CACHE_POOL = 5;
  
 -    /** Marshaller cache execution pool. */
 -    public static final byte MARSH_CACHE_POOL = 6;
 -
      /** IGFS pool. */
 -    public static final byte IGFS_POOL = 7;
 +    public static final byte IGFS_POOL = 6;
  
      /** Pool for handling distributed index range requests. */
 -    public static final byte IDX_POOL = 8;
 +    public static final byte IDX_POOL = 7;
 +
 +    /** Data streamer execution pool. */
 +    public static final byte DATA_STREAMER_POOL = 9;
 +
 +    /** Query execution pool. */
 +    public static final byte QUERY_POOL = 10;
  
+     /** Pool for service proxy executions. */
+     public static final byte SERVICE_POOL = 9;
+ 
      /**
       * Defines the range of reserved pools that are not available for plugins.
       * @param key The key.

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/core/src/main/java/org/apache/ignite/internal/processors/pool/PoolProcessor.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/pool/PoolProcessor.java
index f84b741,66efc8c..f6c8b2e
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/pool/PoolProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/pool/PoolProcessor.java
@@@ -123,16 -127,11 +122,21 @@@ public class PoolProcessor extends Grid
  
                  return ctx.getIgfsExecutorService();
  
+             case GridIoPolicy.SERVICE_POOL:
+                 assert ctx.getServiceExecutorService() != null : "Service pool is not configured.";
+ 
+                 return ctx.getServiceExecutorService();
+ 
 +            case GridIoPolicy.DATA_STREAMER_POOL:
 +                assert ctx.getDataStreamerExecutorService() != null : "Data streamer pool is not configured.";
 +
 +                return ctx.getDataStreamerExecutorService();
 +
 +            case GridIoPolicy.QUERY_POOL:
 +                assert ctx.getQueryExecutorService() != null : "Query pool is not configured.";
 +
 +                return ctx.getQueryExecutorService();
 +
              default: {
                  if (plc < 0)
                      throw new IgniteCheckedException("Policy cannot be negative: " + plc);

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
index 6305d23,c426008..cb5aabe
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
@@@ -1376,8 -1382,21 +1377,21 @@@ class GridTaskWorker<T, R> extends Grid
                      if (loc)
                          ctx.job().processJobExecuteRequest(ctx.discovery().localNode(), req);
                      else {
+                         byte plc;
+ 
+                         if (internal)
+                             plc = MANAGEMENT_POOL;
+                         else {
+                             Byte ctxPlc = getThreadContext(TC_IO_POLICY);
+ 
+                             if (ctxPlc != null)
+                                 plc = ctxPlc;
+                             else
+                                 plc = PUBLIC_POOL;
+                         }
+ 
                          // Send job execution request.
-                         ctx.io().sendToGridTopic(node, TOPIC_JOB, req, internal ? MANAGEMENT_POOL : PUBLIC_POOL);
 -                        ctx.io().send(node, TOPIC_JOB, req, plc);
++                        ctx.io().sendToGridTopic(node, TOPIC_JOB, req, plc);
  
                          if (log.isDebugEnabled())
                              log.debug("Sent job request [req=" + req + ", node=" + node + ']');

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
index a0d37e9,9b41fbc..cd1be7b
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteKernalSelfTestSuite.java
@@@ -143,7 -147,8 +144,8 @@@ public class IgniteKernalSelfTestSuite 
          suite.addTestSuite(IgniteServiceReassignmentTest.class);
          suite.addTestSuite(IgniteServiceProxyTimeoutInitializedTest.class);
          suite.addTestSuite(IgniteServiceDynamicCachesSelfTest.class);
 -        suite.addTestSuite(GridServiceContinuousQueryRedeploy.class);
 +        suite.addTestSuite(GridServiceContinuousQueryRedeployTest.class);
+         suite.addTestSuite(ServiceThreadPoolSelfTest.class);
  
          suite.addTestSuite(IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.class);
          suite.addTestSuite(IgniteServiceDeploymentClassLoadingOptimizedMarshallerTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
index a0db90c,923a79c..e3f89fe
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
@@@ -18,21 -18,42 +18,22 @@@
  package org.apache.ignite.testsuites;
  
  import junit.framework.TestSuite;
 -import org.apache.ignite.internal.processors.cache.CacheLocalQueryDetailMetricsSelfTest;
 -import org.apache.ignite.internal.processors.cache.CacheLocalQueryMetricsSelfTest;
 -import org.apache.ignite.internal.processors.cache.CacheOffheapBatchIndexingSingleTypeTest;
 -import org.apache.ignite.internal.processors.cache.CachePartitionedQueryDetailMetricsDistributedSelfTest;
 -import org.apache.ignite.internal.processors.cache.CachePartitionedQueryDetailMetricsLocalSelfTest;
 -import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsDistributedSelfTest;
 -import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsLocalSelfTest;
 -import org.apache.ignite.internal.processors.cache.CacheQueryNewClientSelfTest;
 -import org.apache.ignite.internal.processors.cache.CacheQueryOffheapEvictDataLostTest;
 -import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryDetailMetricsDistributedSelfTest;
 -import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryDetailMetricsLocalSelfTest;
 -import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryMetricsDistributedSelfTest;
 -import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryMetricsLocalSelfTest;
  import org.apache.ignite.internal.processors.cache.CacheScanPartitionQueryFallbackSelfTest;
 -import org.apache.ignite.internal.processors.cache.CacheSqlQueryValueCopySelfTest;
 -import org.apache.ignite.internal.processors.cache.GridCacheQueryIndexingDisabledSelfTest;
 -import org.apache.ignite.internal.processors.cache.IgniteCacheFieldsQueryNoDataSelfTest;
 -import org.apache.ignite.internal.processors.cache.IgniteCacheNoClassQuerySelfTest;
 +import org.apache.ignite.internal.processors.cache.IgniteCacheCrossCacheJoinRandomTest;
+ import org.apache.ignite.internal.processors.cache.IgniteCacheObjectKeyIndexingSelfTest;
 -import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingQueryErrorTest;
 -import org.apache.ignite.internal.processors.cache.SqlFieldsQuerySelfTest;
 -import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheAtomicFieldsQuerySelfTest;
 -import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheAtomicNearEnabledFieldsQuerySelfTest;
 -import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheDistributedQueryCancelSelfTest;
 +import org.apache.ignite.internal.processors.cache.IgniteCacheOffheapTieredMultithreadedSelfTest;
 +import org.apache.ignite.internal.processors.cache.IgniteCachePartitionedQueryMultiThreadedSelfTest;
 +import org.apache.ignite.internal.processors.cache.IgniteCacheQueryEvictsMultiThreadedSelfTest;
 +import org.apache.ignite.internal.processors.cache.IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest;
 +import org.apache.ignite.internal.processors.cache.IgniteCacheQueryMultiThreadedSelfTest;
 +import org.apache.ignite.internal.processors.cache.IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest;
 +import org.apache.ignite.internal.processors.cache.IgniteCacheQueryOffheapMultiThreadedSelfTest;
 +import org.apache.ignite.internal.processors.cache.IgniteCacheSqlQueryMultiThreadedSelfTest;
 +import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheClientQueryReplicatedNodeRestartSelfTest;
  import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest;
 -import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCachePartitionedFieldsQueryP2PEnabledSelfTest;
 -import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCachePartitionedFieldsQuerySelfTest;
 -import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheQueryStopOnCancelOrTimeoutDistributedJoinSelfTest;
 -import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheReplicatedFieldsQueryP2PEnabledSelfTest;
 -import org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheReplicatedFieldsQuerySelfTest;
 -import org.apache.ignite.internal.processors.cache.local.IgniteCacheLocalFieldsQuerySelfTest;
 -import org.apache.ignite.internal.processors.cache.local.IgniteCacheLocalQueryCancelOrTimeoutSelfTest;
 -import org.apache.ignite.internal.processors.cache.query.GridCacheSwapScanQuerySelfTest;
 -import org.apache.ignite.internal.processors.query.h2.sql.BaseH2CompareQueryTest;
 -import org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryTest;
 -import org.apache.ignite.spi.communication.tcp.GridOrderedMessageCancelSelfTest;
 +import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheQueryNodeFailTest;
 +import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheQueryNodeRestartSelfTest;
 +import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheQueryNodeRestartSelfTest2;
  import org.apache.ignite.testframework.IgniteTestSuite;
  
  /**
@@@ -46,21 -67,61 +47,22 @@@ public class IgniteCacheQuerySelfTestSu
      public static TestSuite suite() throws Exception {
          TestSuite suite = new IgniteTestSuite("Ignite Cache Queries Test Suite 2");
  
 -        // Scan queries.
 +        suite.addTestSuite(IgniteCacheQueryMultiThreadedSelfTest.class);
 +        suite.addTestSuite(IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest.class);
 +        suite.addTestSuite(IgniteCacheQueryOffheapMultiThreadedSelfTest.class);
 +        suite.addTestSuite(IgniteCacheOffheapTieredMultithreadedSelfTest.class);
 +        suite.addTestSuite(IgniteCacheQueryEvictsMultiThreadedSelfTest.class);
 +        suite.addTestSuite(IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.class);
 +        suite.addTestSuite(IgniteCacheCrossCacheJoinRandomTest.class);
 +        suite.addTestSuite(IgniteCacheClientQueryReplicatedNodeRestartSelfTest.class);
 +        suite.addTestSuite(IgniteCacheQueryNodeFailTest.class);
 +        suite.addTestSuite(IgniteCacheQueryNodeRestartSelfTest.class);
 +        suite.addTestSuite(IgniteCacheQueryNodeRestartSelfTest2.class);
 +        suite.addTestSuite(IgniteCacheSqlQueryMultiThreadedSelfTest.class);
 +        suite.addTestSuite(IgniteCachePartitionedQueryMultiThreadedSelfTest.class);
          suite.addTestSuite(CacheScanPartitionQueryFallbackSelfTest.class);
 -
 -        // Fields queries.
 -        suite.addTestSuite(SqlFieldsQuerySelfTest.class);
 -        suite.addTestSuite(IgniteCacheLocalFieldsQuerySelfTest.class);
 -        suite.addTestSuite(IgniteCacheReplicatedFieldsQuerySelfTest.class);
 -        suite.addTestSuite(IgniteCacheReplicatedFieldsQueryP2PEnabledSelfTest.class);
 -        suite.addTestSuite(IgniteCachePartitionedFieldsQuerySelfTest.class);
 -        suite.addTestSuite(IgniteCacheAtomicFieldsQuerySelfTest.class);
 -        suite.addTestSuite(IgniteCacheAtomicNearEnabledFieldsQuerySelfTest.class);
 -        suite.addTestSuite(IgniteCachePartitionedFieldsQueryP2PEnabledSelfTest.class);
 -        suite.addTestSuite(IgniteCacheFieldsQueryNoDataSelfTest.class);
 -
 -        suite.addTestSuite(GridCacheQueryIndexingDisabledSelfTest.class);
 -
 -        suite.addTestSuite(GridCacheSwapScanQuerySelfTest.class);
 -
 -        suite.addTestSuite(GridOrderedMessageCancelSelfTest.class);
 -
 -        suite.addTestSuite(CacheQueryOffheapEvictDataLostTest.class);
 -
 -        // Ignite cache and H2 comparison.
 -        suite.addTestSuite(BaseH2CompareQueryTest.class);
 -        suite.addTestSuite(H2CompareBigQueryTest.class);
 -
 -        // Cache query metrics.
 -        suite.addTestSuite(CacheLocalQueryMetricsSelfTest.class);
 -        suite.addTestSuite(CachePartitionedQueryMetricsDistributedSelfTest.class);
 -        suite.addTestSuite(CachePartitionedQueryMetricsLocalSelfTest.class);
 -        suite.addTestSuite(CacheReplicatedQueryMetricsDistributedSelfTest.class);
 -        suite.addTestSuite(CacheReplicatedQueryMetricsLocalSelfTest.class);
 -
 -        // Cache query metrics.
 -        suite.addTestSuite(CacheLocalQueryDetailMetricsSelfTest.class);
 -        suite.addTestSuite(CachePartitionedQueryDetailMetricsDistributedSelfTest.class);
 -        suite.addTestSuite(CachePartitionedQueryDetailMetricsLocalSelfTest.class);
 -        suite.addTestSuite(CacheReplicatedQueryDetailMetricsDistributedSelfTest.class);
 -        suite.addTestSuite(CacheReplicatedQueryDetailMetricsLocalSelfTest.class);
 -
 -        // Unmarshalling query test.
 -        suite.addTestSuite(IgniteCacheP2pUnmarshallingQueryErrorTest.class);
 -        suite.addTestSuite(IgniteCacheNoClassQuerySelfTest.class);
 -
 -        // Cancellation.
          suite.addTestSuite(IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.class);
 -        suite.addTestSuite(IgniteCacheDistributedQueryCancelSelfTest.class);
 -        suite.addTestSuite(IgniteCacheLocalQueryCancelOrTimeoutSelfTest.class);
 -        suite.addTestSuite(IgniteCacheQueryStopOnCancelOrTimeoutDistributedJoinSelfTest.class);
 -
 -        // Other.
 -        suite.addTestSuite(CacheQueryNewClientSelfTest.class);
 -        suite.addTestSuite(CacheOffheapBatchIndexingSingleTypeTest.class);
 -        suite.addTestSuite(CacheSqlQueryValueCopySelfTest.class);
+         suite.addTestSuite(IgniteCacheObjectKeyIndexingSelfTest.class);
  
          return suite;
      }

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
----------------------------------------------------------------------
diff --cc modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
index 07125a6,6b2fea0..a4594ee
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
@@@ -34,7 -34,7 +34,8 @@@ import org.apache.ignite.internal.proce
  import org.apache.ignite.internal.processors.cache.query.continuous.CacheKeepBinaryIterationTest;
  import org.apache.ignite.internal.processors.cache.query.continuous.CacheKeepBinaryIterationStoreEnabledTest;
  import org.apache.ignite.internal.processors.cache.query.continuous.CacheKeepBinaryIterationSwapEnabledTest;
 +import org.apache.ignite.internal.processors.cache.query.continuous.ClientReconnectContinuousQueryTest;
+ import org.apache.ignite.internal.processors.cache.query.continuous.ContinuousQueryPeerClassLoadingTest;
  import org.apache.ignite.internal.processors.cache.query.continuous.ContinuousQueryRemoteFilterMissingInClassPathSelfTest;
  import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicNearEnabledSelfTest;
  import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicOffheapTieredTest;
@@@ -124,7 -124,7 +125,8 @@@ public class IgniteCacheQuerySelfTestSu
          suite.addTestSuite(CacheKeepBinaryIterationNearEnabledTest.class);
          suite.addTestSuite(IgniteCacheContinuousQueryBackupQueueTest.class);
          suite.addTestSuite(IgniteCacheContinuousQueryNoUnsubscribeTest.class);
+         suite.addTestSuite(ContinuousQueryPeerClassLoadingTest.class);
 +        suite.addTestSuite(ClientReconnectContinuousQueryTest.class);
  
          return suite;
      }

http://git-wip-us.apache.org/repos/asf/ignite/blob/e9bc0382/modules/yardstick/config/benchmark-multicast.properties
----------------------------------------------------------------------


[37/50] [abbrv] ignite git commit: IGNITE-2558 - NearCacheConfiguration does not extend MutableConfiguration. This fixes #1701.

Posted by dm...@apache.org.
IGNITE-2558 - NearCacheConfiguration does not extend MutableConfiguration. This fixes #1701.


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

Branch: refs/heads/ignite-1192
Commit: 512b7af90e3fc8e6ae5690c4b187bb65ba82f218
Parents: f6ee9c0
Author: Max Kozlov <dr...@gmail.com>
Authored: Sun Apr 9 00:05:46 2017 +0200
Committer: Valentin Kulichenko <va...@gmail.com>
Committed: Sun Apr 9 00:05:46 2017 +0200

----------------------------------------------------------------------
 .../configuration/NearCacheConfiguration.java   | 56 +-------------------
 1 file changed, 2 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/512b7af9/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
index 7c948dc..19def1b 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
@@ -17,11 +17,7 @@
 
 package org.apache.ignite.configuration;
 
-import javax.cache.configuration.Factory;
-import javax.cache.configuration.MutableConfiguration;
-import javax.cache.expiry.ExpiryPolicy;
-import javax.cache.integration.CacheLoader;
-import javax.cache.integration.CacheWriter;
+import java.io.Serializable;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.eviction.EvictionPolicy;
 import org.apache.ignite.internal.util.typedef.internal.S;
@@ -36,7 +32,7 @@ import static org.apache.ignite.configuration.CacheConfiguration.DFLT_NEAR_START
  * or most frequently accessed data. Just like with a partitioned cache,
  * the user can control the size of the near cache and its eviction policies.
  */
-public class NearCacheConfiguration<K, V> extends MutableConfiguration<K, V> {
+public class NearCacheConfiguration<K, V> implements Serializable {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -59,8 +55,6 @@ public class NearCacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param ccfg Configuration to copy.
      */
     public NearCacheConfiguration(NearCacheConfiguration<K, V> ccfg) {
-        super(ccfg);
-
         nearEvictPlc = ccfg.getNearEvictionPolicy();
         nearStartSize = ccfg.getNearStartSize();
     }
@@ -112,52 +106,6 @@ public class NearCacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     }
 
     /** {@inheritDoc} */
-    @Override public CacheConfiguration<K, V> setTypes(Class<K> keyType, Class<V> valueType) {
-        return (CacheConfiguration<K, V>)super.setTypes(keyType, valueType);
-    }
-
-    /** {@inheritDoc} */
-    @Override public CacheConfiguration<K, V> setCacheLoaderFactory(Factory<? extends CacheLoader<K, V>> factory) {
-        return (CacheConfiguration<K, V>)super.setCacheLoaderFactory(factory);
-    }
-
-    /** {@inheritDoc} */
-    @Override public CacheConfiguration<K, V> setCacheWriterFactory(
-        Factory<? extends CacheWriter<? super K, ? super V>> factory) {
-        return (CacheConfiguration<K, V>)super.setCacheWriterFactory(factory);
-    }
-
-    /** {@inheritDoc} */
-    @Override public CacheConfiguration<K, V> setExpiryPolicyFactory(Factory<? extends ExpiryPolicy> factory) {
-        return (CacheConfiguration<K, V>)super.setExpiryPolicyFactory(factory);
-    }
-
-    /** {@inheritDoc} */
-    @Override public CacheConfiguration<K, V> setReadThrough(boolean isReadThrough) {
-        return (CacheConfiguration<K, V>)super.setReadThrough(isReadThrough);
-    }
-
-    /** {@inheritDoc} */
-    @Override public CacheConfiguration<K, V> setWriteThrough(boolean isWriteThrough) {
-        return (CacheConfiguration<K, V>)super.setWriteThrough(isWriteThrough);
-    }
-
-    /** {@inheritDoc} */
-    @Override public CacheConfiguration<K, V> setStoreByValue(boolean isStoreByValue) {
-        return (CacheConfiguration<K, V>)super.setStoreByValue(isStoreByValue);
-    }
-
-    /** {@inheritDoc} */
-    @Override public CacheConfiguration<K, V> setStatisticsEnabled(boolean enabled) {
-        return (CacheConfiguration<K, V>)super.setStatisticsEnabled(enabled);
-    }
-
-    /** {@inheritDoc} */
-    @Override public CacheConfiguration<K, V> setManagementEnabled(boolean enabled) {
-        return (CacheConfiguration<K, V>)super.setManagementEnabled(enabled);
-    }
-
-    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(NearCacheConfiguration.class, this, super.toString());
     }


[50/50] [abbrv] ignite git commit: IGNITE-1192: finished implementation, working on the test

Posted by dm...@apache.org.
IGNITE-1192: finished implementation, working on the test


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

Branch: refs/heads/ignite-1192
Commit: 362700c6ae0342f356b0a66be80065fe945743f6
Parents: 2ab0999
Author: Denis Magda <dm...@gridgain.com>
Authored: Mon Apr 10 18:37:45 2017 -0700
Committer: Denis Magda <dm...@gridgain.com>
Committed: Mon Apr 10 18:37:45 2017 -0700

----------------------------------------------------------------------
 assembly/libs/README.txt                        |   2 +-
 bin/ignite.bat                                  |   4 +-
 bin/ignite.sh                                   |   4 +-
 bin/ignitevisorcmd.bat                          |   4 +-
 bin/ignitevisorcmd.sh                           |   4 +-
 bin/include/functions.sh                        |   2 +-
 bin/include/service.sh                          |   2 +-
 config/example-kube.xml                         |   4 +-
 dev-tools/gradlew                               |   4 +-
 examples/config/example-cache.xml               |   4 +-
 examples/config/example-default.xml             |   4 +-
 examples/config/filesystem/example-igfs.xml     |   4 +-
 examples/config/spark/example-shared-rdd.xml    |   4 +-
 ipc/shmem/README.txt                            |   2 +-
 ipc/shmem/aclocal.m4                            |  40 +--
 ipc/shmem/config.guess                          |   4 +-
 ipc/shmem/configure                             |  56 ++--
 ipc/shmem/igniteshmem/Makefile.am               |   4 +-
 ipc/shmem/igniteshmem/Makefile.in               |   4 +-
 ipc/shmem/install-sh                            |   2 +-
 ipc/shmem/ltmain.sh                             |  42 +--
 ipc/shmem/m4/libtool.m4                         |  18 +-
 ipc/shmem/m4/ltoptions.m4                       |  20 +-
 .../test/config/aop/aspectj/META-INF/aop.xml    |   2 +-
 .../bootstrap/aws/cassandra/cassandra-env.sh    |  14 +-
 .../aws/cassandra/cassandra-template.yaml       |  10 +-
 .../tests/persistence/blob/ignite-config.xml    |   4 +-
 .../tests/persistence/pojo/ignite-config.xml    |   4 +-
 .../persistence/pojo/persistence-settings-3.xml |   6 +-
 .../persistence/pojo/persistence-settings-4.xml |   6 +-
 .../persistence/primitive/ignite-config.xml     |   4 +-
 .../primitive/ignite-remote-server-config.xml   |   4 +-
 modules/platforms/cpp/DEVNOTES.txt              |   4 +-
 modules/platforms/cpp/cpp.dxg                   |  38 +--
 .../config/continuous-query-example.xml         |   2 +-
 .../odbc-example/config/example-odbc.xml        |   2 +-
 .../putget-example/config/example-cache.xml     |   2 +-
 .../query-example/config/query-example.xml      |   2 +-
 .../cpp/odbc-test/config/queries-default.xml    |   2 +-
 .../IgniteConfigurationSection.xsd              |   2 +-
 modules/platforms/dotnet/Apache.Ignite.dxg      |  44 +--
 modules/platforms/dotnet/build.ps1              |   2 +-
 .../test/resources/spring-ping-pong-partner.xml |   4 +-
 modules/spring-data/pom.xml                     |  15 +-
 .../springdata/IgniteKeyValueAdapter.java       |   2 +-
 .../ignite/springdata/repository/Query.java     |  37 +++
 .../config/EnableIgniteRepositories.java        |  12 +-
 .../IgniteRepositoryConfigurationExtension.java |  14 +
 .../repository/config/RepositoryConfig.java     |  39 +++
 .../repository/query/IgniteQuery.java           |  83 +++++
 .../repository/query/IgniteQueryGenerator.java  | 243 +++++++++++++++
 .../repository/query/IgniteRepositoryQuery.java | 306 +++++++++++++++++++
 .../support/IgniteRepositoryFactory.java        | 176 +++++++++++
 .../support/IgniteRepositoryFactoryBean.java    |  55 ++++
 .../springdata/IgniteSpringDataSelfTest.java    | 286 +++++++++++++++++
 .../springdata/IgniteSpringDataTestSuite.java   |  38 +++
 .../misc/ApplicationConfiguration.java          |  59 ++++
 .../ignite/springdata/misc/FirstRepository.java |  92 ++++++
 .../apache/ignite/springdata/misc/Person.java   |  75 +++++
 .../springdata/misc/SecondRepository.java       |  40 +++
 modules/web-console/README.txt                  |   2 +-
 .../ui-grid-header/ui-grid-header.tpl.pug       |   2 +-
 .../directives/ui-ace-pojos/ui-ace-pojos.pug    |   2 +-
 .../helpers/jade/form/form-field-checkbox.pug   |   6 +-
 .../helpers/jade/form/form-field-datalist.pug   |   6 +-
 .../helpers/jade/form/form-field-dropdown.pug   |   8 +-
 .../frontend/app/helpers/jade/mixins.pug        |  52 ++--
 .../app/modules/nodes/nodes-dialog.tpl.pug      |   2 +-
 .../states/configuration/caches/node-filter.pug |   2 +-
 .../states/configuration/clusters/ssl.pug       |   8 +-
 .../states/configuration/domains/query.pug      |  10 +-
 .../states/configuration/domains/store.pug      |   4 +-
 .../modules/states/configuration/igfs/misc.pug  |   2 +-
 .../frontend/app/primitives/tooltip/index.pug   |   6 +-
 .../frontend/public/stylesheets/style.scss      |   6 +-
 .../frontend/views/configuration/caches.tpl.pug |   4 +-
 .../views/configuration/clusters.tpl.pug        |   4 +-
 .../views/configuration/domains-import.tpl.pug  |  12 +-
 .../frontend/views/configuration/igfs.tpl.pug   |   4 +-
 .../summary-project-structure.tpl.pug           |   2 +-
 .../frontend/views/settings/admin.tpl.pug       |   2 +-
 .../frontend/views/settings/profile.tpl.pug     |   6 +-
 .../web-console/frontend/views/signin.tpl.pug   |   2 +-
 .../frontend/views/sql/cache-metadata.tpl.pug   |   2 +-
 .../frontend/views/sql/chart-settings.tpl.pug   |   2 +-
 .../frontend/views/sql/paragraph-rate.tpl.pug   |   2 +-
 .../web-console/frontend/views/sql/sql.tpl.pug  |  10 +-
 .../views/templates/agent-download.tpl.pug      |   2 +-
 modules/web-console/web-agent/README.txt        |   2 +-
 .../web-agent/bin/ignite-web-agent.bat          |   2 +-
 .../web-agent/bin/ignite-web-agent.sh           |   2 +-
 .../config/benchmark-atomic-win.properties      |   2 +-
 .../config/benchmark-atomic.properties          |   2 +-
 .../config/benchmark-bin-identity.properties    |   2 +-
 .../config/benchmark-cache-load-win.properties  |   2 +-
 .../config/benchmark-cache-load.properties      |   2 +-
 .../config/benchmark-client-mode.properties     |   2 +-
 .../config/benchmark-compute-win.properties     |   2 +-
 .../config/benchmark-compute.properties         |   2 +-
 .../config/benchmark-failover.properties        |   2 +-
 .../yardstick/config/benchmark-full.properties  |   2 +-
 .../config/benchmark-multicast.properties       |   2 +-
 .../config/benchmark-put-indexed-val.properties |   2 +-
 .../benchmark-query-put-separated.properties    |   2 +-
 .../config/benchmark-query-win.properties       |   2 +-
 .../yardstick/config/benchmark-query.properties |   2 +-
 .../config/benchmark-remote-sample.properties   |   2 +-
 .../config/benchmark-remote.properties          |   2 +-
 .../config/benchmark-sample.properties          |   2 +-
 .../config/benchmark-sql-dml.properties         |   2 +-
 .../yardstick/config/benchmark-store.properties |   2 +-
 .../config/benchmark-tx-win.properties          |   2 +-
 .../yardstick/config/benchmark-tx.properties    |   2 +-
 .../yardstick/config/benchmark-win.properties   |   2 +-
 modules/yardstick/config/benchmark.properties   |   2 +-
 .../test-max-int-values-offheap.properties      |   2 +-
 .../test-max-int-values-onheap.properties       |   2 +-
 .../config/test-max-int-values-swap.properties  |   2 +-
 118 files changed, 1877 insertions(+), 323 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/assembly/libs/README.txt
----------------------------------------------------------------------
diff --git a/assembly/libs/README.txt b/assembly/libs/README.txt
index 9902e8c..ced2812 100644
--- a/assembly/libs/README.txt
+++ b/assembly/libs/README.txt
@@ -20,7 +20,7 @@ to 'libs' folder. You can create a subfolder for convenience as well.
 Importing Ignite Dependencies In Maven Project
 ------------------------------------------------
 
-If you are using Maven to manage dependencies of your project, there are two options:
+If you are using Maven to manage dependencies of your project, there are two option:
 
 1. Import fabric edition:
   - ignite-fabric (all inclusive)

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/bin/ignite.bat
----------------------------------------------------------------------
diff --git a/bin/ignite.bat b/bin/ignite.bat
index db686cc..51525bc 100644
--- a/bin/ignite.bat
+++ b/bin/ignite.bat
@@ -155,7 +155,7 @@ if "%JMX_PORT%" == "" (
 )
 
 ::
-:: JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
+:: JVM option. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
 ::
 :: ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
 ::
@@ -195,7 +195,7 @@ if %ERRORLEVEL% equ 0 (
 set ENABLE_ASSERTIONS=1
 
 ::
-:: Set '-ea' options if assertions are enabled.
+:: Set '-ea' option if assertions are enabled.
 ::
 if %ENABLE_ASSERTIONS% == 1 set JVM_OPTS=%JVM_OPTS% -ea
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/bin/ignite.sh
----------------------------------------------------------------------
diff --git a/bin/ignite.sh b/bin/ignite.sh
index efa3715..507100d 100755
--- a/bin/ignite.sh
+++ b/bin/ignite.sh
@@ -85,7 +85,7 @@ if [ "${DOCK_OPTS}" == "" ]; then
 fi
 
 #
-# JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
+# JVM option. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
 #
 # ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
 #
@@ -121,7 +121,7 @@ fi
 ENABLE_ASSERTIONS="1"
 
 #
-# Set '-ea' options if assertions are enabled.
+# Set '-ea' option if assertions are enabled.
 #
 if [ "${ENABLE_ASSERTIONS}" = "1" ]; then
     JVM_OPTS="${JVM_OPTS} -ea"

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/bin/ignitevisorcmd.bat
----------------------------------------------------------------------
diff --git a/bin/ignitevisorcmd.bat b/bin/ignitevisorcmd.bat
index 236f896..c9aff2f 100644
--- a/bin/ignitevisorcmd.bat
+++ b/bin/ignitevisorcmd.bat
@@ -114,7 +114,7 @@ if %ERRORLEVEL% neq 0 (
 )
 
 ::
-:: JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
+:: JVM option. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
 ::
 :: ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
 ::
@@ -132,7 +132,7 @@ if "%JVM_OPTS_VISOR%" == "" set JVM_OPTS_VISOR=-Xms1g -Xmx1g -XX:MaxPermSize=128
 set ENABLE_ASSERTIONS=1
 
 ::
-:: Set '-ea' options if assertions are enabled.
+:: Set '-ea' option if assertions are enabled.
 ::
 if %ENABLE_ASSERTIONS% == 1 set JVM_OPTS_VISOR=%JVM_OPTS_VISOR% -ea
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/bin/ignitevisorcmd.sh
----------------------------------------------------------------------
diff --git a/bin/ignitevisorcmd.sh b/bin/ignitevisorcmd.sh
index fe74f6a..1104231 100755
--- a/bin/ignitevisorcmd.sh
+++ b/bin/ignitevisorcmd.sh
@@ -57,7 +57,7 @@ setIgniteHome
 CP="${IGNITE_HOME}/bin/include/visor-common/*${SEP}${IGNITE_HOME}/bin/include/visorcmd/*${SEP}${IGNITE_LIBS}"
 
 #
-# JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
+# JVM option. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
 #
 # ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
 #
@@ -82,7 +82,7 @@ fi
 ENABLE_ASSERTIONS="1"
 
 #
-# Set '-ea' options if assertions are enabled.
+# Set '-ea' option if assertions are enabled.
 #
 if [ "${ENABLE_ASSERTIONS}" = "1" ]; then
     JVM_OPTS="${JVM_OPTS} -ea"

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/bin/include/functions.sh
----------------------------------------------------------------------
diff --git a/bin/include/functions.sh b/bin/include/functions.sh
index b18b150..038c78f 100755
--- a/bin/include/functions.sh
+++ b/bin/include/functions.sh
@@ -110,7 +110,7 @@ setIgniteHome() {
 
 #
 # Finds available port for JMX.
-# The function exports JMX_MON variable with Java JMX options.
+# The function exports JMX_MON variable with Java JMX option.
 #
 findAvailableJmxPort() {
     JMX_PORT=`"$JAVA" -cp "${IGNITE_LIBS}" org.apache.ignite.internal.util.portscanner.GridJmxPortFinder`

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/bin/include/service.sh
----------------------------------------------------------------------
diff --git a/bin/include/service.sh b/bin/include/service.sh
index 73beb86..e089781 100755
--- a/bin/include/service.sh
+++ b/bin/include/service.sh
@@ -51,7 +51,7 @@ case "$1" in
         # Configure Ignite environment.
         source "${SCRIPTS_HOME}/include/setenv.sh"
 
-        # Set default JVM options if they was not passed.
+        # Set default JVM option if they was not passed.
         if [ -z "$JVM_OPTS" ]; then
             JVM_OPTS="-Xms1g -Xmx1g -server -XX:+AggressiveOpts -XX:MaxPermSize=512m"
         fi

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/config/example-kube.xml
----------------------------------------------------------------------
diff --git a/config/example-kube.xml b/config/example-kube.xml
index a4fa086..8f06a68 100644
--- a/config/example-kube.xml
+++ b/config/example-kube.xml
@@ -37,8 +37,8 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignite provides several options for automatic discovery that can be used
-                        instead os static IP based discovery. For information on all options refer
+                        Ignite provides several option for automatic discovery that can be used
+                        instead os static IP based discovery. For information on all option refer
                         to our documentation: http://apacheignite.readme.io/docs/cluster-config
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/dev-tools/gradlew
----------------------------------------------------------------------
diff --git a/dev-tools/gradlew b/dev-tools/gradlew
index aa08fcb..2bb2ef5 100755
--- a/dev-tools/gradlew
+++ b/dev-tools/gradlew
@@ -24,7 +24,7 @@
 ##
 ##############################################################################
 
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+# Add default JVM option here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM option to this script.
 DEFAULT_JVM_OPTS=""
 
 APP_NAME="Gradle"
@@ -139,7 +139,7 @@ if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
     fi
 fi
 
-# For Darwin, add options to specify how the application appears in the dock
+# For Darwin, add option to specify how the application appears in the dock
 if $darwin; then
     GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
 fi

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/examples/config/example-cache.xml
----------------------------------------------------------------------
diff --git a/examples/config/example-cache.xml b/examples/config/example-cache.xml
index 98e1a71..07cc7a7 100644
--- a/examples/config/example-cache.xml
+++ b/examples/config/example-cache.xml
@@ -52,8 +52,8 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignite provides several options for automatic discovery that can be used
-                        instead os static IP based discovery. For information on all options refer
+                        Ignite provides several option for automatic discovery that can be used
+                        instead os static IP based discovery. For information on all option refer
                         to our documentation: http://apacheignite.readme.io/docs/cluster-config
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/examples/config/example-default.xml
----------------------------------------------------------------------
diff --git a/examples/config/example-default.xml b/examples/config/example-default.xml
index 6bd6f16..8933d40 100644
--- a/examples/config/example-default.xml
+++ b/examples/config/example-default.xml
@@ -62,8 +62,8 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignite provides several options for automatic discovery that can be used
-                        instead os static IP based discovery. For information on all options refer
+                        Ignite provides several option for automatic discovery that can be used
+                        instead os static IP based discovery. For information on all option refer
                         to our documentation: http://apacheignite.readme.io/docs/cluster-config
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/examples/config/filesystem/example-igfs.xml
----------------------------------------------------------------------
diff --git a/examples/config/filesystem/example-igfs.xml b/examples/config/filesystem/example-igfs.xml
index 2236821..fcb4a64 100644
--- a/examples/config/filesystem/example-igfs.xml
+++ b/examples/config/filesystem/example-igfs.xml
@@ -100,8 +100,8 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignition provides several options for automatic discovery that can be used
-                        instead os static IP based discovery. For information on all options refer
+                        Ignition provides several option for automatic discovery that can be used
+                        instead os static IP based discovery. For information on all option refer
                         to our documentation: http://apacheignite.readme.io/docs/cluster-config
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/examples/config/spark/example-shared-rdd.xml
----------------------------------------------------------------------
diff --git a/examples/config/spark/example-shared-rdd.xml b/examples/config/spark/example-shared-rdd.xml
index 83de6a3..1918eee 100644
--- a/examples/config/spark/example-shared-rdd.xml
+++ b/examples/config/spark/example-shared-rdd.xml
@@ -62,8 +62,8 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignite provides several options for automatic discovery that can be used
-                        instead os static IP based discovery. For information on all options refer
+                        Ignite provides several option for automatic discovery that can be used
+                        instead os static IP based discovery. For information on all option refer
                         to our documentation: http://apacheignite.readme.io/docs/cluster-config
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/ipc/shmem/README.txt
----------------------------------------------------------------------
diff --git a/ipc/shmem/README.txt b/ipc/shmem/README.txt
index e11360b..e1770d5 100644
--- a/ipc/shmem/README.txt
+++ b/ipc/shmem/README.txt
@@ -15,7 +15,7 @@ You can also do
 
     ./configure --help
 
-to see all available command line options. Once the configure script finishes, you can run a make:
+to see all available command line option. Once the configure script finishes, you can run a make:
 
     make install
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/ipc/shmem/aclocal.m4
----------------------------------------------------------------------
diff --git a/ipc/shmem/aclocal.m4 b/ipc/shmem/aclocal.m4
index e89e1c6..3bdf386 100644
--- a/ipc/shmem/aclocal.m4
+++ b/ipc/shmem/aclocal.m4
@@ -201,7 +201,7 @@ m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 m4_require([_LT_WITH_SYSROOT])dnl
 
 _LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the option which allow our
 # commands through without removal of \ escapes INIT.
 if test -n "\${ZSH_VERSION+set}" ; then
    setopt NO_GLOB_SUBST
@@ -721,7 +721,7 @@ m4_defun([_LT_CONFIG],
 _LT_CONFIG_SAVE_COMMANDS([
   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
   m4_if(_LT_TAG, [C], [
-    # See if we are running on zsh, and set the options which allow our
+    # See if we are running on zsh, and set the option which allow our
     # commands through without removal of \ escapes.
     if test -n "${ZSH_VERSION+set}" ; then
       setopt NO_GLOB_SUBST
@@ -1987,7 +1987,7 @@ dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
 
 # _LT_COMPILER_C_O([TAGNAME])
 # ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
+# Check to see if option -c and -o are simultaneously supported by compiler.
 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
 m4_defun([_LT_COMPILER_C_O],
 [m4_require([_LT_DECL_SED])dnl
@@ -2037,7 +2037,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    $RM conftest*
 ])
 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
-	[Does compiler simultaneously support -c and -o options?])
+	[Does compiler simultaneously support -c and -o option?])
 ])# _LT_COMPILER_C_O
 
 
@@ -3946,7 +3946,7 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_static, $1)=
       ;;
     interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Interix 3.x gcc -fpic/-fPIC option generate broken code.
       # Instead, we relocate shared libraries at runtime.
       ;;
     sysv4*MP*)
@@ -4277,7 +4277,7 @@ m4_if([$1], [CXX], [
       ;;
 
     interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Interix 3.x gcc -fpic/-fPIC option generate broken code.
       # Instead, we relocate shared libraries at runtime.
       ;;
 
@@ -5484,7 +5484,7 @@ _LT_EOF
       case $host_os in
       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
       *)
-	# The compiler driver will combine and reorder linker options,
+	# The compiler driver will combine and reorder linker option,
 	# but understands `-z linker_flag'.  GCC discards it without `$wl',
 	# but is careful enough not to reorder.
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
@@ -6731,7 +6731,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    case $host_os in
 	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 	      *)
-		# The compiler driver will combine and reorder linker options,
+		# The compiler driver will combine and reorder linker option,
 		# but understands `-z linker_flag'.
 	        # Supported since Solaris 2.6 (maybe 2.5.1?)
 		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
@@ -7710,7 +7710,7 @@ test -z "$SED" && SED=sed
 Xsed="$SED -e 1s/^X//"
 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
-    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+    [Sed that helps us avoid accidentally triggering echo(1) option like -n])
 ])# _LT_DECL_SED
 
 m4_ifndef([AC_PROG_SED], [
@@ -8034,7 +8034,7 @@ m4_define([_LT_IF_OPTION],
 
 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
 # -------------------------------------------------------
-# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# Execute IF-NOT-SET unless all option in OPTION-LIST for MACRO-NAME
 # are set.
 m4_define([_LT_UNLESS_OPTIONS],
 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
@@ -8047,25 +8047,25 @@ m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
 
 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
 # ----------------------------------------
-# OPTION-LIST is a space-separated list of Libtool options associated
+# OPTION-LIST is a space-separated list of Libtool option associated
 # with MACRO-NAME.  If any OPTION has a matching handler declared with
 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
 # the unknown option and exit.
 m4_defun([_LT_SET_OPTIONS],
-[# Set options
+[# Set option
 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
     [_LT_SET_OPTION([$1], _LT_Option)])
 
 m4_if([$1],[LT_INIT],[
   dnl
-  dnl Simply set some default values (i.e off) if boolean options were not
+  dnl Simply set some default values (i.e off) if boolean option were not
   dnl specified:
   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
   ])
   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
   ])
   dnl
-  dnl If no reference was made to various pairs of opposing options, then
+  dnl If no reference was made to various pairs of opposing option, then
   dnl we run the default mode handler for the pair.  For example, if neither
   dnl `shared' nor `disable-shared' was passed, we enable building of shared
   dnl archives by default:
@@ -8147,7 +8147,7 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
 # _LT_ENABLE_SHARED([DEFAULT])
 # ----------------------------
 # implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
+# `disable-shared' LT_INIT option.
 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 m4_define([_LT_ENABLE_SHARED],
 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
@@ -8201,7 +8201,7 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
 # _LT_ENABLE_STATIC([DEFAULT])
 # ----------------------------
 # implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
+# `disable-static' LT_INIT option.
 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 m4_define([_LT_ENABLE_STATIC],
 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
@@ -8255,7 +8255,7 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
 # ----------------------------------
 # implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
+# and `disable-fast-install' LT_INIT option.
 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 m4_define([_LT_ENABLE_FAST_INSTALL],
 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
@@ -8311,7 +8311,7 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 # _LT_WITH_PIC([MODE])
 # --------------------
 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
-# LT_INIT options.
+# LT_INIT option.
 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 m4_define([_LT_WITH_PIC],
 [AC_ARG_WITH([pic],
@@ -8876,7 +8876,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
+      # icc doesn't choke on unknown option, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
       # that says an option was ignored or not supported.
       # When given -MP, icc 7.0 and 7.1 complain thusly:
@@ -9379,7 +9379,7 @@ AC_DEFUN([_AM_SET_OPTION],
 
 # _AM_SET_OPTIONS(OPTIONS)
 # ------------------------
-# OPTIONS is a space-separated list of Automake options.
+# OPTIONS is a space-separated list of Automake option.
 AC_DEFUN([_AM_SET_OPTIONS],
 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/ipc/shmem/config.guess
----------------------------------------------------------------------
diff --git a/ipc/shmem/config.guess b/ipc/shmem/config.guess
index 499bfa7..f5856d2 100755
--- a/ipc/shmem/config.guess
+++ b/ipc/shmem/config.guess
@@ -1055,8 +1055,8 @@ EOF
 	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
 	exit ;;
     i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+	if test -f /usr/option/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/option/cb.name`
 		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
 	elif /bin/uname -X 2>/dev/null >/dev/null ; then
 		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/ipc/shmem/configure
----------------------------------------------------------------------
diff --git a/ipc/shmem/configure b/ipc/shmem/configure
index 0fa6dc9..292b71b 100755
--- a/ipc/shmem/configure
+++ b/ipc/shmem/configure
@@ -778,12 +778,12 @@ CPP
 CXXCPP'
 
 
-# Initialize some variables set by options.
+# Initialize some variables set by option.
 ac_init_help=
 ac_init_version=false
 ac_unrecognized_opts=
 ac_unrecognized_sep=
-# The variables have the same names as the options, with
+# The variables have the same names as the option, with
 # dashes changed to underlines.
 cache_file=/dev/null
 exec_prefix=NONE
@@ -800,7 +800,7 @@ verbose=
 x_includes=NONE
 x_libraries=NONE
 
-# Installation directory options.
+# Installation directory option.
 # These are left unexpanded so users can "make install exec_prefix=/foo"
 # and all the variables that are supposed to be based on exec_prefix
 # by default will actually change.
@@ -843,7 +843,7 @@ do
   *)    ac_optarg=yes ;;
   esac
 
-  # Accept the important Cygnus configure options, so we can diagnose typos.
+  # Accept the important Cygnus configure option, so we can diagnose typos.
 
   case $ac_dashdash$ac_option in
   --)
@@ -1194,8 +1194,8 @@ fi
 if test -n "$ac_unrecognized_opts"; then
   case $enable_option_checking in
     no) ;;
-    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+    fatal) as_fn_error $? "unrecognized option: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized option: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
 
@@ -1313,7 +1313,7 @@ done
 # Report the --help message.
 #
 if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
+  # Omit some internal or obsolete option to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
 \`configure' configures ignite-shmem 1.0 to adapt to many kinds of systems.
@@ -1323,11 +1323,11 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
 To assign environment variables (e.g., CC, CFLAGS...), specify them as
 VAR=VALUE.  See below for descriptions of some of the useful variables.
 
-Defaults for the options are specified in brackets.
+Defaults for the option are specified in brackets.
 
 Configuration:
   -h, --help              display this help and exit
-      --help=short        display options specific to this package
+      --help=short        display option specific to this package
       --help=recursive    display the short help of all the included packages
   -V, --version           display version information and exit
   -q, --quiet, --silent   do not print \`checking ...' messages
@@ -1347,7 +1347,7 @@ By default, \`make install' will install all the files in
 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
 for instance \`--prefix=\$HOME'.
 
-For better control, use the options below.
+For better control, use the option below.
 
 Fine tuning of the installation directories:
   --bindir=DIR            user executables [EPREFIX/bin]
@@ -1392,7 +1392,7 @@ if test -n "$ac_init_help"; then
   cat <<\_ACEOF
 
 Optional Features:
-  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-option-checking  ignore unrecognized --enable/--with option
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --disable-dependency-tracking  speeds up one-time build
@@ -3877,7 +3877,7 @@ else
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
+      # icc doesn't choke on unknown option, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
       # that says an option was ignored or not supported.
       # When given -MP, icc 7.0 and 7.1 complain thusly:
@@ -4391,7 +4391,7 @@ else
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
+      # icc doesn't choke on unknown option, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
       # that says an option was ignored or not supported.
       # When given -MP, icc 7.0 and 7.1 complain thusly:
@@ -7964,7 +7964,7 @@ func_stripname_cnf ()
 
 
 
-# Set options
+# Set option
 
 
 
@@ -8560,7 +8560,7 @@ lt_prog_compiler_static=
       ;;
 
     interix[3-9]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Interix 3.x gcc -fpic/-fPIC option generate broken code.
       # Instead, we relocate shared libraries at runtime.
       ;;
 
@@ -10086,7 +10086,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       case $host_os in
       solaris2.[0-5] | solaris2.[0-5].*) ;;
       *)
-	# The compiler driver will combine and reorder linker options,
+	# The compiler driver will combine and reorder linker option,
 	# but understands `-z linker_flag'.  GCC discards it without `$wl',
 	# but is careful enough not to reorder.
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
@@ -13233,7 +13233,7 @@ fi
 	    case $host_os in
 	      solaris2.[0-5] | solaris2.[0-5].*) ;;
 	      *)
-		# The compiler driver will combine and reorder linker options,
+		# The compiler driver will combine and reorder linker option,
 		# but understands `-z linker_flag'.
 	        # Supported since Solaris 2.6 (maybe 2.5.1?)
 		whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
@@ -13658,7 +13658,7 @@ lt_prog_compiler_static_CXX=
       lt_prog_compiler_static_CXX=
       ;;
     interix[3-9]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Interix 3.x gcc -fpic/-fPIC option generate broken code.
       # Instead, we relocate shared libraries at runtime.
       ;;
     sysv4*MP*)
@@ -15687,7 +15687,7 @@ test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # Save the log message, to keep $0 and so on meaningful, and to
 # report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
+# values after option handling.
 ac_log="
 This file was extended by ignite-shmem $as_me 1.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
@@ -15757,7 +15757,7 @@ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g
 ac_cs_version="\\
 ignite-shmem config.status 1.0
 configured by $0, generated by GNU Autoconf 2.69,
-  with options \\"\$ac_cs_config\\"
+  with option \\"\$ac_cs_config\\"
 
 Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
@@ -15795,7 +15795,7 @@ do
   esac
 
   case $ac_option in
-  # Handling of the options.
+  # Handling of the option.
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
     ac_cs_recheck=: ;;
   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
@@ -16233,7 +16233,7 @@ ac_aux_dir='$ac_aux_dir'
 xsi_shell='$xsi_shell'
 lt_shell_append='$lt_shell_append'
 
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the option which allow our
 # commands through without removal of \ escapes INIT.
 if test -n "\${ZSH_VERSION+set}" ; then
    setopt NO_GLOB_SUBST
@@ -16957,7 +16957,7 @@ $as_echo X"$file" |
  ;;
     "libtool":C)
 
-    # See if we are running on zsh, and set the options which allow our
+    # See if we are running on zsh, and set the option which allow our
     # commands through without removal of \ escapes.
     if test -n "${ZSH_VERSION+set}" ; then
       setopt NO_GLOB_SUBST
@@ -17047,7 +17047,7 @@ build_os=$build_os
 # A sed program that does not truncate output.
 SED=$lt_SED
 
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+# Sed that helps us avoid accidentally triggering echo(1) option like -n.
 Xsed="\$SED -e 1s/^X//"
 
 # A grep program that handles long lines.
@@ -17289,7 +17289,7 @@ wl=$lt_lt_prog_compiler_wl
 # Compiler flag to prevent dynamic linking.
 link_static_flag=$lt_lt_prog_compiler_static
 
-# Does compiler simultaneously support -c and -o options?
+# Does compiler simultaneously support -c and -o option?
 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
 
 # Whether or not to add -lc for building shared libraries.
@@ -17631,7 +17631,7 @@ wl=$lt_lt_prog_compiler_wl_CXX
 # Compiler flag to prevent dynamic linking.
 link_static_flag=$lt_lt_prog_compiler_static_CXX
 
-# Does compiler simultaneously support -c and -o options?
+# Does compiler simultaneously support -c and -o option?
 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
 
 # Whether or not to add -lc for building shared libraries.
@@ -17786,6 +17786,6 @@ if test "$no_create" != yes; then
   $ac_cs_success || as_fn_exit 1
 fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized option: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized option: $ac_unrecognized_opts" >&2;}
 fi

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/ipc/shmem/igniteshmem/Makefile.am
----------------------------------------------------------------------
diff --git a/ipc/shmem/igniteshmem/Makefile.am b/ipc/shmem/igniteshmem/Makefile.am
index a7c1d71..2ac3f29 100644
--- a/ipc/shmem/igniteshmem/Makefile.am
+++ b/ipc/shmem/igniteshmem/Makefile.am
@@ -28,10 +28,10 @@ lib_LTLIBRARIES = libigniteshmem.la
 # Sources for igniteshmem
 libigniteshmem_la_SOURCES = org_apache_ignite_internal_util_ipc_shmem_IpcSharedMemoryUtils.cpp
 
-# Linker options libTestProgram
+# Linker option libTestProgram
 libigniteshmem_la_LDFLAGS =
 
-# Compiler options. Here we are adding the include directory
+# Compiler option. Here we are adding the include directory
 # to be searched for headers included in the source code.
 libigniteshmem_la_CPPFLAGS = -I$(top_srcdir)/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I$(JAVA_HOME)/include/darwin \
 -I/System/Library/Frameworks/JavaVM.framework/Headers

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/ipc/shmem/igniteshmem/Makefile.in
----------------------------------------------------------------------
diff --git a/ipc/shmem/igniteshmem/Makefile.in b/ipc/shmem/igniteshmem/Makefile.in
index 34782dc..251fb64 100644
--- a/ipc/shmem/igniteshmem/Makefile.in
+++ b/ipc/shmem/igniteshmem/Makefile.in
@@ -258,10 +258,10 @@ lib_LTLIBRARIES = libigniteshmem.la
 # Sources for igniteshmem
 libigniteshmem_la_SOURCES = org_apache_ignite_internal_util_ipc_shmem_IpcSharedMemoryUtils.cpp
 
-# Linker options libTestProgram
+# Linker option libTestProgram
 libigniteshmem_la_LDFLAGS =
 
-# Compiler options. Here we are adding the include directory
+# Compiler option. Here we are adding the include directory
 # to be searched for headers included in the source code.
 libigniteshmem_la_CPPFLAGS = -I$(top_srcdir)/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I$(JAVA_HOME)/include/darwin \
 -I/System/Library/Frameworks/JavaVM.framework/Headers

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/ipc/shmem/install-sh
----------------------------------------------------------------------
diff --git a/ipc/shmem/install-sh b/ipc/shmem/install-sh
index a9244eb..c055f57 100755
--- a/ipc/shmem/install-sh
+++ b/ipc/shmem/install-sh
@@ -459,7 +459,7 @@ do
     # Copy the file name to the temp name.
     (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
 
-    # and set any options; do chmod last to preserve setuid bits.
+    # and set any option; do chmod last to preserve setuid bits.
     #
     # If any of these fail, we abort the whole thing.  If we want to
     # ignore errors from any of these, just make sure not to ignore

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/ipc/shmem/ltmain.sh
----------------------------------------------------------------------
diff --git a/ipc/shmem/ltmain.sh b/ipc/shmem/ltmain.sh
index af3f40d..74a5202 100644
--- a/ipc/shmem/ltmain.sh
+++ b/ipc/shmem/ltmain.sh
@@ -430,7 +430,7 @@ sed_double_backslash="\
   s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
   s/\n//g"
 
-# Standard options:
+# Standard option:
 opt_dry_run=false
 opt_help=false
 opt_quiet=false
@@ -1057,7 +1057,7 @@ opt_silent=false
 opt_verbose=false
 
 
-# Parse options once, thoroughly.  This comes as soon as possible in the
+# Parse option once, thoroughly.  This comes as soon as possible in the
 # script to make things like `--version' happen as quickly as we can.
 {
   # this just eases exit handling
@@ -1151,14 +1151,14 @@ func_enable_tag "$optarg"
       --help)		func_help				;;
       --version)	func_version				;;
 
-      # Separate optargs to long options:
+      # Separate optargs to long option:
       --*=*)
 			func_split_long_opt "$opt"
 			set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
 			shift
 			;;
 
-      # Separate non-argument short options:
+      # Separate non-argument short option:
       -\?*|-h*|-n*|-v*)
 			func_split_short_opt "$opt"
 			set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
@@ -1171,7 +1171,7 @@ func_enable_tag "$optarg"
     esac
   done
 
-  # Validate options:
+  # Validate option:
 
   # save first non-option argument
   if test "$#" -gt 0; then
@@ -1216,7 +1216,7 @@ func_enable_tag "$optarg"
   }
 
 
-  # Bail if the options were screwed
+  # Bail if the option were screwed
   $exit_cmd $EXIT_FAILURE
 }
 
@@ -1979,7 +1979,7 @@ func_mode_compile ()
 	;;
 
       normal )
-	# Accept any command-line options.
+	# Accept any command-line option.
 	case $arg in
 	-o)
 	  test -n "$libobj" && \
@@ -2314,7 +2314,7 @@ func_mode_help ()
 Remove files from the build directory.
 
 RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+(typically \`/bin/rm').  RM-OPTIONS are option (such as \`-f') to be passed
 to RM.
 
 If FILE is a libtool library, object or program, all the files associated
@@ -2327,7 +2327,7 @@ with it are deleted. Otherwise, only FILE itself is deleted using RM."
 
 Compile a source file into a libtool library object.
 
-This mode accepts the following additional options:
+This mode accepts the following additional option:
 
   -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
   -no-suppress      do not suppress compiler output for multiple passes
@@ -2351,7 +2351,7 @@ library object suffix, \`.lo'."
 
 Automatically set library path, then run a program.
 
-This mode accepts the following additional options:
+This mode accepts the following additional option:
 
   -dlopen FILE      add the directory containing FILE to the library path
 
@@ -2391,7 +2391,7 @@ The following components of INSTALL-COMMAND are treated specially:
   -inst-prefix-dir PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
 
 The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
+BSD-compatible install option are recognized)."
         ;;
 
       link)
@@ -2444,7 +2444,7 @@ The following components of LINK-COMMAND are treated specially:
   -Xlinker FLAG     pass linker-specific FLAG directly to the linker
   -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
 
-All other options (arguments beginning with \`-') are ignored.
+All other option (arguments beginning with \`-') are ignored.
 
 Every other argument is treated as a filename.  Files ending in \`.la' are
 treated as uninstalled libtool libraries, other files are standard or library
@@ -2468,7 +2468,7 @@ is created, otherwise an executable program is created."
 Remove libraries from an installation directory.
 
 RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+(typically \`/bin/rm').  RM-OPTIONS are option (such as \`-f') to be passed
 to RM.
 
 If FILE is a libtool library, all the files associated with it are deleted.
@@ -3899,14 +3899,14 @@ _LTECHO_EOF'
     ECHO=\"$qECHO\"
   fi
 
-# Very basic option parsing. These options are (a) specific to
+# Very basic option parsing. These option are (a) specific to
 # the libtool wrapper, (b) are identical between the wrapper
 # /script/ and the wrapper /executable/ which is used only on
 # windows platforms, and (c) all begin with the string "--lt-"
-# (application programs are unlikely to have options which match
+# (application programs are unlikely to have option which match
 # this pattern).
 #
-# There are only two supported options: --lt-debug and
+# There are only two supported option: --lt-debug and
 # --lt-dump-script. There is, deliberately, no --lt-help.
 #
 # The first argument to this parsing function should be the
@@ -3984,7 +3984,7 @@ func_exec_program_core ()
 }
 
 # A function to encapsulate launching the target application
-# Strips options in the --lt-* namespace from \$@ and
+# Strips option in the --lt-* namespace from \$@ and
 # launches target application with the remaining arguments.
 func_exec_program ()
 {
@@ -4002,7 +4002,7 @@ func_exec_program ()
   func_exec_program_core \${1+\"\$@\"}
 }
 
-  # Parse options
+  # Parse option
   func_parse_lt_options \"\$0\" \${1+\"\$@\"}
 
   # Find the directory that this script lives in.
@@ -4368,7 +4368,7 @@ main (int argc, char *argv[])
   newargz = XMALLOC (char *, argc + 1);
 
   /* very simple arg parsing; don't want to rely on getopt
-   * also, copy all non cwrapper options to newargz, except
+   * also, copy all non cwrapper option to newargz, except
    * argz[0], which is handled differently
    */
   newargc=0;
@@ -4399,7 +4399,7 @@ EOF
              namespace, but it is not one of the ones we know about and
              have already dealt with, above (inluding dump-script), then
              report an error. Otherwise, targets might begin to believe
-             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             they are allowed to use option in the LTWRAPPER_OPTION_PREFIX
              namespace. The first time any user complains about this, we'll
              need to make LTWRAPPER_OPTION_PREFIX a configure-time option
              or a configure.ac-settable value.
@@ -7410,7 +7410,7 @@ func_mode_link ()
 	  func_arith $current - $age
 	  major=.$func_arith_result
 	  versuffix="$major.$age.$revision"
-	  # Darwin ld doesn't like 0 for these options...
+	  # Darwin ld doesn't like 0 for these option...
 	  func_arith $current + 1
 	  minor_current=$func_arith_result
 	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/ipc/shmem/m4/libtool.m4
----------------------------------------------------------------------
diff --git a/ipc/shmem/m4/libtool.m4 b/ipc/shmem/m4/libtool.m4
index 828104c..5832d35 100644
--- a/ipc/shmem/m4/libtool.m4
+++ b/ipc/shmem/m4/libtool.m4
@@ -179,7 +179,7 @@ m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 m4_require([_LT_WITH_SYSROOT])dnl
 
 _LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the option which allow our
 # commands through without removal of \ escapes INIT.
 if test -n "\${ZSH_VERSION+set}" ; then
    setopt NO_GLOB_SUBST
@@ -705,7 +705,7 @@ m4_defun([_LT_CONFIG],
 _LT_CONFIG_SAVE_COMMANDS([
   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
   m4_if(_LT_TAG, [C], [
-    # See if we are running on zsh, and set the options which allow our
+    # See if we are running on zsh, and set the option which allow our
     # commands through without removal of \ escapes.
     if test -n "${ZSH_VERSION+set}" ; then
       setopt NO_GLOB_SUBST
@@ -1965,7 +1965,7 @@ dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
 
 # _LT_COMPILER_C_O([TAGNAME])
 # ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
+# Check to see if option -c and -o are simultaneously supported by compiler.
 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
 m4_defun([_LT_COMPILER_C_O],
 [m4_require([_LT_DECL_SED])dnl
@@ -2015,7 +2015,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    $RM conftest*
 ])
 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
-	[Does compiler simultaneously support -c and -o options?])
+	[Does compiler simultaneously support -c and -o option?])
 ])# _LT_COMPILER_C_O
 
 
@@ -3939,7 +3939,7 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_static, $1)=
       ;;
     interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Interix 3.x gcc -fpic/-fPIC option generate broken code.
       # Instead, we relocate shared libraries at runtime.
       ;;
     sysv4*MP*)
@@ -4270,7 +4270,7 @@ m4_if([$1], [CXX], [
       ;;
 
     interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Interix 3.x gcc -fpic/-fPIC option generate broken code.
       # Instead, we relocate shared libraries at runtime.
       ;;
 
@@ -5477,7 +5477,7 @@ _LT_EOF
       case $host_os in
       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
       *)
-	# The compiler driver will combine and reorder linker options,
+	# The compiler driver will combine and reorder linker option,
 	# but understands `-z linker_flag'.  GCC discards it without `$wl',
 	# but is careful enough not to reorder.
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
@@ -6731,7 +6731,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    case $host_os in
 	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 	      *)
-		# The compiler driver will combine and reorder linker options,
+		# The compiler driver will combine and reorder linker option,
 		# but understands `-z linker_flag'.
 	        # Supported since Solaris 2.6 (maybe 2.5.1?)
 		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
@@ -7718,7 +7718,7 @@ test -z "$SED" && SED=sed
 Xsed="$SED -e 1s/^X//"
 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
-    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+    [Sed that helps us avoid accidentally triggering echo(1) option like -n])
 ])# _LT_DECL_SED
 
 m4_ifndef([AC_PROG_SED], [

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/ipc/shmem/m4/ltoptions.m4
----------------------------------------------------------------------
diff --git a/ipc/shmem/m4/ltoptions.m4 b/ipc/shmem/m4/ltoptions.m4
index 5d9acd8..6bc9a30 100644
--- a/ipc/shmem/m4/ltoptions.m4
+++ b/ipc/shmem/m4/ltoptions.m4
@@ -42,7 +42,7 @@ m4_define([_LT_IF_OPTION],
 
 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
 # -------------------------------------------------------
-# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# Execute IF-NOT-SET unless all option in OPTION-LIST for MACRO-NAME
 # are set.
 m4_define([_LT_UNLESS_OPTIONS],
 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
@@ -55,25 +55,25 @@ m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
 
 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
 # ----------------------------------------
-# OPTION-LIST is a space-separated list of Libtool options associated
+# OPTION-LIST is a space-separated list of Libtool option associated
 # with MACRO-NAME.  If any OPTION has a matching handler declared with
 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
 # the unknown option and exit.
 m4_defun([_LT_SET_OPTIONS],
-[# Set options
+[# Set option
 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
     [_LT_SET_OPTION([$1], _LT_Option)])
 
 m4_if([$1],[LT_INIT],[
   dnl
-  dnl Simply set some default values (i.e off) if boolean options were not
+  dnl Simply set some default values (i.e off) if boolean option were not
   dnl specified:
   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
   ])
   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
   ])
   dnl
-  dnl If no reference was made to various pairs of opposing options, then
+  dnl If no reference was made to various pairs of opposing option, then
   dnl we run the default mode handler for the pair.  For example, if neither
   dnl `shared' nor `disable-shared' was passed, we enable building of shared
   dnl archives by default:
@@ -87,7 +87,7 @@ m4_if([$1],[LT_INIT],[
 
 
 ## --------------------------------- ##
-## Macros to handle LT_INIT options. ##
+## Macros to handle LT_INIT option. ##
 ## --------------------------------- ##
 
 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
@@ -158,7 +158,7 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
 # _LT_ENABLE_SHARED([DEFAULT])
 # ----------------------------
 # implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
+# `disable-shared' LT_INIT option.
 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 m4_define([_LT_ENABLE_SHARED],
 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
@@ -212,7 +212,7 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
 # _LT_ENABLE_STATIC([DEFAULT])
 # ----------------------------
 # implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
+# `disable-static' LT_INIT option.
 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 m4_define([_LT_ENABLE_STATIC],
 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
@@ -266,7 +266,7 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
 # ----------------------------------
 # implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
+# and `disable-fast-install' LT_INIT option.
 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 m4_define([_LT_ENABLE_FAST_INSTALL],
 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
@@ -322,7 +322,7 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 # _LT_WITH_PIC([MODE])
 # --------------------
 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
-# LT_INIT options.
+# LT_INIT option.
 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 m4_define([_LT_WITH_PIC],
 [AC_ARG_WITH([pic],

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/aop/src/test/config/aop/aspectj/META-INF/aop.xml
----------------------------------------------------------------------
diff --git a/modules/aop/src/test/config/aop/aspectj/META-INF/aop.xml b/modules/aop/src/test/config/aop/aspectj/META-INF/aop.xml
index 79417da..9c763e4 100644
--- a/modules/aop/src/test/config/aop/aspectj/META-INF/aop.xml
+++ b/modules/aop/src/test/config/aop/aspectj/META-INF/aop.xml
@@ -22,7 +22,7 @@
     "http://www.eclipse.org/aspectj/dtd/aspectj_1_5_0.dtd">
 
 <aspectj>
-    <weaver options="-Xset:weaveJavaPackages=true,weaveJavaxPackages=true -Xreweavable">
+    <weaver option="-Xset:weaveJavaPackages=true,weaveJavaxPackages=true -Xreweavable">
         <!-- BEA libs. -->
         <exclude within="weblogic..*"/>
         <exclude within="com.bea..*"/>

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/cassandra/store/src/test/bootstrap/aws/cassandra/cassandra-env.sh
----------------------------------------------------------------------
diff --git a/modules/cassandra/store/src/test/bootstrap/aws/cassandra/cassandra-env.sh b/modules/cassandra/store/src/test/bootstrap/aws/cassandra/cassandra-env.sh
index ba76401..f8583d5 100644
--- a/modules/cassandra/store/src/test/bootstrap/aws/cassandra/cassandra-env.sh
+++ b/modules/cassandra/store/src/test/bootstrap/aws/cassandra/cassandra-env.sh
@@ -167,14 +167,14 @@ JVM_OPTS="$JVM_OPTS -Xloggc:${CASSANDRA_HOME}/logs/gc.log"
 # Here we create the arguments that will get passed to the jvm when
 # starting cassandra.
 
-# Read user-defined JVM options from jvm.options file
-JVM_OPTS_FILE=$CASSANDRA_CONF/jvm.options
+# Read user-defined JVM option from jvm.option file
+JVM_OPTS_FILE=$CASSANDRA_CONF/jvm.option
 for opt in `grep "^-" $JVM_OPTS_FILE`
 do
   JVM_OPTS="$JVM_OPTS $opt"
 done
 
-# Check what parameters were defined on jvm.options file to avoid conflicts
+# Check what parameters were defined on jvm.option file to avoid conflicts
 echo $JVM_OPTS | grep -q Xmn
 DEFINED_XMN=$?
 echo $JVM_OPTS | grep -q Xmx
@@ -184,21 +184,21 @@ DEFINED_XMS=$?
 echo $JVM_OPTS | grep -q UseConcMarkSweepGC
 USING_CMS=$?
 
-# We only set -Xms and -Xmx if they were not defined on jvm.options file
+# We only set -Xms and -Xmx if they were not defined on jvm.option file
 # If defined, both Xmx and Xms should be defined together.
 if [ $DEFINED_XMX -ne 0 ] && [ $DEFINED_XMS -ne 0 ]; then
      JVM_OPTS="$JVM_OPTS -Xms${MAX_HEAP_SIZE}"
      JVM_OPTS="$JVM_OPTS -Xmx${MAX_HEAP_SIZE}"
 elif [ $DEFINED_XMX -ne 0 ] || [ $DEFINED_XMS -ne 0 ]; then
-     echo "Please set or unset -Xmx and -Xms flags in pairs on jvm.options file."
+     echo "Please set or unset -Xmx and -Xms flags in pairs on jvm.option file."
      exit 1
 fi
 
-# We only set -Xmn flag if it was not defined in jvm.options file
+# We only set -Xmn flag if it was not defined in jvm.option file
 # and if the CMS GC is being used
 # If defined, both Xmn and Xmx should be defined together.
 if [ $DEFINED_XMN -eq 0 ] && [ $DEFINED_XMX -ne 0 ]; then
-    echo "Please set or unset -Xmx and -Xmn flags in pairs on jvm.options file."
+    echo "Please set or unset -Xmx and -Xmn flags in pairs on jvm.option file."
     exit 1
 elif [ $DEFINED_XMN -ne 0 ] && [ $USING_CMS -eq 0 ]; then
     JVM_OPTS="$JVM_OPTS -Xmn${HEAP_NEWSIZE}"

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/cassandra/store/src/test/bootstrap/aws/cassandra/cassandra-template.yaml
----------------------------------------------------------------------
diff --git a/modules/cassandra/store/src/test/bootstrap/aws/cassandra/cassandra-template.yaml b/modules/cassandra/store/src/test/bootstrap/aws/cassandra/cassandra-template.yaml
index e621886..34f3897 100644
--- a/modules/cassandra/store/src/test/bootstrap/aws/cassandra/cassandra-template.yaml
+++ b/modules/cassandra/store/src/test/bootstrap/aws/cassandra/cassandra-template.yaml
@@ -520,7 +520,7 @@ broadcast_rpc_address:
 # enable or disable keepalive on rpc/native connections
 rpc_keepalive: true
 
-# Cassandra provides two out-of-the-box options for the RPC Server:
+# Cassandra provides two out-of-the-box option for the RPC Server:
 #
 # sync  -> One thread per thrift connection. For a very large number of clients, memory
 #          will be your limiting factor. On a 64 bit JVM, 180KB is the minimum stack size
@@ -787,7 +787,7 @@ dynamic_snitch_badness_threshold: 0.1
 request_scheduler: org.apache.cassandra.scheduler.NoScheduler
 
 # Scheduler Options vary based on the type of scheduler
-# NoScheduler - Has no options
+# NoScheduler - Has no option
 # RoundRobin
 #  - throttle_limit -- The throttle_limit is the number of in-flight
 #                      requests per client.  Requests beyond 
@@ -818,13 +818,13 @@ request_scheduler: org.apache.cassandra.scheduler.NoScheduler
 # users generate their own keys) TLS_RSA_WITH_AES_128_CBC_SHA as the cipher
 # suite for authentication, key exchange and encryption of the actual data transfers.
 # Use the DHE/ECDHE ciphers if running in FIPS 140 compliant mode.
-# NOTE: No custom encryption options are enabled at the moment
-# The available internode options are : all, none, dc, rack
+# NOTE: No custom encryption option are enabled at the moment
+# The available internode option are : all, none, dc, rack
 #
 # If set to dc cassandra will encrypt the traffic between the DCs
 # If set to rack cassandra will encrypt the traffic between the racks
 #
-# The passwords used in these options must match the passwords used when generating
+# The passwords used in these option must match the passwords used when generating
 # the keystore and truststore.  For instructions on generating these files, see:
 # http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore
 #

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/blob/ignite-config.xml
----------------------------------------------------------------------
diff --git a/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/blob/ignite-config.xml b/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/blob/ignite-config.xml
index fbf38e9..d1b1fb7 100644
--- a/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/blob/ignite-config.xml
+++ b/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/blob/ignite-config.xml
@@ -73,8 +73,8 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignite provides several options for automatic discovery that can be used
-                        instead os static IP based discovery. For information on all options refer
+                        Ignite provides several option for automatic discovery that can be used
+                        instead os static IP based discovery. For information on all option refer
                         to our documentation: http://apacheignite.readme.io/docs/cluster-config
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/ignite-config.xml
----------------------------------------------------------------------
diff --git a/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/ignite-config.xml b/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/ignite-config.xml
index c9b45c8..5978cab 100644
--- a/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/ignite-config.xml
+++ b/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/ignite-config.xml
@@ -148,8 +148,8 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignite provides several options for automatic discovery that can be used
-                        instead os static IP based discovery. For information on all options refer
+                        Ignite provides several option for automatic discovery that can be used
+                        instead os static IP based discovery. For information on all option refer
                         to our documentation: http://apacheignite.readme.io/docs/cluster-config
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/persistence-settings-3.xml
----------------------------------------------------------------------
diff --git a/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/persistence-settings-3.xml b/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/persistence-settings-3.xml
index f602508..6afae66 100644
--- a/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/persistence-settings-3.xml
+++ b/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/persistence-settings-3.xml
@@ -27,7 +27,7 @@ Attributes:
 -->
 <persistence keyspace="test1" table="pojo_test3" ttl="86400">
     <!--
-    Cassandra keyspace options which should be used to create provided keyspace if it doesn't exist.
+    Cassandra keyspace option which should be used to create provided keyspace if it doesn't exist.
 
     Note: optional element
     -->
@@ -37,7 +37,7 @@ Attributes:
     </keyspaceOptions>
 
     <!--
-    Cassandra table options which should be used to create provided table if it doesn't exist.
+    Cassandra table option which should be used to create provided table if it doesn't exist.
 
     Note: optional element
     -->
@@ -159,7 +159,7 @@ Attributes:
            3) static       [optional] - boolean flag which specifies that column is static withing a given partition
            4) index        [optional] - boolean flag specifying that secondary index should be created for the field
            5) indexClass   [optional] - custom index java class name, in case you want to use custom index
-           6) indexOptions [optional] - custom index options
+           6) indexOptions [optional] - custom index option
         -->
         <field name="personNumber" column="number" />
         <field name="firstName" column="first_name" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/persistence-settings-4.xml
----------------------------------------------------------------------
diff --git a/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/persistence-settings-4.xml b/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/persistence-settings-4.xml
index 490d8e7..97d7d7c 100644
--- a/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/persistence-settings-4.xml
+++ b/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/pojo/persistence-settings-4.xml
@@ -27,7 +27,7 @@ Attributes:
 -->
 <persistence keyspace="test1" ttl="86400">
     <!--
-    Cassandra keyspace options which should be used to create provided keyspace if it doesn't exist.
+    Cassandra keyspace option which should be used to create provided keyspace if it doesn't exist.
 
     Note: optional element
     -->
@@ -37,7 +37,7 @@ Attributes:
     </keyspaceOptions>
 
     <!--
-    Cassandra table options which should be used to create provided table if it doesn't exist.
+    Cassandra table option which should be used to create provided table if it doesn't exist.
 
     Note: optional element
     -->
@@ -159,7 +159,7 @@ Attributes:
            3) static       [optional] - boolean flag which specifies that column is static withing a given partition
            4) index        [optional] - boolean flag specifying that secondary index should be created for the field
            5) indexClass   [optional] - custom index java class name, in case you want to use custom index
-           6) indexOptions [optional] - custom index options
+           6) indexOptions [optional] - custom index option
         -->
         <field name="personNumber" column="number" />
         <field name="firstName" column="first_name" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/primitive/ignite-config.xml
----------------------------------------------------------------------
diff --git a/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/primitive/ignite-config.xml b/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/primitive/ignite-config.xml
index 13e0922..b679ee2 100644
--- a/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/primitive/ignite-config.xml
+++ b/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/primitive/ignite-config.xml
@@ -73,8 +73,8 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignite provides several options for automatic discovery that can be used
-                        instead os static IP based discovery. For information on all options refer
+                        Ignite provides several option for automatic discovery that can be used
+                        instead os static IP based discovery. For information on all option refer
                         to our documentation: http://apacheignite.readme.io/docs/cluster-config
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/primitive/ignite-remote-server-config.xml
----------------------------------------------------------------------
diff --git a/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/primitive/ignite-remote-server-config.xml b/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/primitive/ignite-remote-server-config.xml
index 8d71aec..de10595 100644
--- a/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/primitive/ignite-remote-server-config.xml
+++ b/modules/cassandra/store/src/test/resources/org/apache/ignite/tests/persistence/primitive/ignite-remote-server-config.xml
@@ -89,8 +89,8 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignite provides several options for automatic discovery that can be used
-                        instead os static IP based discovery. For information on all options refer
+                        Ignite provides several option for automatic discovery that can be used
+                        instead os static IP based discovery. For information on all option refer
                         to our documentation: http://apacheignite.readme.io/docs/cluster-config
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/platforms/cpp/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/DEVNOTES.txt b/modules/platforms/cpp/DEVNOTES.txt
index 473af23..c75a3be 100644
--- a/modules/platforms/cpp/DEVNOTES.txt
+++ b/modules/platforms/cpp/DEVNOTES.txt
@@ -29,8 +29,8 @@ Building the Apache Ignite C++ components:
     * ./configure
     * make
 
-Among standard included by autotools options configure script also include following
-Ignite-specific options:
+Among standard included by autotools option configure script also include following
+Ignite-specific option:
  * --enable-odbc - build included ODBC driver. Disabled by default.
  * --enable-core - build Ignite core library. Enabled by default.
  * --enable-node - build stand-alone node executable. Enabled by default.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/platforms/cpp/cpp.dxg
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/cpp.dxg b/modules/platforms/cpp/cpp.dxg
index d25d978..d0f4c5e 100644
--- a/modules/platforms/cpp/cpp.dxg
+++ b/modules/platforms/cpp/cpp.dxg
@@ -11,7 +11,7 @@
 # Values that contain spaces should be placed between quotes (" ").
 
 #---------------------------------------------------------------------------
-# Project related configuration options
+# Project related configuration option
 #---------------------------------------------------------------------------
 
 # This tag specifies the encoding used for all characters in the config file
@@ -310,7 +310,7 @@ TYPEDEF_HIDES_STRUCT   = NO
 SYMBOL_CACHE_SIZE      = 0
 
 #---------------------------------------------------------------------------
-# Build related configuration options
+# Build related configuration option
 #---------------------------------------------------------------------------
 
 # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
@@ -551,7 +551,7 @@ FILE_VERSION_FILTER    =
 LAYOUT_FILE            =
 
 #---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
+# configuration option related to warning and progress messages
 #---------------------------------------------------------------------------
 
 # The QUIET tag can be used to turn on/off the messages that are generated
@@ -602,7 +602,7 @@ WARN_FORMAT            = "$file:$line: $text"
 WARN_LOGFILE           =
 
 #---------------------------------------------------------------------------
-# configuration options related to the input files
+# configuration option related to the input files
 #---------------------------------------------------------------------------
 
 # The INPUT tag can be used to specify the files and/or directories that contain
@@ -727,7 +727,7 @@ FILTER_SOURCE_FILES    = NO
 FILTER_SOURCE_PATTERNS =
 
 #---------------------------------------------------------------------------
-# configuration options related to source browsing
+# configuration option related to source browsing
 #---------------------------------------------------------------------------
 
 # If the SOURCE_BROWSER tag is set to YES then a list of source files will
@@ -783,7 +783,7 @@ USE_HTAGS              = NO
 VERBATIM_HEADERS       = YES
 
 #---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
+# configuration option related to the alphabetical class index
 #---------------------------------------------------------------------------
 
 # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
@@ -806,7 +806,7 @@ COLS_IN_ALPHA_INDEX    = 5
 IGNORE_PREFIX          =
 
 #---------------------------------------------------------------------------
-# configuration options related to the HTML output
+# configuration option related to the HTML output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_HTML tag is set to YES (the default) Doxygen will
@@ -830,7 +830,7 @@ HTML_FILE_EXTENSION    = .html
 # each generated HTML page. If it is left blank doxygen will generate a
 # standard header. Note that when using a custom header you are responsible
 # for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
+# needs, which is dependent on the configuration option used.
 # It is adviced to generate a default header using "doxygen -w html
 # header.html footer.html stylesheet.css YourConfigFile" and then modify
 # that header. Note that the header is subject to change so you typically
@@ -1154,7 +1154,7 @@ SEARCHENGINE           = YES
 SERVER_BASED_SEARCH    = NO
 
 #---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
+# configuration option related to the LaTeX output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
@@ -1247,7 +1247,7 @@ LATEX_HIDE_INDICES     = NO
 LATEX_SOURCE_CODE      = NO
 
 #---------------------------------------------------------------------------
-# configuration options related to the RTF output
+# configuration option related to the RTF output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
@@ -1289,7 +1289,7 @@ RTF_STYLESHEET_FILE    =
 RTF_EXTENSIONS_FILE    =
 
 #---------------------------------------------------------------------------
-# configuration options related to the man page output
+# configuration option related to the man page output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_MAN tag is set to YES (the default) Doxygen will
@@ -1317,7 +1317,7 @@ MAN_EXTENSION          = .3
 MAN_LINKS              = NO
 
 #---------------------------------------------------------------------------
-# configuration options related to the XML output
+# configuration option related to the XML output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_XML tag is set to YES Doxygen will
@@ -1352,7 +1352,7 @@ XML_DTD                =
 XML_PROGRAMLISTING     = YES
 
 #---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
+# configuration option for the AutoGen Definitions output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
@@ -1364,7 +1364,7 @@ XML_PROGRAMLISTING     = YES
 GENERATE_AUTOGEN_DEF   = NO
 
 #---------------------------------------------------------------------------
-# configuration options related to the Perl module output
+# configuration option related to the Perl module output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_PERLMOD tag is set to YES Doxygen will
@@ -1399,7 +1399,7 @@ PERLMOD_PRETTY         = YES
 PERLMOD_MAKEVAR_PREFIX =
 
 #---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
+# Configuration option related to the preprocessor
 #---------------------------------------------------------------------------
 
 # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
@@ -1510,7 +1510,7 @@ EXTERNAL_GROUPS        = YES
 PERL_PATH              = /usr/bin/perl
 
 #---------------------------------------------------------------------------
-# Configuration options related to the dot tool
+# Configuration option related to the dot tool
 #---------------------------------------------------------------------------
 
 # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
@@ -1538,7 +1538,7 @@ HIDE_UNDOC_RELATIONS   = YES
 
 # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
 # available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# toolkit from AT&T and Lucent Bell Labs. The other option in this section
 # have no effect if this option is set to NO (the default)
 
 HAVE_DOT               = NO
@@ -1617,7 +1617,7 @@ INCLUDE_GRAPH          = YES
 
 INCLUDED_BY_GRAPH      = YES
 
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# If the CALL_GRAPH and HAVE_DOT option are set to YES then
 # doxygen will generate a call dependency graph for every global function
 # or class method. Note that enabling this option will significantly increase
 # the time of a run. So in most cases it will be better to enable call graphs
@@ -1697,7 +1697,7 @@ MAX_DOT_GRAPH_DEPTH    = 0
 DOT_TRANSPARENT        = NO
 
 # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
+# files in one run (i.e. multiple -o and -T option on the command line). This
 # makes dot run faster, but since only newer versions of dot (>1.8.10)
 # support this, this feature is disabled by default.
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/platforms/cpp/examples/continuous-query-example/config/continuous-query-example.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/continuous-query-example/config/continuous-query-example.xml b/modules/platforms/cpp/examples/continuous-query-example/config/continuous-query-example.xml
index bdc1e92..2febc73 100644
--- a/modules/platforms/cpp/examples/continuous-query-example/config/continuous-query-example.xml
+++ b/modules/platforms/cpp/examples/continuous-query-example/config/continuous-query-example.xml
@@ -32,7 +32,7 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignite provides several options for automatic discovery that can be used
+                        Ignite provides several option for automatic discovery that can be used
                         instead os static IP based discovery.
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/platforms/cpp/examples/odbc-example/config/example-odbc.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/odbc-example/config/example-odbc.xml b/modules/platforms/cpp/examples/odbc-example/config/example-odbc.xml
index e19075e..ac78937 100644
--- a/modules/platforms/cpp/examples/odbc-example/config/example-odbc.xml
+++ b/modules/platforms/cpp/examples/odbc-example/config/example-odbc.xml
@@ -105,7 +105,7 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignite provides several options for automatic discovery that can be used
+                        Ignite provides several option for automatic discovery that can be used
                         instead os static IP based discovery.
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/platforms/cpp/examples/putget-example/config/example-cache.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/putget-example/config/example-cache.xml b/modules/platforms/cpp/examples/putget-example/config/example-cache.xml
index 28b726c..b0ed0ff 100644
--- a/modules/platforms/cpp/examples/putget-example/config/example-cache.xml
+++ b/modules/platforms/cpp/examples/putget-example/config/example-cache.xml
@@ -55,7 +55,7 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignite provides several options for automatic discovery that can be used
+                        Ignite provides several option for automatic discovery that can be used
                         instead os static IP based discovery.
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/platforms/cpp/examples/query-example/config/query-example.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/query-example/config/query-example.xml b/modules/platforms/cpp/examples/query-example/config/query-example.xml
index a7b63c2..9877e1b 100644
--- a/modules/platforms/cpp/examples/query-example/config/query-example.xml
+++ b/modules/platforms/cpp/examples/query-example/config/query-example.xml
@@ -101,7 +101,7 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignite provides several options for automatic discovery that can be used
+                        Ignite provides several option for automatic discovery that can be used
                         instead os static IP based discovery.
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/platforms/cpp/odbc-test/config/queries-default.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/config/queries-default.xml b/modules/platforms/cpp/odbc-test/config/queries-default.xml
index c1eaea8..8d28fda 100644
--- a/modules/platforms/cpp/odbc-test/config/queries-default.xml
+++ b/modules/platforms/cpp/odbc-test/config/queries-default.xml
@@ -126,7 +126,7 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignite provides several options for automatic discovery that can be used
+                        Ignite provides several option for automatic discovery that can be used
                         instead os static IP based discovery.
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
index 3691aa0..bf69d85 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
@@ -777,7 +777,7 @@
                 </xs:element>
                 <xs:element name="jvmOptions" minOccurs="0">
                     <xs:annotation>
-                        <xs:documentation>Collection of options passed to JVM on Ignite start.</xs:documentation>
+                        <xs:documentation>Collection of option passed to JVM on Ignite start.</xs:documentation>
                     </xs:annotation>
                     <xs:complexType>
                         <xs:sequence>


[42/50] [abbrv] ignite git commit: IGNITE-4935 .NET: IgniteConfiguration.EventStorageSpi

Posted by dm...@apache.org.
IGNITE-4935 .NET: IgniteConfiguration.EventStorageSpi

This closes #1761


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

Branch: refs/heads/ignite-1192
Commit: 4425b40f93f4b61e815dd7352022b5fcbe4765f0
Parents: 118baeb
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Mon Apr 10 12:33:52 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Mon Apr 10 12:34:12 2017 +0300

----------------------------------------------------------------------
 .../utils/PlatformConfigurationUtils.java       |  29 +++++-
 .../Apache.Ignite.Core.Tests/EventsTest.cs      |  66 +++++++++---
 .../IgniteConfigurationSerializerTest.cs        |  13 ++-
 .../IgniteConfigurationTest.cs                  |  15 ++-
 .../Apache.Ignite.Core.csproj                   |   3 +
 .../Events/IEventStorageSpi.cs                  |  33 ++++++
 .../Events/MemoryEventStorageSpi.cs             | 100 +++++++++++++++++++
 .../Events/NoopEventStorageSpi.cs               |  27 +++++
 .../Apache.Ignite.Core/IgniteConfiguration.cs   |  48 ++++++++-
 .../IgniteConfigurationSection.xsd              |  22 ++++
 .../Plugin/IPluginConfiguration.cs              |   4 +-
 11 files changed, 338 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4425b40f/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
index 7fb25c8..f1ef625 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
@@ -67,9 +67,11 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.spi.eventstorage.EventStorageSpi;
+import org.apache.ignite.spi.eventstorage.NoopEventStorageSpi;
+import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi;
 import org.apache.ignite.spi.swapspace.SwapSpaceSpi;
 import org.apache.ignite.spi.swapspace.file.FileSwapSpaceSpi;
-import org.apache.ignite.spi.swapspace.file.FileSwapSpaceSpiMBean;
 import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
 
@@ -673,6 +675,18 @@ public class PlatformConfigurationUtils {
                 assert swapType == SWAP_TYP_NONE;
         }
 
+        switch (in.readByte()) {
+            case 1:
+                cfg.setEventStorageSpi(new NoopEventStorageSpi());
+                break;
+
+            case 2:
+                cfg.setEventStorageSpi(new MemoryEventStorageSpi()
+                        .setExpireCount(in.readLong())
+                        .setExpireAgeMs(in.readLong()));
+                break;
+        }
+
         readPluginConfiguration(cfg, in);
     }
 
@@ -1116,6 +1130,19 @@ public class PlatformConfigurationUtils {
             w.writeByte(SWAP_TYP_NONE);
         }
 
+        EventStorageSpi eventStorageSpi = cfg.getEventStorageSpi();
+
+        if (eventStorageSpi == null) {
+            w.writeByte((byte) 0);
+        } else if (eventStorageSpi instanceof NoopEventStorageSpi) {
+            w.writeByte((byte) 1);
+        } else if (eventStorageSpi instanceof MemoryEventStorageSpi) {
+            w.writeByte((byte) 2);
+
+            w.writeLong(((MemoryEventStorageSpi)eventStorageSpi).getExpireCount());
+            w.writeLong(((MemoryEventStorageSpi)eventStorageSpi).getExpireAgeMs());
+        }
+
         w.writeString(cfg.getIgniteHome());
 
         w.writeLong(ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getInit());

http://git-wip-us.apache.org/repos/asf/ignite/blob/4425b40f/modules/platforms/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs
index 994b334..329d307 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs
@@ -50,15 +50,6 @@ namespace Apache.Ignite.Core.Tests
 
         /** */
         private IIgnite[] _grids;
-        
-        /** */
-        public static int IdGen;
-
-        [TestFixtureTearDown]
-        public void FixtureTearDown()
-        {
-            StopGrids();
-        }
 
         /// <summary>
         /// Executes before each test.
@@ -74,7 +65,7 @@ namespace Apache.Ignite.Core.Tests
         /// Executes after each test.
         /// </summary>
         [TearDown]
-        public virtual void TearDown()
+        public void TearDown()
         {
             try
             {
@@ -97,6 +88,15 @@ namespace Apache.Ignite.Core.Tests
         }
 
         /// <summary>
+        /// Fixture tear down.
+        /// </summary>
+        [TestFixtureTearDown]
+        public void FixtureTearDown()
+        {
+            StopGrids();
+        }
+
+        /// <summary>
         /// Tests enable/disable of event types.
         /// </summary>
         [Test]
@@ -611,6 +611,36 @@ namespace Apache.Ignite.Core.Tests
         }
 
         /// <summary>
+        /// Tests the event store configuration.
+        /// </summary>
+        [Test]
+        public void TestConfiguration()
+        {
+            var cfg = _grid1.GetConfiguration().EventStorageSpi as MemoryEventStorageSpi;
+
+            Assert.IsNotNull(cfg);
+
+            Assert.AreEqual(MemoryEventStorageSpi.DefaultExpirationTimeout, cfg.ExpirationTimeout);
+            Assert.AreEqual(MemoryEventStorageSpi.DefaultMaxEventCount, cfg.MaxEventCount);
+
+            // Test user-defined event storage.
+            var igniteCfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
+            {
+                IgniteInstanceName = "grid4",
+                EventStorageSpi = new MyEventStorage()
+            };
+
+            var ex = Assert.Throws<IgniteException>(() => Ignition.Start(igniteCfg));
+            Assert.AreEqual("Failed to start Ignite.NET, check inner exception for details", ex.Message);
+
+            Assert.IsNotNull(ex.InnerException);
+            Assert.AreEqual("Unsupported IgniteConfiguration.EventStorageSpi: " +
+                            "'Apache.Ignite.Core.Tests.MyEventStorage'. Supported implementations: " +
+                            "'Apache.Ignite.Core.Events.NoopEventStorageSpi', " +
+                            "'Apache.Ignite.Core.Events.MemoryEventStorageSpi'.", ex.InnerException.Message);
+        }
+
+        /// <summary>
         /// Checks base event fields serialization.
         /// </summary>
         /// <param name="evt">The evt.</param>
@@ -666,7 +696,7 @@ namespace Apache.Ignite.Core.Tests
         /// <summary>
         /// Gets the Ignite configuration.
         /// </summary>
-        private static IgniteConfiguration Configuration(string springConfigUrl)
+        private static IgniteConfiguration GetConfiguration(string springConfigUrl)
         {
             return new IgniteConfiguration
             {
@@ -679,7 +709,8 @@ namespace Apache.Ignite.Core.Tests
                     {
                         new BinaryTypeConfiguration(typeof (RemoteEventBinarizableFilter))
                     }
-                }
+                },
+                EventStorageSpi = new MemoryEventStorageSpi()
             };
         }
 
@@ -761,9 +792,9 @@ namespace Apache.Ignite.Core.Tests
             if (_grid1 != null)
                 return;
 
-            _grid1 = Ignition.Start(Configuration("config\\compute\\compute-grid1.xml"));
-            _grid2 = Ignition.Start(Configuration("config\\compute\\compute-grid2.xml"));
-            _grid3 = Ignition.Start(Configuration("config\\compute\\compute-grid3.xml"));
+            _grid1 = Ignition.Start(GetConfiguration("config\\compute\\compute-grid1.xml"));
+            _grid2 = Ignition.Start(GetConfiguration("config\\compute\\compute-grid2.xml"));
+            _grid3 = Ignition.Start(GetConfiguration("config\\compute\\compute-grid3.xml"));
 
             _grids = new[] {_grid1, _grid2, _grid3};
         }
@@ -1069,4 +1100,9 @@ namespace Apache.Ignite.Core.Tests
             throw new NotImplementedException();
         }
     }
+
+    public class MyEventStorage : IEventStorageSpi
+    {
+        // No-op.
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/4425b40f/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
index 6015f80..1d39e69 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
@@ -137,6 +137,7 @@ namespace Apache.Ignite.Core.Tests
                             <pluginConfigurations>
                                 <iPluginConfiguration type='Apache.Ignite.Core.Tests.Plugin.TestIgnitePluginConfiguration, Apache.Ignite.Core.Tests' />
                             </pluginConfigurations>
+                            <eventStorageSpi type='MemoryEventStorageSpi' expirationTimeout='00:00:23.45' maxEventCount='129' />
                         </igniteConfig>";
 
             var cfg = IgniteConfiguration.FromXml(xml);
@@ -255,6 +256,11 @@ namespace Apache.Ignite.Core.Tests
 
             var cachePlugCfg = cacheCfg.PluginConfigurations.Cast<CachePluginConfiguration>().Single();
             Assert.AreEqual("baz", cachePlugCfg.TestProperty);
+
+            var eventStorage = cfg.EventStorageSpi as MemoryEventStorageSpi;
+            Assert.IsNotNull(eventStorage);
+            Assert.AreEqual(23.45, eventStorage.ExpirationTimeout.TotalSeconds);
+            Assert.AreEqual(129, eventStorage.MaxEventCount);
         }
 
         /// <summary>
@@ -796,7 +802,12 @@ namespace Apache.Ignite.Core.Tests
                     ReadStripesNumber = 77,
                     BaseDirectory = "test"
                 },
-                PluginConfigurations = new[] {new TestIgnitePluginConfiguration() }
+                PluginConfigurations = new[] {new TestIgnitePluginConfiguration() },
+                EventStorageSpi = new MemoryEventStorageSpi
+                {
+                    ExpirationTimeout = TimeSpan.FromMilliseconds(12345),
+                    MaxEventCount = 257
+                }
             };
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4425b40f/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
index 5063c21..f9f8a61 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
@@ -83,6 +83,7 @@ namespace Apache.Ignite.Core.Tests
             CheckDefaultValueAttributes(new AtomicConfiguration());
             CheckDefaultValueAttributes(new TransactionConfiguration());
             CheckDefaultValueAttributes(new FileSwapSpaceSpi());
+            CheckDefaultValueAttributes(new MemoryEventStorageSpi());
         }
 
         /// <summary>
@@ -198,6 +199,13 @@ namespace Apache.Ignite.Core.Tests
 
                 Assert.IsNotNull(resCfg.PluginConfigurations);
                 Assert.AreEqual(cfg.PluginConfigurations, resCfg.PluginConfigurations);
+
+                var eventCfg = cfg.EventStorageSpi as MemoryEventStorageSpi;
+                var resEventCfg = resCfg.EventStorageSpi as MemoryEventStorageSpi;
+                Assert.IsNotNull(eventCfg);
+                Assert.IsNotNull(resEventCfg);
+                Assert.AreEqual(eventCfg.ExpirationTimeout, resEventCfg.ExpirationTimeout);
+                Assert.AreEqual(eventCfg.MaxEventCount, resEventCfg.MaxEventCount);
             }
         }
 
@@ -546,7 +554,12 @@ namespace Apache.Ignite.Core.Tests
                         }
                     }
                 },
-                PluginConfigurations = new[] { new TestIgnitePluginConfiguration() }
+                PluginConfigurations = new[] { new TestIgnitePluginConfiguration() },
+                EventStorageSpi = new MemoryEventStorageSpi
+                {
+                    ExpirationTimeout = TimeSpan.FromSeconds(5),
+                    MaxEventCount = 10
+                }
             };
         }
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/4425b40f/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
index 2a174eb..6553f1a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
@@ -93,6 +93,9 @@
   <ItemGroup>
     <Compile Include="Binary\BinaryArrayEqualityComparer.cs" />
     <Compile Include="Common\ExceptionFactory.cs" />
+    <Compile Include="Events\IEventStorageSpi.cs" />
+    <Compile Include="Events\MemoryEventStorageSpi.cs" />
+    <Compile Include="Events\NoopEventStorageSpi.cs" />
     <Compile Include="Impl\Binary\BinaryFieldEqualityComparer.cs" />
     <Compile Include="Binary\BinaryReflectiveSerializer.cs" />
     <Compile Include="Common\JavaException.cs" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/4425b40f/modules/platforms/dotnet/Apache.Ignite.Core/Events/IEventStorageSpi.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/IEventStorageSpi.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/IEventStorageSpi.cs
new file mode 100644
index 0000000..f04c30c
--- /dev/null
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/IEventStorageSpi.cs
@@ -0,0 +1,33 @@
+\ufeff/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Apache.Ignite.Core.Events
+{
+    using System.Diagnostics.CodeAnalysis;
+
+    /// <summary>
+    /// Manages local event storage.
+    /// <para />
+    /// Only predefined implementations are supported: 
+    /// <see cref="NoopEventStorageSpi"/>, <see cref="MemoryEventStorageSpi"/>.
+    /// </summary>
+    [SuppressMessage("Microsoft.Design", "CA1040:AvoidEmptyInterfaces")]
+    public interface IEventStorageSpi
+    {
+        // No-op.
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/4425b40f/modules/platforms/dotnet/Apache.Ignite.Core/Events/MemoryEventStorageSpi.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/MemoryEventStorageSpi.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/MemoryEventStorageSpi.cs
new file mode 100644
index 0000000..e00c155
--- /dev/null
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/MemoryEventStorageSpi.cs
@@ -0,0 +1,100 @@
+\ufeff/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Apache.Ignite.Core.Events
+{
+    using System;
+    using System.ComponentModel;
+    using System.Diagnostics;
+    using Apache.Ignite.Core.Binary;
+
+    /// <summary>
+    /// In-memory event storage.
+    /// </summary>
+    public class MemoryEventStorageSpi : IEventStorageSpi
+    {
+        /// <summary>
+        /// Default event count limit.
+        /// </summary>
+        public const long DefaultMaxEventCount = 10000;
+
+        /// <summary>
+        /// The default expiration timeout.
+        /// </summary>
+        public static readonly TimeSpan DefaultExpirationTimeout = TimeSpan.FromSeconds(-1);
+
+        /// <summary>
+        /// Gets or sets the expiration timeout for stored events.
+        /// Negative value means no expiration.
+        /// Defaults to -1 second.
+        /// </summary>
+        [DefaultValue(typeof(TimeSpan), "-0:0:1")]
+        public TimeSpan ExpirationTimeout { get; set; }
+
+        /// <summary>
+        /// Gets or sets the maximum event count to store. When this limit is reached, older events are removed.
+        /// Defaults to <see cref="DefaultMaxEventCount"/>.
+        /// </summary>
+        [DefaultValue(DefaultMaxEventCount)]
+        public long MaxEventCount { get; set; }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="MemoryEventStorageSpi"/> class.
+        /// </summary>
+        public MemoryEventStorageSpi()
+        {
+            ExpirationTimeout = DefaultExpirationTimeout;
+            MaxEventCount = DefaultMaxEventCount;
+        }
+
+        /// <summary>
+        /// Reads instance.
+        /// </summary>
+        internal static MemoryEventStorageSpi Read(IBinaryRawReader reader)
+        {
+            Debug.Assert(reader != null);
+
+            var eventCount = reader.ReadLong();
+            var timeout = reader.ReadLong();
+
+            return new MemoryEventStorageSpi
+            {
+                MaxEventCount = eventCount,
+                ExpirationTimeout = timeout < 0 || timeout > TimeSpan.MaxValue.TotalMilliseconds
+                    ? DefaultExpirationTimeout
+                    : TimeSpan.FromMilliseconds(timeout)
+            };
+        }
+
+        /// <summary>
+        /// Writes this instance.
+        /// </summary>
+        internal void Write(IBinaryRawWriter writer)
+        {
+            writer.WriteLong(MaxEventCount);
+
+            if (ExpirationTimeout == TimeSpan.MaxValue || ExpirationTimeout < TimeSpan.Zero)
+            {
+                writer.WriteLong(long.MaxValue);
+            }
+            else
+            {
+                writer.WriteLong((long) ExpirationTimeout.TotalMilliseconds);
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/4425b40f/modules/platforms/dotnet/Apache.Ignite.Core/Events/NoopEventStorageSpi.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/NoopEventStorageSpi.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/NoopEventStorageSpi.cs
new file mode 100644
index 0000000..c69531f
--- /dev/null
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/NoopEventStorageSpi.cs
@@ -0,0 +1,27 @@
+\ufeff/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Apache.Ignite.Core.Events
+{
+    /// <summary>
+    /// No-op event storage interface, does not store anything.
+    /// </summary>
+    public class NoopEventStorageSpi : IEventStorageSpi
+    {
+        // No-op.
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/4425b40f/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
index 28842e9..20e2be8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
@@ -30,6 +30,7 @@
     using Apache.Ignite.Core.Cache;
     using Apache.Ignite.Core.Cache.Configuration;
     using Apache.Ignite.Core.Cluster;
+    using Apache.Ignite.Core.Common;
     using Apache.Ignite.Core.Communication;
     using Apache.Ignite.Core.Communication.Tcp;
     using Apache.Ignite.Core.DataStructures.Configuration;
@@ -348,7 +349,33 @@
             // Swap space
             SwapSpaceSerializer.Write(writer, SwapSpaceSpi);
 
-            // Plugins
+            // Event storage
+            if (EventStorageSpi == null)
+            {
+                writer.WriteByte(0);
+            }
+            else if (EventStorageSpi is NoopEventStorageSpi)
+            {
+                writer.WriteByte(1);
+            }
+            else
+            {
+                var memEventStorage = EventStorageSpi as MemoryEventStorageSpi;
+
+                if (memEventStorage == null)
+                {
+                    throw new IgniteException(string.Format(
+                        "Unsupported IgniteConfiguration.EventStorageSpi: '{0}'. " +
+                        "Supported implementations: '{1}', '{2}'.",
+                        EventStorageSpi.GetType(), typeof(NoopEventStorageSpi), typeof(MemoryEventStorageSpi)));
+                }
+
+                writer.WriteByte(2);
+
+                memEventStorage.Write(writer);
+            }
+
+            // Plugins (should be last)
             if (PluginConfigurations != null)
             {
                 var pos = writer.Stream.Position;
@@ -484,6 +511,17 @@
 
             // Swap
             SwapSpaceSpi = SwapSpaceSerializer.Read(r);
+
+            // Event storage
+            switch (r.ReadByte())
+            {
+                case 1: EventStorageSpi = new NoopEventStorageSpi();
+                    break;
+
+                case 2:
+                    EventStorageSpi = MemoryEventStorageSpi.Read(r);
+                    break;
+            }
         }
 
         /// <summary>
@@ -923,5 +961,13 @@
         /// </summary>
         [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
         public ICollection<IPluginConfiguration> PluginConfigurations { get; set; }
+
+        /// <summary>
+        /// Gets or sets the event storage interface.
+        /// <para />
+        /// Only predefined implementations are supported: 
+        /// <see cref="NoopEventStorageSpi"/>, <see cref="MemoryEventStorageSpi"/>.
+        /// </summary>
+        public IEventStorageSpi EventStorageSpi { get; set; }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/4425b40f/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
index 375d128..3691aa0 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
@@ -1208,6 +1208,28 @@
                         </xs:attribute>
                     </xs:complexType>
                 </xs:element>
+                <xs:element name="eventStorageSpi" minOccurs="0">
+                    <xs:annotation>
+                        <xs:documentation>Event storage space SPI.</xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:attribute name="type" type="xs:string" use="required">
+                            <xs:annotation>
+                                <xs:documentation>Assembly-qualified type name.</xs:documentation>
+                            </xs:annotation>
+                        </xs:attribute>
+                        <xs:attribute name="expirationTimeout" type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>Expiration timeout for stored events. Negative for unlimited.</xs:documentation>
+                            </xs:annotation>
+                        </xs:attribute>
+                        <xs:attribute name="maxEventCount" type="xs:long">
+                            <xs:annotation>
+                                <xs:documentation>Maximum event count to store.</xs:documentation>
+                            </xs:annotation>
+                        </xs:attribute>
+                    </xs:complexType>
+                </xs:element>
                 <xs:element name="pluginConfigurations" minOccurs="0">
                     <xs:annotation>
                         <xs:documentation>Plugin configurations.</xs:documentation>

http://git-wip-us.apache.org/repos/asf/ignite/blob/4425b40f/modules/platforms/dotnet/Apache.Ignite.Core/Plugin/IPluginConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Plugin/IPluginConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Plugin/IPluginConfiguration.cs
index 4d594f4..47c6599 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Plugin/IPluginConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Plugin/IPluginConfiguration.cs
@@ -17,11 +17,10 @@
 
 namespace Apache.Ignite.Core.Plugin
 {
-    using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Binary;
 
     /// <summary>
-    /// Plugin configuration marker interface.
+    /// Plugin configuration interface.
     /// <para />
     /// Implementations should be linked to corresponding <see cref="IPluginProvider{TConfig}"/>
     /// via <see cref="PluginProviderTypeAttribute"/>.
@@ -41,7 +40,6 @@ namespace Apache.Ignite.Core.Plugin
     /// </code>
     /// </example>
     /// </summary>
-    [SuppressMessage("Microsoft.Design", "CA1040:AvoidEmptyInterfaces")]
     public interface IPluginConfiguration
     {
         /// <summary>


[12/50] [abbrv] ignite git commit: Merge remote-tracking branch 'remotes/upstream/ignite-1.8.4-p1'

Posted by dm...@apache.org.
Merge remote-tracking branch 'remotes/upstream/ignite-1.8.4-p1'


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

Branch: refs/heads/ignite-1192
Commit: 889594f454da8d9b2e7085825557143aabfb13f0
Parents: d34a4d0 8273e67
Author: Anton Vinogradov <av...@apache.org>
Authored: Mon Apr 3 18:27:18 2017 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Mon Apr 3 18:27:18 2017 +0300

----------------------------------------------------------------------

----------------------------------------------------------------------



[47/50] [abbrv] ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-1192

Posted by dm...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-1192


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

Branch: refs/heads/ignite-1192
Commit: 2ab0999d4f97b5361d094862ebf2115ed3360b3c
Parents: 9017ab4 edfa353
Author: Denis Magda <dm...@gridgain.com>
Authored: Mon Apr 10 14:26:37 2017 -0700
Committer: Denis Magda <dm...@gridgain.com>
Committed: Mon Apr 10 14:26:37 2017 -0700

----------------------------------------------------------------------
 DEVNOTES.txt                                    |    3 -
 assembly/dependencies-fabric-lgpl.xml           |    3 -
 assembly/dependencies-fabric.xml                |    3 -
 assembly/dependencies-schema-import.xml         |   57 -
 assembly/release-base.xml                       |    2 -
 assembly/release-fabric-base.xml                |   15 +-
 assembly/release-schema-import.xml              |   50 -
 bin/ignite-schema-import.bat                    |  110 -
 bin/ignite-schema-import.sh                     |   87 -
 examples/README-LGPL.txt                        |    4 +-
 examples/README.txt                             |    2 -
 examples/pom-standalone-lgpl.xml                |    1 -
 examples/pom-standalone.xml                     |    1 -
 examples/pom.xml                                |    1 -
 examples/schema-import/README.txt               |   38 -
 examples/schema-import/bin/db-init.sql          |   28 -
 examples/schema-import/bin/h2-server.bat        |   80 -
 examples/schema-import/bin/h2-server.sh         |   66 -
 .../schema-import/bin/schema-import.properties  |   28 -
 examples/schema-import/pom-standalone.xml       |   90 -
 examples/schema-import/pom.xml                  |  101 -
 .../org/apache/ignite/schema/CacheConfig.java   |   36 -
 .../java/org/apache/ignite/schema/Demo.java     |  134 --
 .../java/org/apache/ignite/schema/DemoNode.java |   38 -
 .../ignite/schema/H2DataSourceFactory.java      |   35 -
 .../java/org/apache/ignite/schema/Person.java   |   44 -
 .../org/apache/ignite/schema/PersonKey.java     |   37 -
 .../computegrid/ComputeAsyncExample.java        |    8 +-
 .../ComputeFibonacciContinuationExample.java    |   13 +-
 .../examples/datagrid/CacheAsyncApiExample.java |   17 +-
 .../datastructures/IgniteLockExample.java       |    4 +-
 .../datastructures/IgniteSemaphoreExample.java  |    4 +-
 .../examples/ScalarContinuationExample.scala    |   10 +-
 .../singlesplit/SingleSplitsLoadTest.java       |    8 +-
 .../spi/checkpoint/s3/S3CheckpointSpi.java      |   72 +-
 .../tcp/ipfinder/s3/TcpDiscoveryS3IpFinder.java |   27 +-
 .../ignite/tests/utils/TestTransaction.java     |   11 +
 .../internal/client/ClientStartNodeTask.java    |   10 +-
 .../internal/jdbc2/JdbcConnectionSelfTest.java  |   34 +
 .../JettyRestProcessorAbstractSelfTest.java     |    2 +-
 .../jdbc/AbstractJdbcPojoQuerySelfTest.java     |  169 ++
 .../jdbc/JdbcPojoLegacyQuerySelfTest.java       |   44 +
 .../ignite/jdbc/JdbcPojoQuerySelfTest.java      |   56 +
 .../jdbc/suite/IgniteJdbcDriverTestSuite.java   |    4 +
 .../src/test/resources/spring-server-node.xml   |   71 +-
 .../test/resources/spring-server-ssl-node.xml   |   69 +-
 .../cloud/TcpDiscoveryCloudIpFinder.java        |   51 +-
 .../java/org/apache/ignite/IgniteBinary.java    |   35 +-
 .../java/org/apache/ignite/IgniteCache.java     |  611 ++++-
 .../java/org/apache/ignite/IgniteCluster.java   |  126 ++
 .../java/org/apache/ignite/IgniteCompute.java   |  262 ++-
 .../java/org/apache/ignite/IgniteEvents.java    |  128 +-
 .../org/apache/ignite/IgniteFileSystem.java     |   92 +-
 .../org/apache/ignite/IgniteJdbcDriver.java     |   11 +-
 .../java/org/apache/ignite/IgniteMessaging.java |   27 +
 .../java/org/apache/ignite/IgniteServices.java  |  221 +-
 .../ignite/binary/BinaryBasicIdMapper.java      |    5 +-
 .../ignite/binary/BinaryBasicNameMapper.java    |    5 +-
 .../ignite/binary/BinaryObjectBuilder.java      |   10 -
 .../ignite/binary/BinaryTypeConfiguration.java  |   30 +-
 .../ignite/cache/CacheKeyConfiguration.java     |   10 +-
 .../ignite/cache/CacheTypeFieldMetadata.java    |  149 --
 .../apache/ignite/cache/CacheTypeMetadata.java  |  379 ----
 .../org/apache/ignite/cache/QueryEntity.java    |   38 +-
 .../affinity/fair/FairAffinityFunction.java     |   21 +-
 .../rendezvous/RendezvousAffinityFunction.java  |   27 +-
 .../cache/eviction/AbstractEvictionPolicy.java  |   15 +-
 .../cache/eviction/fifo/FifoEvictionPolicy.java |   74 +-
 .../eviction/fifo/FifoEvictionPolicyMBean.java  |    2 +
 .../igfs/IgfsPerBlockLruEvictionPolicy.java     |  131 +-
 .../cache/eviction/lru/LruEvictionPolicy.java   |   74 +-
 .../eviction/sorted/SortedEvictionPolicy.java   |   74 +-
 .../store/jdbc/CacheAbstractJdbcStore.java      |   79 +-
 .../cache/store/jdbc/CacheJdbcPojoStore.java    |   18 +-
 .../configuration/AtomicConfiguration.java      |   15 +-
 .../configuration/BinaryConfiguration.java      |   30 +-
 .../configuration/CacheConfiguration.java       |   98 +-
 .../configuration/CollectionConfiguration.java  |   36 +-
 .../configuration/ConnectorConfiguration.java   |  100 +-
 .../configuration/FileSystemConfiguration.java  |  155 +-
 .../configuration/HadoopConfiguration.java      |   31 +-
 .../configuration/IgniteConfiguration.java      |   34 +-
 .../configuration/NearCacheConfiguration.java   |    6 +-
 .../configuration/TransactionConfiguration.java |   45 +-
 .../igfs/IgfsGroupDataBlocksKeyMapper.java      |    5 +-
 .../igfs/IgfsIpcEndpointConfiguration.java      |   30 +-
 .../apache/ignite/internal/GridComponent.java   |    5 +-
 .../ignite/internal/GridJobCancelRequest.java   |    2 +-
 .../ignite/internal/GridJobExecuteRequest.java  |    2 +-
 .../ignite/internal/GridJobExecuteResponse.java |    2 +-
 .../ignite/internal/GridJobSiblingsRequest.java |    2 +-
 .../internal/GridJobSiblingsResponse.java       |    2 +-
 .../ignite/internal/GridKernalContext.java      |    7 +
 .../ignite/internal/GridKernalContextImpl.java  |   11 +
 .../ignite/internal/GridTaskCancelRequest.java  |    2 +-
 .../ignite/internal/GridTaskSessionRequest.java |    2 +-
 .../org/apache/ignite/internal/GridTopic.java   |    5 +-
 .../ignite/internal/IgniteComputeImpl.java      |  546 ++++-
 .../ignite/internal/IgniteEventsImpl.java       |   87 +-
 .../apache/ignite/internal/IgniteKernal.java    |    2 +
 .../ignite/internal/IgniteMessagingImpl.java    |   65 +-
 .../ignite/internal/IgniteServicesImpl.java     |  108 +
 .../org/apache/ignite/internal/IgnitionEx.java  |   20 +-
 .../ignite/internal/MarshallerContextImpl.java  |   25 +-
 .../ignite/internal/MarshallerPlatformIds.java  |    3 +
 .../binary/BinaryCachingMetadataHandler.java    |    6 +
 .../internal/binary/BinaryClassDescriptor.java  |   33 +-
 .../ignite/internal/binary/BinaryContext.java   |   29 +-
 .../internal/binary/BinaryEnumObjectImpl.java   |    2 +-
 .../internal/binary/BinaryFieldMetadata.java    |  127 ++
 .../ignite/internal/binary/BinaryMetadata.java  |   49 +-
 .../binary/BinaryMetadataCollector.java         |   17 +-
 .../internal/binary/BinaryMetadataHandler.java  |   18 +-
 .../binary/BinaryNoopMetadataHandler.java       |    5 +
 .../internal/binary/BinaryObjectExImpl.java     |    4 -
 .../internal/binary/BinaryObjectImpl.java       |    2 +-
 .../binary/BinaryObjectOffheapImpl.java         |    2 +-
 .../internal/binary/BinaryReaderExImpl.java     |    2 +-
 .../ignite/internal/binary/BinaryUtils.java     |   23 +-
 .../internal/binary/BinaryWriterExImpl.java     |   45 +-
 .../binary/builder/BinaryObjectBuilderImpl.java |   70 +-
 .../client/GridClientConfiguration.java         |  100 +-
 .../client/GridClientDataConfiguration.java     |   15 +-
 .../client/GridClientPartitionAffinity.java     |   15 +-
 .../balancer/GridClientBalancerAdapter.java     |    5 +-
 .../router/GridTcpRouterConfiguration.java      |   50 +-
 .../internal/cluster/ClusterGroupAdapter.java   |    2 +-
 .../cluster/IgniteClusterAsyncImpl.java         |   28 +-
 .../internal/cluster/IgniteClusterImpl.java     |   24 +-
 .../internal/direct/DirectMessageWriter.java    |    4 +-
 .../stream/v1/DirectByteBufferStreamImplV1.java |    8 +-
 .../stream/v2/DirectByteBufferStreamImplV2.java |    9 +-
 .../ignite/internal/jdbc2/JdbcConnection.java   |   56 +-
 .../ignite/internal/jdbc2/JdbcQueryTask.java    |    2 +-
 .../ignite/internal/jdbc2/JdbcQueryTaskV2.java  |    2 +-
 .../internal/jdbc2/JdbcSqlFieldsQuery.java      |   57 +
 .../checkpoint/GridCheckpointRequest.java       |    2 +-
 .../managers/communication/GridIoManager.java   |    2 +
 .../managers/communication/GridIoMessage.java   |    2 +-
 .../communication/GridIoMessageFactory.java     |   23 +-
 .../managers/communication/GridIoPolicy.java    |    5 +-
 .../communication/GridIoUserMessage.java        |    2 +-
 .../communication/IgniteIoTestMessage.java      |    2 +-
 .../deployment/GridDeploymentInfoBean.java      |    2 +-
 .../deployment/GridDeploymentRequest.java       |    2 +-
 .../deployment/GridDeploymentResponse.java      |    2 +-
 .../discovery/DiscoveryCustomMessage.java       |   48 +
 .../discovery/GridDiscoveryManager.java         |   38 +-
 .../eventstorage/GridEventStorageManager.java   |   18 +-
 .../eventstorage/GridEventStorageMessage.java   |    2 +-
 .../affinity/AffinityTopologyVersion.java       |    2 +-
 .../cache/CacheAffinitySharedManager.java       |    4 -
 .../cache/CacheEntryInfoCollection.java         |    2 +-
 .../cache/CacheEntryPredicateAdapter.java       |    2 +-
 .../cache/CacheEntryPredicateContainsValue.java |    2 +-
 .../cache/CacheEntrySerializablePredicate.java  |    2 +-
 .../processors/cache/CacheEvictionEntry.java    |    2 +-
 .../cache/CacheInvokeDirectResult.java          |    2 +-
 .../cache/CacheObjectByteArrayImpl.java         |    2 +-
 .../processors/cache/CacheObjectImpl.java       |    2 +-
 .../processors/cache/GridCacheAdapter.java      |  184 +-
 .../processors/cache/GridCacheAtomicFuture.java |    2 +-
 .../processors/cache/GridCacheEntryInfo.java    |    2 +-
 .../cache/GridCacheEvictionRequest.java         |    2 +-
 .../cache/GridCacheEvictionResponse.java        |    2 +-
 .../processors/cache/GridCacheMvccManager.java  |   84 +-
 .../GridCachePartitionExchangeManager.java      |   62 +-
 .../processors/cache/GridCacheProcessor.java    |   39 +-
 .../processors/cache/GridCacheReturn.java       |    2 +-
 .../processors/cache/GridCacheUtils.java        |    4 -
 .../cache/GridDeferredAckMessageSender.java     |   11 +-
 .../processors/cache/IgniteCacheProxy.java      |  579 ++++-
 .../processors/cache/KeyCacheObjectImpl.java    |    2 +-
 .../cache/binary/BinaryMetadataHolder.java      |   73 +
 .../cache/binary/BinaryMetadataTransport.java   |  641 ++++++
 .../binary/BinaryMetadataUpdatedListener.java   |   29 +
 .../binary/CacheObjectBinaryProcessor.java      |   12 +-
 .../binary/CacheObjectBinaryProcessorImpl.java  |  508 ++---
 .../binary/ClientMetadataRequestFuture.java     |  161 ++
 .../cache/binary/MetadataRequestMessage.java    |  122 +
 .../cache/binary/MetadataResponseMessage.java   |  195 ++
 .../binary/MetadataUpdateAcceptedMessage.java   |   96 +
 .../binary/MetadataUpdateProposedMessage.java   |  224 ++
 .../cache/binary/MetadataUpdateResult.java      |   96 +
 .../distributed/GridCacheTtlUpdateRequest.java  |    2 +-
 .../distributed/GridCacheTxRecoveryRequest.java |    2 +-
 .../GridCacheTxRecoveryResponse.java            |    2 +-
 .../distributed/GridDistributedLockRequest.java |    2 +-
 .../GridDistributedLockResponse.java            |    2 +-
 .../GridDistributedTxFinishRequest.java         |    2 +-
 .../GridDistributedTxFinishResponse.java        |    2 +-
 .../GridDistributedTxPrepareRequest.java        |    2 +-
 .../GridDistributedTxPrepareResponse.java       |    2 +-
 .../GridDistributedUnlockRequest.java           |    2 +-
 .../dht/GridClientPartitionTopology.java        |   34 +-
 .../dht/GridDhtAffinityAssignmentRequest.java   |    2 +-
 .../dht/GridDhtAffinityAssignmentResponse.java  |  103 +-
 .../distributed/dht/GridDhtLockRequest.java     |    2 +-
 .../distributed/dht/GridDhtLockResponse.java    |    2 +-
 .../dht/GridDhtPartitionTopology.java           |    6 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |   34 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |    2 +-
 .../dht/GridDhtTxFinishResponse.java            |    2 +-
 .../dht/GridDhtTxOnePhaseCommitAckRequest.java  |    2 +-
 .../dht/GridDhtTxPrepareRequest.java            |    2 +-
 .../dht/GridDhtTxPrepareResponse.java           |    2 +-
 .../distributed/dht/GridDhtUnlockRequest.java   |    2 +-
 .../dht/GridPartitionedGetFuture.java           |    8 +-
 .../dht/GridPartitionedSingleGetFuture.java     |   53 +-
 .../GridDhtAtomicAbstractUpdateFuture.java      |    4 +-
 .../GridDhtAtomicDeferredUpdateResponse.java    |    2 +-
 .../dht/atomic/GridDhtAtomicNearResponse.java   |    2 +-
 .../GridDhtAtomicSingleUpdateRequest.java       |    2 +-
 .../dht/atomic/GridDhtAtomicUpdateRequest.java  |    2 +-
 .../dht/atomic/GridDhtAtomicUpdateResponse.java |    2 +-
 .../GridNearAtomicAbstractUpdateFuture.java     |    2 +-
 .../GridNearAtomicCheckUpdateRequest.java       |    2 +-
 .../atomic/GridNearAtomicFullUpdateRequest.java |    2 +-
 ...GridNearAtomicSingleUpdateFilterRequest.java |    2 +-
 .../GridNearAtomicSingleUpdateFuture.java       |   21 +-
 ...GridNearAtomicSingleUpdateInvokeRequest.java |    2 +-
 .../GridNearAtomicSingleUpdateRequest.java      |    2 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |   23 +-
 .../atomic/GridNearAtomicUpdateResponse.java    |    2 +-
 .../dht/atomic/NearCacheUpdates.java            |    2 +-
 .../distributed/dht/atomic/UpdateErrors.java    |    2 +-
 .../dht/preloader/GridDhtForceKeysRequest.java  |    2 +-
 .../dht/preloader/GridDhtForceKeysResponse.java |    2 +-
 .../GridDhtPartitionDemandMessage.java          |    2 +-
 .../dht/preloader/GridDhtPartitionDemander.java |  505 +----
 .../preloader/GridDhtPartitionExchangeId.java   |    2 +-
 .../dht/preloader/GridDhtPartitionFullMap.java  |   45 +-
 .../dht/preloader/GridDhtPartitionMap.java      |  210 +-
 .../dht/preloader/GridDhtPartitionMap2.java     |  329 ---
 .../GridDhtPartitionSupplyMessage.java          |    2 +-
 .../GridDhtPartitionSupplyMessageV2.java        |    2 +-
 .../GridDhtPartitionsAbstractMessage.java       |    4 -
 .../GridDhtPartitionsExchangeFuture.java        |    2 +-
 .../preloader/GridDhtPartitionsFullMessage.java |    8 +-
 .../GridDhtPartitionsSingleMessage.java         |   12 +-
 .../GridDhtPartitionsSingleRequest.java         |    2 +-
 .../dht/preloader/GridDhtPreloader.java         |   18 +-
 .../distributed/near/CacheVersionedValue.java   |    2 +-
 .../distributed/near/GridNearGetRequest.java    |    2 +-
 .../distributed/near/GridNearGetResponse.java   |    2 +-
 .../distributed/near/GridNearLockRequest.java   |    2 +-
 .../distributed/near/GridNearLockResponse.java  |    2 +-
 .../near/GridNearSingleGetRequest.java          |    2 +-
 .../near/GridNearSingleGetResponse.java         |    2 +-
 .../near/GridNearTxFinishRequest.java           |    2 +-
 .../near/GridNearTxFinishResponse.java          |    2 +-
 .../near/GridNearTxPrepareRequest.java          |    2 +-
 .../near/GridNearTxPrepareResponse.java         |    2 +-
 .../distributed/near/GridNearUnlockRequest.java |    2 +-
 .../query/GridCacheDistributedQueryManager.java |    7 +-
 .../cache/query/GridCacheLocalQueryFuture.java  |    3 +-
 .../cache/query/GridCacheQueryRequest.java      |    2 +-
 .../cache/query/GridCacheQueryResponse.java     |    2 +-
 .../cache/query/GridCacheSqlQuery.java          |    2 +-
 .../CacheContinuousQueryBatchAck.java           |    6 +-
 .../continuous/CacheContinuousQueryEntry.java   |    2 +-
 .../continuous/CacheContinuousQueryHandler.java |    6 +-
 .../continuous/CacheContinuousQueryManager.java |   87 +-
 .../query/jdbc/GridCacheQueryJdbcTask.java      |    4 +-
 .../store/GridCacheStoreManagerAdapter.java     |   35 +-
 .../cache/transactions/IgniteTxEntry.java       |    2 +-
 .../cache/transactions/IgniteTxKey.java         |    2 +-
 .../cache/transactions/IgniteTxManager.java     |    2 +-
 .../transactions/TransactionProxyImpl.java      |   39 +-
 .../cache/transactions/TxEntryValueHolder.java  |    2 +-
 .../processors/cache/transactions/TxLock.java   |    2 +-
 .../cache/transactions/TxLockList.java          |    2 +-
 .../cache/transactions/TxLocksRequest.java      |    2 +-
 .../cache/transactions/TxLocksResponse.java     |    2 +-
 .../version/GridCacheRawVersionedEntry.java     |    2 +-
 .../cache/version/GridCacheVersion.java         |    2 +-
 .../cache/version/GridCacheVersionEx.java       |    2 +-
 .../clock/GridClockDeltaSnapshotMessage.java    |    2 +-
 .../processors/clock/GridClockDeltaVersion.java |    2 +-
 .../closure/GridClosureProcessor.java           |  398 +---
 .../continuous/GridContinuousMessage.java       |    2 +-
 .../continuous/GridContinuousProcessor.java     |    6 +-
 .../datastreamer/DataStreamerEntry.java         |    2 +-
 .../datastreamer/DataStreamerRequest.java       |    2 +-
 .../datastreamer/DataStreamerResponse.java      |    2 +-
 .../internal/processors/hadoop/HadoopJobId.java |    2 +-
 .../shuffle/HadoopDirectShuffleMessage.java     |    2 +-
 .../hadoop/shuffle/HadoopShuffleAck.java        |    2 +-
 .../shuffle/HadoopShuffleFinishRequest.java     |    2 +-
 .../shuffle/HadoopShuffleFinishResponse.java    |    2 +-
 .../hadoop/shuffle/HadoopShuffleMessage.java    |    2 +-
 .../processors/igfs/IgfsAckMessage.java         |    2 +-
 .../internal/processors/igfs/IgfsAsyncImpl.java |   45 +-
 .../internal/processors/igfs/IgfsBlockKey.java  |    3 +-
 .../processors/igfs/IgfsBlocksMessage.java      |    2 +-
 .../processors/igfs/IgfsDeleteMessage.java      |    2 +-
 .../processors/igfs/IgfsFileAffinityRange.java  |    2 +-
 .../igfs/IgfsFragmentizerRequest.java           |    2 +-
 .../igfs/IgfsFragmentizerResponse.java          |    2 +-
 .../internal/processors/igfs/IgfsImpl.java      |   76 +-
 .../processors/igfs/IgfsSyncMessage.java        |    2 +-
 .../GridMarshallerMappingProcessor.java         |    7 +-
 .../MissingMappingRequestMessage.java           |    2 +-
 .../MissingMappingResponseMessage.java          |    2 +-
 .../platform/PlatformAbstractTarget.java        |   24 +-
 .../platform/PlatformAsyncTarget.java           |   44 -
 .../platform/PlatformContextImpl.java           |   92 +-
 .../platform/PlatformTargetProxy.java           |   22 -
 .../platform/PlatformTargetProxyImpl.java       |   36 +-
 .../binary/PlatformBinaryProcessor.java         |   40 +-
 .../platform/cache/PlatformCache.java           |  218 +-
 .../platform/compute/PlatformCompute.java       |   14 +-
 .../dotnet/PlatformDotNetCacheStore.java        |   12 +-
 .../dotnet/PlatformDotNetConfigurationEx.java   |   21 +-
 ...formDotNetEntityFrameworkCacheExtension.java |    8 +-
 .../platform/events/PlatformEvents.java         |   70 +-
 .../memory/PlatformOutputStreamImpl.java        |    8 +-
 .../platform/messaging/PlatformMessaging.java   |   35 +-
 .../platform/services/PlatformServices.java     |   95 +-
 .../transactions/PlatformTransactions.java      |    9 +-
 .../utils/PlatformConfigurationUtils.java       |   38 +-
 .../internal/processors/pool/PoolProcessor.java |   10 +-
 .../processors/query/GridQueryProcessor.java    |   18 +-
 .../query/QueryTypeDescriptorImpl.java          |   17 -
 .../internal/processors/query/QueryUtils.java   |  328 +--
 .../messages/GridQueryCancelRequest.java        |    2 +-
 .../twostep/messages/GridQueryFailResponse.java |    2 +-
 .../messages/GridQueryNextPageRequest.java      |    2 +-
 .../messages/GridQueryNextPageResponse.java     |    2 +-
 .../h2/twostep/messages/GridQueryRequest.java   |  368 ---
 .../handlers/task/GridTaskResultRequest.java    |    2 +-
 .../handlers/task/GridTaskResultResponse.java   |    2 +-
 .../service/GridServiceProcessor.java           |  137 +-
 .../processors/service/GridServiceProxy.java    |   10 +
 .../processors/task/GridTaskProcessor.java      |    9 +-
 .../task/GridTaskThreadContextKey.java          |    7 +-
 .../processors/task/GridTaskWorker.java         |   16 +-
 .../org/apache/ignite/internal/util/F0.java     |  196 +-
 .../ignite/internal/util/GridByteArrayList.java |    2 +-
 .../ignite/internal/util/GridLongList.java      |    2 +-
 .../internal/util/GridMessageCollection.java    |    2 +-
 .../ignite/internal/util/IgniteUtils.java       |   10 -
 .../internal/util/UUIDCollectionMessage.java    |    2 +-
 .../ignite/internal/util/lang/GridFunc.java     |  620 +----
 .../internal/util/nio/GridDirectParser.java     |   12 +-
 .../ignite/internal/visor/cache/VisorCache.java |   84 +-
 .../cache/VisorCacheAggregatedMetrics.java      |    2 +-
 .../visor/cache/VisorCacheClearTask.java        |   14 +-
 .../visor/cache/VisorCacheConfiguration.java    |   22 +-
 .../internal/visor/cache/VisorCacheMetrics.java |   26 +
 .../cache/VisorCacheMetricsCollectorTask.java   |   18 +-
 .../visor/cache/VisorCacheMetricsV2.java        |   66 -
 .../cache/VisorCacheQueryConfiguration.java     |   11 +
 .../cache/VisorCacheQueryConfigurationV2.java   |   47 -
 .../cache/VisorCacheStoreConfiguration.java     |   12 +
 .../cache/VisorCacheStoreConfigurationV2.java   |   48 -
 .../cache/VisorCacheTypeFieldMetadata.java      |   14 +-
 .../visor/cache/VisorCacheTypeMetadata.java     |   91 +-
 .../internal/visor/cache/VisorCacheV2.java      |   73 -
 .../internal/visor/cache/VisorCacheV3.java      |   52 -
 .../internal/visor/cache/VisorCacheV4.java      |  124 -
 .../visor/compute/VisorGatewayTask.java         |    6 +-
 .../visor/event/VisorGridDiscoveryEvent.java    |   18 +-
 .../visor/event/VisorGridDiscoveryEventV2.java  |   80 -
 .../visor/igfs/VisorIgfsFormatTask.java         |    2 +-
 .../visor/node/VisorIgfsConfiguration.java      |    2 +-
 .../visor/node/VisorNodeDataCollectorJob.java   |   52 +-
 .../internal/visor/query/VisorQueryArg.java     |   39 +-
 .../internal/visor/query/VisorQueryArgV2.java   |   49 -
 .../internal/visor/query/VisorQueryArgV3.java   |   51 -
 .../internal/visor/query/VisorQueryJob.java     |    8 +-
 .../internal/visor/util/VisorEventMapper.java   |    4 +-
 .../internal/visor/util/VisorTaskUtils.java     |   15 -
 .../apache/ignite/lang/IgniteAsyncSupport.java  |   52 +-
 .../ignite/lang/IgniteAsyncSupported.java       |    4 +-
 .../optimized/OptimizedMarshaller.java          |   15 +-
 .../apache/ignite/mxbean/IgniteMBeanAware.java  |   28 +
 .../dotnet/PlatformDotNetAffinityFunction.java  |   10 +-
 .../PlatformDotNetBinaryConfiguration.java      |   31 +-
 .../PlatformDotNetBinaryTypeConfiguration.java  |   35 +-
 .../dotnet/PlatformDotNetConfiguration.java     |   10 +-
 .../extensions/communication/Message.java       |    5 +-
 .../communication/MessageFactory.java           |    2 +-
 .../extensions/communication/MessageWriter.java |    5 +-
 .../ignite/services/ServiceConfiguration.java   |   35 +-
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |   52 +-
 .../ignite/spi/IgniteSpiMBeanAdapter.java       |   78 +
 .../checkpoint/cache/CacheCheckpointSpi.java    |   40 +-
 .../spi/checkpoint/jdbc/JdbcCheckpointSpi.java  |  219 +-
 .../spi/checkpoint/noop/NoopCheckpointSpi.java  |    7 +
 .../sharedfs/SharedFsCheckpointSpi.java         |   54 +-
 .../ignite/spi/collision/CollisionSpi.java      |   11 +-
 .../fifoqueue/FifoQueueCollisionSpi.java        |  134 +-
 .../fifoqueue/FifoQueueCollisionSpiMBean.java   |    2 +-
 .../jobstealing/JobStealingCollisionSpi.java    |  281 ++-
 .../JobStealingCollisionSpiMBean.java           |    6 +-
 .../jobstealing/JobStealingRequest.java         |    2 +-
 .../spi/collision/noop/NoopCollisionSpi.java    |    7 +
 .../PriorityQueueCollisionSpi.java              |  278 ++-
 .../PriorityQueueCollisionSpiMBean.java         |    2 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  684 ++++--
 .../deployment/local/LocalDeploymentSpi.java    |   29 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |  109 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |  446 +++-
 .../ipfinder/TcpDiscoveryIpFinderAdapter.java   |    5 +-
 .../ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java |   17 +-
 .../TcpDiscoveryMulticastIpFinder.java          |   47 +-
 .../sharedfs/TcpDiscoverySharedFsIpFinder.java  |   12 +-
 .../tcp/ipfinder/vm/TcpDiscoveryVmIpFinder.java |   14 +-
 .../messages/TcpDiscoveryClientAckResponse.java |    4 -
 .../spi/eventstorage/NoopEventStorageSpi.java   |   53 +
 .../memory/MemoryEventStorageSpi.java           |   98 +-
 .../spi/failover/always/AlwaysFailoverSpi.java  |   53 +-
 .../jobstealing/JobStealingFailoverSpi.java     |   68 +-
 .../spi/failover/never/NeverFailoverSpi.java    |   30 +-
 .../spi/indexing/noop/NoopIndexingSpi.java      |    7 +
 .../adaptive/AdaptiveLoadBalancingSpi.java      |   43 +-
 .../roundrobin/RoundRobinLoadBalancingSpi.java  |   44 +-
 .../WeightedRandomLoadBalancingSpi.java         |   61 +-
 .../spi/swapspace/file/FileSwapSpaceSpi.java    |  112 +-
 .../spi/swapspace/noop/NoopSwapSpaceSpi.java    |    7 +
 .../apache/ignite/transactions/Transaction.java |   22 +
 .../resources/META-INF/classnames.properties    |  108 +-
 .../test/config/store/jdbc/ignite-jdbc-type.xml |  279 +++
 .../config/store/jdbc/ignite-type-metadata.xml  |  276 ---
 .../IgniteCacheExpiryStoreLoadSelfTest.java     |   18 +-
 ...eJdbcStoreAbstractMultithreadedSelfTest.java |   71 +-
 .../cache/store/jdbc/model/Organization.java    |    2 -
 .../cache/store/jdbc/model/OrganizationKey.java |    2 -
 .../ignite/cache/store/jdbc/model/Person.java   |    2 -
 .../store/jdbc/model/PersonComplexKey.java      |    4 +-
 .../cache/store/jdbc/model/PersonKey.java       |    2 -
 .../ignite/custom/DummyEventFilterFactory.java  |   47 +
 .../ignite/igfs/IgfsEventsAbstractSelfTest.java |    2 +-
 .../igfs/IgfsFragmentizerAbstractSelfTest.java  |    2 +-
 .../ignite/igfs/IgfsFragmentizerSelfTest.java   |    2 +-
 .../internal/ClusterGroupAbstractTest.java      |   73 +-
 .../ComputeJobCancelWithServiceSelfTest.java    |    7 +-
 .../internal/GridAffinityNoCacheSelfTest.java   |    2 +-
 .../internal/GridCancelOnGridStopSelfTest.java  |    2 +-
 .../GridCancelledJobsMetricsSelfTest.java       |   11 +-
 .../internal/GridContinuousTaskSelfTest.java    |   21 +-
 .../GridEventStorageCheckAllEventsSelfTest.java |   12 +-
 .../GridEventStorageDefaultExceptionTest.java   |   94 +
 .../GridFailoverCustomTopologySelfTest.java     |    7 +-
 .../GridJobMasterLeaveAwareSelfTest.java        |   93 +-
 .../internal/GridMultipleJobsSelfTest.java      |    8 +-
 .../ignite/internal/GridReduceSelfTest.java     |    9 +-
 .../GridTaskCancelSingleNodeSelfTest.java       |    7 +-
 .../internal/GridTaskExecutionSelfTest.java     |   58 +-
 ...xecutionWithoutPeerClassLoadingSelfTest.java |   31 +
 .../GridTaskFailoverAffinityRunTest.java        |    7 +-
 .../GridTaskInstanceExecutionSelfTest.java      |    7 +-
 .../internal/GridTaskJobRejectSelfTest.java     |    7 +-
 .../IgniteClientReconnectApiExceptionTest.java  |   10 +-
 .../IgniteComputeEmptyClusterGroupTest.java     |   26 +-
 .../binary/BinaryMarshallerSelfTest.java        |    4 -
 .../BinaryObjectBuilderAdditionalSelfTest.java  |    9 +-
 ...naryObjectBuilderDefaultMappersSelfTest.java |  127 +-
 .../binary/TestCachingMetadataHandler.java      |    5 +
 ...ByteBufferStreamImplV2ByteOrderSelfTest.java |    2 +-
 ...GridManagerLocalMessageListenerSelfTest.java |    2 +-
 .../GridCommunicationSendMessageSelfTest.java   |   83 +-
 .../communication/GridIoManagerSelfTest.java    |    2 +-
 .../cache/CacheConcurrentReadThroughTest.java   |    8 +-
 ...CacheExchangeMessageDuplicatedStateTest.java |   12 +-
 .../cache/CacheFutureExceptionSelfTest.java     |    6 +-
 .../CachePutEventListenerErrorSelfTest.java     |    7 +-
 .../GridCacheAbstractFailoverSelfTest.java      |    6 +-
 ...cheAbstractFullApiMultithreadedSelfTest.java |  105 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  876 +++++++-
 .../cache/GridCacheAbstractMetricsSelfTest.java |   52 +-
 .../GridCacheAsyncOperationsLimitSelfTest.java  |    9 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |   10 +-
 .../GridCacheConditionalDeploymentSelfTest.java |    4 +-
 .../GridCacheInterceptorAbstractSelfTest.java   |   31 +-
 .../GridCacheMissingCommitVersionSelfTest.java  |    6 +-
 .../cache/GridCachePutAllFailoverSelfTest.java  |   16 +-
 .../GridCacheReferenceCleanupSelfTest.java      |   15 +-
 ...ridCacheStoreManagerDeserializationTest.java |    1 -
 .../cache/GridCacheUtilsSelfTest.java           |    4 -
 ...calCacheStoreManagerDeserializationTest.java |    2 +-
 .../IgniteCacheAbstractStopBusySelfTest.java    |    7 +-
 .../IgniteCacheBinaryObjectsScanSelfTest.java   |    2 +-
 .../IgniteCacheConfigVariationsFullApiTest.java |  965 +++++++-
 .../cache/IgniteCacheInvokeAbstractTest.java    |   20 +-
 .../IgniteCacheManyAsyncOperationsTest.java     |    6 +-
 .../cache/IgniteCachePeekModesAbstractTest.java |   35 +-
 .../cache/WithKeepBinaryCacheFullApiTest.java   |  228 +-
 .../binary/BinaryMetadataUpdatesFlowTest.java   |  592 +++++
 .../CacheKeepBinaryWithInterceptorTest.java     |   16 +-
 ...ryDuplicateIndexObjectsAbstractSelfTest.java |  161 --
 ...naryObjectMetadataExchangeMultinodeTest.java |  463 ++++
 .../GridCacheBinaryObjectsAbstractSelfTest.java |  111 +-
 ...ateIndexObjectPartitionedAtomicSelfTest.java |   38 -
 ...xObjectPartitionedTransactionalSelfTest.java |   41 -
 ...eAbstractDataStructuresFailoverSelfTest.java |    7 +-
 ...ridCacheQueueJoinedNodeSelfAbstractTest.java |   12 +-
 .../IgniteCountDownLatchAbstractSelfTest.java   |    7 +-
 .../IgniteLockAbstractSelfTest.java             |    7 +-
 .../IgniteSemaphoreAbstractSelfTest.java        |    7 +-
 ...acheAsyncOperationsFailoverAbstractTest.java |   12 +-
 .../distributed/CacheAsyncOperationsTest.java   |   32 +-
 .../CachePutAllFailoverAbstractTest.java        |    8 +-
 .../GridCacheAbstractJobExecutionTest.java      |   15 +-
 .../GridCacheBasicOpAbstractTest.java           |   38 +-
 .../distributed/GridCacheEventAbstractTest.java |   82 +-
 .../GridCacheMultiNodeAbstractTest.java         |   25 +-
 ...yMetadataUpdateChangingTopologySelfTest.java |   13 +-
 .../IgniteCacheConnectionRecoveryTest.java      |   10 +-
 ...eCacheMessageRecoveryIdleConnectionTest.java |    6 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |    6 +-
 .../dht/GridCacheDhtPreloadDelayedSelfTest.java |   12 +-
 .../dht/GridCacheDhtPreloadSelfTest.java        |    4 +-
 .../dht/GridCacheGlobalLoadTest.java            |   21 +-
 .../dht/GridCacheTxNodeFailureSelfTest.java     |   12 +-
 .../IgniteCachePutRetryAbstractSelfTest.java    |   26 +-
 .../atomic/IgniteCacheAtomicProtocolTest.java   |   34 +-
 ...idCacheNearOnlyMultiNodeFullApiSelfTest.java |   11 +-
 .../GridCachePartitionedLoadCacheSelfTest.java  |    9 +-
 .../GridCacheRebalancingSyncSelfTest.java       |    7 +-
 .../GridCacheEmptyEntriesAbstractSelfTest.java  |   21 +-
 .../CacheContinuousQueryVariationsTest.java     |    5 +
 .../ContinuousQueryPeerClassLoadingTest.java    |  142 ++
 .../GridCacheContinuousQueryConcurrentTest.java |    5 +-
 .../closure/GridClosureProcessorSelfTest.java   |   74 +-
 ...ComputeJobExecutionErrorToLogManualTest.java |   10 +-
 ...gniteComputeConfigVariationsFullApiTest.java |  533 ++++-
 .../continuous/GridEventConsumeSelfTest.java    |  196 +-
 ...faultIgfsSecondaryFileSystemTestAdapter.java |    2 +-
 .../igfs/IgfsAbstractBaseSelfTest.java          |    2 +-
 .../processors/igfs/IgfsAbstractSelfTest.java   |    4 +-
 ...sCachePerBlockLruEvictionPolicySelfTest.java |    2 +-
 .../igfs/IgfsMetaManagerSelfTest.java           |    2 +-
 .../processors/igfs/IgfsMetricsSelfTest.java    |    2 +-
 .../internal/processors/igfs/IgfsMock.java      |   43 +-
 .../processors/igfs/IgfsProcessorSelfTest.java  |    8 +-
 .../processors/igfs/IgfsStreamsSelfTest.java    |    2 +-
 .../processors/igfs/IgfsTaskSelfTest.java       |   21 +-
 .../IgfsAbstractRecordResolverSelfTest.java     |    2 +-
 ...niteMessagingConfigVariationFullApiTest.java |   93 +-
 .../GridServiceProcessorAbstractSelfTest.java   |  291 ++-
 .../GridServiceProcessorMultiNodeSelfTest.java  |   18 +-
 .../GridServiceProcessorStopSelfTest.java       |    7 +-
 .../nio/IgniteExceptionInNioWorkerSelfTest.java |    2 +-
 .../loadtest/GridSingleExecutionTest.java       |   10 +-
 .../loadtests/colocation/GridTestMain.java      |    7 +-
 .../communication/GridTestMessage.java          |    2 +-
 .../multisplit/GridMultiSplitsLoadTest.java     |    7 +-
 ...ridSingleSplitsNewNodesAbstractLoadTest.java |    8 +-
 .../ignite/loadtests/dsi/GridDsiClient.java     |   12 +-
 ...GridJobExecutionLoadTestClientSemaphore.java |    9 +-
 ...JobExecutionSingleNodeSemaphoreLoadTest.java |   10 +-
 .../loadtests/job/GridJobLoadTestSubmitter.java |    7 +-
 .../mergesort/GridMergeSortLoadTask.java        |    7 +-
 .../marshaller/MarshallerContextSelfTest.java   |   80 +-
 .../ignite/messaging/GridMessagingSelfTest.java |   73 +-
 .../messaging/IgniteMessagingSendAsyncTest.java |   83 +-
 .../ignite/platform/PlatformStopIgniteTask.java |   11 +-
 .../services/ServiceThreadPoolSelfTest.java     |  133 ++
 ...idSessionFutureWaitJobAttributeSelfTest.java |    7 +-
 ...GridSessionSetJobAttributeOrderSelfTest.java |    8 +-
 ...sionSetJobAttributeWaitListenerSelfTest.java |    7 +-
 .../GridSessionSetTaskAttributeSelfTest.java    |    7 +-
 ...GridSessionTaskWaitJobAttributeSelfTest.java |    7 +-
 .../GridSessionWaitAttributeSelfTest.java       |    9 +-
 .../communication/GridCacheMessageSelfTest.java |   20 +-
 .../spi/communication/GridTestMessage.java      |    4 +-
 .../TcpDiscoverySpiFailureTimeoutSelfTest.java  |   60 -
 .../ignite/testframework/GridTestUtils.java     |   57 +
 .../testframework/junits/GridAbstractTest.java  |   56 +-
 .../junits/GridTestKernalContext.java           |    1 +
 .../cache/GridAbstractCacheStoreSelfTest.java   |   11 +
 .../junits/common/GridCommonAbstractTest.java   |   30 +-
 .../multijvm/IgniteCacheProcessProxy.java       |  172 ++
 .../multijvm/IgniteClusterProcessProxy.java     |   13 +
 .../multijvm/IgniteEventsProcessProxy.java      |   31 +
 .../IgniteBinaryObjectsTestSuite.java           |    4 +
 .../testsuites/IgniteComputeGridTestSuite.java  |    4 +
 .../testsuites/IgniteKernalSelfTestSuite.java   |    2 +
 .../ignite/util/GridMessageCollectionTest.java  |    5 +-
 .../gce/TcpDiscoveryGoogleStorageIpFinder.java  |   33 +-
 .../fs/IgniteHadoopIgfsSecondaryFileSystem.java |   10 +-
 .../IgniteHadoopWeightedMapReducePlanner.java   |   26 +-
 .../hadoop/impl/v2/HadoopV2Context.java         |    7 +-
 .../impl/HadoopTaskExecutionSelfTest.java       |    2 +-
 ...opClientProtocolMultipleServersSelfTest.java |    2 +-
 .../client/HadoopClientProtocolSelfTest.java    |    2 +-
 .../hadoop/impl/igfs/IgfsEventsTestSuite.java   |    2 +-
 .../query/h2/DmlStatementsProcessor.java        |   35 -
 .../processors/query/h2/IgniteH2Indexing.java   |   34 +-
 .../query/h2/opt/GridH2TreeIndex.java           |    4 +-
 .../query/h2/sql/GridSqlOperationType.java      |   23 +-
 .../query/h2/sql/GridSqlQueryParser.java        |   19 +-
 .../query/h2/twostep/GridMapQueryExecutor.java  |   39 -
 .../h2/twostep/GridReduceQueryExecutor.java     |   62 +-
 .../query/h2/twostep/msg/GridH2Array.java       |    2 +-
 .../query/h2/twostep/msg/GridH2Boolean.java     |    2 +-
 .../query/h2/twostep/msg/GridH2Byte.java        |    2 +-
 .../query/h2/twostep/msg/GridH2Bytes.java       |    2 +-
 .../query/h2/twostep/msg/GridH2CacheObject.java |    2 +-
 .../query/h2/twostep/msg/GridH2Date.java        |    2 +-
 .../query/h2/twostep/msg/GridH2Decimal.java     |    2 +-
 .../query/h2/twostep/msg/GridH2Double.java      |    2 +-
 .../query/h2/twostep/msg/GridH2Float.java       |    2 +-
 .../query/h2/twostep/msg/GridH2Geometry.java    |    2 +-
 .../h2/twostep/msg/GridH2IndexRangeRequest.java |    2 +-
 .../twostep/msg/GridH2IndexRangeResponse.java   |    2 +-
 .../query/h2/twostep/msg/GridH2Integer.java     |    2 +-
 .../query/h2/twostep/msg/GridH2JavaObject.java  |    2 +-
 .../query/h2/twostep/msg/GridH2Long.java        |    2 +-
 .../query/h2/twostep/msg/GridH2Null.java        |    2 +-
 .../h2/twostep/msg/GridH2QueryRequest.java      |    2 +-
 .../query/h2/twostep/msg/GridH2RowMessage.java  |    2 +-
 .../query/h2/twostep/msg/GridH2RowRange.java    |    2 +-
 .../h2/twostep/msg/GridH2RowRangeBounds.java    |    2 +-
 .../query/h2/twostep/msg/GridH2Short.java       |    2 +-
 .../query/h2/twostep/msg/GridH2String.java      |    2 +-
 .../query/h2/twostep/msg/GridH2Time.java        |    2 +-
 .../query/h2/twostep/msg/GridH2Timestamp.java   |    2 +-
 .../query/h2/twostep/msg/GridH2Uuid.java        |    2 +-
 .../twostep/msg/GridH2ValueMessageFactory.java  |    2 +-
 .../cache/BinarySerializationQuerySelfTest.java |   30 +-
 ...ryDuplicateIndexObjectsAbstractSelfTest.java |  159 ++
 ...niteCacheLockPartitionOnAffinityRunTest.java |    6 +-
 .../IgniteCacheObjectKeyIndexingSelfTest.java   |  124 +
 .../cache/IgniteCacheQueryLoadSelfTest.java     |   20 +-
 .../cache/IncorrectCacheTypeMetadataTest.java   |   72 -
 .../cache/IncorrectQueryEntityTest.java         |    3 +
 ...ateIndexObjectPartitionedAtomicSelfTest.java |   38 +
 ...xObjectPartitionedTransactionalSelfTest.java |   41 +
 .../query/IgniteQueryDedicatedPoolTest.java     |  223 ++
 .../query/IgniteSqlQueryDedicatedPoolTest.java  |  110 -
 .../query/IgniteSqlSegmentedIndexSelfTest.java  |   30 +-
 .../query/IgniteSqlSplitterSelfTest.java        |   43 +
 .../h2/GridIndexingSpiAbstractSelfTest.java     |    2 +-
 .../query/h2/sql/GridQueryParsingTest.java      |   27 +-
 .../IgniteBinaryCacheQueryTestSuite.java        |    4 +-
 .../IgniteCacheQuerySelfTestSuite.java          |    6 +-
 .../IgniteCacheQuerySelfTestSuite2.java         |    2 +
 .../IgniteCacheQuerySelfTestSuite3.java         |    2 +
 modules/log4j2/pom.xml                          |    4 +-
 .../ignite/logger/log4j2/Log4J2Logger.java      |   23 +-
 modules/platforms/cpp/binary/Makefile.am        |    2 +-
 .../platforms/cpp/binary/include/Makefile.am    |    1 +
 .../include/ignite/binary/binary_containers.h   |    2 +-
 .../include/ignite/binary/binary_object.h       |   75 +-
 .../include/ignite/binary/binary_raw_writer.h   |    4 +-
 .../include/ignite/binary/binary_writer.h       |    4 +-
 .../ignite/impl/binary/binary_field_meta.h      |  110 +
 .../ignite/impl/binary/binary_id_resolver.h     |   96 +-
 .../ignite/impl/binary/binary_object_header.h   |   13 +
 .../ignite/impl/binary/binary_object_impl.h     |  124 +-
 .../ignite/impl/binary/binary_reader_impl.h     |    6 +-
 .../include/ignite/impl/binary/binary_schema.h  |   10 +-
 .../ignite/impl/binary/binary_type_handler.h    |   47 +-
 .../ignite/impl/binary/binary_type_impl.h       |    2 +-
 .../ignite/impl/binary/binary_type_manager.h    |   48 +-
 .../ignite/impl/binary/binary_type_snapshot.h   |   82 +-
 .../ignite/impl/binary/binary_type_updater.h    |   19 +-
 .../include/ignite/impl/binary/binary_utils.h   |   13 +-
 .../ignite/impl/binary/binary_writer_impl.h     |   21 +-
 .../cpp/binary/project/vs/binary.vcxproj        |    3 +-
 .../binary/project/vs/binary.vcxproj.filters    |    9 +-
 .../src/impl/binary/binary_field_meta.cpp       |   42 +
 .../src/impl/binary/binary_object_impl.cpp      |  139 +-
 .../src/impl/binary/binary_type_handler.cpp     |   45 +-
 .../src/impl/binary/binary_type_manager.cpp     |  187 +-
 .../src/impl/binary/binary_type_snapshot.cpp    |   50 +-
 .../src/impl/binary/binary_type_updater.cpp     |   32 -
 .../common/include/ignite/common/concurrent.h   |   30 +
 .../cpp/common/include/ignite/reference.h       |   14 +-
 .../cpp/core-test/config/cache-identity.xml     |   33 +
 .../cpp/core-test/config/cache-query.xml        |   37 +-
 .../cpp/core-test/config/cache-test.xml         |    2 +-
 .../core-test/include/ignite/binary_test_defs.h |    5 +
 .../cpp/core-test/include/ignite/test_utils.h   |   11 +
 .../project/vs/core-test.vcxproj.filters        |    3 +
 .../src/binary_identity_resolver_test.cpp       |   91 +-
 .../cpp/core-test/src/binary_object_test.cpp    |  220 +-
 .../src/binary_reader_writer_raw_test.cpp       |   12 +-
 .../core-test/src/binary_reader_writer_test.cpp |   12 +-
 .../cpp/core-test/src/cache_invoke_test.cpp     |    8 +-
 .../cpp/core-test/src/cache_query_test.cpp      |  225 +-
 .../platforms/cpp/core-test/src/cache_test.cpp  |  229 +-
 .../cpp/core-test/src/cluster_test.cpp          |    7 +-
 .../cpp/core-test/src/continuous_query_test.cpp |  202 +-
 .../cpp/core-test/src/ignition_test.cpp         |   12 +-
 .../cpp/core-test/src/reference_test.cpp        |   12 +-
 modules/platforms/cpp/core/Makefile.am          |    1 +
 modules/platforms/cpp/core/include/Makefile.am  |   70 +-
 .../cpp/core/include/ignite/cache/cache.h       |  183 +-
 .../cpp/core/include/ignite/cache/cache_entry.h |   15 +
 .../ignite/cache/cache_entry_processor.h        |   42 +-
 .../cache/event/cache_entry_event_filter.h      |  109 +
 .../cache/query/continuous/continuous_query.h   |   35 +-
 .../include/ignite/cache/query/query_cursor.h   |   28 +-
 .../platforms/cpp/core/include/ignite/ignite.h  |   18 +-
 .../cpp/core/include/ignite/ignite_binding.h    |   39 +-
 .../include/ignite/ignite_binding_context.h     |    2 +-
 .../cpp/core/include/ignite/ignition.h          |   14 +-
 .../impl/binary/binary_type_updater_impl.h      |    6 +-
 .../cpp/core/include/ignite/impl/bindings.h     |   95 +
 .../impl/cache/cache_entry_processor_holder.h   |   15 -
 .../core/include/ignite/impl/cache/cache_impl.h |   81 +-
 .../cache/event/cache_entry_event_filter_base.h |   66 +
 .../event/cache_entry_event_filter_holder.h     |  185 ++
 .../continuous/continuous_query_handle_impl.h   |   10 -
 .../query/continuous/continuous_query_impl.h    |   60 +-
 .../ignite/impl/cache/query/query_impl.h        |    7 +
 .../cpp/core/include/ignite/impl/helpers.h      |   57 +
 .../include/ignite/impl/ignite_binding_impl.h   |  101 +-
 .../include/ignite/impl/ignite_environment.h    |   37 +-
 .../cpp/core/include/ignite/impl/ignite_impl.h  |   21 +-
 .../ignite/impl/interop/interop_target.h        |    2 +-
 .../cpp/core/include/ignite/impl/operations.h   |  138 +-
 .../platforms/cpp/core/project/vs/core.vcxproj  |    6 +
 .../cpp/core/project/vs/core.vcxproj.filters    |   21 +
 modules/platforms/cpp/core/src/ignition.cpp     |   62 +-
 .../impl/binary/binary_type_updater_impl.cpp    |  101 +-
 .../cpp/core/src/impl/cache/cache_impl.cpp      |   90 +-
 .../continuous/continuous_query_handle_impl.cpp |    5 -
 .../core/src/impl/cache/query/query_impl.cpp    |   39 +-
 .../cpp/core/src/impl/ignite_binding_impl.cpp   |   88 +
 .../cpp/core/src/impl/ignite_environment.cpp    |  128 +-
 .../platforms/cpp/core/src/impl/ignite_impl.cpp |    2 +-
 .../core/src/impl/interop/interop_target.cpp    |    2 +-
 .../cpp/jni/include/ignite/jni/exports.h        |    2 -
 .../platforms/cpp/jni/include/ignite/jni/java.h |    4 -
 modules/platforms/cpp/jni/project/vs/module.def |    2 -
 modules/platforms/cpp/jni/src/exports.cpp       |    8 -
 modules/platforms/cpp/jni/src/java.cpp          |   20 -
 .../ExpiryCacheHolderTest.cs                    |   12 +-
 .../Apache.Ignite.Core.Tests.csproj             |   12 +-
 .../Binary/BinaryBuilderSelfTest.cs             |  207 +-
 .../BinaryBuilderSelfTestArrayIdentity.cs       |   34 -
 .../BinaryBuilderSelfTestDynamicRegistration.cs |   40 +
 .../Binary/BinaryCompactFooterInteropTest.cs    |    2 +-
 .../Binary/BinaryDynamicRegistrationTest.cs     |  483 ++++
 .../Binary/BinaryEqualityComparerTest.cs        |    7 +-
 .../Binary/BinarySelfTest.cs                    |  205 +-
 .../Binary/BinarySelfTestFullFooter.cs          |    5 +-
 .../Binary/JavaBinaryInteropTest.cs             |  182 ++
 .../Serializable/AdvancedSerializationTest.cs   |  228 ++
 .../BasicSerializableObjectsTest.cs             |  124 +
 .../Binary/Serializable/CallbacksTest.cs        |  369 +++
 .../Binary/Serializable/DelegatesTest.cs        |  161 ++
 .../Binary/Serializable/ObjectReferenceTests.cs |  131 ++
 .../Binary/Serializable/PrimitivesTest.cs       |  754 +++++++
 .../Binary/Serializable/SqlDmlTest.cs           |  277 +++
 .../BinaryConfigurationTest.cs                  |   43 +
 .../Cache/Affinity/AffinityFunctionTest.cs      |   21 -
 .../Cache/CacheAbstractTest.cs                  |   74 +-
 .../Cache/CacheConfigurationTest.cs             |    4 +-
 .../Cache/CacheTestAsyncWrapper.cs              |   12 +-
 .../Cache/Query/CacheDmlQueriesTest.cs          |    5 +-
 .../Cache/Query/CacheLinqTest.cs                |  167 +-
 .../Query/CacheQueriesCodeConfigurationTest.cs  |    7 +
 .../Cache/Query/CacheQueriesTest.cs             |   15 +-
 .../Continuous/ContinuousQueryAbstractTest.cs   |   29 +-
 .../Cache/Store/CacheStoreAdapterTest.cs        |   14 +-
 .../Cache/Store/CacheStoreSessionTest.cs        |    2 +-
 .../Cache/Store/CacheStoreTest.cs               |    7 +-
 .../Cache/Store/CacheTestParallelLoadStore.cs   |   16 +-
 .../Cache/Store/CacheTestStore.cs               |   13 +-
 .../Compute/AbstractTaskTest.cs                 |   28 +-
 .../Compute/ComputeApiTest.cs                   |   28 +-
 .../Compute/IgniteExceptionTaskSelfTest.cs      |   40 +-
 .../Compute/MixedClusterTest.cs                 |   33 +-
 .../Compute/ResourceTaskTest.cs                 |   13 +-
 .../Config/cache-query-continuous.xml           |  118 +-
 .../Apache.Ignite.Core.Tests/DeploymentTest.cs  |   26 +-
 .../Apache.Ignite.Core.Tests/EventsTest.cs      |   67 +-
 .../Examples/ExamplesTest.cs                    |   24 +-
 .../Apache.Ignite.Core.Tests/ExecutableTest.cs  |   33 +-
 .../IgniteConfigurationSectionTest.cs           |    7 +-
 .../IgniteConfigurationSerializerTest.cs        |   19 +-
 .../IgniteConfigurationTest.cs                  |   15 +-
 .../Plugin/PluginTest.cs                        |   16 +-
 .../SerializationTest.cs                        |  240 --
 .../Services/ServiceProxyTest.cs                |   40 +-
 .../Apache.Ignite.Core.Tests/TestUtils.cs       |   11 +
 .../Apache.Ignite.Core.csproj                   |   18 +-
 .../Binary/BinaryArrayEqualityComparer.cs       |    8 +
 .../Binary/IBinaryObjectBuilder.cs              |   10 -
 .../Cache/Affinity/AffinityFunctionBase.cs      |  139 ++
 .../Cache/Affinity/Fair/FairAffinityFunction.cs |    1 -
 .../Rendezvous/RendezvousAffinityFunction.cs    |    1 -
 .../Cache/Configuration/CacheConfiguration.cs   |   10 +-
 .../Cache/Configuration/QueryEntity.cs          |    8 +
 .../dotnet/Apache.Ignite.Core/Cache/ICache.cs   |   28 +-
 .../Cache/ICacheEntryProcessorResult.cs         |   12 +-
 .../Cache/Query/Continuous/ContinuousQuery.cs   |   59 +-
 .../Apache.Ignite.Core/Cache/Query/QueryBase.cs |    4 +-
 .../Cache/Query/SqlFieldsQuery.cs               |    6 +-
 .../Store/CacheParallelLoadStoreAdapter.cs      |   38 +-
 .../Cache/Store/CacheStoreAdapter.cs            |   30 +-
 .../Cache/Store/ICacheStore.cs                  |   39 +-
 .../Cache/Store/ICacheStoreSession.cs           |    2 +-
 .../Datastream/IDataStreamer.cs                 |    2 +-
 .../Apache.Ignite.Core/Events/CacheEvent.cs     |    8 -
 .../Events/IEventStorageSpi.cs                  |   33 +
 .../Events/MemoryEventStorageSpi.cs             |  100 +
 .../Events/NoopEventStorageSpi.cs               |   27 +
 .../Apache.Ignite.Core/IgniteConfiguration.cs   |   73 +-
 .../IgniteConfigurationSection.xsd              |   29 +
 .../dotnet/Apache.Ignite.Core/Ignition.cs       |   32 +-
 .../Impl/Binary/BinarizableSerializer.cs        |    5 +-
 .../Impl/Binary/BinaryFullTypeDescriptor.cs     |   49 +-
 .../Impl/Binary/BinaryObject.cs                 |   72 +-
 .../Impl/Binary/BinaryObjectBuilder.cs          |   92 +-
 .../Impl/Binary/BinaryObjectHeader.cs           |   13 +-
 .../Impl/Binary/BinaryObjectSchemaSerializer.cs |    2 +
 .../Impl/Binary/BinaryProcessor.cs              |   41 +-
 .../Impl/Binary/BinaryReader.cs                 |   39 +-
 .../Impl/Binary/BinaryReflectiveActions.cs      |    2 +-
 .../BinaryReflectiveSerializerInternal.cs       |   84 +-
 .../Binary/BinarySurrogateTypeDescriptor.cs     |   13 +-
 .../Impl/Binary/BinarySystemHandlers.cs         |   96 +-
 .../Impl/Binary/BinarySystemTypeSerializer.cs   |    2 +-
 .../Impl/Binary/BinaryUtils.cs                  |   64 +-
 .../Impl/Binary/BinaryWriter.cs                 |  244 +-
 .../Impl/Binary/DateTimeHolder.cs               |  101 -
 .../Impl/Binary/DateTimeSerializer.cs           |   48 -
 .../Binary/DeserializationCallbackProcessor.cs  |  102 +
 .../Impl/Binary/IBinaryEqualityComparer.cs      |   10 +
 .../Impl/Binary/IBinarySerializerInternal.cs    |    4 +-
 .../Impl/Binary/IBinaryTypeDescriptor.cs        |    8 +
 .../Impl/Binary/Io/BinaryStreamAdapter.cs       |  119 -
 .../Impl/Binary/Io/IBinaryStream.cs             |    3 +-
 .../Impl/Binary/Io/IBinaryStreamProcessor.cs    |    5 +-
 .../Impl/Binary/Marshaller.cs                   |  281 ++-
 .../Impl/Binary/Metadata/BinaryField.cs         |   72 +
 .../Impl/Binary/Metadata/BinaryType.cs          |   38 +-
 .../Binary/Metadata/BinaryTypeHashsetHandler.cs |   10 +-
 .../Impl/Binary/Metadata/BinaryTypeHolder.cs    |    9 +-
 .../Impl/Binary/Metadata/IBinaryTypeHandler.cs  |    4 +-
 .../Impl/Binary/ReflectionUtils.cs              |   50 +
 .../Impl/Binary/SerializableObjectHolder.cs     |   96 -
 .../Impl/Binary/SerializableSerializer.cs       |  656 +++++-
 .../Impl/Binary/TypeResolver.cs                 |    7 +
 .../Impl/Binary/UserSerializerProxy.cs          |    5 +-
 .../Impl/Cache/Affinity/AffinityFunctionBase.cs |  140 --
 .../Affinity/AffinityFunctionSerializer.cs      |    3 -
 .../Impl/Cache/CacheEntryProcessorResult.cs     |   27 +-
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |   31 +-
 .../Impl/Cache/Store/CacheStore.cs              |  233 +-
 .../Impl/Cache/Store/CacheStoreInternal.cs      |  285 +++
 .../Impl/Cache/Store/ICacheStoreInternal.cs     |   43 +
 .../Impl/Collections/MultiValueDictionary.cs    |    2 +-
 .../Common/CopyOnWriteConcurrentDictionary.cs   |   35 +
 .../Impl/Common/DelegateConverter.cs            |   90 +-
 .../Impl/Common/DelegateTypeDescriptor.cs       |    3 +-
 .../Apache.Ignite.Core/Impl/Common/Future.cs    |    3 +-
 .../Impl/Common/IFutureConverter.cs             |    4 +-
 .../Impl/Common/IFutureInternal.cs              |    3 +-
 .../Impl/Common/IgniteHome.cs                   |   21 +-
 .../Impl/Common/LoadedAssembliesResolver.cs     |    2 +-
 .../Impl/Common/SerializableTypeDescriptor.cs   |  222 ++
 .../Apache.Ignite.Core/Impl/Handle/Handle.cs    |    2 +-
 .../Impl/Handle/HandleRegistry.cs               |    2 +-
 .../Apache.Ignite.Core/Impl/Handle/IHandle.cs   |    2 +-
 .../dotnet/Apache.Ignite.Core/Impl/Ignite.cs    |   13 +-
 .../Impl/Memory/IPlatformMemory.cs              |    5 +-
 .../Impl/Memory/PlatformMemory.cs               |    3 +-
 .../Impl/Memory/PlatformMemoryManager.cs        |    4 +-
 .../Impl/Memory/PlatformMemoryPool.cs           |    3 +-
 .../Impl/Memory/PlatformMemoryStream.cs         |    3 +-
 .../Impl/Memory/PlatformRawMemory.cs            |   96 -
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |   17 +-
 .../Impl/Services/ServiceProxySerializer.cs     |    4 +-
 .../Impl/Unmanaged/UnmanagedCallbacks.cs        |    8 +-
 .../NuGet/LINQPad/ComputeExample.linq           |    1 -
 .../NuGet/LINQPad/PutGetExample.linq            |    5 +-
 .../NuGet/LINQPad/QueryExample.linq             |    5 +-
 .../Plugin/IPluginConfiguration.cs              |    4 +-
 .../Impl/DbCache.cs                             |    2 +-
 .../Apache.Ignite.Linq.csproj                   |    1 -
 .../dotnet/Apache.Ignite.Linq/CompiledQuery.cs  |  112 +-
 .../dotnet/Apache.Ignite.Linq/CompiledQuery2.cs |  257 ---
 .../Impl/CacheFieldsQueryProvider.cs            |   10 +-
 .../Impl/CacheQueryExpressionVisitor.cs         |   14 +-
 .../Apache.Ignite.Linq/Impl/CacheQueryParser.cs |   25 +-
 .../Apache.Ignite.Linq/Impl/MethodVisitor.cs    |   72 +-
 .../NuGet/LINQPad/QueryExample.linq             |    5 +-
 .../dotnet/Apache.Ignite.Linq/QueryOptions.cs   |    2 +-
 .../examples/Apache.Ignite.Examples/App.config  |   20 +-
 .../Datagrid/LinqExample.cs                     |    2 +-
 .../Datagrid/MultiTieredCacheExample.cs         |    4 +-
 .../Datagrid/PutGetExample.cs                   |   13 +-
 .../Datagrid/StoreExample.cs                    |    1 +
 .../Misc/ClientReconnectExample.cs              |   38 +-
 .../Apache.Ignite.ExamplesDll/Binary/Address.cs |    2 -
 .../Compute/CharacterCountClosure.cs            |    1 -
 .../Datagrid/ContinuousQueryFilter.cs           |    2 -
 .../Datagrid/EmployeeStore.cs                   |   27 +-
 .../Datagrid/EmployeeStorePredicate.cs          |    2 -
 .../Messaging/RemoteOrderedListener.cs          |    1 -
 .../Messaging/RemoteUnorderedListener.cs        |    1 -
 .../Services/MapService.cs                      |    1 -
 .../scalar/pimps/ScalarProjectionPimp.scala     |   24 +-
 modules/schema-import-db/README.txt             |    4 -
 modules/schema-import-db/pom.xml                |   55 -
 .../apache/ignite/schema/parser/DbColumn.java   |   88 -
 .../ignite/schema/parser/DbMetadataReader.java  |  147 --
 .../apache/ignite/schema/parser/DbTable.java    |   82 -
 .../parser/dialect/DB2MetadataDialect.java      |   33 -
 .../parser/dialect/DatabaseMetadataDialect.java |  102 -
 .../parser/dialect/JdbcMetadataDialect.java     |  199 --
 .../parser/dialect/MySQLMetadataDialect.java    |   82 -
 .../parser/dialect/OracleMetadataDialect.java   |  360 ---
 modules/schema-import/README.txt                |  216 --
 modules/schema-import/pom.xml                   |  119 -
 .../main/java/media/data_connection_48x48.png   |  Bin 4443 -> 0 bytes
 .../src/main/java/media/error_48x48.png         |  Bin 4349 -> 0 bytes
 .../src/main/java/media/ignite_128x128.png      |  Bin 4917 -> 0 bytes
 .../src/main/java/media/ignite_16x16.png        |  Bin 608 -> 0 bytes
 .../src/main/java/media/ignite_24x24.png        |  Bin 930 -> 0 bytes
 .../src/main/java/media/ignite_32x32.png        |  Bin 1203 -> 0 bytes
 .../src/main/java/media/ignite_48x48.png        |  Bin 1868 -> 0 bytes
 .../src/main/java/media/ignite_64x64.png        |  Bin 2453 -> 0 bytes
 .../src/main/java/media/information_48x48.png   |  Bin 4102 -> 0 bytes
 .../src/main/java/media/question_48x48.png      |  Bin 3857 -> 0 bytes
 .../src/main/java/media/sign_warning_48x48.png  |  Bin 2988 -> 0 bytes
 .../schema-import/src/main/java/media/style.css |  134 --
 .../src/main/java/media/text_tree_48x48.png     |  Bin 2567 -> 0 bytes
 .../ignite/schema/generator/CodeGenerator.java  |  831 -------
 .../ignite/schema/generator/GeneratorUtils.java |   70 -
 .../ignite/schema/generator/XmlGenerator.java   |  446 ----
 .../ignite/schema/model/PojoDescriptor.java     |  497 ----
 .../apache/ignite/schema/model/PojoField.java   |  461 ----
 .../ignite/schema/model/SchemaDescriptor.java   |   62 -
 .../schema/parser/DatabaseMetadataParser.java   |  115 -
 .../ignite/schema/ui/ConfirmCallable.java       |   83 -
 .../org/apache/ignite/schema/ui/Controls.java   |  697 ------
 .../org/apache/ignite/schema/ui/GridPaneEx.java |  180 --
 .../org/apache/ignite/schema/ui/MessageBox.java |  274 ---
 .../apache/ignite/schema/ui/ModalDialog.java    |   50 -
 .../ignite/schema/ui/SchemaImportApp.java       | 2115 ------------------
 .../ignite/schema/ui/TextColumnValidator.java   |   32 -
 .../schema/test/AbstractSchemaImportTest.java   |  181 --
 .../test/generator/CodeGeneratorTest.java       |   81 -
 .../schema/test/generator/XmlGeneratorTest.java |   42 -
 .../ignite/schema/test/model/CacheConfig.txt    |  409 ----
 .../apache/ignite/schema/test/model/Objects.txt |  531 -----
 .../ignite/schema/test/model/ObjectsKey.txt     |   96 -
 .../ignite/schema/test/model/Primitives.txt     |  535 -----
 .../ignite/schema/test/model/PrimitivesKey.txt  |   96 -
 .../org/apache/ignite/schema/test/model/Tst.txt |  535 -----
 .../apache/ignite/schema/test/model/TstKey.txt  |   96 -
 .../schema/test/model/ignite-type-metadata.xml  |  666 ------
 .../test/parser/DbMetadataParserTest.java       |  134 --
 .../testsuites/IgniteSchemaImportTestSuite.java |   42 -
 modules/spring/pom.xml                          |    6 +
 .../apache/ignite/cache/spring/SpringCache.java |    4 +-
 .../ignite/cache/spring/SpringCacheTest.java    |  177 ++
 .../ignite/internal/GridFactorySelfTest.java    |    3 +
 .../IgniteExcludeInConfigurationTest.java       |   14 +-
 .../org/apache/ignite/spring/sprint-exclude.xml |   19 +-
 .../testsuites/IgniteSpringTestSuite.java       |    3 +
 ...gniteProjectionStartStopRestartSelfTest.java |    6 +-
 .../spi/deployment/uri/UriDeploymentSpi.java    |   80 +-
 .../commands/cache/VisorCacheCommand.scala      |   21 +-
 .../commands/cache/VisorCacheScanCommand.scala  |    2 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |    2 +-
 .../commands/tasks/VisorTasksCommandSpec.scala  |   22 +-
 .../helpers/jade/form/form-field-checkbox.pug   |   14 +-
 .../helpers/jade/form/form-field-datalist.pug   |    2 +-
 .../helpers/jade/form/form-field-dropdown.pug   |    3 +-
 .../app/helpers/jade/form/form-field-number.pug |    3 +-
 .../helpers/jade/form/form-field-password.pug   |    2 +-
 .../app/helpers/jade/form/form-field-text.pug   |    3 +-
 .../frontend/app/helpers/jade/mixins.pug        |    1 +
 .../modules/configuration/Version.service.js    |    2 +-
 .../states/configuration/clusters/general.pug   |    2 +-
 .../clusters/general/discovery/s3.pug           |    2 +-
 .../frontend/app/primitives/tooltip/index.pug   |   25 +
 .../views/configuration/domains-import.tpl.pug  |    6 +
 modules/web-console/web-agent/README.txt        |    2 +-
 modules/web-console/web-agent/pom.xml           |   12 -
 .../ignite/console/agent/db/DbColumn.java       |   88 +
 .../console/agent/db/DbMetadataReader.java      |  142 ++
 .../apache/ignite/console/agent/db/DbTable.java |   82 +
 .../agent/db/dialect/DB2MetadataDialect.java    |   33 +
 .../db/dialect/DatabaseMetadataDialect.java     |  102 +
 .../agent/db/dialect/JdbcMetadataDialect.java   |  199 ++
 .../agent/db/dialect/MySQLMetadataDialect.java  |   82 +
 .../agent/db/dialect/OracleMetadataDialect.java |  359 +++
 .../agent/handlers/DatabaseListener.java        |   20 +-
 .../config/benchmark-atomic.properties          |   21 +-
 .../config/benchmark-cache-load.properties      |    7 +-
 .../config/benchmark-compute.properties         |   13 +-
 .../config/benchmark-failover.properties        |    4 +-
 .../config/benchmark-multicast.properties       |    4 +-
 .../config/benchmark-put-indexed-val.properties |    9 +-
 .../yardstick/config/benchmark-query.properties |   19 +-
 .../config/benchmark-remote-sample.properties   |    5 +-
 .../config/benchmark-sample.properties          |    5 +-
 .../config/benchmark-sql-dml.properties         |   19 +-
 .../yardstick/config/benchmark-store.properties |   30 +-
 .../yardstick/config/benchmark-tx.properties    |   19 +-
 .../test-max-int-values-offheap.properties      |    5 +-
 .../test-max-int-values-onheap.properties       |    5 +-
 .../config/test-max-int-values-swap.properties  |    5 +-
 .../cache/IgniteBinaryIdentityBenchmark.java    |   21 -
 .../IgniteLegacyBinaryIdentityGetBenchmark.java |   30 -
 .../IgniteLegacyBinaryIdentityPutBenchmark.java |   30 -
 .../cache/WaitMapExchangeFinishCallable.java    |    4 +-
 .../dml/IgniteSqlDeleteFilteredBenchmark.java   |    5 +-
 .../dml/IgniteSqlUpdateFilteredBenchmark.java   |    5 +-
 .../IgniteAtomicInvokeRetryBenchmark.java       |   12 +-
 .../failover/IgniteAtomicRetriesBenchmark.java  |   12 +-
 .../IgniteFailoverAbstractBenchmark.java        |   22 +-
 ...IgniteTransactionalInvokeRetryBenchmark.java |   10 +-
 ...IgniteTransactionalWriteInvokeBenchmark.java |   16 +-
 .../IgniteTransactionalWriteReadBenchmark.java  |   12 +-
 .../IgniteCacheRandomOperationBenchmark.java    |   25 +-
 .../zk/TcpDiscoveryZookeeperIpFinder.java       |   37 +-
 pom.xml                                         |  121 -
 1019 files changed, 29608 insertions(+), 26275 deletions(-)
----------------------------------------------------------------------



[33/50] [abbrv] ignite git commit: IGNITE-4349 Discontinue the schema-import utility.

Posted by dm...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/MessageBox.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
deleted file mode 100644
index 83aaa61..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/MessageBox.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.ui;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
-import javafx.geometry.Pos;
-import javafx.scene.control.CheckBox;
-import javafx.scene.control.ScrollBar;
-import javafx.scene.control.TextArea;
-import javafx.scene.layout.HBox;
-import javafx.scene.layout.Priority;
-import javafx.stage.Modality;
-import javafx.stage.Stage;
-import javafx.stage.StageStyle;
-
-import static org.apache.ignite.schema.ui.Controls.borderPane;
-import static org.apache.ignite.schema.ui.Controls.button;
-import static org.apache.ignite.schema.ui.Controls.checkBox;
-import static org.apache.ignite.schema.ui.Controls.hBox;
-import static org.apache.ignite.schema.ui.Controls.imageView;
-import static org.apache.ignite.schema.ui.Controls.paneEx;
-import static org.apache.ignite.schema.ui.Controls.scene;
-
-/**
- * Message box functionality.
- */
-public class MessageBox extends ModalDialog {
-    /** Logger. */
-    private static final Logger log = Logger.getLogger(MessageBox.class.getName());
-
-    /** Message box type. */
-    private enum MessageType {
-        /** Information. */
-        INFO,
-        /** Warning. */
-        WARN,
-        /** Error. */
-        ERROR,
-        /** Confirm. */
-        CONFIRM,
-        /** Confirm with cancel option. */
-        CANCELLABLE_CONFIRM
-    }
-
-    /** Message box type. */
-    public enum Result {
-        /** Return value if YES is chosen. */
-        YES,
-        /** Return value if YES_TO_ALL is chosen. */
-        YES_TO_ALL,
-        /** Return value if NO is chosen. */
-        NO,
-        /** Return value if NO_TO_ALL is chosen. */
-        NO_TO_ALL,
-        /** Return value if CANCEL is chosen. */
-        CANCEL
-    }
-
-    /** Dialog result. */
-    private Result res = Result.CANCEL;
-
-    /**
-     * Create message box.
-     *
-     * @param owner Owner window.
-     * @param type Message box type.
-     * @param msg Message to show.
-     * @param applyToAll {@code true} if &quot;Apply to all&quot; check box should be displayed.
-     */
-    private MessageBox(Stage owner, MessageType type, String msg, final boolean applyToAll) {
-        super(owner, 480, 180);
-
-        String title;
-        String iconFile;
-
-        switch (type) {
-            case WARN:
-                title = "Warning";
-                iconFile = "sign_warning";
-                break;
-
-            case ERROR:
-                title = "Error";
-                iconFile = "error";
-                break;
-
-            case CONFIRM:
-            case CANCELLABLE_CONFIRM:
-                title = "Confirmation";
-                iconFile = "question";
-                break;
-
-            default:
-                title = "Information";
-                iconFile = "information";
-                break;
-        }
-
-        setTitle(title);
-        initStyle(StageStyle.UTILITY);
-        initModality(Modality.APPLICATION_MODAL);
-        initOwner(owner);
-        setResizable(false);
-
-        GridPaneEx contentPnl = paneEx(10, 10, 0, 10);
-
-        contentPnl.addColumn();
-        contentPnl.addColumn(100, 100, Double.MAX_VALUE, Priority.ALWAYS);
-
-        contentPnl.add(hBox(0, true, imageView(iconFile, 48)));
-
-        final TextArea ta = new TextArea(msg);
-        ta.setEditable(false);
-        ta.setWrapText(true);
-        ta.setFocusTraversable(false);
-
-        contentPnl.add(ta);
-
-        // Workaround for vertical scrollbar.
-        if (msg.length() < 100 && msg.split("\r\n|\r|\n").length < 4)
-            showingProperty().addListener(new ChangeListener<Boolean>() {
-                @Override public void changed(ObservableValue<? extends Boolean> val, Boolean oldVal, Boolean newVal) {
-                    if (newVal) {
-                        ScrollBar scrollBar = (ScrollBar)ta.lookup(".scroll-bar:vertical");
-
-                        if (scrollBar != null)
-                            scrollBar.setDisable(true);
-                    }
-                }
-            });
-
-        final CheckBox applyToAllCh = checkBox("Apply to all", "", false);
-
-        if (applyToAll) {
-            contentPnl.skip(1);
-            contentPnl.add(applyToAllCh);
-        }
-
-        HBox btns = hBox(10, true);
-        btns.setAlignment(Pos.CENTER);
-
-        if (MessageType.CONFIRM == type || MessageType.CANCELLABLE_CONFIRM == type) {
-            res = Result.NO;
-
-            btns.getChildren().addAll(
-                button("Yes", "Approve the request", new EventHandler<ActionEvent>() {
-                    @Override public void handle(ActionEvent e) {
-                        res = applyToAll && applyToAllCh.isSelected() ? Result.YES_TO_ALL : Result.YES;
-
-                        close();
-                    }
-                }),
-                button("No", "Reject the request", new EventHandler<ActionEvent>() {
-                    @Override public void handle(ActionEvent e) {
-                        res = applyToAll && applyToAllCh.isSelected() ? Result.NO_TO_ALL : Result.NO;
-
-                        close();
-                    }
-                }));
-
-            if (MessageType.CANCELLABLE_CONFIRM == type)
-                btns.getChildren().addAll(
-                    button("Cancel", "Cancel the request", new EventHandler<ActionEvent>() {
-                        @Override public void handle(ActionEvent e) {
-                            res = Result.CANCEL;
-
-                            close();
-                        }
-                    }));
-        }
-        else
-            btns.getChildren().add(button("OK", "Close dialog", new EventHandler<ActionEvent>() {
-                @Override public void handle(ActionEvent e) {
-                    close();
-                }
-            }));
-
-        setScene(scene(borderPane(null, contentPnl, btns, null, null)));
-    }
-
-    /**
-     * Show message in modal dialog.
-     *
-     * @param owner Owner window.
-     * @param type Message box type.
-     * @param msg Message to show.
-     * @param applyToAll {@code true} if &quot;Apply to all&quot; check box should be displayed.
-     * @return Option selected by the user.
-     */
-    private static Result showDialog(Stage owner, MessageType type, String msg, boolean applyToAll) {
-        MessageBox dlg = new MessageBox(owner, type, msg, applyToAll);
-
-        dlg.showModal();
-
-        return dlg.res;
-    }
-
-    /**
-     * Show confirmation dialog.
-     *
-     * @param owner Owner window.
-     * @param msg Message to show.
-     * @return {@code true} If user confirm.
-     */
-    public static boolean confirmDialog(Stage owner, String msg) {
-        return showDialog(owner, MessageType.CONFIRM, msg, false) == Result.YES;
-    }
-
-    /**
-     * Show confirmation dialog.
-     *
-     * @param owner Owner window.
-     * @param msg Message to show.
-     * @return User confirmation result.
-     */
-    public static Result applyToAllChoiceDialog(Stage owner, String msg) {
-        return showDialog(owner, MessageType.CANCELLABLE_CONFIRM, msg, true);
-    }
-
-    /**
-     * Show information dialog.
-     *
-     * @param owner Owner window.
-     * @param msg Message to show.
-     */
-    public static void informationDialog(Stage owner, String msg) {
-        showDialog(owner, MessageType.INFO, msg, false);
-    }
-
-    /**
-     * Show warning dialog.
-     *
-     * @param owner Owner window.
-     * @param msg Message to show.
-     */
-    public static void warningDialog(Stage owner, String msg) {
-        showDialog(owner, MessageType.WARN, msg, false);
-    }
-
-    /**
-     * Show error dialog.
-     *
-     * @param owner Owner window.
-     * @param msg Error message to show.
-     * @param e Optional exception to show.
-     */
-    public static void errorDialog(Stage owner, String msg, Throwable e) {
-        log.log(Level.SEVERE, msg, e);
-
-        String exMsg = e != null ? (e.getMessage() != null ? e.getMessage() : e.getClass().getName()) : null;
-
-        showDialog(owner, MessageType.ERROR, exMsg != null ? msg + "\n" + exMsg : msg, false);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
deleted file mode 100644
index a1e34a1..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/ModalDialog.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.ui;
-
-import javafx.stage.Stage;
-
-/**
- * Abstract base modal dialog.
- */
-public abstract class ModalDialog extends Stage {
-    /** Owner window. */
-    protected final Stage owner;
-
-    /**
-     * @param owner Owner window.
-     * @param width Window width.
-     * @param height Window height.
-     */
-    protected ModalDialog(Stage owner, int width, int height) {
-        this.owner = owner;
-
-        setWidth(width);
-        setHeight(height);
-    }
-
-    /**
-     * Show modal dialog.
-     */
-    protected void showModal() {
-        setX(owner.getX() + owner.getWidth() / 2 - getWidth() / 2);
-        setY(owner.getY() + owner.getHeight() / 2 - getHeight() / 2);
-
-        showAndWait();
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
deleted file mode 100644
index 6305341..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
+++ /dev/null
@@ -1,2115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.ui;
-
-import java.awt.Desktop;
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.lang.reflect.Field;
-import java.nio.charset.Charset;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ThreadFactory;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import javafx.application.Application;
-import javafx.application.Platform;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.collections.FXCollections;
-import javafx.collections.ObservableList;
-import javafx.concurrent.Task;
-import javafx.embed.swing.SwingFXUtils;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
-import javafx.geometry.Insets;
-import javafx.geometry.Pos;
-import javafx.geometry.VPos;
-import javafx.scene.Node;
-import javafx.scene.control.Button;
-import javafx.scene.control.CheckBox;
-import javafx.scene.control.ComboBox;
-import javafx.scene.control.Label;
-import javafx.scene.control.ListView;
-import javafx.scene.control.PasswordField;
-import javafx.scene.control.ProgressIndicator;
-import javafx.scene.control.TableCell;
-import javafx.scene.control.TableColumn;
-import javafx.scene.control.TableRow;
-import javafx.scene.control.TableView;
-import javafx.scene.control.TextField;
-import javafx.scene.control.TitledPane;
-import javafx.scene.layout.BorderPane;
-import javafx.scene.layout.HBox;
-import javafx.scene.layout.Pane;
-import javafx.scene.layout.Priority;
-import javafx.scene.layout.StackPane;
-import javafx.stage.DirectoryChooser;
-import javafx.stage.FileChooser;
-import javafx.stage.Screen;
-import javafx.stage.Stage;
-import javafx.util.Callback;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.schema.generator.CodeGenerator;
-import org.apache.ignite.schema.generator.XmlGenerator;
-import org.apache.ignite.schema.model.PojoDescriptor;
-import org.apache.ignite.schema.model.PojoField;
-import org.apache.ignite.schema.model.SchemaDescriptor;
-import org.apache.ignite.schema.parser.DatabaseMetadataParser;
-import org.apache.ignite.schema.parser.DbMetadataReader;
-
-/**
- * Schema Import utility application.
- */
-@SuppressWarnings("UnnecessaryFullyQualifiedName")
-public class SchemaImportApp extends Application {
-    /** Logger. */
-    private static final Logger log = Logger.getLogger(SchemaImportApp.class.getName());
-
-    /** */
-    private static final String PREF_WINDOW_X = "window.x";
-
-    /** */
-    private static final String PREF_WINDOW_Y = "window.y";
-
-    /** */
-    private static final String PREF_WINDOW_WIDTH = "window.width";
-
-    /** */
-    private static final String PREF_WINDOW_HEIGHT = "window.height";
-
-    /** */
-    private static final String PREF_JDBC_DB_PRESET = "jdbc.db.preset";
-
-    /** */
-    private static final String PREF_JDBC_DRIVER_JAR = "jdbc.driver.jar";
-
-    /** */
-    private static final String PREF_JDBC_DRIVER_CLASS = "jdbc.driver.class";
-
-    /** */
-    private static final String PREF_JDBC_URL = "jdbc.url";
-
-    /** */
-    private static final String PREF_JDBC_USER = "jdbc.user";
-
-    /** */
-    private static final String PREF_OUT_FOLDER = "out.folder";
-
-    /** */
-    private static final String PREF_POJO_PACKAGE = "pojo.package";
-
-    /** */
-    private static final String PREF_POJO_INCLUDE = "pojo.include";
-
-    /** */
-    private static final String PREF_POJO_CONSTRUCTOR = "pojo.constructor";
-
-    /** */
-    private static final String PREF_GENERATE_ALIASES = "sql.aliases";
-
-    /** */
-    private static final String PREF_XML_SINGLE = "xml.single";
-
-    /** */
-    private static final String PREF_NAMING_PATTERN = "naming.pattern";
-
-    /** */
-    private static final String PREF_NAMING_REPLACE = "naming.replace";
-
-    /** Empty POJO fields model. */
-    private static final ObservableList<PojoField> NO_FIELDS = FXCollections.emptyObservableList();
-
-    /** Ability to use xdg-open utility flag. */
-    private static final boolean HAS_XDG_OPEN = U.isUnix() && new File("/usr/bin/xdg-open").canExecute();
-
-    /** Default presets for popular databases. */
-    private final Preset[] presets = {
-        new Preset("h2", "H2 Database", "h2.jar", "org.h2.Driver", "jdbc:h2:[database]", "sa"),
-        new Preset("db2", "DB2", "db2jcc4.jar", "com.ibm.db2.jcc.DB2Driver", "jdbc:db2://[host]:[port]/[database]",
-            "db2admin"),
-        new Preset("oracle", "Oracle", "ojdbc6.jar", "oracle.jdbc.OracleDriver",
-            "jdbc:oracle:thin:@[host]:[port]:[database]", "system"),
-        new Preset("mysql", "MySQL", "mysql-connector-java-5-bin.jar", "com.mysql.jdbc.Driver",
-            "jdbc:mysql://[host]:[port]/[database]", "root"),
-        new Preset("mssql", "Microsoft SQL Server", "sqljdbc41.jar", "com.microsoft.sqlserver.jdbc.SQLServerDriver",
-            "jdbc:sqlserver://[host]:[port][;databaseName=database]", "sa"),
-        new Preset("postgresql", "PostgreSQL", "postgresql-9.3.jdbc4.jar", "org.postgresql.Driver",
-            "jdbc:postgresql://[host]:[port]/[database]", "sa"),
-        new Preset("custom", "Custom server...", "custom-jdbc.jar", "org.custom.Driver", "jdbc:custom", "sa")
-    };
-
-    /** */
-    private Stage owner;
-
-    /** */
-    private BorderPane rootPane;
-
-    /** Header pane. */
-    private BorderPane hdrPane;
-
-    /** */
-    private HBox dbIcon;
-
-    /** */
-    private HBox genIcon;
-
-    /** */
-    private Label titleLb;
-
-    /** */
-    private Label subTitleLb;
-
-    /** */
-    private Button prevBtn;
-
-    /** */
-    private Button nextBtn;
-
-    /** */
-    private ComboBox<Preset> rdbmsCb;
-
-    /** */
-    private TextField jdbcDrvJarTf;
-
-    /** */
-    private TextField jdbcDrvClsTf;
-
-    /** */
-    private TextField jdbcUrlTf;
-
-    /** */
-    private TextField userTf;
-
-    /** */
-    private PasswordField pwdTf;
-
-    /** */
-    private ComboBox<String> parseCb;
-
-    /** */
-    private ListView<SchemaDescriptor> schemaLst;
-
-    /** */
-    private GridPaneEx connPnl;
-
-    /** */
-    private StackPane connLayerPnl;
-
-    /** */
-    private TableView<PojoDescriptor> pojosTbl;
-
-    /** */
-    private TableView<PojoField> fieldsTbl;
-
-    /** */
-    private Node curTbl;
-
-    /** */
-    private TextField outFolderTf;
-
-    /** */
-    private TextField pkgTf;
-
-    /** */
-    private CheckBox pojoConstructorCh;
-
-    /** */
-    private CheckBox generateAliasesCh;
-
-    /** */
-    private CheckBox pojoIncludeKeysCh;
-
-    /** */
-    private CheckBox xmlSingleFileCh;
-
-    /** */
-    private TextField regexTf;
-
-    /** */
-    private TextField replaceTf;
-
-    /** */
-    private GridPaneEx genPnl;
-
-    /** */
-    private StackPane genLayerPnl;
-
-    /** */
-    private ProgressIndicator pi;
-
-    /** */
-    private ObservableList<SchemaDescriptor> schemas = FXCollections.emptyObservableList();
-
-    /** List with POJOs descriptors. */
-    private ObservableList<PojoDescriptor> pojos = FXCollections.emptyObservableList();
-
-    /** Currently selected POJO. */
-    private PojoDescriptor curPojo;
-
-    /** Application preferences. */
-    private final Properties prefs = new Properties();
-
-    /** File path for storing on local file system. */
-    private final File prefsFile = new File(System.getProperty("user.home"), ".ignite-schema-import");
-
-    /** */
-    private final ExecutorService exec = Executors.newSingleThreadExecutor(new ThreadFactory() {
-        /** {@inheritDoc} */
-        @Override public Thread newThread(Runnable r) {
-            Thread t = new Thread(r, "ignite-schema-import-worker");
-
-            t.setDaemon(true);
-
-            return t;
-        }
-    });
-
-    /**
-     * Schema Import utility launcher.
-     *
-     * @param args Command line arguments passed to the application.
-     */
-    public static void main(String[] args) {
-        // Workaround for JavaFX ugly text AA.
-        System.setProperty("prism.lcdtext", "false");
-        System.setProperty("prism.text", "t2k");
-
-        // Workaround for AWT + JavaFX: we should initialize AWT before JavaFX.
-        java.awt.Toolkit.getDefaultToolkit();
-
-        // Workaround for JavaFX + Mac OS dock icon.
-        if (System.getProperty("os.name").toLowerCase().contains("mac os")) {
-            System.setProperty("javafx.macosx.embedded", "true");
-
-            try {
-                Class<?> appCls = Class.forName("com.apple.eawt.Application");
-
-                Object osxApp = appCls.getDeclaredMethod("getApplication").invoke(null);
-
-                appCls.getDeclaredMethod("setDockIconImage", java.awt.Image.class)
-                    .invoke(osxApp, SwingFXUtils.fromFXImage(Controls.image("ignite", 128), null));
-            }
-            catch (Exception ignore) {
-                // No-op.
-            }
-
-            // Workaround for JDK 7/JavaFX 2 application on Mac OSX El Capitan.
-            try {
-                Class<?> fontFinderCls = Class.forName("com.sun.t2k.MacFontFinder");
-
-                Field psNameToPathMap = fontFinderCls.getDeclaredField("psNameToPathMap");
-
-                psNameToPathMap.setAccessible(true);
-                psNameToPathMap.set(null, new HashMap<String, String>());
-            }
-            catch (Exception ignore) {
-                // No-op.
-            }
-        }
-
-        launch(args);
-    }
-
-    /**
-     * Lock UI before start long task.
-     *
-     * @param layer Stack pane to add progress indicator.
-     * @param controls Controls to disable.
-     */
-    private void lockUI(StackPane layer, Node... controls) {
-        for (Node control : controls)
-            control.setDisable(true);
-
-        layer.getChildren().add(pi);
-    }
-
-    /**
-     * Unlock UI after long task finished.
-     *
-     * @param layer Stack pane to remove progress indicator.
-     * @param controls Controls to enable.
-     */
-    private void unlockUI(StackPane layer, Node... controls) {
-        for (Node control : controls)
-            control.setDisable(false);
-
-        layer.getChildren().remove(pi);
-    }
-
-    /**
-     * Perceptual delay to avoid UI flickering.
-     *
-     * @param started Time when background progress started.
-     */
-    private void perceptualDelay(long started) {
-        long delta = System.currentTimeMillis() - started;
-
-        if (delta < 500)
-            try {
-                Thread.sleep(500 - delta);
-            }
-            catch (InterruptedException ignored) {
-                Thread.currentThread().interrupt();
-            }
-    }
-
-    /**
-     * Open connection to database.
-     *
-     * @return Connection to database.
-     * @throws SQLException If connection failed.
-     */
-    private Connection connect() throws SQLException {
-        final String jdbcDrvJarPath = jdbcDrvJarTf.getText().trim();
-
-        final String jdbcDrvCls = jdbcDrvClsTf.getText();
-
-        final String jdbcUrl = jdbcUrlTf.getText();
-
-        String user = userTf.getText().trim();
-
-        String pwd = pwdTf.getText().trim();
-
-        final Properties jdbcInfo = new Properties();
-
-        if (!user.isEmpty())
-            jdbcInfo.put("user", user);
-
-        if (!pwd.isEmpty())
-            jdbcInfo.put("password", pwd);
-
-        return DbMetadataReader.getInstance().connect(jdbcDrvJarPath, jdbcDrvCls, jdbcUrl, jdbcInfo);
-    }
-
-    /**
-     * Fill tree with database metadata.
-     */
-    private void fill() {
-        final List<String> selSchemas = new ArrayList<>();
-
-        for (SchemaDescriptor schema: schemas)
-            if (schema.selected().getValue())
-                selSchemas.add(schema.schema());
-
-        if (selSchemas.isEmpty())
-            if (!MessageBox.confirmDialog(owner, "No schemas selected.\nExtract tables for all available schemas?"))
-                return;
-
-        lockUI(connLayerPnl, connPnl, nextBtn);
-
-        final String jdbcUrl = jdbcUrlTf.getText();
-
-        final boolean tblsOnly = parseCb.getSelectionModel().getSelectedIndex() == 0;
-
-        Runnable task = new Task<Void>() {
-            /** {@inheritDoc} */
-            @Override protected Void call() throws Exception {
-                long started = System.currentTimeMillis();
-
-                try (Connection conn = connect()) {
-                    pojos = DatabaseMetadataParser.parse(conn, selSchemas, tblsOnly);
-                }
-
-                perceptualDelay(started);
-
-                return null;
-            }
-
-            /** {@inheritDoc} */
-            @Override protected void succeeded() {
-                try {
-                    super.succeeded();
-
-                    pojosTbl.setItems(pojos);
-
-                    if (pojos.isEmpty()) {
-                        MessageBox.warningDialog(owner, "No tables found in database. Recheck JDBC URL.\n" +
-                            "JDBC URL: " +  jdbcUrl);
-
-                        return;
-                    }
-                    else
-                        pojosTbl.getSelectionModel().clearAndSelect(0);
-
-                    curTbl = pojosTbl;
-
-                    pojosTbl.requestFocus();
-
-                    hdrPane.setLeft(genIcon);
-
-                    titleLb.setText("Generate XML And POJOs");
-                    subTitleLb.setText(jdbcUrlTf.getText());
-
-                    rootPane.setCenter(genLayerPnl);
-
-                    prevBtn.setDisable(false);
-                    nextBtn.setText("Generate");
-                    Controls.tooltip(nextBtn, "Generate XML and POJO files");
-                }
-                finally {
-                    unlockUI(connLayerPnl, connPnl, nextBtn);
-                }
-            }
-
-            /** {@inheritDoc} */
-            @Override protected void cancelled() {
-                super.cancelled();
-
-                unlockUI(connLayerPnl, connPnl, nextBtn);
-            }
-
-            /** {@inheritDoc} */
-            @Override protected void failed() {
-                super.succeeded();
-
-                unlockUI(connLayerPnl, connPnl, nextBtn);
-
-                MessageBox.errorDialog(owner, "Failed to get tables list from database.", getException());
-            }
-        };
-
-        exec.submit(task);
-    }
-
-    /**
-     * Load schemas list from database.
-     */
-    private void loadSchemas() {
-        lockUI(connLayerPnl, connPnl, nextBtn);
-
-        final String jdbcUrl = jdbcUrlTf.getText();
-
-        Runnable task = new Task<Void>() {
-            /** {@inheritDoc} */
-            @Override protected Void call() throws Exception {
-                long started = System.currentTimeMillis();
-
-                try (Connection conn = connect()) {
-                    schemas = DatabaseMetadataParser.schemas(conn);
-                }
-
-                perceptualDelay(started);
-
-                return null;
-            }
-
-            /** {@inheritDoc} */
-            @Override protected void succeeded() {
-                try {
-                    super.succeeded();
-
-                    schemaLst.setItems(schemas);
-
-                    if (schemas.isEmpty()) {
-                        MessageBox.warningDialog(owner, "No schemas found in database. Recheck JDBC URL.\n" +
-                            "JDBC URL: " +  jdbcUrl);
-
-                        return;
-                    }
-
-                    nextBtn.setDisable(false);
-                }
-                finally {
-                    unlockUI(connLayerPnl, connPnl, nextBtn);
-                }
-            }
-
-            /** {@inheritDoc} */
-            @Override protected void cancelled() {
-                super.cancelled();
-
-                unlockUI(connLayerPnl, connPnl, nextBtn);
-            }
-
-            /** {@inheritDoc} */
-            @Override protected void failed() {
-                super.succeeded();
-
-                unlockUI(connLayerPnl, connPnl, nextBtn);
-
-                MessageBox.errorDialog(owner, "Failed to get schemas list from database.", getException());
-            }
-        };
-
-        exec.submit(task);
-    }
-
-    /**
-     * Generate XML and POJOs.
-     */
-    private void generate() {
-        final Collection<PojoDescriptor> selPojos = checkedPojos();
-
-        if (selPojos.isEmpty()) {
-            MessageBox.warningDialog(owner, "Please select tables to generate XML and POJOs files!");
-
-            return;
-        }
-
-        if (!checkInput(outFolderTf, true, "Output folder should not be empty!"))
-            return;
-
-        lockUI(genLayerPnl, genPnl, prevBtn, nextBtn);
-
-        final String outFolder = outFolderTf.getText();
-
-        final String pkg = pkgTf.getText();
-
-        final File destFolder = new File(outFolder);
-
-        final boolean constructor = pojoConstructorCh.isSelected();
-
-        final boolean includeKeys = pojoIncludeKeysCh.isSelected();
-
-        final boolean generateAliases = generateAliasesCh.isSelected();
-
-        final boolean singleXml = xmlSingleFileCh.isSelected();
-
-        Runnable task = new Task<Void>() {
-            /**
-             * @param pojo POJO descriptor to check.
-             * @param selected Selected flag.
-             * @param msg Message to show in case of check failed.
-             */
-            private void checkEmpty(final PojoDescriptor pojo, boolean selected, String msg) {
-                if (!selected) {
-                    Platform.runLater(new Runnable() {
-                        @Override public void run() {
-                            TableView.TableViewSelectionModel<PojoDescriptor> selMdl = pojosTbl.getSelectionModel();
-
-                            selMdl.clearSelection();
-                            selMdl.select(pojo);
-                            pojosTbl.scrollTo(selMdl.getSelectedIndex());
-                        }
-                    });
-
-                    throw new IllegalStateException(msg + pojo.table());
-                }
-            }
-
-            /** {@inheritDoc} */
-            @Override protected Void call() throws Exception {
-                long started = System.currentTimeMillis();
-
-                if (!destFolder.exists() && !destFolder.mkdirs())
-                    throw new IOException("Failed to create output folder: " + destFolder);
-
-                Collection<PojoDescriptor> all = new ArrayList<>();
-
-                ConfirmCallable askOverwrite = new ConfirmCallable(owner, "File already exists: %s\nOverwrite?");
-
-                // Generate XML and POJO.
-                for (PojoDescriptor pojo : selPojos) {
-                    if (pojo.checked()) {
-                        checkEmpty(pojo, pojo.hasFields(), "No fields selected for type: ");
-                        checkEmpty(pojo, pojo.hasKeyFields(), "No key fields selected for type: ");
-                        checkEmpty(pojo, pojo.hasValueFields(includeKeys), "No value fields selected for type: ");
-
-                        all.add(pojo);
-                    }
-                }
-
-                for (PojoDescriptor pojo : all) {
-                    if (!singleXml)
-                        XmlGenerator.generate(pkg, pojo, includeKeys, generateAliases,
-                            new File(destFolder, pojo.table() + ".xml"), askOverwrite);
-
-                    CodeGenerator.pojos(pojo, outFolder, pkg, constructor, includeKeys, askOverwrite);
-                }
-
-                if (singleXml)
-                    XmlGenerator.generate(pkg, all, includeKeys, generateAliases,
-                        new File(outFolder, "ignite-type-metadata.xml"), askOverwrite);
-
-                CodeGenerator.snippet(all, pkg, includeKeys, generateAliases, outFolder, askOverwrite);
-
-                perceptualDelay(started);
-
-                return null;
-            }
-
-            /**
-             * Running of command with reading of first printed line.
-             *
-             * @param cmdLine Process to run.
-             * @return First printed by command line.
-             */
-            private String execAndReadLine(Process cmdLine) {
-                InputStream stream = cmdLine.getInputStream();
-                Charset cs = Charset.defaultCharset();
-
-                try(BufferedReader reader = new BufferedReader(
-                        cs == null ? new InputStreamReader(stream) : new InputStreamReader(stream, cs))) {
-                    return reader.readLine();
-                }
-                catch (IOException ignored){
-                    return null;
-                }
-            }
-
-            /**
-             * Start specified command in separate process.
-             *
-             * @param commands Executable file and command parameters in array.
-             * @return Process instance for run command.
-             */
-            private Process startProcess(List<String> commands) throws IOException {
-                ProcessBuilder builder = new ProcessBuilder(commands);
-
-                Map<String, String> environment = builder.environment();
-
-                environment.clear();
-
-                environment.putAll(System.getenv());
-
-                return builder.start();
-            }
-
-            /**
-             * Convert specified command parameters to system specific parameters.
-             *
-             * @param cmd Path to executable file.
-             * @param parameters Params for created process.
-             * @return List of converted system specific parameters.
-             */
-            private List<String> toCommandLine(String cmd, String... parameters) {
-                boolean isWin = U.isWindows();
-
-                List<String> params = new ArrayList<>(parameters.length + 1);
-
-                params.add(cmd.replace('/', File.separatorChar).replace('\\', File.separatorChar));
-
-                for (String parameter: parameters) {
-                    if (isWin) {
-                        if (parameter.contains("\"")) params.add(parameter.replace("\"", "\\\""));
-                        else if (parameter.isEmpty()) params.add("\"\"");
-                        else params.add(parameter);
-                    }
-                    else
-                        params.add(parameter);
-                }
-
-                return params;
-            }
-
-            /**
-             * Create process for run specified command.
-             *
-             * @param execPath Path to executable file.
-             * @param params Params for created process.
-             * @return Process instance for run command.
-             */
-            private Process createProcess(String execPath, String... params) throws IOException {
-                if (F.isEmpty(execPath))
-                    throw new IllegalArgumentException("Executable not specified");
-
-                return startProcess(toCommandLine(execPath, params));
-            }
-
-            /**
-             * Compare two version strings.
-             *
-             * @param v1 Version string 1.
-             * @param v2 Version string 2.
-             * @return The value 0 if the argument version is equal to this version.
-             * A value less than 0 if this version is less than the version argument.
-             * A value greater than 0 if this version is greater than the version argument.
-             */
-            private int compareVersionNumbers(String v1, String v2) {
-                if (v1 == null && v2 == null)
-                    return 0;
-
-                if (v1 == null)
-                    return -1;
-
-                if (v2 == null)
-                    return 1;
-
-                String[] part1 = v1.split("[._-]");
-                String[] part2 = v2.split("[._-]");
-
-                int idx = 0;
-
-                while (idx < part1.length && idx < part2.length) {
-                    String p1 = part1[idx];
-                    String p2 = part2[idx];
-
-                    int cmp = p1.matches("\\d+") && p2.matches("\\d+") ? Integer.valueOf(p1).compareTo(Integer.valueOf(p2)) :
-                            part1[idx].compareTo(part2[idx]);
-
-                    if (cmp != 0)
-                        return cmp;
-
-                    idx += 1;
-                }
-
-                if (part1.length == part2.length)
-                    return 0;
-                else {
-                    boolean left = part1.length > idx;
-                    String[] parts = left ? part1 : part2;
-
-                    while (idx < parts.length) {
-                        String p = parts[idx];
-
-                        int cmp = p.matches("\\d+") ? Integer.valueOf(p).compareTo(0) : 1;
-
-                        if (cmp != 0) return left ? cmp : -cmp;
-
-                        idx += 1;
-                    }
-
-                    return 0;
-                }
-            }
-
-            /**
-             * Check that system has Nautilus.
-             *
-             * @return {@code True} when Nautilus is installed or {@code false} otherwise.
-             * @throws IOException If failed to detect Nautilus.
-             */
-            private boolean canUseNautilus() throws IOException {
-                if (U.isUnix() || new File("/usr/bin/xdg-mime").canExecute() || new File("/usr/bin/nautilus").canExecute()) {
-                    String appName = execAndReadLine(createProcess("xdg-mime", "query", "default", "inode/directory"));
-
-                    if (appName == null || !appName.matches("nautilus.*\\.desktop"))
-                        return false;
-                    else {
-                        String ver = execAndReadLine(createProcess("nautilus", "--version"));
-
-                        if (ver != null) {
-                            Matcher m = Pattern.compile("GNOME nautilus ([0-9.]+)").matcher(ver);
-
-                            return m.find() && compareVersionNumbers(m.group(1), "3") >= 0;
-                        }
-                        else
-                            return false;
-                    }
-                }
-                else
-                    return false;
-            }
-
-            /**
-             * Open specified folder with selection of specified file in system file manager.
-             *
-             * @param dir Opened folder.
-             */
-            private void openFolder(File dir) throws IOException {
-                if (U.isWindows())
-                    Runtime.getRuntime().exec("explorer /root," + dir.getAbsolutePath());
-                else if (U.isMacOs())
-                    createProcess("open", dir.getAbsolutePath());
-                else if (canUseNautilus())
-                    createProcess("nautilus", dir.getAbsolutePath());
-                else {
-                    String path = dir.getAbsolutePath();
-
-                    if (HAS_XDG_OPEN)
-                        createProcess("/usr/bin/xdg-open", path);
-                    else if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.OPEN))
-                        Desktop.getDesktop().open(new File(path));
-                    else
-                        MessageBox.warningDialog(owner, "This action isn't supported on the current platform" +
-                            ((U.isLinux() || U.isUnix() || U.isSolaris()) ?
-                            ".\nTo fix this issue you should install library libgnome2-0." : ""));
-                }
-            }
-
-            /** {@inheritDoc} */
-            @Override protected void succeeded() {
-                super.succeeded();
-
-                unlockUI(genLayerPnl, genPnl, prevBtn, nextBtn);
-
-                if (MessageBox.confirmDialog(owner, "Generation complete!\n\n" +
-                    "Reveal output folder in system default file browser?"))
-                    try {
-                        openFolder(destFolder);
-                    }
-                    catch (Exception e) {
-                        MessageBox.errorDialog(owner, "Failed to open folder with results.", e);
-                    }
-            }
-
-            /** {@inheritDoc} */
-            @Override protected void cancelled() {
-                super.cancelled();
-
-                unlockUI(genLayerPnl, genPnl, prevBtn, nextBtn);
-
-                MessageBox.warningDialog(owner, "Generation canceled.");
-            }
-
-            /** {@inheritDoc} */
-            @Override protected void failed() {
-                super.succeeded();
-
-                unlockUI(genLayerPnl, genPnl, prevBtn, nextBtn);
-
-                MessageBox.errorDialog(owner, "Generation failed.", getException());
-            }
-        };
-
-        exec.submit(task);
-    }
-
-    /**
-     * @return Header pane with title label.
-     */
-    private BorderPane createHeaderPane() {
-        dbIcon = Controls.hBox(0, true, Controls.imageView("data_connection", 48));
-        genIcon = Controls.hBox(0, true, Controls.imageView("text_tree", 48));
-
-        titleLb = Controls.label("");
-        titleLb.setId("banner");
-
-        subTitleLb = Controls.label("");
-
-        BorderPane bp = Controls.borderPane(null, Controls.vBox(5, titleLb, subTitleLb), null, dbIcon,
-            Controls.hBox(0, true, Controls.imageView("ignite", 48)));
-        bp.setId("banner");
-
-        return bp;
-    }
-
-    /**
-     * @return Panel with control buttons.
-     */
-    private Pane createButtonsPane() {
-        prevBtn = Controls.button("Prev", "Go to \"Database connection\" page", new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent evt) {
-                prev();
-            }
-        });
-
-        nextBtn = Controls.button("Next", "Go to \"POJO and XML generation\" page", new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent evt) {
-                next();
-            }
-        });
-
-        return Controls.buttonsPane(Pos.BOTTOM_RIGHT, true, prevBtn, nextBtn);
-    }
-
-    /**
-     * @return {@code true} if some changes were made to fields metadata.
-     */
-    private boolean changed() {
-        for (PojoDescriptor pojo : pojos)
-            if (pojo.changed())
-                return true;
-
-        return false;
-    }
-
-    /**
-     * Go to &quot;Connect To Database&quot; panel.
-     */
-    private void prev() {
-        if (changed() && !MessageBox.confirmDialog(owner, "Are you sure you want to return to previous page?\n" +
-            "This will discard all your changes."))
-            return;
-
-        hdrPane.setLeft(dbIcon);
-
-        titleLb.setText("Connect To Database");
-        subTitleLb.setText("Specify database connection properties...");
-
-        rootPane.setCenter(connLayerPnl);
-
-        prevBtn.setDisable(true);
-        nextBtn.setText("Next");
-        Controls.tooltip(nextBtn, "Go to \"XML and POJO generation\" page");
-    }
-
-    /**
-     * Check that text field is non empty.
-     *
-     * @param tf Text field check.
-     * @param trim If {@code true} then
-     * @param msg Warning message.
-     * @return {@code true} If text field is empty.
-     */
-    private boolean checkInput(TextField tf, boolean trim, String msg) {
-        String s = tf.getText();
-
-        s = trim ? s.trim() : s;
-
-        if (s.isEmpty()) {
-            tf.requestFocus();
-
-            MessageBox.warningDialog(owner, msg);
-
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Go to &quot;Generate XML And POJOs&quot; panel or generate XML and POJOs.
-     */
-    private void next() {
-        if (rootPane.getCenter() == connLayerPnl) {
-            if (checkInput(jdbcDrvJarTf, true, "Path to JDBC driver is not specified!") &&
-                checkInput(jdbcDrvClsTf, true, "JDBC driver class name is not specified!") &&
-                checkInput(jdbcUrlTf, true, "JDBC URL connection string is not specified!") &&
-                checkInput(userTf, true, "User name is not specified!"))
-                fill();
-        }
-        else
-            generate();
-    }
-
-    /**
-     * Create connection pane with controls.
-     *
-     * @return Pane with connection controls.
-     */
-    private Pane createConnectionPane() {
-        connPnl = Controls.paneEx(10, 10, 0, 10);
-
-        connPnl.addColumn();
-        connPnl.addColumn(100, 100, Double.MAX_VALUE, Priority.ALWAYS);
-        connPnl.addColumn(35, 35, 35, Priority.NEVER);
-
-        connPnl.addRows(9);
-        connPnl.addRow(100, 100, Double.MAX_VALUE, Priority.ALWAYS);
-
-        connPnl.add(Controls.text("This utility is designed to automatically generate configuration XML files and" +
-            " POJO classes from database schema information.", 550), 3);
-
-        connPnl.wrap();
-
-        GridPaneEx presetPnl = Controls.paneEx(0, 0, 0, 0);
-        presetPnl.addColumn(100, 100, Double.MAX_VALUE, Priority.ALWAYS);
-        presetPnl.addColumn();
-
-        rdbmsCb = presetPnl.add(Controls.comboBox("Select database server to get predefined settings", presets));
-
-        presetPnl.add(Controls.button("Save preset", "Save current settings in preferences", new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent evt) {
-                Preset preset = rdbmsCb.getSelectionModel().getSelectedItem();
-
-                savePreset(preset);
-            }
-        }));
-
-        connPnl.add(Controls.label("DB Preset:"));
-        connPnl.add(presetPnl, 2);
-
-        jdbcDrvJarTf = connPnl.addLabeled("Driver JAR:", Controls.textField("Path to driver jar"));
-
-        connPnl.add(Controls.button("...", "Select JDBC driver jar or zip", new EventHandler<ActionEvent>() {
-            /** {@inheritDoc} */
-            @Override public void handle(ActionEvent evt) {
-                FileChooser fc = new FileChooser();
-
-                try {
-                    File jarFolder = new File(jdbcDrvJarTf.getText()).getParentFile();
-
-                    if (jarFolder.exists())
-                        fc.setInitialDirectory(jarFolder);
-                }
-                catch (Exception ignored) {
-                    // No-op.
-                }
-
-                jdbcDrvJarTf.getText();
-
-                fc.getExtensionFilters().addAll(
-                    new FileChooser.ExtensionFilter("JDBC Drivers (*.jar)", "*.jar"),
-                    new FileChooser.ExtensionFilter("ZIP archives (*.zip)", "*.zip"));
-
-                File drvJar = fc.showOpenDialog(owner);
-
-                if (drvJar != null)
-                    jdbcDrvJarTf.setText(drvJar.getAbsolutePath());
-            }
-        }));
-
-        jdbcDrvClsTf = connPnl.addLabeled("JDBC Driver:", Controls.textField("Enter class name for JDBC driver"), 2);
-
-        jdbcUrlTf = connPnl.addLabeled("JDBC URL:", Controls.textField("JDBC URL of the database connection string"), 2);
-
-        rdbmsCb.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Preset>() {
-            @Override public void changed(ObservableValue<? extends Preset> val, Preset oldVal, Preset newVal) {
-                jdbcDrvJarTf.setText(newVal.jar);
-                jdbcDrvClsTf.setText(newVal.drv);
-                jdbcUrlTf.setText(newVal.url);
-                userTf.setText(newVal.user);
-            }
-        });
-
-        userTf = connPnl.addLabeled("User:", Controls.textField("User name"), 2);
-
-        pwdTf = connPnl.addLabeled("Password:", Controls.passwordField("User password"), 2);
-
-        parseCb = connPnl.addLabeled("Parse:", Controls.comboBox("Type of tables to parse", "Tables only", "Tables and Views"), 2);
-
-        GridPaneEx schemaPnl = Controls.paneEx(5, 5, 5, 5);
-        schemaPnl.addColumn(100, 100, Double.MAX_VALUE, Priority.ALWAYS);
-        schemaPnl.addColumn();
-
-        schemaLst = schemaPnl.add(Controls.list("Select schemas to load", new SchemaCell()));
-
-        schemaPnl.wrap();
-
-        schemaPnl.add(Controls.button("Load schemas", "Load schemas for specified database", new EventHandler<ActionEvent>() {
-            /** {@inheritDoc} */
-            @Override public void handle(ActionEvent evt) {
-                loadSchemas();
-            }
-        }));
-
-        TitledPane titledPnl = connPnl.add(Controls.titledPane("Schemas", schemaPnl, false), 3);
-
-        titledPnl.setExpanded(true);
-
-        GridPaneEx.setValignment(titledPnl, VPos.TOP);
-
-        connLayerPnl = Controls.stackPane(connPnl);
-
-        return connLayerPnl;
-    }
-
-    /**
-     * Check if new class name is unique.
-     *
-     * @param pojo Current edited POJO.
-     * @param newVal New value for class name.
-     * @param key {@code true} if key class name is checked.
-     * @return {@code true} if class name is valid.
-     */
-    private boolean checkClassNameUnique(PojoDescriptor pojo, String newVal, boolean key) {
-        for (PojoDescriptor otherPojo : pojos)
-            if (pojo != otherPojo) {
-                String otherKeyCls = otherPojo.keyClassName();
-                String otherValCls = otherPojo.valueClassName();
-
-                if (newVal.equals(otherKeyCls) || newVal.equals(otherValCls)) {
-                    MessageBox.warningDialog(owner, (key ? "Key" : "Value") + " class name must be unique!");
-
-                    return false;
-                }
-            }
-
-        return true;
-    }
-
-    /**
-     * Check if new class name is valid.
-     *
-     * @param pojo Current edited POJO.
-     * @param newVal New value for class name.
-     * @param key {@code true} if key class name is checked.
-     * @return {@code true} if class name is valid.
-     */
-    private boolean checkClassName(PojoDescriptor pojo, String newVal, boolean key) {
-        if (newVal.trim().isEmpty()) {
-            MessageBox.warningDialog(owner, (key ? "Key" : "Value") + " class name must be non empty!");
-
-            return false;
-        }
-
-        if (key) {
-            if (newVal.equals(pojo.valueClassName())) {
-                MessageBox.warningDialog(owner, "Key class name must be different from value class name!");
-
-                return false;
-            }
-        }
-        else if (newVal.equals(pojo.keyClassName())) {
-            MessageBox.warningDialog(owner, "Value class name must be different from key class name!");
-
-            return false;
-        }
-
-        return checkClassNameUnique(pojo, newVal, key);
-    }
-
-    /**
-     * Create generate pane with controls.
-     */
-    private void createGeneratePane() {
-        genPnl = Controls.paneEx(10, 10, 0, 10);
-
-        genPnl.addColumn();
-        genPnl.addColumn(100, 100, Double.MAX_VALUE, Priority.ALWAYS);
-        genPnl.addColumn(35, 35, 35, Priority.NEVER);
-
-        genPnl.addRow(100, 100, Double.MAX_VALUE, Priority.ALWAYS);
-        genPnl.addRows(8);
-
-        TableColumn<PojoDescriptor, Boolean> useCol = Controls.customColumn("Schema / Table", "use",
-            "If checked then this table will be used for XML and POJOs generation", PojoDescriptorCell.cellFactory());
-
-        TableColumn<PojoDescriptor, String> keyClsCol = Controls.textColumn("Key Class Name", "keyClassName", "Key class name",
-            new TextColumnValidator<PojoDescriptor>() {
-                @Override public boolean valid(PojoDescriptor rowVal, String newVal) {
-                    boolean valid = checkClassName(rowVal, newVal, true);
-
-                    if (valid)
-                        rowVal.keyClassName(newVal);
-
-                    return valid;
-                }
-            });
-
-        TableColumn<PojoDescriptor, String> valClsCol = Controls.textColumn("Value Class Name", "valueClassName",
-            "Value class name", new TextColumnValidator<PojoDescriptor>() {
-                @Override public boolean valid(PojoDescriptor rowVal, String newVal) {
-                    boolean valid = checkClassName(rowVal, newVal, false);
-
-                    if (valid)
-                        rowVal.valueClassName(newVal);
-
-                    return valid;
-                }
-            });
-
-        pojosTbl = Controls.tableView("Tables not found in database", useCol, keyClsCol, valClsCol);
-
-        TableColumn<PojoField, Boolean> useFldCol = Controls.customColumn("Use", "use",
-            "Check to use this field for XML and POJO generation\n" +
-            "Note that NOT NULL columns cannot be unchecked", PojoFieldUseCell.cellFactory());
-        useFldCol.setMinWidth(50);
-        useFldCol.setMaxWidth(50);
-
-        TableColumn<PojoField, Boolean> keyCol = Controls.booleanColumn("Key", "key",
-            "Check to include this field into key object");
-
-        TableColumn<PojoField, Boolean> akCol = Controls.booleanColumn("AK", "affinityKey",
-            "Check to annotate key filed with @AffinityKeyMapped annotation in generated POJO class\n" +
-            "Note that a class can have only ONE key field annotated with @AffinityKeyMapped annotation");
-
-        TableColumn<PojoField, String> dbNameCol = Controls.tableColumn("DB Name", "dbName", "Field name in database");
-
-        TableColumn<PojoField, String> dbTypeNameCol = Controls.tableColumn("DB Type", "dbTypeName", "Field type in database");
-
-        TableColumn<PojoField, String> javaNameCol = Controls.textColumn("Java Name", "javaName", "Field name in POJO class",
-            new TextColumnValidator<PojoField>() {
-                @Override public boolean valid(PojoField rowVal, String newVal) {
-                    if (newVal.trim().isEmpty()) {
-                        MessageBox.warningDialog(owner, "Java name must be non empty!");
-
-                        return false;
-                    }
-
-                    for (PojoField field : curPojo.fields())
-                        if (rowVal != field && newVal.equals(field.javaName())) {
-                            MessageBox.warningDialog(owner, "Java name must be unique!");
-
-                            return false;
-                        }
-
-                    rowVal.javaName(newVal);
-
-                    return true;
-                }
-            });
-
-        TableColumn<PojoField, String> javaTypeNameCol = Controls.customColumn("Java Type", "javaTypeName",
-            "Field java type in POJO class", JavaTypeCell.cellFactory());
-
-        fieldsTbl = Controls.tableView("Select table to see table columns",
-            useFldCol, keyCol, akCol, dbNameCol, dbTypeNameCol, javaNameCol, javaTypeNameCol);
-
-        genPnl.add(Controls.splitPane(pojosTbl, fieldsTbl, 0.6), 3);
-
-        final GridPaneEx keyValPnl = Controls.paneEx(0, 0, 0, 0);
-        keyValPnl.addColumn(100, 100, Double.MAX_VALUE, Priority.ALWAYS);
-        keyValPnl.addColumn();
-        keyValPnl.addColumn(100, 100, Double.MAX_VALUE, Priority.ALWAYS);
-        keyValPnl.addColumn();
-
-        pkgTf = genPnl.addLabeled("Package:", Controls.textField("Package that will be used for POJOs generation"), 2);
-
-        outFolderTf = genPnl.addLabeled("Output Folder:", Controls.textField("Output folder for XML and POJOs files"));
-
-        genPnl.add(Controls.button("...", "Select output folder", new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent evt) {
-                DirectoryChooser dc = new DirectoryChooser();
-
-                try {
-                    File outFolder = new File(outFolderTf.getText());
-
-                    if (outFolder.exists())
-                        dc.setInitialDirectory(outFolder);
-                }
-                catch (Exception ignored) {
-                    // No-op.
-                }
-
-                File folder = dc.showDialog(owner);
-
-                if (folder != null)
-                    outFolderTf.setText(folder.getAbsolutePath());
-            }
-        }));
-
-        pojoIncludeKeysCh = genPnl.add(Controls.checkBox("Include key fields into value POJOs",
-            "If selected then include key fields into value object", true), 3);
-
-        pojoConstructorCh = genPnl.add(Controls.checkBox("Generate constructors for POJOs",
-            "If selected then generate empty and full constructors for POJOs", false), 3);
-
-        generateAliasesCh = genPnl.add(Controls.checkBox("Generate aliases for SQL fields",
-            "If selected then generate aliases for SQL fields with db names", true), 3);
-
-        xmlSingleFileCh = genPnl.add(Controls.checkBox("Write all configurations to a single XML file",
-            "If selected then all configurations will be saved into the file 'ignite-type-metadata.xml'", true), 3);
-
-        GridPaneEx regexPnl = Controls.paneEx(5, 5, 5, 5);
-        regexPnl.addColumn();
-        regexPnl.addColumn(100, 100, Double.MAX_VALUE, Priority.ALWAYS);
-        regexPnl.addColumn();
-        regexPnl.addColumn(100, 100, Double.MAX_VALUE, Priority.ALWAYS);
-
-        regexTf = regexPnl.addLabeled("  Regexp:", Controls.textField("Regular expression. For example: (\\w+)"));
-
-        replaceTf = regexPnl.addLabeled("  Replace with:", Controls.textField("Replace text. For example: $1_SomeText"));
-
-        final ComboBox<String> replaceCb = regexPnl.addLabeled("  Replace:", Controls.comboBox("Replacement target",
-            "Key class names", "Value class names", "Java names"));
-
-        regexPnl.add(Controls.buttonsPane(Pos.CENTER_LEFT, false,
-            Controls.button("Rename Selected", "Replaces each substring of this string that matches the given regular expression" +
-                    " with the given replacement",
-                new EventHandler<ActionEvent>() {
-                    @Override public void handle(ActionEvent evt) {
-                        if (!checkInput(regexTf, false, "Regular expression should not be empty!"))
-                            return;
-
-                        String sel = replaceCb.getSelectionModel().getSelectedItem();
-
-                        boolean isFields = "Java names".equals(sel) && curTbl == fieldsTbl;
-
-                        String src = isFields ? "fields" : "tables";
-
-                        String target = "\"" + sel + "\"";
-
-                        Collection<PojoDescriptor> selPojos = pojosTbl.getSelectionModel().getSelectedItems();
-
-                        Collection<PojoField> selFields = fieldsTbl.getSelectionModel().getSelectedItems();
-
-                        boolean isEmpty = isFields ? selFields.isEmpty() : selPojos.isEmpty();
-
-                        if (isEmpty) {
-                            MessageBox.warningDialog(owner, "Please select " + src + " to rename " + target + "!");
-
-                            return;
-                        }
-
-                        if (!MessageBox.confirmDialog(owner, "Are you sure you want to rename " + target +
-                            " for all selected " + src + "?"))
-                            return;
-
-                        String regex = regexTf.getText();
-
-                        String replace = replaceTf.getText();
-
-                        try {
-                            switch (replaceCb.getSelectionModel().getSelectedIndex()) {
-                                case 0:
-                                    renameKeyClassNames(selPojos, regex, replace);
-                                    break;
-
-                                case 1:
-                                    renameValueClassNames(selPojos, regex, replace);
-                                    break;
-
-                                default:
-                                    if (isFields)
-                                        renameFieldsJavaNames(selFields, regex, replace);
-                                    else
-                                        renamePojosJavaNames(selPojos, regex, replace);
-                            }
-                        }
-                        catch (Exception e) {
-                            MessageBox.errorDialog(owner, "Failed to rename " + target + "!", e);
-                        }
-                    }
-                }),
-            Controls.button("Reset Selected", "Revert changes for selected items to initial auto-generated values",
-                new EventHandler<ActionEvent>() {
-                    @Override public void handle(ActionEvent evt) {
-                        String sel = replaceCb.getSelectionModel().getSelectedItem();
-
-                        boolean isFields = "Java names".equals(sel) && curTbl == fieldsTbl;
-
-                        String src = isFields ? "fields" : "tables";
-
-                        String target = "\"" + sel + "\"";
-
-                        Collection<PojoDescriptor> selPojos = pojosTbl.getSelectionModel().getSelectedItems();
-
-                        Collection<PojoField> selFields = fieldsTbl.getSelectionModel().getSelectedItems();
-
-                        boolean isEmpty = isFields ? selFields.isEmpty() : selPojos.isEmpty();
-
-                        if (isEmpty) {
-                            MessageBox.warningDialog(owner, "Please select " + src + "to revert " + target + "!");
-
-                            return;
-                        }
-
-                        if (!MessageBox.confirmDialog(owner,
-                            "Are you sure you want to revert " + target + " for all selected " + src + "?"))
-                            return;
-
-                        switch (replaceCb.getSelectionModel().getSelectedIndex()) {
-                            case 0:
-                                revertKeyClassNames(selPojos);
-                                break;
-
-                            case 1:
-                                revertValueClassNames(selPojos);
-                                break;
-
-                            default:
-                                if (isFields)
-                                    revertFieldsJavaNames(selFields);
-                                else
-                                    revertPojosJavaNames(selPojos);
-                        }
-                    }
-                })
-        ), 2).setPadding(new Insets(0, 0, 0, 10));
-
-        pojosTbl.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<PojoDescriptor>() {
-            @Override public void changed(ObservableValue<? extends PojoDescriptor> val,
-                PojoDescriptor oldVal, PojoDescriptor newItem) {
-                if (newItem != null && newItem.parent() != null) {
-                    curPojo = newItem;
-
-                    fieldsTbl.setItems(curPojo.fields());
-                    fieldsTbl.getSelectionModel().clearSelection();
-
-                    keyValPnl.setDisable(false);
-                }
-                else {
-                    curPojo = null;
-                    fieldsTbl.setItems(NO_FIELDS);
-
-                    keyValPnl.setDisable(true);
-                }
-            }
-        });
-
-        pojosTbl.focusedProperty().addListener(new ChangeListener<Boolean>() {
-            @Override public void changed(ObservableValue<? extends Boolean> val, Boolean oldVal, Boolean newVal) {
-                if (newVal)
-                    curTbl = pojosTbl;
-            }
-        });
-
-        fieldsTbl.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
-            @Override public void changed(ObservableValue<? extends Number> val, Number oldVal, Number newVal) {
-                if (curPojo != null) {
-                    TableView.TableViewSelectionModel<PojoDescriptor> selMdl = pojosTbl.getSelectionModel();
-
-                    List<Integer> selIndices = new ArrayList<>(selMdl.getSelectedIndices());
-
-                    if (selIndices.size() > 1) {
-                        for (Integer idx : selIndices) {
-                            if (pojos.get(idx) != curPojo)
-                                selMdl.clearSelection(idx);
-                        }
-                    }
-                }
-            }
-        });
-
-        fieldsTbl.focusedProperty().addListener(new ChangeListener<Boolean>() {
-            @Override public void changed(ObservableValue<? extends Boolean> val, Boolean oldVal, Boolean newVal) {
-                if (newVal)
-                    curTbl = fieldsTbl;
-            }
-        });
-
-        genPnl.add(Controls.titledPane("Rename \"Key class name\", \"Value class name\" or  \"Java name\" for selected tables",
-            regexPnl, true), 3);
-
-        genLayerPnl = Controls.stackPane(genPnl);
-    }
-
-    /**
-     * Rename key class name for selected POJOs.
-     *
-     * @param selPojos Selected POJOs to rename.
-     * @param regex Regex to search.
-     * @param replace Text for replacement.
-     */
-    private void renameKeyClassNames(Collection<PojoDescriptor> selPojos, String regex, String replace) {
-        for (PojoDescriptor pojo : selPojos)
-            pojo.keyClassName(pojo.keyClassName().replaceAll(regex, replace));
-    }
-
-    /**
-     * Rename value class name for selected POJOs.
-     *
-     * @param selPojos Selected POJOs to rename.
-     * @param regex Regex to search.
-     * @param replace Text for replacement.
-     */
-    private void renameValueClassNames(Collection<PojoDescriptor> selPojos, String regex, String replace) {
-        for (PojoDescriptor pojo : selPojos)
-            pojo.valueClassName(pojo.valueClassName().replaceAll(regex, replace));
-    }
-
-    /**
-     * Rename fields java name for selected POJOs.
-     *
-     * @param selPojos Selected POJOs to rename.
-     * @param regex Regex to search.
-     * @param replace Text for replacement.
-     */
-    private void renamePojosJavaNames(Collection<PojoDescriptor> selPojos, String regex, String replace) {
-        for (PojoDescriptor pojo : selPojos)
-            for (PojoField field : pojo.fields())
-                field.javaName(field.javaName().replaceAll(regex, replace));
-    }
-
-    /**
-     * Rename fields java name for current POJO.
-     *
-     * @param selFields Selected fields for current POJO to rename.
-     * @param regex Regex to search.
-     * @param replace Text for replacement.
-     */
-    private void renameFieldsJavaNames(Collection<PojoField> selFields, String regex, String replace) {
-        for (PojoField field : selFields)
-            field.javaName(field.javaName().replaceAll(regex, replace));
-    }
-
-    /**
-     * Revert key class name for selected POJOs to initial value.
-     *
-     * @param selPojos Selected POJOs to revert.
-     */
-    private void revertKeyClassNames(Collection<PojoDescriptor> selPojos) {
-        for (PojoDescriptor pojo : selPojos)
-            pojo.revertKeyClassName();
-    }
-
-    /**
-     * Revert value class name for selected POJOs to initial value.
-     *
-     * @param selPojos Selected POJOs to revert.
-     */
-    private void revertValueClassNames(Collection<PojoDescriptor> selPojos) {
-        for (PojoDescriptor pojo : selPojos)
-            pojo.revertValueClassName();
-    }
-
-    /**
-     * Revert fields java name for selected POJOs to initial value.
-     *
-     * @param selPojos Selected POJOs to revert.
-     */
-    private void revertPojosJavaNames(Collection<PojoDescriptor> selPojos) {
-        for (PojoDescriptor pojo : selPojos)
-            pojo.revertJavaNames();
-    }
-
-    /**
-     * Revert fields java name for current POJO to initial value.
-     *
-     * @param selFields Selected POJO fields to revert.
-     */
-    private void revertFieldsJavaNames(Collection<PojoField> selFields) {
-        for (PojoField field : selFields)
-            field.resetJavaName();
-    }
-
-    /**
-     * @return POJOs checked in table-tree-view.
-     */
-    private Collection<PojoDescriptor> checkedPojos() {
-        Collection<PojoDescriptor> res = new ArrayList<>();
-
-        for (PojoDescriptor pojo : pojos)
-            if (pojo.checked())
-                res.add(pojo);
-
-        return res;
-    }
-
-    /**
-     * Gets string property.
-     *
-     * @param key Property key.
-     * @param dflt Default value.
-     * @return Property value as string.
-     */
-    private String getStringProp(String key, String dflt) {
-        String val = prefs.getProperty(key);
-
-        if (val != null)
-            return val;
-
-        return dflt;
-    }
-
-    /**
-     * Sets string property.
-     *
-     * @param key Property key.
-     * @param val Value to set.
-     */
-    private void setStringProp(String key, String val) {
-        prefs.put(key, val);
-    }
-
-    /**
-     * Gets int property.
-     *
-     * @param key Property key.
-     * @param dflt Default value.
-     * @return Property value as int.
-     */
-    private int getIntProp(String key, int dflt) {
-        String val = prefs.getProperty(key);
-
-        if (val != null)
-            try {
-                return Integer.parseInt(val);
-            }
-            catch (NumberFormatException ignored) {
-                return dflt;
-            }
-
-        return dflt;
-    }
-
-    /**
-     * Sets int property.
-     *
-     * @param key Property key.
-     * @param val Value to set.
-     */
-    private void setIntProp(String key, int val) {
-        prefs.put(key, String.valueOf(val));
-    }
-
-    /**
-     * Gets boolean property.
-     *
-     * @param key Property key.
-     * @param dflt Default value.
-     * @return Property value as boolean.
-     */
-    private boolean getBoolProp(String key, boolean dflt) {
-        String val = prefs.getProperty(key);
-
-        if (val != null)
-            return Boolean.parseBoolean(val);
-
-        return dflt;
-    }
-
-    /**
-     * Sets boolean property.
-     *
-     * @param key Property key.
-     * @param val Value to set.
-     */
-    private void setBoolProp(String key, boolean val) {
-        prefs.put(key, String.valueOf(val));
-    }
-
-    /**
-     * Resolve path.
-     *
-     * @param key Preferences key.
-     * @param dflt Default value.
-     * @return String with full file path or default value.
-     */
-    private String resolveFilePath(String key, String dflt) {
-        String path = prefs.getProperty(key);
-
-        if (path != null) {
-            File file = U.resolveIgnitePath(path);
-
-            if (file != null)
-                return file.getAbsolutePath();
-        }
-
-        return dflt;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void start(Stage primaryStage) {
-        owner = primaryStage;
-
-        if (prefsFile.exists())
-            try (BufferedInputStream in = new BufferedInputStream(new FileInputStream(prefsFile))) {
-                prefs.load(in);
-            }
-            catch (IOException e) {
-                log.log(Level.SEVERE, "Failed to load preferences. Default preferences will be used", e);
-            }
-
-        // Load custom preferences.
-        List<String> params = getParameters().getRaw();
-
-        if (!params.isEmpty()) {
-            String customPrefsFileName = params.get(0);
-
-            if (customPrefsFileName.isEmpty())
-                log.log(Level.WARNING, "Path to file with custom preferences is not specified.");
-            else {
-                File customPrefsFile = U.resolveIgnitePath(customPrefsFileName);
-
-                if (customPrefsFile == null)
-                    log.log(Level.WARNING, "Failed to resolve path to file with custom preferences: " +
-                        customPrefsFileName);
-                else {
-                    Properties customPrefs = new Properties();
-
-                    try (BufferedInputStream in = new BufferedInputStream(new FileInputStream(customPrefsFile))) {
-                        customPrefs.load(in);
-                    }
-                    catch (IOException e) {
-                        log.log(Level.SEVERE, "Failed to load custom preferences.", e);
-                    }
-
-                    prefs.putAll(customPrefs);
-                }
-            }
-        }
-
-        // Restore presets.
-        for (Preset preset : presets) {
-            String key = "presets." + preset.pref + ".";
-
-            preset.jar = getStringProp(key + "jar", preset.jar);
-            preset.drv = getStringProp(key + "drv", preset.drv);
-            preset.url = getStringProp(key + "url", preset.url);
-            preset.user = getStringProp(key + "user", preset.user);
-        }
-
-        primaryStage.setTitle("Apache Ignite Auto Schema Import Utility");
-
-        primaryStage.getIcons().addAll(
-            Controls.image("ignite", 16),
-            Controls.image("ignite", 24),
-            Controls.image("ignite", 32),
-            Controls.image("ignite", 48),
-            Controls.image("ignite", 64),
-            Controls.image("ignite", 128));
-
-        pi = Controls.progressIndicator(50);
-
-        createGeneratePane();
-
-        hdrPane = createHeaderPane();
-        rootPane = Controls.borderPane(hdrPane, createConnectionPane(), createButtonsPane(), null, null);
-
-        primaryStage.setScene(Controls.scene(rootPane));
-
-        primaryStage.setWidth(650);
-        primaryStage.setMinWidth(650);
-
-        primaryStage.setHeight(650);
-        primaryStage.setMinHeight(650);
-
-        prev();
-
-        // Restore window pos and size.
-        if (prefs.getProperty(PREF_WINDOW_X) != null) {
-            int x = getIntProp(PREF_WINDOW_X, 100);
-            int y = getIntProp(PREF_WINDOW_Y, 100);
-            int w = getIntProp(PREF_WINDOW_WIDTH, 650);
-            int h = getIntProp(PREF_WINDOW_HEIGHT, 650);
-
-            // Ensure that window fit any available screen.
-            if (!Screen.getScreensForRectangle(x, y, w, h).isEmpty()) {
-                primaryStage.setX(x);
-                primaryStage.setY(y);
-
-                primaryStage.setWidth(w);
-                primaryStage.setHeight(h);
-            }
-        }
-        else
-            primaryStage.centerOnScreen();
-
-        String userHome = System.getProperty("user.home").replace('\\', '/');
-
-        // Restore connection pane settings.
-        rdbmsCb.getSelectionModel().select(getIntProp(PREF_JDBC_DB_PRESET, 0));
-        jdbcDrvJarTf.setText(resolveFilePath(PREF_JDBC_DRIVER_JAR, "h2.jar"));
-        jdbcDrvClsTf.setText(getStringProp(PREF_JDBC_DRIVER_CLASS, "org.h2.Driver"));
-        jdbcUrlTf.setText(getStringProp(PREF_JDBC_URL, "jdbc:h2:" + userHome + "/ignite-schema-import/db"));
-        userTf.setText(getStringProp(PREF_JDBC_USER, "sa"));
-
-        // Restore generation pane settings.
-        outFolderTf.setText(resolveFilePath(PREF_OUT_FOLDER, userHome + "/ignite-schema-import/out"));
-
-        pkgTf.setText(getStringProp(PREF_POJO_PACKAGE, "org.apache.ignite"));
-        pojoIncludeKeysCh.setSelected(getBoolProp(PREF_POJO_INCLUDE, true));
-        pojoConstructorCh.setSelected(getBoolProp(PREF_POJO_CONSTRUCTOR, false));
-        generateAliasesCh.setSelected(getBoolProp(PREF_GENERATE_ALIASES, true));
-
-        xmlSingleFileCh.setSelected(getBoolProp(PREF_XML_SINGLE, true));
-
-        regexTf.setText(getStringProp(PREF_NAMING_PATTERN, "(\\w+)"));
-        replaceTf.setText(getStringProp(PREF_NAMING_REPLACE, "$1_SomeText"));
-
-        primaryStage.show();
-    }
-
-    /**
-     * Save preset.
-     *
-     * @param preset Preset to save.
-     */
-    private void savePreset(Preset preset) {
-        String key = "presets." + preset.pref + ".";
-
-        preset.jar = jdbcDrvJarTf.getText();
-        setStringProp(key + "jar", preset.jar);
-
-        preset.drv = jdbcDrvClsTf.getText();
-        setStringProp(key + "drv", preset.drv);
-
-        preset.url = jdbcUrlTf.getText();
-        setStringProp(key + "url", preset.url);
-
-        preset.user = userTf.getText();
-        setStringProp(key + "user", preset.user);
-
-        savePreferences();
-    }
-
-    /**
-     * Save user preferences.
-     */
-    private void savePreferences() {
-        try (FileOutputStream out = new FileOutputStream(prefsFile)) {
-            prefs.store(out, "Apache Ignite Schema Import Utility");
-        }
-        catch (IOException e) {
-            MessageBox.errorDialog(owner, "Failed to save preferences!", e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public void stop() throws Exception {
-        // Save window pos and size.
-        setIntProp(PREF_WINDOW_X, (int)owner.getX());
-        setIntProp(PREF_WINDOW_Y, (int)owner.getY());
-        setIntProp(PREF_WINDOW_WIDTH, (int)owner.getWidth());
-        setIntProp(PREF_WINDOW_HEIGHT, (int)owner.getHeight());
-
-        // Save connection pane settings.
-        setIntProp(PREF_JDBC_DB_PRESET, rdbmsCb.getSelectionModel().getSelectedIndex());
-        setStringProp(PREF_JDBC_DRIVER_JAR, jdbcDrvJarTf.getText());
-        setStringProp(PREF_JDBC_DRIVER_CLASS, jdbcDrvClsTf.getText());
-        setStringProp(PREF_JDBC_URL, jdbcUrlTf.getText());
-        setStringProp(PREF_JDBC_USER, userTf.getText());
-
-        // Save generation pane settings.
-        setStringProp(PREF_OUT_FOLDER, outFolderTf.getText());
-
-        setStringProp(PREF_POJO_PACKAGE, pkgTf.getText());
-        setBoolProp(PREF_POJO_INCLUDE, pojoIncludeKeysCh.isSelected());
-        setBoolProp(PREF_POJO_CONSTRUCTOR, pojoConstructorCh.isSelected());
-        setBoolProp(PREF_GENERATE_ALIASES, generateAliasesCh.isSelected());
-
-        setBoolProp(PREF_XML_SINGLE, xmlSingleFileCh.isSelected());
-
-        setStringProp(PREF_NAMING_PATTERN, regexTf.getText());
-        setStringProp(PREF_NAMING_REPLACE, replaceTf.getText());
-
-        savePreferences();
-    }
-
-    /** Presets for database settings. */
-    private static class Preset {
-        /** Name in preferences. */
-        private String pref;
-
-        /** RDBMS name to show on screen. */
-        private String name;
-
-        /** Path to JDBC driver jar. */
-        private String jar;
-
-        /** JDBC driver class name. */
-        private String drv;
-
-        /** JDBC URL. */
-        private String url;
-
-        /** User name. */
-        private String user;
-
-        /**
-         * Preset constructor.
-         *
-         * @param pref Name in preferences.
-         * @param name RDBMS name to show on screen.
-         * @param jar Path to JDBC driver jar..
-         * @param drv JDBC driver class name.
-         * @param url JDBC URL.
-         * @param user User name.
-         */
-        Preset(String pref, String name, String jar, String drv, String url, String user) {
-            this.pref = pref;
-            this.name = name;
-            this.jar = jar;
-            this.drv = drv;
-            this.url = url;
-            this.user = user;
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return name;
-        }
-    }
-
-    /**
-     * Special table cell to select possible java type conversions.
-     */
-    private static class JavaTypeCell extends TableCell<PojoField, String> {
-        /** Combo box. */
-        private final ComboBox<String> comboBox;
-
-        /**
-         * Creates a ComboBox cell factory for use in TableColumn controls.
-         *
-         * @return Cell factory for cell with java types combobox.
-         */
-        public static Callback<TableColumn<PojoField, String>, TableCell<PojoField, String>> cellFactory() {
-            return new Callback<TableColumn<PojoField, String>, TableCell<PojoField, String>>() {
-                @Override public TableCell<PojoField, String> call(TableColumn<PojoField, String> col) {
-                    return new JavaTypeCell();
-                }
-            };
-        }
-
-        /**
-         * Default constructor.
-         */
-        private JavaTypeCell() {
-            comboBox = new ComboBox<>(FXCollections.<String>emptyObservableList());
-
-            comboBox.valueProperty().addListener(new ChangeListener<String>() {
-                @Override public void changed(ObservableValue<? extends String> val, String oldVal, String newVal) {
-                    if (isEditing())
-                        commitEdit(newVal);
-                }
-            });
-
-            getStyleClass().add("combo-box-table-cell");
-        }
-
-        /** {@inheritDoc} */
-        @Override public void startEdit() {
-            if (comboBox.getItems().size() > 1) {
-                comboBox.getSelectionModel().select(getItem());
-
-                super.startEdit();
-
-                setText(null);
-                setGraphic(comboBox);
-            }
-        }
-
-        /** {@inheritDoc} */
-        @Override public void cancelEdit() {
-            super.cancelEdit();
-
-            setText(getItem());
-
-            setGraphic(null);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void updateItem(String item, boolean empty) {
-            super.updateItem(item, empty);
-
-            setGraphic(null);
-            setText(null);
-
-            if (!empty) {
-                setText(item);
-
-                TableRow row = getTableRow();
-
-                if (row != null) {
-                    PojoField pojo = (PojoField)row.getItem();
-
-                    if (pojo != null) {
-                        comboBox.setItems(pojo.conversions());
-                        comboBox.getSelectionModel().select(pojo.javaTypeName());
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Special list view cell to select loaded schemas.
-     */
-    private static class SchemaCell implements Callback<SchemaDescriptor, ObservableValue<Boolean>> {
-        /** {@inheritDoc} */
-        @Override public ObservableValue<Boolean> call(SchemaDescriptor item) {
-            return item.selected();
-        }
-    }
-
-    /**
-     * Special table cell to select schema or table.
-     */
-    private static class PojoDescriptorCell extends TableCell<PojoDescriptor, Boolean> {
-        /** Previous POJO bound to cell. */
-        private PojoDescriptor prevPojo;
-
-        /** Previous cell graphic. */
-        private Pane prevGraphic;
-
-        /**
-         * Creates a ComboBox cell factory for use in TableColumn controls.
-         *
-         * @return Cell factory for schema / table selection.
-         */
-        public static Callback<TableColumn<PojoDescriptor, Boolean>, TableCell<PojoDescriptor, Boolean>> cellFactory() {
-            return new Callback<TableColumn<PojoDescriptor, Boolean>, TableCell<PojoDescriptor, Boolean>>() {
-                @Override public TableCell<PojoDescriptor, Boolean> call(TableColumn<PojoDescriptor, Boolean> col) {
-                    return new PojoDescriptorCell();
-                }
-            };
-        }
-
-        /** {@inheritDoc} */
-        @Override public void updateItem(Boolean item, boolean empty) {
-            super.updateItem(item, empty);
-
-            setGraphic(null);
-
-            if (!empty) {
-                TableRow row = getTableRow();
-
-                if (row != null) {
-                    final PojoDescriptor pojo = (PojoDescriptor)row.getItem();
-
-                    if (pojo != null) {
-                        if (prevGraphic == null || pojo != prevPojo) {
-                            boolean isTbl = pojo.parent() != null;
-
-                            CheckBox ch = new CheckBox();
-                            ch.setAllowIndeterminate(false);
-                            ch.indeterminateProperty().bindBidirectional(pojo.indeterminate());
-                            ch.selectedProperty().bindBidirectional(pojo.useProperty());
-
-                            Label lb = new Label(isTbl ? pojo.table() : pojo.schema());
-
-                            Pane pnl = new HBox(5);
-                            pnl.setPadding(new Insets(0, 0, 0, isTbl ? 25 : 5));
-                            pnl.getChildren().addAll(ch, lb);
-
-                            prevPojo = pojo;
-                            prevGraphic = pnl;
-                        }
-
-                        setGraphic(prevGraphic);
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Special table cell to select &quot;used&quot; fields for code generation.
-     */
-    private static class PojoFieldUseCell extends TableCell<PojoField, Boolean> {
-        /** Previous POJO field bound to cell. */
-        private PojoField prevField;
-
-        /** Previous cell graphic. */
-        private CheckBox prevGraphic;
-
-        /**
-         * Creates a ComboBox cell factory for use in TableColumn controls.
-         *
-         * @return Cell factory for used fields selection.
-         */
-        public static Callback<TableColumn<PojoField, Boolean>, TableCell<PojoField, Boolean>> cellFactory() {
-            return new Callback<TableColumn<PojoField, Boolean>, TableCell<PojoField, Boolean>>() {
-                @Override public TableCell<PojoField, Boolean> call(TableColumn<PojoField, Boolean> col) {
-                    return new PojoFieldUseCell();
-                }
-            };
-        }
-
-        /** {@inheritDoc} */
-        @Override public void updateItem(Boolean item, boolean empty) {
-            super.updateItem(item, empty);
-
-            setGraphic(null);
-
-            if (!empty) {
-                TableRow row = getTableRow();
-
-                if (row != null) {
-                    final PojoField field = (PojoField)row.getItem();
-
-                    if (field != null) {
-                        if (prevGraphic == null || prevField != field) {
-                            setAlignment(Pos.CENTER);
-
-                            CheckBox ch = new CheckBox();
-                            ch.setDisable(!field.nullable());
-                            ch.selectedProperty().bindBidirectional(field.useProperty());
-
-                            prevField = field;
-                            prevGraphic = ch;
-                        }
-
-                        setGraphic(prevGraphic);
-                    }
-                }
-            }
-        }
-    }
-}


[32/50] [abbrv] ignite git commit: IGNITE-4349 Discontinue the schema-import utility.

Posted by dm...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/TextColumnValidator.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/TextColumnValidator.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/TextColumnValidator.java
deleted file mode 100644
index 6ec044d..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/TextColumnValidator.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.ui;
-
-/**
- * Validator for editable table view text column.
- */
-public interface TextColumnValidator<T> {
-    /**
-     * Validate new value of text.
-     *
-     * @param rowVal Row value.
-     * @param newVal New value of text.
-     * @return {@code true} if text is valid.
-     */
-    public boolean valid(T rowVal, String newVal);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/AbstractSchemaImportTest.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/AbstractSchemaImportTest.java b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/AbstractSchemaImportTest.java
deleted file mode 100644
index 8cb1196..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/AbstractSchemaImportTest.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.test;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.List;
-import junit.framework.TestCase;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.schema.model.PojoDescriptor;
-import org.apache.ignite.schema.parser.DatabaseMetadataParser;
-import org.apache.ignite.schema.ui.ConfirmCallable;
-import org.apache.ignite.schema.ui.MessageBox;
-
-/**
- * Base functional for Ignite Schema Import utility tests.
- */
-public abstract class AbstractSchemaImportTest extends TestCase {
-    /** DB connection URL. */
-    private static final String CONN_URL = "jdbc:h2:mem:autoCacheStore;DB_CLOSE_DELAY=-1";
-
-    /** Path to temp folder where generated POJOs will be saved. */
-    protected static final String OUT_DIR_PATH = System.getProperty("java.io.tmpdir") + "/ignite-schema-import/out";
-
-    /** Auto confirmation of file conflicts. */
-    protected static final ConfirmCallable YES_TO_ALL = new ConfirmCallable(null, "") {
-        @Override public MessageBox.Result confirm(String msg) {
-            return MessageBox.Result.YES_TO_ALL;
-        }
-    };
-
-    /** List of ALL object parsed from test database. */
-    protected List<PojoDescriptor> all;
-
-    /** List of ONLY POJO descriptors. */
-    protected List<PojoDescriptor> pojos;
-
-    /** {@inheritDoc} */
-    @Override public void setUp() throws Exception {
-        Class.forName("org.h2.Driver");
-
-        Connection conn = DriverManager.getConnection(CONN_URL, "sa", "");
-
-        Statement stmt = conn.createStatement();
-
-        stmt.executeUpdate("CREATE TABLE IF NOT EXISTS PRIMITIVES (pk INTEGER PRIMARY KEY, " +
-            " boolCol BOOLEAN NOT NULL," +
-            " byteCol TINYINT NOT NULL," +
-            " shortCol SMALLINT NOT NULL," +
-            " intCol INTEGER NOT NULL, " +
-            " longCol BIGINT NOT NULL," +
-            " floatCol REAL NOT NULL," +
-            " doubleCol DOUBLE NOT NULL," +
-            " doubleCol2 DOUBLE NOT NULL, " +
-            " bigDecimalCol DECIMAL(10, 0)," +
-            " strCol VARCHAR(10)," +
-            " dateCol DATE," +
-            " timeCol TIME," +
-            " tsCol TIMESTAMP, " +
-            " arrCol BINARY(10)," +
-            " FIELD_WITH_ALIAS VARCHAR(10))");
-
-        stmt.executeUpdate("CREATE TABLE IF NOT EXISTS OBJECTS (pk INTEGER PRIMARY KEY, " +
-            " boolCol BOOLEAN," +
-            " byteCol TINYINT," +
-            " shortCol SMALLINT," +
-            " intCol INTEGER," +
-            " longCol BIGINT," +
-            " floatCol REAL," +
-            " doubleCol DOUBLE," +
-            " doubleCol2 DOUBLE," +
-            " bigDecimalCol DECIMAL(10, 0)," +
-            " strCol VARCHAR(10), " +
-            " dateCol DATE," +
-            " timeCol TIME," +
-            " tsCol TIMESTAMP," +
-            " arrCol BINARY(10)," +
-            " FIELD_WITH_ALIAS VARCHAR(10))");
-
-        stmt.executeUpdate("CREATE INDEX IF NOT EXISTS IDX_1 ON OBJECTS (INTCOL ASC, LONGCOL ASC)");
-
-        stmt.executeUpdate("CREATE INDEX IF NOT EXISTS IDX_2 ON OBJECTS (INTCOL ASC, LONGCOL DESC)");
-
-        stmt.executeUpdate("CREATE SCHEMA IF NOT EXISTS TESTSCHEMA");
-
-        stmt.executeUpdate("CREATE TABLE IF NOT EXISTS TESTSCHEMA.TST(pk INTEGER PRIMARY KEY, " +
-            " boolCol BOOLEAN NOT NULL," +
-            " byteCol TINYINT NOT NULL," +
-            " shortCol SMALLINT NOT NULL," +
-            " intCol INTEGER NOT NULL, " +
-            " longCol BIGINT NOT NULL," +
-            " floatCol REAL NOT NULL," +
-            " doubleCol DOUBLE NOT NULL," +
-            " doubleCol2 DOUBLE NOT NULL, " +
-            " bigDecimalCol DECIMAL(10, 0)," +
-            " strCol VARCHAR(10)," +
-            " dateCol DATE," +
-            " timeCol TIME," +
-            " tsCol TIMESTAMP, " +
-            " arrCol BINARY(10)," +
-            " FIELD_WITH_ALIAS VARCHAR(10))");
-
-        stmt.executeUpdate("CREATE INDEX IF NOT EXISTS IDX_3 ON TESTSCHEMA.TST (INTCOL ASC, LONGCOL ASC)");
-
-        stmt.executeUpdate("CREATE INDEX IF NOT EXISTS IDX_4 ON TESTSCHEMA.TST (INTCOL ASC, LONGCOL DESC)");
-
-        conn.commit();
-
-        U.closeQuiet(stmt);
-
-        List<String> schemas = new ArrayList<>();
-
-        all = DatabaseMetadataParser.parse(conn, schemas, false);
-
-        pojos = new ArrayList<>();
-
-        for (PojoDescriptor pojo : all)
-            if (pojo.parent() != null)
-                pojos.add(pojo);
-
-        U.closeQuiet(conn);
-    }
-
-    /**
-     * Compare files by lines.
-     *
-     * @param exp Stream to read of expected file from test resources.
-     * @param generated Generated file instance.
-     * @param excludePtrn Marker string to exclude lines from comparing.
-     * @return true if generated file correspond to expected.
-     */
-    protected boolean compareFilesInt(InputStream exp, File generated, String excludePtrn) {
-        try (BufferedReader baseReader = new BufferedReader(new InputStreamReader(exp))) {
-            try (BufferedReader generatedReader = new BufferedReader(new FileReader(generated))) {
-                String baseLine;
-
-                while ((baseLine = baseReader.readLine()) != null) {
-                    String generatedLine = generatedReader.readLine();
-
-                    if (!baseLine.equals(generatedLine) && !baseLine.contains(excludePtrn)
-                            && !generatedLine.contains(excludePtrn)) {
-                        System.out.println("Generated file: " + generated.toString());
-                        System.out.println("Expected: " + baseLine);
-                        System.out.println("Generated: " + generatedLine);
-
-                        return false;
-                    }
-                }
-
-                return true;
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-
-            return false;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/CodeGeneratorTest.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/CodeGeneratorTest.java b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/CodeGeneratorTest.java
deleted file mode 100644
index 0917139..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/CodeGeneratorTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.test.generator;
-
-import java.io.File;
-import org.apache.ignite.schema.generator.CodeGenerator;
-import org.apache.ignite.schema.model.PojoDescriptor;
-import org.apache.ignite.schema.test.AbstractSchemaImportTest;
-
-/**
- * Tests for POJO generator.
- */
-public class CodeGeneratorTest extends AbstractSchemaImportTest {
-    /** Marker string to skip date generation while comparing.*/
-    private static final String GEN_PTRN = "Code generated by Apache Ignite Schema Import utility";
-
-    /** Test package. */
-    private static final String TEST_PACKAGE = "org.apache.ignite.schema.test.model";
-
-    /** Path to generated model. */
-    private static final String TEST_PATH = "org/apache/ignite/schema/test/model";
-
-    /**
-     * Test that POJOs generated correctly.
-     */
-    public void testPojoGeneration() throws Exception {
-        Boolean containsSchema = false;
-
-        for (PojoDescriptor pojo : all) {
-            if (pojo.valueClassName().isEmpty())
-                containsSchema = true;
-            else {
-                CodeGenerator.pojos(pojo, OUT_DIR_PATH, TEST_PACKAGE, true, true, YES_TO_ALL);
-
-                assertTrue("Generated key class POJO content is differ from expected for type " + pojo.keyClassName(),
-                        compareFiles(pojo.keyClassName(), TEST_PATH, GEN_PTRN));
-
-                assertTrue("Generated value class POJO content is differ from expected for type " + pojo.valueClassName(),
-                        compareFiles(pojo.valueClassName(), TEST_PATH, GEN_PTRN));
-            }
-        }
-
-        assertTrue("Generated POJOs does not contains schema.", containsSchema);
-    }
-
-    /**
-     * Test that configuration generated correctly.
-     */
-    public void testConfigGeneration() throws Exception {
-        CodeGenerator.snippet(pojos, TEST_PACKAGE, true, true, OUT_DIR_PATH, YES_TO_ALL);
-
-        assertTrue("Generated configuration is differ from expected", compareFiles("CacheConfig", TEST_PATH, GEN_PTRN));
-    }
-
-    /**
-     * @param typeName Type name.
-     * @param intPath Internal path.
-     * @return {@code true} if generated POJO as expected.
-     */
-    private boolean compareFiles(String typeName, String intPath, String excludePtrn) {
-        String relPath = intPath + "/" + typeName;
-
-        return compareFilesInt(getClass().getResourceAsStream("/" + relPath + ".txt"),
-                new File(OUT_DIR_PATH + "/" + relPath + ".java"), excludePtrn);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/XmlGeneratorTest.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/XmlGeneratorTest.java b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/XmlGeneratorTest.java
deleted file mode 100644
index 8b12392..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/XmlGeneratorTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.test.generator;
-
-import java.io.File;
-import org.apache.ignite.schema.generator.XmlGenerator;
-import org.apache.ignite.schema.test.AbstractSchemaImportTest;
-
-/**
- * Tests for XML generator.
- */
-public class XmlGeneratorTest extends AbstractSchemaImportTest {
-    /** */
-    private static final String TEST_XML_FILE_NAME = "ignite-type-metadata.xml";
-
-    /**
-     * Test that XML generated correctly.
-     */
-    public void testXmlGeneration() throws Exception {
-        XmlGenerator.generate("org.apache.ignite.schema.test.model", pojos, true, true,
-            new File(OUT_DIR_PATH, TEST_XML_FILE_NAME), YES_TO_ALL);
-
-        assertTrue("Generated XML file content is differ from expected one",
-            compareFilesInt(getClass().getResourceAsStream("/org/apache/ignite/schema/test/model/" + TEST_XML_FILE_NAME),
-                new File(OUT_DIR_PATH, TEST_XML_FILE_NAME), "XML generated by Apache Ignite Schema Import utility"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/CacheConfig.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/CacheConfig.txt b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/CacheConfig.txt
deleted file mode 100644
index 9573eb7..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/CacheConfig.txt
+++ /dev/null
@@ -1,409 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.test.model;
-
-import java.sql.*;
-import java.util.*;
-
-import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.store.jdbc.*;
-import org.apache.ignite.configuration.*;
-
-/**
- * CacheConfig definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 08/18/2016.
- */
-public class CacheConfig {
-    /**
-     * Create JDBC type for OBJECTS.
-     *
-     * @param cacheName Cache name.
-     * @return Configured JDBC type.
-     */
-    private static JdbcType jdbcTypeObjects(String cacheName) {
-        JdbcType jdbcType = new JdbcType();
-
-        jdbcType.setCacheName(cacheName);
-        jdbcType.setDatabaseSchema("PUBLIC");
-        jdbcType.setDatabaseTable("OBJECTS");
-        jdbcType.setKeyType("org.apache.ignite.schema.test.model.ObjectsKey");
-        jdbcType.setValueType("org.apache.ignite.schema.test.model.Objects");
-
-        // Key fields for OBJECTS.
-        Collection<JdbcTypeField> keys = new ArrayList<>();
-        keys.add(new JdbcTypeField(Types.INTEGER, "PK", int.class, "pk"));
-        jdbcType.setKeyFields(keys.toArray(new JdbcTypeField[keys.size()]));
-
-        // Value fields for OBJECTS.
-        Collection<JdbcTypeField> vals = new ArrayList<>();
-        vals.add(new JdbcTypeField(Types.INTEGER, "PK", int.class, "pk"));
-        vals.add(new JdbcTypeField(Types.BOOLEAN, "BOOLCOL", Boolean.class, "boolcol"));
-        vals.add(new JdbcTypeField(Types.TINYINT, "BYTECOL", Byte.class, "bytecol"));
-        vals.add(new JdbcTypeField(Types.SMALLINT, "SHORTCOL", Short.class, "shortcol"));
-        vals.add(new JdbcTypeField(Types.INTEGER, "INTCOL", Integer.class, "intcol"));
-        vals.add(new JdbcTypeField(Types.BIGINT, "LONGCOL", Long.class, "longcol"));
-        vals.add(new JdbcTypeField(Types.REAL, "FLOATCOL", Float.class, "floatcol"));
-        vals.add(new JdbcTypeField(Types.DOUBLE, "DOUBLECOL", Double.class, "doublecol"));
-        vals.add(new JdbcTypeField(Types.DOUBLE, "DOUBLECOL2", Double.class, "doublecol2"));
-        vals.add(new JdbcTypeField(Types.DECIMAL, "BIGDECIMALCOL", java.math.BigDecimal.class, "bigdecimalcol"));
-        vals.add(new JdbcTypeField(Types.VARCHAR, "STRCOL", String.class, "strcol"));
-        vals.add(new JdbcTypeField(Types.DATE, "DATECOL", java.sql.Date.class, "datecol"));
-        vals.add(new JdbcTypeField(Types.TIME, "TIMECOL", java.sql.Time.class, "timecol"));
-        vals.add(new JdbcTypeField(Types.TIMESTAMP, "TSCOL", java.sql.Timestamp.class, "tscol"));
-        vals.add(new JdbcTypeField(Types.VARBINARY, "ARRCOL", Object.class, "arrcol"));
-        vals.add(new JdbcTypeField(Types.VARCHAR, "FIELD_WITH_ALIAS", String.class, "fieldWithAlias"));
-        jdbcType.setValueFields(vals.toArray(new JdbcTypeField[vals.size()]));
-
-        return jdbcType;
-    }
-
-    /**
-     * Create SQL Query descriptor for OBJECTS.
-     *
-     * @return Configured query entity.
-     */
-    private static QueryEntity queryEntityObjects() {
-        QueryEntity qryEntity = new QueryEntity();
-
-        qryEntity.setKeyType("org.apache.ignite.schema.test.model.ObjectsKey");
-        qryEntity.setValueType("org.apache.ignite.schema.test.model.Objects");
-
-        // Query fields for OBJECTS.
-        LinkedHashMap<String, String> fields = new LinkedHashMap<>();
-
-        fields.put("pk", "java.lang.Integer");
-        fields.put("boolcol", "java.lang.Boolean");
-        fields.put("bytecol", "java.lang.Byte");
-        fields.put("shortcol", "java.lang.Short");
-        fields.put("intcol", "java.lang.Integer");
-        fields.put("longcol", "java.lang.Long");
-        fields.put("floatcol", "java.lang.Float");
-        fields.put("doublecol", "java.lang.Double");
-        fields.put("doublecol2", "java.lang.Double");
-        fields.put("bigdecimalcol", "java.math.BigDecimal");
-        fields.put("strcol", "java.lang.String");
-        fields.put("datecol", "java.sql.Date");
-        fields.put("timecol", "java.sql.Time");
-        fields.put("tscol", "java.sql.Timestamp");
-        fields.put("arrcol", "java.lang.Object");
-        fields.put("fieldWithAlias", "java.lang.String");
-
-        qryEntity.setFields(fields);
-
-        // Aliases for fields.
-        Map<String, String> aliases = new HashMap<>();
-
-        aliases.put("fieldWithAlias", "FIELD_WITH_ALIAS");
-
-        qryEntity.setAliases(aliases);
-
-        // Indexes for OBJECTS.
-        Collection<QueryIndex> idxs = new ArrayList<>();
-
-        idxs.add(new QueryIndex("pk", true, "PRIMARY_KEY_C"));
-
-        QueryIndex idx = new QueryIndex();
-
-        idx.setName("IDX_1");
-
-        idx.setIndexType(QueryIndexType.SORTED);
-
-        LinkedHashMap<String, Boolean> idxFlds = new LinkedHashMap<>();
-
-        idxFlds.put("intcol", true);
-        idxFlds.put("longcol", true);
-
-        idx.setFields(idxFlds);
-
-        idxs.add(idx);
-
-        idx = new QueryIndex();
-
-        idx.setName("IDX_2");
-
-        idx.setIndexType(QueryIndexType.SORTED);
-
-        idxFlds = new LinkedHashMap<>();
-
-        idxFlds.put("intcol", true);
-        idxFlds.put("longcol", false);
-
-        idx.setFields(idxFlds);
-
-        idxs.add(idx);
-
-        qryEntity.setIndexes(idxs);
-
-        return qryEntity;
-    }
-
-    /**
-     * Create JDBC type for PRIMITIVES.
-     *
-     * @param cacheName Cache name.
-     * @return Configured JDBC type.
-     */
-    private static JdbcType jdbcTypePrimitives(String cacheName) {
-        JdbcType jdbcType = new JdbcType();
-
-        jdbcType.setCacheName(cacheName);
-        jdbcType.setDatabaseSchema("PUBLIC");
-        jdbcType.setDatabaseTable("PRIMITIVES");
-        jdbcType.setKeyType("org.apache.ignite.schema.test.model.PrimitivesKey");
-        jdbcType.setValueType("org.apache.ignite.schema.test.model.Primitives");
-
-        // Key fields for PRIMITIVES.
-        Collection<JdbcTypeField> keys = new ArrayList<>();
-        keys.add(new JdbcTypeField(Types.INTEGER, "PK", int.class, "pk"));
-        jdbcType.setKeyFields(keys.toArray(new JdbcTypeField[keys.size()]));
-
-        // Value fields for PRIMITIVES.
-        Collection<JdbcTypeField> vals = new ArrayList<>();
-        vals.add(new JdbcTypeField(Types.INTEGER, "PK", int.class, "pk"));
-        vals.add(new JdbcTypeField(Types.BOOLEAN, "BOOLCOL", boolean.class, "boolcol"));
-        vals.add(new JdbcTypeField(Types.TINYINT, "BYTECOL", byte.class, "bytecol"));
-        vals.add(new JdbcTypeField(Types.SMALLINT, "SHORTCOL", short.class, "shortcol"));
-        vals.add(new JdbcTypeField(Types.INTEGER, "INTCOL", int.class, "intcol"));
-        vals.add(new JdbcTypeField(Types.BIGINT, "LONGCOL", long.class, "longcol"));
-        vals.add(new JdbcTypeField(Types.REAL, "FLOATCOL", float.class, "floatcol"));
-        vals.add(new JdbcTypeField(Types.DOUBLE, "DOUBLECOL", double.class, "doublecol"));
-        vals.add(new JdbcTypeField(Types.DOUBLE, "DOUBLECOL2", double.class, "doublecol2"));
-        vals.add(new JdbcTypeField(Types.DECIMAL, "BIGDECIMALCOL", java.math.BigDecimal.class, "bigdecimalcol"));
-        vals.add(new JdbcTypeField(Types.VARCHAR, "STRCOL", String.class, "strcol"));
-        vals.add(new JdbcTypeField(Types.DATE, "DATECOL", java.sql.Date.class, "datecol"));
-        vals.add(new JdbcTypeField(Types.TIME, "TIMECOL", java.sql.Time.class, "timecol"));
-        vals.add(new JdbcTypeField(Types.TIMESTAMP, "TSCOL", java.sql.Timestamp.class, "tscol"));
-        vals.add(new JdbcTypeField(Types.VARBINARY, "ARRCOL", Object.class, "arrcol"));
-        vals.add(new JdbcTypeField(Types.VARCHAR, "FIELD_WITH_ALIAS", String.class, "fieldWithAlias"));
-        jdbcType.setValueFields(vals.toArray(new JdbcTypeField[vals.size()]));
-
-        return jdbcType;
-    }
-
-    /**
-     * Create SQL Query descriptor for PRIMITIVES.
-     *
-     * @return Configured query entity.
-     */
-    private static QueryEntity queryEntityPrimitives() {
-        QueryEntity qryEntity = new QueryEntity();
-
-        qryEntity.setKeyType("org.apache.ignite.schema.test.model.PrimitivesKey");
-        qryEntity.setValueType("org.apache.ignite.schema.test.model.Primitives");
-
-        // Query fields for PRIMITIVES.
-        LinkedHashMap<String, String> fields = new LinkedHashMap<>();
-
-        fields.put("pk", "java.lang.Integer");
-        fields.put("boolcol", "java.lang.Boolean");
-        fields.put("bytecol", "java.lang.Byte");
-        fields.put("shortcol", "java.lang.Short");
-        fields.put("intcol", "java.lang.Integer");
-        fields.put("longcol", "java.lang.Long");
-        fields.put("floatcol", "java.lang.Float");
-        fields.put("doublecol", "java.lang.Double");
-        fields.put("doublecol2", "java.lang.Double");
-        fields.put("bigdecimalcol", "java.math.BigDecimal");
-        fields.put("strcol", "java.lang.String");
-        fields.put("datecol", "java.sql.Date");
-        fields.put("timecol", "java.sql.Time");
-        fields.put("tscol", "java.sql.Timestamp");
-        fields.put("arrcol", "java.lang.Object");
-        fields.put("fieldWithAlias", "java.lang.String");
-
-        qryEntity.setFields(fields);
-
-        // Aliases for fields.
-        Map<String, String> aliases = new HashMap<>();
-
-        aliases.put("fieldWithAlias", "FIELD_WITH_ALIAS");
-
-        qryEntity.setAliases(aliases);
-
-        // Indexes for PRIMITIVES.
-        Collection<QueryIndex> idxs = new ArrayList<>();
-
-        idxs.add(new QueryIndex("pk", true, "PRIMARY_KEY_D"));
-
-        qryEntity.setIndexes(idxs);
-
-        return qryEntity;
-    }
-
-    /**
-     * Create JDBC type for TST.
-     *
-     * @param cacheName Cache name.
-     * @return Configured JDBC type.
-     */
-    private static JdbcType jdbcTypeTst(String cacheName) {
-        JdbcType jdbcType = new JdbcType();
-
-        jdbcType.setCacheName(cacheName);
-        jdbcType.setDatabaseSchema("TESTSCHEMA");
-        jdbcType.setDatabaseTable("TST");
-        jdbcType.setKeyType("org.apache.ignite.schema.test.model.TstKey");
-        jdbcType.setValueType("org.apache.ignite.schema.test.model.Tst");
-
-        // Key fields for TST.
-        Collection<JdbcTypeField> keys = new ArrayList<>();
-        keys.add(new JdbcTypeField(Types.INTEGER, "PK", int.class, "pk"));
-        jdbcType.setKeyFields(keys.toArray(new JdbcTypeField[keys.size()]));
-
-        // Value fields for TST.
-        Collection<JdbcTypeField> vals = new ArrayList<>();
-        vals.add(new JdbcTypeField(Types.INTEGER, "PK", int.class, "pk"));
-        vals.add(new JdbcTypeField(Types.BOOLEAN, "BOOLCOL", boolean.class, "boolcol"));
-        vals.add(new JdbcTypeField(Types.TINYINT, "BYTECOL", byte.class, "bytecol"));
-        vals.add(new JdbcTypeField(Types.SMALLINT, "SHORTCOL", short.class, "shortcol"));
-        vals.add(new JdbcTypeField(Types.INTEGER, "INTCOL", int.class, "intcol"));
-        vals.add(new JdbcTypeField(Types.BIGINT, "LONGCOL", long.class, "longcol"));
-        vals.add(new JdbcTypeField(Types.REAL, "FLOATCOL", float.class, "floatcol"));
-        vals.add(new JdbcTypeField(Types.DOUBLE, "DOUBLECOL", double.class, "doublecol"));
-        vals.add(new JdbcTypeField(Types.DOUBLE, "DOUBLECOL2", double.class, "doublecol2"));
-        vals.add(new JdbcTypeField(Types.DECIMAL, "BIGDECIMALCOL", java.math.BigDecimal.class, "bigdecimalcol"));
-        vals.add(new JdbcTypeField(Types.VARCHAR, "STRCOL", String.class, "strcol"));
-        vals.add(new JdbcTypeField(Types.DATE, "DATECOL", java.sql.Date.class, "datecol"));
-        vals.add(new JdbcTypeField(Types.TIME, "TIMECOL", java.sql.Time.class, "timecol"));
-        vals.add(new JdbcTypeField(Types.TIMESTAMP, "TSCOL", java.sql.Timestamp.class, "tscol"));
-        vals.add(new JdbcTypeField(Types.VARBINARY, "ARRCOL", Object.class, "arrcol"));
-        vals.add(new JdbcTypeField(Types.VARCHAR, "FIELD_WITH_ALIAS", String.class, "fieldWithAlias"));
-        jdbcType.setValueFields(vals.toArray(new JdbcTypeField[vals.size()]));
-
-        return jdbcType;
-    }
-
-    /**
-     * Create SQL Query descriptor for TST.
-     *
-     * @return Configured query entity.
-     */
-    private static QueryEntity queryEntityTst() {
-        QueryEntity qryEntity = new QueryEntity();
-
-        qryEntity.setKeyType("org.apache.ignite.schema.test.model.TstKey");
-        qryEntity.setValueType("org.apache.ignite.schema.test.model.Tst");
-
-        // Query fields for TST.
-        LinkedHashMap<String, String> fields = new LinkedHashMap<>();
-
-        fields.put("pk", "java.lang.Integer");
-        fields.put("boolcol", "java.lang.Boolean");
-        fields.put("bytecol", "java.lang.Byte");
-        fields.put("shortcol", "java.lang.Short");
-        fields.put("intcol", "java.lang.Integer");
-        fields.put("longcol", "java.lang.Long");
-        fields.put("floatcol", "java.lang.Float");
-        fields.put("doublecol", "java.lang.Double");
-        fields.put("doublecol2", "java.lang.Double");
-        fields.put("bigdecimalcol", "java.math.BigDecimal");
-        fields.put("strcol", "java.lang.String");
-        fields.put("datecol", "java.sql.Date");
-        fields.put("timecol", "java.sql.Time");
-        fields.put("tscol", "java.sql.Timestamp");
-        fields.put("arrcol", "java.lang.Object");
-        fields.put("fieldWithAlias", "java.lang.String");
-
-        qryEntity.setFields(fields);
-
-        // Aliases for fields.
-        Map<String, String> aliases = new HashMap<>();
-
-        aliases.put("fieldWithAlias", "FIELD_WITH_ALIAS");
-
-        qryEntity.setAliases(aliases);
-
-        // Indexes for TST.
-        Collection<QueryIndex> idxs = new ArrayList<>();
-
-        idxs.add(new QueryIndex("pk", true, "PRIMARY_KEY_1"));
-
-        QueryIndex idx = new QueryIndex();
-
-        idx.setName("IDX_3");
-
-        idx.setIndexType(QueryIndexType.SORTED);
-
-        LinkedHashMap<String, Boolean> idxFlds = new LinkedHashMap<>();
-
-        idxFlds.put("intcol", true);
-        idxFlds.put("longcol", true);
-
-        idx.setFields(idxFlds);
-
-        idxs.add(idx);
-
-        idx = new QueryIndex();
-
-        idx.setName("IDX_4");
-
-        idx.setIndexType(QueryIndexType.SORTED);
-
-        idxFlds = new LinkedHashMap<>();
-
-        idxFlds.put("intcol", true);
-        idxFlds.put("longcol", false);
-
-        idx.setFields(idxFlds);
-
-        idxs.add(idx);
-
-        qryEntity.setIndexes(idxs);
-
-        return qryEntity;
-    }
-
-    /**
-     * Configure cache.
-     *
-     * @param cacheName Cache name.
-     * @param storeFactory Cache store factory.
-     * @return Cache configuration.
-     */
-    public static <K, V> CacheConfiguration<K, V> cache(String cacheName, CacheJdbcPojoStoreFactory<K, V> storeFactory) {
-        if (storeFactory == null)
-             throw new IllegalArgumentException("Cache store factory cannot be null.");
-
-        CacheConfiguration<K, V> ccfg = new CacheConfiguration<>(cacheName);
-
-        ccfg.setCacheStoreFactory(storeFactory);
-        ccfg.setReadThrough(true);
-        ccfg.setWriteThrough(true);
-
-        // Configure JDBC types.
-        Collection<JdbcType> jdbcTypes = new ArrayList<>();
-
-        jdbcTypes.add(jdbcTypeObjects(cacheName));
-        jdbcTypes.add(jdbcTypePrimitives(cacheName));
-        jdbcTypes.add(jdbcTypeTst(cacheName));
-
-        storeFactory.setTypes(jdbcTypes.toArray(new JdbcType[jdbcTypes.size()]));
-
-        // Configure query entities.
-        Collection<QueryEntity> qryEntities = new ArrayList<>();
-
-        qryEntities.add(queryEntityObjects());
-        qryEntities.add(queryEntityPrimitives());
-        qryEntities.add(queryEntityTst());
-
-        ccfg.setQueryEntities(qryEntities);
-
-        return ccfg;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Objects.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Objects.txt b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Objects.txt
deleted file mode 100644
index 380191b..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Objects.txt
+++ /dev/null
@@ -1,531 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.test.model;
-
-import java.io.*;
-
-/**
- * Objects definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 01/27/2015.
- */
-public class Objects implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Value for pk. */
-    private int pk;
-
-    /** Value for boolcol. */
-    private Boolean boolcol;
-
-    /** Value for bytecol. */
-    private Byte bytecol;
-
-    /** Value for shortcol. */
-    private Short shortcol;
-
-    /** Value for intcol. */
-    private Integer intcol;
-
-    /** Value for longcol. */
-    private Long longcol;
-
-    /** Value for floatcol. */
-    private Float floatcol;
-
-    /** Value for doublecol. */
-    private Double doublecol;
-
-    /** Value for doublecol2. */
-    private Double doublecol2;
-
-    /** Value for bigdecimalcol. */
-    private java.math.BigDecimal bigdecimalcol;
-
-    /** Value for strcol. */
-    private String strcol;
-
-    /** Value for datecol. */
-    private java.sql.Date datecol;
-
-    /** Value for timecol. */
-    private java.sql.Time timecol;
-
-    /** Value for tscol. */
-    private java.sql.Timestamp tscol;
-
-    /** Value for arrcol. */
-    private Object arrcol;
-
-    /** Value for fieldWithAlias. */
-    private String fieldWithAlias;
-
-    /**
-     * Empty constructor.
-     */
-    public Objects() {
-        // No-op.
-    }
-
-    /**
-     * Full constructor.
-     */
-    public Objects(
-        int pk,
-        Boolean boolcol,
-        Byte bytecol,
-        Short shortcol,
-        Integer intcol,
-        Long longcol,
-        Float floatcol,
-        Double doublecol,
-        Double doublecol2,
-        java.math.BigDecimal bigdecimalcol,
-        String strcol,
-        java.sql.Date datecol,
-        java.sql.Time timecol,
-        java.sql.Timestamp tscol,
-        Object arrcol,
-        String fieldWithAlias
-    ) {
-        this.pk = pk;
-        this.boolcol = boolcol;
-        this.bytecol = bytecol;
-        this.shortcol = shortcol;
-        this.intcol = intcol;
-        this.longcol = longcol;
-        this.floatcol = floatcol;
-        this.doublecol = doublecol;
-        this.doublecol2 = doublecol2;
-        this.bigdecimalcol = bigdecimalcol;
-        this.strcol = strcol;
-        this.datecol = datecol;
-        this.timecol = timecol;
-        this.tscol = tscol;
-        this.arrcol = arrcol;
-        this.fieldWithAlias = fieldWithAlias;
-    }
-
-    /**
-     * Gets pk.
-     *
-     * @return Value for pk.
-     */
-    public int getPk() {
-        return pk;
-    }
-
-    /**
-     * Sets pk.
-     *
-     * @param pk New value for pk.
-     */
-    public void setPk(int pk) {
-        this.pk = pk;
-    }
-
-    /**
-     * Gets boolcol.
-     *
-     * @return Value for boolcol.
-     */
-    public Boolean getBoolcol() {
-        return boolcol;
-    }
-
-    /**
-     * Sets boolcol.
-     *
-     * @param boolcol New value for boolcol.
-     */
-    public void setBoolcol(Boolean boolcol) {
-        this.boolcol = boolcol;
-    }
-
-    /**
-     * Gets bytecol.
-     *
-     * @return Value for bytecol.
-     */
-    public Byte getBytecol() {
-        return bytecol;
-    }
-
-    /**
-     * Sets bytecol.
-     *
-     * @param bytecol New value for bytecol.
-     */
-    public void setBytecol(Byte bytecol) {
-        this.bytecol = bytecol;
-    }
-
-    /**
-     * Gets shortcol.
-     *
-     * @return Value for shortcol.
-     */
-    public Short getShortcol() {
-        return shortcol;
-    }
-
-    /**
-     * Sets shortcol.
-     *
-     * @param shortcol New value for shortcol.
-     */
-    public void setShortcol(Short shortcol) {
-        this.shortcol = shortcol;
-    }
-
-    /**
-     * Gets intcol.
-     *
-     * @return Value for intcol.
-     */
-    public Integer getIntcol() {
-        return intcol;
-    }
-
-    /**
-     * Sets intcol.
-     *
-     * @param intcol New value for intcol.
-     */
-    public void setIntcol(Integer intcol) {
-        this.intcol = intcol;
-    }
-
-    /**
-     * Gets longcol.
-     *
-     * @return Value for longcol.
-     */
-    public Long getLongcol() {
-        return longcol;
-    }
-
-    /**
-     * Sets longcol.
-     *
-     * @param longcol New value for longcol.
-     */
-    public void setLongcol(Long longcol) {
-        this.longcol = longcol;
-    }
-
-    /**
-     * Gets floatcol.
-     *
-     * @return Value for floatcol.
-     */
-    public Float getFloatcol() {
-        return floatcol;
-    }
-
-    /**
-     * Sets floatcol.
-     *
-     * @param floatcol New value for floatcol.
-     */
-    public void setFloatcol(Float floatcol) {
-        this.floatcol = floatcol;
-    }
-
-    /**
-     * Gets doublecol.
-     *
-     * @return Value for doublecol.
-     */
-    public Double getDoublecol() {
-        return doublecol;
-    }
-
-    /**
-     * Sets doublecol.
-     *
-     * @param doublecol New value for doublecol.
-     */
-    public void setDoublecol(Double doublecol) {
-        this.doublecol = doublecol;
-    }
-
-    /**
-     * Gets doublecol2.
-     *
-     * @return Value for doublecol2.
-     */
-    public Double getDoublecol2() {
-        return doublecol2;
-    }
-
-    /**
-     * Sets doublecol2.
-     *
-     * @param doublecol2 New value for doublecol2.
-     */
-    public void setDoublecol2(Double doublecol2) {
-        this.doublecol2 = doublecol2;
-    }
-
-    /**
-     * Gets bigdecimalcol.
-     *
-     * @return Value for bigdecimalcol.
-     */
-    public java.math.BigDecimal getBigdecimalcol() {
-        return bigdecimalcol;
-    }
-
-    /**
-     * Sets bigdecimalcol.
-     *
-     * @param bigdecimalcol New value for bigdecimalcol.
-     */
-    public void setBigdecimalcol(java.math.BigDecimal bigdecimalcol) {
-        this.bigdecimalcol = bigdecimalcol;
-    }
-
-    /**
-     * Gets strcol.
-     *
-     * @return Value for strcol.
-     */
-    public String getStrcol() {
-        return strcol;
-    }
-
-    /**
-     * Sets strcol.
-     *
-     * @param strcol New value for strcol.
-     */
-    public void setStrcol(String strcol) {
-        this.strcol = strcol;
-    }
-
-    /**
-     * Gets datecol.
-     *
-     * @return Value for datecol.
-     */
-    public java.sql.Date getDatecol() {
-        return datecol;
-    }
-
-    /**
-     * Sets datecol.
-     *
-     * @param datecol New value for datecol.
-     */
-    public void setDatecol(java.sql.Date datecol) {
-        this.datecol = datecol;
-    }
-
-    /**
-     * Gets timecol.
-     *
-     * @return Value for timecol.
-     */
-    public java.sql.Time getTimecol() {
-        return timecol;
-    }
-
-    /**
-     * Sets timecol.
-     *
-     * @param timecol New value for timecol.
-     */
-    public void setTimecol(java.sql.Time timecol) {
-        this.timecol = timecol;
-    }
-
-    /**
-     * Gets tscol.
-     *
-     * @return Value for tscol.
-     */
-    public java.sql.Timestamp getTscol() {
-        return tscol;
-    }
-
-    /**
-     * Sets tscol.
-     *
-     * @param tscol New value for tscol.
-     */
-    public void setTscol(java.sql.Timestamp tscol) {
-        this.tscol = tscol;
-    }
-
-    /**
-     * Gets arrcol.
-     *
-     * @return Value for arrcol.
-     */
-    public Object getArrcol() {
-        return arrcol;
-    }
-
-    /**
-     * Sets arrcol.
-     *
-     * @param arrcol New value for arrcol.
-     */
-    public void setArrcol(Object arrcol) {
-        this.arrcol = arrcol;
-    }
-
-    /**
-     * Gets fieldWithAlias.
-     *
-     * @return Value for fieldWithAlias.
-     */
-    public String getFieldWithAlias() {
-        return fieldWithAlias;
-    }
-
-    /**
-     * Sets fieldWithAlias.
-     *
-     * @param fieldWithAlias New value for fieldWithAlias.
-     */
-    public void setFieldWithAlias(String fieldWithAlias) {
-        this.fieldWithAlias = fieldWithAlias;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        if (this == o)
-            return true;
-
-        if (!(o instanceof Objects))
-            return false;
-
-        Objects that = (Objects)o;
-
-        if (pk != that.pk)
-            return false;
-
-        if (boolcol != null ? !boolcol.equals(that.boolcol) : that.boolcol != null)
-            return false;
-
-        if (bytecol != null ? !bytecol.equals(that.bytecol) : that.bytecol != null)
-            return false;
-
-        if (shortcol != null ? !shortcol.equals(that.shortcol) : that.shortcol != null)
-            return false;
-
-        if (intcol != null ? !intcol.equals(that.intcol) : that.intcol != null)
-            return false;
-
-        if (longcol != null ? !longcol.equals(that.longcol) : that.longcol != null)
-            return false;
-
-        if (floatcol != null ? !floatcol.equals(that.floatcol) : that.floatcol != null)
-            return false;
-
-        if (doublecol != null ? !doublecol.equals(that.doublecol) : that.doublecol != null)
-            return false;
-
-        if (doublecol2 != null ? !doublecol2.equals(that.doublecol2) : that.doublecol2 != null)
-            return false;
-
-        if (bigdecimalcol != null ? !bigdecimalcol.equals(that.bigdecimalcol) : that.bigdecimalcol != null)
-            return false;
-
-        if (strcol != null ? !strcol.equals(that.strcol) : that.strcol != null)
-            return false;
-
-        if (datecol != null ? !datecol.equals(that.datecol) : that.datecol != null)
-            return false;
-
-        if (timecol != null ? !timecol.equals(that.timecol) : that.timecol != null)
-            return false;
-
-        if (tscol != null ? !tscol.equals(that.tscol) : that.tscol != null)
-            return false;
-
-        if (arrcol != null ? !arrcol.equals(that.arrcol) : that.arrcol != null)
-            return false;
-
-        if (fieldWithAlias != null ? !fieldWithAlias.equals(that.fieldWithAlias) : that.fieldWithAlias != null)
-            return false;
-
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        int res = pk;
-
-        res = 31 * res + (boolcol != null ? boolcol.hashCode() : 0);
-
-        res = 31 * res + (bytecol != null ? bytecol.hashCode() : 0);
-
-        res = 31 * res + (shortcol != null ? shortcol.hashCode() : 0);
-
-        res = 31 * res + (intcol != null ? intcol.hashCode() : 0);
-
-        res = 31 * res + (longcol != null ? longcol.hashCode() : 0);
-
-        res = 31 * res + (floatcol != null ? floatcol.hashCode() : 0);
-
-        res = 31 * res + (doublecol != null ? doublecol.hashCode() : 0);
-
-        res = 31 * res + (doublecol2 != null ? doublecol2.hashCode() : 0);
-
-        res = 31 * res + (bigdecimalcol != null ? bigdecimalcol.hashCode() : 0);
-
-        res = 31 * res + (strcol != null ? strcol.hashCode() : 0);
-
-        res = 31 * res + (datecol != null ? datecol.hashCode() : 0);
-
-        res = 31 * res + (timecol != null ? timecol.hashCode() : 0);
-
-        res = 31 * res + (tscol != null ? tscol.hashCode() : 0);
-
-        res = 31 * res + (arrcol != null ? arrcol.hashCode() : 0);
-
-        res = 31 * res + (fieldWithAlias != null ? fieldWithAlias.hashCode() : 0);
-
-        return res;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return "Objects [pk=" + pk +
-            ", boolcol=" + boolcol +
-            ", bytecol=" + bytecol +
-            ", shortcol=" + shortcol +
-            ", intcol=" + intcol +
-            ", longcol=" + longcol +
-            ", floatcol=" + floatcol +
-            ", doublecol=" + doublecol +
-            ", doublecol2=" + doublecol2 +
-            ", bigdecimalcol=" + bigdecimalcol +
-            ", strcol=" + strcol +
-            ", datecol=" + datecol +
-            ", timecol=" + timecol +
-            ", tscol=" + tscol +
-            ", arrcol=" + arrcol +
-            ", fieldWithAlias=" + fieldWithAlias +
-            "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ObjectsKey.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ObjectsKey.txt b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ObjectsKey.txt
deleted file mode 100644
index cad109c..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ObjectsKey.txt
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.test.model;
-
-import java.io.*;
-
-/**
- * ObjectsKey definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 01/27/2015.
- */
-public class ObjectsKey implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Value for pk. */
-    private int pk;
-
-    /**
-     * Empty constructor.
-     */
-    public ObjectsKey() {
-        // No-op.
-    }
-
-    /**
-     * Full constructor.
-     */
-    public ObjectsKey(
-        int pk
-    ) {
-        this.pk = pk;
-    }
-
-    /**
-     * Gets pk.
-     *
-     * @return Value for pk.
-     */
-    public int getPk() {
-        return pk;
-    }
-
-    /**
-     * Sets pk.
-     *
-     * @param pk New value for pk.
-     */
-    public void setPk(int pk) {
-        this.pk = pk;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        if (this == o)
-            return true;
-
-        if (!(o instanceof ObjectsKey))
-            return false;
-
-        ObjectsKey that = (ObjectsKey)o;
-
-        if (pk != that.pk)
-            return false;
-
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        int res = pk;
-
-        return res;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return "ObjectsKey [pk=" + pk +
-            "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Primitives.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Primitives.txt b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Primitives.txt
deleted file mode 100644
index a07b379..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Primitives.txt
+++ /dev/null
@@ -1,535 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.test.model;
-
-import java.io.*;
-
-/**
- * Primitives definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 01/27/2015.
- */
-public class Primitives implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Value for pk. */
-    private int pk;
-
-    /** Value for boolcol. */
-    private boolean boolcol;
-
-    /** Value for bytecol. */
-    private byte bytecol;
-
-    /** Value for shortcol. */
-    private short shortcol;
-
-    /** Value for intcol. */
-    private int intcol;
-
-    /** Value for longcol. */
-    private long longcol;
-
-    /** Value for floatcol. */
-    private float floatcol;
-
-    /** Value for doublecol. */
-    private double doublecol;
-
-    /** Value for doublecol2. */
-    private double doublecol2;
-
-    /** Value for bigdecimalcol. */
-    private java.math.BigDecimal bigdecimalcol;
-
-    /** Value for strcol. */
-    private String strcol;
-
-    /** Value for datecol. */
-    private java.sql.Date datecol;
-
-    /** Value for timecol. */
-    private java.sql.Time timecol;
-
-    /** Value for tscol. */
-    private java.sql.Timestamp tscol;
-
-    /** Value for arrcol. */
-    private Object arrcol;
-
-    /** Value for fieldWithAlias. */
-    private String fieldWithAlias;
-
-    /**
-     * Empty constructor.
-     */
-    public Primitives() {
-        // No-op.
-    }
-
-    /**
-     * Full constructor.
-     */
-    public Primitives(
-        int pk,
-        boolean boolcol,
-        byte bytecol,
-        short shortcol,
-        int intcol,
-        long longcol,
-        float floatcol,
-        double doublecol,
-        double doublecol2,
-        java.math.BigDecimal bigdecimalcol,
-        String strcol,
-        java.sql.Date datecol,
-        java.sql.Time timecol,
-        java.sql.Timestamp tscol,
-        Object arrcol,
-        String fieldWithAlias
-    ) {
-        this.pk = pk;
-        this.boolcol = boolcol;
-        this.bytecol = bytecol;
-        this.shortcol = shortcol;
-        this.intcol = intcol;
-        this.longcol = longcol;
-        this.floatcol = floatcol;
-        this.doublecol = doublecol;
-        this.doublecol2 = doublecol2;
-        this.bigdecimalcol = bigdecimalcol;
-        this.strcol = strcol;
-        this.datecol = datecol;
-        this.timecol = timecol;
-        this.tscol = tscol;
-        this.arrcol = arrcol;
-        this.fieldWithAlias = fieldWithAlias;
-    }
-
-    /**
-     * Gets pk.
-     *
-     * @return Value for pk.
-     */
-    public int getPk() {
-        return pk;
-    }
-
-    /**
-     * Sets pk.
-     *
-     * @param pk New value for pk.
-     */
-    public void setPk(int pk) {
-        this.pk = pk;
-    }
-
-    /**
-     * Gets boolcol.
-     *
-     * @return Value for boolcol.
-     */
-    public boolean getBoolcol() {
-        return boolcol;
-    }
-
-    /**
-     * Sets boolcol.
-     *
-     * @param boolcol New value for boolcol.
-     */
-    public void setBoolcol(boolean boolcol) {
-        this.boolcol = boolcol;
-    }
-
-    /**
-     * Gets bytecol.
-     *
-     * @return Value for bytecol.
-     */
-    public byte getBytecol() {
-        return bytecol;
-    }
-
-    /**
-     * Sets bytecol.
-     *
-     * @param bytecol New value for bytecol.
-     */
-    public void setBytecol(byte bytecol) {
-        this.bytecol = bytecol;
-    }
-
-    /**
-     * Gets shortcol.
-     *
-     * @return Value for shortcol.
-     */
-    public short getShortcol() {
-        return shortcol;
-    }
-
-    /**
-     * Sets shortcol.
-     *
-     * @param shortcol New value for shortcol.
-     */
-    public void setShortcol(short shortcol) {
-        this.shortcol = shortcol;
-    }
-
-    /**
-     * Gets intcol.
-     *
-     * @return Value for intcol.
-     */
-    public int getIntcol() {
-        return intcol;
-    }
-
-    /**
-     * Sets intcol.
-     *
-     * @param intcol New value for intcol.
-     */
-    public void setIntcol(int intcol) {
-        this.intcol = intcol;
-    }
-
-    /**
-     * Gets longcol.
-     *
-     * @return Value for longcol.
-     */
-    public long getLongcol() {
-        return longcol;
-    }
-
-    /**
-     * Sets longcol.
-     *
-     * @param longcol New value for longcol.
-     */
-    public void setLongcol(long longcol) {
-        this.longcol = longcol;
-    }
-
-    /**
-     * Gets floatcol.
-     *
-     * @return Value for floatcol.
-     */
-    public float getFloatcol() {
-        return floatcol;
-    }
-
-    /**
-     * Sets floatcol.
-     *
-     * @param floatcol New value for floatcol.
-     */
-    public void setFloatcol(float floatcol) {
-        this.floatcol = floatcol;
-    }
-
-    /**
-     * Gets doublecol.
-     *
-     * @return Value for doublecol.
-     */
-    public double getDoublecol() {
-        return doublecol;
-    }
-
-    /**
-     * Sets doublecol.
-     *
-     * @param doublecol New value for doublecol.
-     */
-    public void setDoublecol(double doublecol) {
-        this.doublecol = doublecol;
-    }
-
-    /**
-     * Gets doublecol2.
-     *
-     * @return Value for doublecol2.
-     */
-    public double getDoublecol2() {
-        return doublecol2;
-    }
-
-    /**
-     * Sets doublecol2.
-     *
-     * @param doublecol2 New value for doublecol2.
-     */
-    public void setDoublecol2(double doublecol2) {
-        this.doublecol2 = doublecol2;
-    }
-
-    /**
-     * Gets bigdecimalcol.
-     *
-     * @return Value for bigdecimalcol.
-     */
-    public java.math.BigDecimal getBigdecimalcol() {
-        return bigdecimalcol;
-    }
-
-    /**
-     * Sets bigdecimalcol.
-     *
-     * @param bigdecimalcol New value for bigdecimalcol.
-     */
-    public void setBigdecimalcol(java.math.BigDecimal bigdecimalcol) {
-        this.bigdecimalcol = bigdecimalcol;
-    }
-
-    /**
-     * Gets strcol.
-     *
-     * @return Value for strcol.
-     */
-    public String getStrcol() {
-        return strcol;
-    }
-
-    /**
-     * Sets strcol.
-     *
-     * @param strcol New value for strcol.
-     */
-    public void setStrcol(String strcol) {
-        this.strcol = strcol;
-    }
-
-    /**
-     * Gets datecol.
-     *
-     * @return Value for datecol.
-     */
-    public java.sql.Date getDatecol() {
-        return datecol;
-    }
-
-    /**
-     * Sets datecol.
-     *
-     * @param datecol New value for datecol.
-     */
-    public void setDatecol(java.sql.Date datecol) {
-        this.datecol = datecol;
-    }
-
-    /**
-     * Gets timecol.
-     *
-     * @return Value for timecol.
-     */
-    public java.sql.Time getTimecol() {
-        return timecol;
-    }
-
-    /**
-     * Sets timecol.
-     *
-     * @param timecol New value for timecol.
-     */
-    public void setTimecol(java.sql.Time timecol) {
-        this.timecol = timecol;
-    }
-
-    /**
-     * Gets tscol.
-     *
-     * @return Value for tscol.
-     */
-    public java.sql.Timestamp getTscol() {
-        return tscol;
-    }
-
-    /**
-     * Sets tscol.
-     *
-     * @param tscol New value for tscol.
-     */
-    public void setTscol(java.sql.Timestamp tscol) {
-        this.tscol = tscol;
-    }
-
-    /**
-     * Gets arrcol.
-     *
-     * @return Value for arrcol.
-     */
-    public Object getArrcol() {
-        return arrcol;
-    }
-
-    /**
-     * Sets arrcol.
-     *
-     * @param arrcol New value for arrcol.
-     */
-    public void setArrcol(Object arrcol) {
-        this.arrcol = arrcol;
-    }
-
-    /**
-     * Gets fieldWithAlias.
-     *
-     * @return Value for fieldWithAlias.
-     */
-    public String getFieldWithAlias() {
-        return fieldWithAlias;
-    }
-
-    /**
-     * Sets fieldWithAlias.
-     *
-     * @param fieldWithAlias New value for fieldWithAlias.
-     */
-    public void setFieldWithAlias(String fieldWithAlias) {
-        this.fieldWithAlias = fieldWithAlias;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        if (this == o)
-            return true;
-
-        if (!(o instanceof Primitives))
-            return false;
-
-        Primitives that = (Primitives)o;
-
-        if (pk != that.pk)
-            return false;
-
-        if (boolcol != that.boolcol)
-            return false;
-
-        if (bytecol != that.bytecol)
-            return false;
-
-        if (shortcol != that.shortcol)
-            return false;
-
-        if (intcol != that.intcol)
-            return false;
-
-        if (longcol != that.longcol)
-            return false;
-
-        if (Float.compare(floatcol, that.floatcol) != 0)
-            return false;
-
-        if (Double.compare(doublecol, that.doublecol) != 0)
-            return false;
-
-        if (Double.compare(doublecol2, that.doublecol2) != 0)
-            return false;
-
-        if (bigdecimalcol != null ? !bigdecimalcol.equals(that.bigdecimalcol) : that.bigdecimalcol != null)
-            return false;
-
-        if (strcol != null ? !strcol.equals(that.strcol) : that.strcol != null)
-            return false;
-
-        if (datecol != null ? !datecol.equals(that.datecol) : that.datecol != null)
-            return false;
-
-        if (timecol != null ? !timecol.equals(that.timecol) : that.timecol != null)
-            return false;
-
-        if (tscol != null ? !tscol.equals(that.tscol) : that.tscol != null)
-            return false;
-
-        if (arrcol != null ? !arrcol.equals(that.arrcol) : that.arrcol != null)
-            return false;
-
-        if (fieldWithAlias != null ? !fieldWithAlias.equals(that.fieldWithAlias) : that.fieldWithAlias != null)
-            return false;
-
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        int res = pk;
-
-        res = 31 * res + (boolcol ? 1 : 0);
-
-        res = 31 * res + (int)bytecol;
-
-        res = 31 * res + (int)shortcol;
-
-        res = 31 * res + intcol;
-
-        res = 31 * res + (int)(longcol ^ (longcol >>> 32));
-
-        res = 31 * res + (floatcol != +0.0f ? Float.floatToIntBits(floatcol) : 0);
-
-        long ig_hash_temp = Double.doubleToLongBits(doublecol);
-
-        res = 31 * res + (int)(ig_hash_temp ^ (ig_hash_temp >>> 32));
-
-        ig_hash_temp = Double.doubleToLongBits(doublecol2);
-
-        res = 31 * res + (int)(ig_hash_temp ^ (ig_hash_temp >>> 32));
-
-        res = 31 * res + (bigdecimalcol != null ? bigdecimalcol.hashCode() : 0);
-
-        res = 31 * res + (strcol != null ? strcol.hashCode() : 0);
-
-        res = 31 * res + (datecol != null ? datecol.hashCode() : 0);
-
-        res = 31 * res + (timecol != null ? timecol.hashCode() : 0);
-
-        res = 31 * res + (tscol != null ? tscol.hashCode() : 0);
-
-        res = 31 * res + (arrcol != null ? arrcol.hashCode() : 0);
-
-        res = 31 * res + (fieldWithAlias != null ? fieldWithAlias.hashCode() : 0);
-
-        return res;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return "Primitives [pk=" + pk +
-            ", boolcol=" + boolcol +
-            ", bytecol=" + bytecol +
-            ", shortcol=" + shortcol +
-            ", intcol=" + intcol +
-            ", longcol=" + longcol +
-            ", floatcol=" + floatcol +
-            ", doublecol=" + doublecol +
-            ", doublecol2=" + doublecol2 +
-            ", bigdecimalcol=" + bigdecimalcol +
-            ", strcol=" + strcol +
-            ", datecol=" + datecol +
-            ", timecol=" + timecol +
-            ", tscol=" + tscol +
-            ", arrcol=" + arrcol +
-            ", fieldWithAlias=" + fieldWithAlias +
-            "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/PrimitivesKey.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/PrimitivesKey.txt b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/PrimitivesKey.txt
deleted file mode 100644
index 0844e63..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/PrimitivesKey.txt
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.test.model;
-
-import java.io.*;
-
-/**
- * PrimitivesKey definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 01/27/2015.
- */
-public class PrimitivesKey implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Value for pk. */
-    private int pk;
-
-    /**
-     * Empty constructor.
-     */
-    public PrimitivesKey() {
-        // No-op.
-    }
-
-    /**
-     * Full constructor.
-     */
-    public PrimitivesKey(
-        int pk
-    ) {
-        this.pk = pk;
-    }
-
-    /**
-     * Gets pk.
-     *
-     * @return Value for pk.
-     */
-    public int getPk() {
-        return pk;
-    }
-
-    /**
-     * Sets pk.
-     *
-     * @param pk New value for pk.
-     */
-    public void setPk(int pk) {
-        this.pk = pk;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        if (this == o)
-            return true;
-
-        if (!(o instanceof PrimitivesKey))
-            return false;
-
-        PrimitivesKey that = (PrimitivesKey)o;
-
-        if (pk != that.pk)
-            return false;
-
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        int res = pk;
-
-        return res;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return "PrimitivesKey [pk=" + pk +
-            "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Tst.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Tst.txt b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Tst.txt
deleted file mode 100644
index f1db255..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Tst.txt
+++ /dev/null
@@ -1,535 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.test.model;
-
-import java.io.*;
-
-/**
- * Tst definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 01/27/2015.
- */
-public class Tst implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Value for pk. */
-    private int pk;
-
-    /** Value for boolcol. */
-    private boolean boolcol;
-
-    /** Value for bytecol. */
-    private byte bytecol;
-
-    /** Value for shortcol. */
-    private short shortcol;
-
-    /** Value for intcol. */
-    private int intcol;
-
-    /** Value for longcol. */
-    private long longcol;
-
-    /** Value for floatcol. */
-    private float floatcol;
-
-    /** Value for doublecol. */
-    private double doublecol;
-
-    /** Value for doublecol2. */
-    private double doublecol2;
-
-    /** Value for bigdecimalcol. */
-    private java.math.BigDecimal bigdecimalcol;
-
-    /** Value for strcol. */
-    private String strcol;
-
-    /** Value for datecol. */
-    private java.sql.Date datecol;
-
-    /** Value for timecol. */
-    private java.sql.Time timecol;
-
-    /** Value for tscol. */
-    private java.sql.Timestamp tscol;
-
-    /** Value for arrcol. */
-    private Object arrcol;
-
-    /** Value for fieldWithAlias. */
-    private String fieldWithAlias;
-
-    /**
-     * Empty constructor.
-     */
-    public Tst() {
-        // No-op.
-    }
-
-    /**
-     * Full constructor.
-     */
-    public Tst(
-        int pk,
-        boolean boolcol,
-        byte bytecol,
-        short shortcol,
-        int intcol,
-        long longcol,
-        float floatcol,
-        double doublecol,
-        double doublecol2,
-        java.math.BigDecimal bigdecimalcol,
-        String strcol,
-        java.sql.Date datecol,
-        java.sql.Time timecol,
-        java.sql.Timestamp tscol,
-        Object arrcol,
-        String fieldWithAlias
-    ) {
-        this.pk = pk;
-        this.boolcol = boolcol;
-        this.bytecol = bytecol;
-        this.shortcol = shortcol;
-        this.intcol = intcol;
-        this.longcol = longcol;
-        this.floatcol = floatcol;
-        this.doublecol = doublecol;
-        this.doublecol2 = doublecol2;
-        this.bigdecimalcol = bigdecimalcol;
-        this.strcol = strcol;
-        this.datecol = datecol;
-        this.timecol = timecol;
-        this.tscol = tscol;
-        this.arrcol = arrcol;
-        this.fieldWithAlias = fieldWithAlias;
-    }
-
-    /**
-     * Gets pk.
-     *
-     * @return Value for pk.
-     */
-    public int getPk() {
-        return pk;
-    }
-
-    /**
-     * Sets pk.
-     *
-     * @param pk New value for pk.
-     */
-    public void setPk(int pk) {
-        this.pk = pk;
-    }
-
-    /**
-     * Gets boolcol.
-     *
-     * @return Value for boolcol.
-     */
-    public boolean getBoolcol() {
-        return boolcol;
-    }
-
-    /**
-     * Sets boolcol.
-     *
-     * @param boolcol New value for boolcol.
-     */
-    public void setBoolcol(boolean boolcol) {
-        this.boolcol = boolcol;
-    }
-
-    /**
-     * Gets bytecol.
-     *
-     * @return Value for bytecol.
-     */
-    public byte getBytecol() {
-        return bytecol;
-    }
-
-    /**
-     * Sets bytecol.
-     *
-     * @param bytecol New value for bytecol.
-     */
-    public void setBytecol(byte bytecol) {
-        this.bytecol = bytecol;
-    }
-
-    /**
-     * Gets shortcol.
-     *
-     * @return Value for shortcol.
-     */
-    public short getShortcol() {
-        return shortcol;
-    }
-
-    /**
-     * Sets shortcol.
-     *
-     * @param shortcol New value for shortcol.
-     */
-    public void setShortcol(short shortcol) {
-        this.shortcol = shortcol;
-    }
-
-    /**
-     * Gets intcol.
-     *
-     * @return Value for intcol.
-     */
-    public int getIntcol() {
-        return intcol;
-    }
-
-    /**
-     * Sets intcol.
-     *
-     * @param intcol New value for intcol.
-     */
-    public void setIntcol(int intcol) {
-        this.intcol = intcol;
-    }
-
-    /**
-     * Gets longcol.
-     *
-     * @return Value for longcol.
-     */
-    public long getLongcol() {
-        return longcol;
-    }
-
-    /**
-     * Sets longcol.
-     *
-     * @param longcol New value for longcol.
-     */
-    public void setLongcol(long longcol) {
-        this.longcol = longcol;
-    }
-
-    /**
-     * Gets floatcol.
-     *
-     * @return Value for floatcol.
-     */
-    public float getFloatcol() {
-        return floatcol;
-    }
-
-    /**
-     * Sets floatcol.
-     *
-     * @param floatcol New value for floatcol.
-     */
-    public void setFloatcol(float floatcol) {
-        this.floatcol = floatcol;
-    }
-
-    /**
-     * Gets doublecol.
-     *
-     * @return Value for doublecol.
-     */
-    public double getDoublecol() {
-        return doublecol;
-    }
-
-    /**
-     * Sets doublecol.
-     *
-     * @param doublecol New value for doublecol.
-     */
-    public void setDoublecol(double doublecol) {
-        this.doublecol = doublecol;
-    }
-
-    /**
-     * Gets doublecol2.
-     *
-     * @return Value for doublecol2.
-     */
-    public double getDoublecol2() {
-        return doublecol2;
-    }
-
-    /**
-     * Sets doublecol2.
-     *
-     * @param doublecol2 New value for doublecol2.
-     */
-    public void setDoublecol2(double doublecol2) {
-        this.doublecol2 = doublecol2;
-    }
-
-    /**
-     * Gets bigdecimalcol.
-     *
-     * @return Value for bigdecimalcol.
-     */
-    public java.math.BigDecimal getBigdecimalcol() {
-        return bigdecimalcol;
-    }
-
-    /**
-     * Sets bigdecimalcol.
-     *
-     * @param bigdecimalcol New value for bigdecimalcol.
-     */
-    public void setBigdecimalcol(java.math.BigDecimal bigdecimalcol) {
-        this.bigdecimalcol = bigdecimalcol;
-    }
-
-    /**
-     * Gets strcol.
-     *
-     * @return Value for strcol.
-     */
-    public String getStrcol() {
-        return strcol;
-    }
-
-    /**
-     * Sets strcol.
-     *
-     * @param strcol New value for strcol.
-     */
-    public void setStrcol(String strcol) {
-        this.strcol = strcol;
-    }
-
-    /**
-     * Gets datecol.
-     *
-     * @return Value for datecol.
-     */
-    public java.sql.Date getDatecol() {
-        return datecol;
-    }
-
-    /**
-     * Sets datecol.
-     *
-     * @param datecol New value for datecol.
-     */
-    public void setDatecol(java.sql.Date datecol) {
-        this.datecol = datecol;
-    }
-
-    /**
-     * Gets timecol.
-     *
-     * @return Value for timecol.
-     */
-    public java.sql.Time getTimecol() {
-        return timecol;
-    }
-
-    /**
-     * Sets timecol.
-     *
-     * @param timecol New value for timecol.
-     */
-    public void setTimecol(java.sql.Time timecol) {
-        this.timecol = timecol;
-    }
-
-    /**
-     * Gets tscol.
-     *
-     * @return Value for tscol.
-     */
-    public java.sql.Timestamp getTscol() {
-        return tscol;
-    }
-
-    /**
-     * Sets tscol.
-     *
-     * @param tscol New value for tscol.
-     */
-    public void setTscol(java.sql.Timestamp tscol) {
-        this.tscol = tscol;
-    }
-
-    /**
-     * Gets arrcol.
-     *
-     * @return Value for arrcol.
-     */
-    public Object getArrcol() {
-        return arrcol;
-    }
-
-    /**
-     * Sets arrcol.
-     *
-     * @param arrcol New value for arrcol.
-     */
-    public void setArrcol(Object arrcol) {
-        this.arrcol = arrcol;
-    }
-
-    /**
-     * Gets fieldWithAlias.
-     *
-     * @return Value for fieldWithAlias.
-     */
-    public String getFieldWithAlias() {
-        return fieldWithAlias;
-    }
-
-    /**
-     * Sets fieldWithAlias.
-     *
-     * @param fieldWithAlias New value for fieldWithAlias.
-     */
-    public void setFieldWithAlias(String fieldWithAlias) {
-        this.fieldWithAlias = fieldWithAlias;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        if (this == o)
-            return true;
-
-        if (!(o instanceof Tst))
-            return false;
-
-        Tst that = (Tst)o;
-
-        if (pk != that.pk)
-            return false;
-
-        if (boolcol != that.boolcol)
-            return false;
-
-        if (bytecol != that.bytecol)
-            return false;
-
-        if (shortcol != that.shortcol)
-            return false;
-
-        if (intcol != that.intcol)
-            return false;
-
-        if (longcol != that.longcol)
-            return false;
-
-        if (Float.compare(floatcol, that.floatcol) != 0)
-            return false;
-
-        if (Double.compare(doublecol, that.doublecol) != 0)
-            return false;
-
-        if (Double.compare(doublecol2, that.doublecol2) != 0)
-            return false;
-
-        if (bigdecimalcol != null ? !bigdecimalcol.equals(that.bigdecimalcol) : that.bigdecimalcol != null)
-            return false;
-
-        if (strcol != null ? !strcol.equals(that.strcol) : that.strcol != null)
-            return false;
-
-        if (datecol != null ? !datecol.equals(that.datecol) : that.datecol != null)
-            return false;
-
-        if (timecol != null ? !timecol.equals(that.timecol) : that.timecol != null)
-            return false;
-
-        if (tscol != null ? !tscol.equals(that.tscol) : that.tscol != null)
-            return false;
-
-        if (arrcol != null ? !arrcol.equals(that.arrcol) : that.arrcol != null)
-            return false;
-
-        if (fieldWithAlias != null ? !fieldWithAlias.equals(that.fieldWithAlias) : that.fieldWithAlias != null)
-            return false;
-
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        int res = pk;
-
-        res = 31 * res + (boolcol ? 1 : 0);
-
-        res = 31 * res + (int)bytecol;
-
-        res = 31 * res + (int)shortcol;
-
-        res = 31 * res + intcol;
-
-        res = 31 * res + (int)(longcol ^ (longcol >>> 32));
-
-        res = 31 * res + (floatcol != +0.0f ? Float.floatToIntBits(floatcol) : 0);
-
-        long ig_hash_temp = Double.doubleToLongBits(doublecol);
-
-        res = 31 * res + (int)(ig_hash_temp ^ (ig_hash_temp >>> 32));
-
-        ig_hash_temp = Double.doubleToLongBits(doublecol2);
-
-        res = 31 * res + (int)(ig_hash_temp ^ (ig_hash_temp >>> 32));
-
-        res = 31 * res + (bigdecimalcol != null ? bigdecimalcol.hashCode() : 0);
-
-        res = 31 * res + (strcol != null ? strcol.hashCode() : 0);
-
-        res = 31 * res + (datecol != null ? datecol.hashCode() : 0);
-
-        res = 31 * res + (timecol != null ? timecol.hashCode() : 0);
-
-        res = 31 * res + (tscol != null ? tscol.hashCode() : 0);
-
-        res = 31 * res + (arrcol != null ? arrcol.hashCode() : 0);
-
-        res = 31 * res + (fieldWithAlias != null ? fieldWithAlias.hashCode() : 0);
-
-        return res;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return "Tst [pk=" + pk +
-            ", boolcol=" + boolcol +
-            ", bytecol=" + bytecol +
-            ", shortcol=" + shortcol +
-            ", intcol=" + intcol +
-            ", longcol=" + longcol +
-            ", floatcol=" + floatcol +
-            ", doublecol=" + doublecol +
-            ", doublecol2=" + doublecol2 +
-            ", bigdecimalcol=" + bigdecimalcol +
-            ", strcol=" + strcol +
-            ", datecol=" + datecol +
-            ", timecol=" + timecol +
-            ", tscol=" + tscol +
-            ", arrcol=" + arrcol +
-            ", fieldWithAlias=" + fieldWithAlias +
-            "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/TstKey.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/TstKey.txt b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/TstKey.txt
deleted file mode 100644
index e2ce3c0..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/TstKey.txt
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.test.model;
-
-import java.io.*;
-
-/**
- * TstKey definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 01/27/2015.
- */
-public class TstKey implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Value for pk. */
-    private int pk;
-
-    /**
-     * Empty constructor.
-     */
-    public TstKey() {
-        // No-op.
-    }
-
-    /**
-     * Full constructor.
-     */
-    public TstKey(
-        int pk
-    ) {
-        this.pk = pk;
-    }
-
-    /**
-     * Gets pk.
-     *
-     * @return Value for pk.
-     */
-    public int getPk() {
-        return pk;
-    }
-
-    /**
-     * Sets pk.
-     *
-     * @param pk New value for pk.
-     */
-    public void setPk(int pk) {
-        this.pk = pk;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        if (this == o)
-            return true;
-
-        if (!(o instanceof TstKey))
-            return false;
-
-        TstKey that = (TstKey)o;
-
-        if (pk != that.pk)
-            return false;
-
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        int res = pk;
-
-        return res;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return "TstKey [pk=" + pk +
-            "]";
-    }
-}


[24/50] [abbrv] ignite git commit: IGNITE-4914 Distributing marshaller mappings for multiple platforms fixed

Posted by dm...@apache.org.
IGNITE-4914 Distributing marshaller mappings for multiple platforms fixed

This closes #1741


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

Branch: refs/heads/ignite-1192
Commit: 037bca6f92c6041f75e9db83cd6befd635321177
Parents: 7c80c47
Author: Sergey Chugunov <se...@gmail.com>
Authored: Thu Apr 6 11:25:57 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Thu Apr 6 11:25:57 2017 +0300

----------------------------------------------------------------------
 .../ignite/internal/MarshallerContextImpl.java  | 20 +++--
 .../marshaller/MarshallerContextSelfTest.java   | 80 ++++++++++++++++++--
 2 files changed, 88 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/037bca6f/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
index ce79b4f..effd481 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
@@ -25,6 +25,7 @@ import java.net.URL;
 import java.util.AbstractMap;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -145,9 +146,11 @@ public class MarshallerContextImpl implements MarshallerContext {
 
     /** */
     public ArrayList<Map<Integer, MappedName>> getCachedMappings() {
-        ArrayList<Map<Integer, MappedName>> result = new ArrayList<>(allCaches.size());
+        int size = allCaches.size();
+
+        ArrayList<Map<Integer, MappedName>> result = new ArrayList<>(size);
 
-        for (int i = 0; i < allCaches.size(); i++) {
+        for (int i = 0; i < size; i++) {
             Map res;
 
             if (i == JAVA_ID)
@@ -155,8 +158,10 @@ public class MarshallerContextImpl implements MarshallerContext {
             else
                 res = allCaches.get(i);
 
-            if (!res.isEmpty())
+            if (res != null && !res.isEmpty())
                 result.add(res);
+            else
+                result.add(Collections.<Integer, MappedName>emptyMap());
         }
 
         return result;
@@ -164,12 +169,12 @@ public class MarshallerContextImpl implements MarshallerContext {
 
     /**
      * @param platformId Platform id.
-     * @param marshallerMapping Marshaller mapping.
+     * @param marshallerMappings All marshaller mappings for given platformId.
      */
-    public void onMappingDataReceived(byte platformId, Map<Integer, MappedName> marshallerMapping) {
+    public void onMappingDataReceived(byte platformId, Map<Integer, MappedName> marshallerMappings) {
         ConcurrentMap<Integer, MappedName> platformCache = getCacheFor(platformId);
 
-        for (Map.Entry<Integer, MappedName> e : marshallerMapping.entrySet())
+        for (Map.Entry<Integer, MappedName> e : marshallerMappings.entrySet())
             platformCache.put(e.getKey(), new MappedName(e.getValue().className(), true));
     }
 
@@ -299,7 +304,8 @@ public class MarshallerContextImpl implements MarshallerContext {
     /**
      *
      * @param item type mapping to propose
-     * @return false if there is a conflict with another mapping in local cache, true otherwise.
+     * @return null if cache doesn't contain any mappings for given (platformId, typeId) pair,
+     * previous class name otherwise.
      */
     public String onMappingProposed(MarshallerMappingItem item) {
         ConcurrentMap<Integer, MappedName> cache = getCacheFor(item.platformId());

http://git-wip-us.apache.org/repos/asf/ignite/blob/037bca6f/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java
index 5883898..db3738d 100644
--- a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java
@@ -21,7 +21,9 @@ import java.io.File;
 import java.io.IOException;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
@@ -29,6 +31,7 @@ import org.apache.ignite.Ignite;
 import org.apache.ignite.internal.IgniteKernal;
 import org.apache.ignite.internal.MarshallerContextImpl;
 import org.apache.ignite.internal.processors.closure.GridClosureProcessor;
+import org.apache.ignite.internal.processors.marshaller.MappedName;
 import org.apache.ignite.internal.processors.marshaller.MarshallerMappingItem;
 import org.apache.ignite.internal.processors.pool.PoolProcessor;
 import org.apache.ignite.internal.util.typedef.internal.U;
@@ -60,22 +63,27 @@ public class MarshallerContextSelfTest extends GridCommonAbstractTest {
         ctx.add(new GridClosureProcessor(ctx));
     }
 
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        stopAllGrids();
+    }
+
     /**
      * @throws Exception If failed.
      */
     public void testClassName() throws Exception {
-        MarshallerContextImpl ctx = new MarshallerContextImpl(null);
+        MarshallerContextImpl marshCtx = new MarshallerContextImpl(null);
 
-        ctx.onMarshallerProcessorStarted(this.ctx, null);
+        marshCtx.onMarshallerProcessorStarted(ctx, null);
 
         MarshallerMappingItem item = new MarshallerMappingItem(JAVA_ID, 1, String.class.getName());
 
-        ctx.onMappingProposed(item);
+        marshCtx.onMappingProposed(item);
 
-        ctx.onMappingAccepted(item);
+        marshCtx.onMappingAccepted(item);
 
         try (Ignite g1 = startGrid(1)) {
-            MarshallerContextImpl marshCtx = ((IgniteKernal)g1).context().marshallerContext();
+            marshCtx = ((IgniteKernal)g1).context().marshallerContext();
             String clsName = marshCtx.getClassName(JAVA_ID, 1);
 
             assertEquals("java.lang.String", clsName);
@@ -83,6 +91,68 @@ public class MarshallerContextSelfTest extends GridCommonAbstractTest {
     }
 
     /**
+     * Test for adding non-java mappings (with platformId &gt; 0) to MarshallerContext and collecting them
+     * for discovery.
+     *
+     * @throws Exception If failed.
+     */
+    public void testMultiplatformMappingsCollecting() throws Exception {
+        String nonJavaClassName = "random.platform.Mapping";
+
+        MarshallerContextImpl marshCtx = new MarshallerContextImpl(null);
+
+        marshCtx.onMarshallerProcessorStarted(ctx, null);
+
+        MarshallerMappingItem item = new MarshallerMappingItem((byte) 2, 101, nonJavaClassName);
+
+        marshCtx.onMappingProposed(item);
+
+        marshCtx.onMappingAccepted(item);
+
+        ArrayList<Map<Integer, MappedName>> allMappings = marshCtx.getCachedMappings();
+
+        assertEquals(allMappings.size(), 3);
+
+        assertTrue(allMappings.get(0).isEmpty());
+
+        assertTrue(allMappings.get(1).isEmpty());
+
+        Map<Integer, MappedName> nonJavaMappings = allMappings.get(2);
+
+        assertNotNull(nonJavaMappings);
+
+        assertNotNull(nonJavaMappings.get(101));
+
+        assertEquals(nonJavaClassName, nonJavaMappings.get(101).className());
+    }
+
+    /**
+     * Test for adding non-java mappings (with platformId &gt; 0) to MarshallerContext and distributing them
+     * to newly joining nodes.
+     *
+     * @throws Exception If failed.
+     */
+    public void testMultiplatformMappingsDistributing() throws Exception {
+        String nonJavaClassName = "random.platform.Mapping";
+
+        Ignite grid0 = startGrid(0);
+
+        MarshallerContextImpl marshCtx0 = ((IgniteKernal)grid0).context().marshallerContext();
+
+        MarshallerMappingItem item = new MarshallerMappingItem((byte) 2, 101, nonJavaClassName);
+
+        marshCtx0.onMappingProposed(item);
+
+        marshCtx0.onMappingAccepted(item);
+
+        Ignite grid1 = startGrid(1);
+
+        MarshallerContextImpl marshCtx1 = ((IgniteKernal)grid1).context().marshallerContext();
+
+        assertEquals(nonJavaClassName, marshCtx1.getClassName((byte) 2, 101));
+    }
+
+    /**
      * @throws Exception If failed.
      */
     public void testOnUpdated() throws Exception {


[31/50] [abbrv] ignite git commit: IGNITE-4349 Discontinue the schema-import utility.

Posted by dm...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ignite-type-metadata.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ignite-type-metadata.xml b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ignite-type-metadata.xml
deleted file mode 100644
index fc481f0..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ignite-type-metadata.xml
+++ /dev/null
@@ -1,666 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!--
-    XML generated by Apache Ignite Schema Import utility: 08/18/2016
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:util="http://www.springframework.org/schema/util"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans
-                           http://www.springframework.org/schema/beans/spring-beans.xsd
-                           http://www.springframework.org/schema/util
-                           http://www.springframework.org/schema/util/spring-util.xsd">
-    <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
-        <property name="types">
-            <list>
-                <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
-                    <property name="databaseSchema" value="PUBLIC"/>
-                    <property name="databaseTable" value="OBJECTS"/>
-                    <property name="keyType" value="org.apache.ignite.schema.test.model.ObjectsKey"/>
-                    <property name="valueType" value="org.apache.ignite.schema.test.model.Objects"/>
-                    <property name="keyFields">
-                        <list>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.INTEGER"/>
-                                </property>
-                                <property name="databaseFieldName" value="PK"/>
-                                <property name="javaFieldType" value="int"/>
-                                <property name="javaFieldName" value="pk"/>
-                            </bean>
-                        </list>
-                    </property>
-                    <property name="valueFields">
-                        <list>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.INTEGER"/>
-                                </property>
-                                <property name="databaseFieldName" value="PK"/>
-                                <property name="javaFieldType" value="int"/>
-                                <property name="javaFieldName" value="pk"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.BOOLEAN"/>
-                                </property>
-                                <property name="databaseFieldName" value="BOOLCOL"/>
-                                <property name="javaFieldType" value="java.lang.Boolean"/>
-                                <property name="javaFieldName" value="boolcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.TINYINT"/>
-                                </property>
-                                <property name="databaseFieldName" value="BYTECOL"/>
-                                <property name="javaFieldType" value="java.lang.Byte"/>
-                                <property name="javaFieldName" value="bytecol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.SMALLINT"/>
-                                </property>
-                                <property name="databaseFieldName" value="SHORTCOL"/>
-                                <property name="javaFieldType" value="java.lang.Short"/>
-                                <property name="javaFieldName" value="shortcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.INTEGER"/>
-                                </property>
-                                <property name="databaseFieldName" value="INTCOL"/>
-                                <property name="javaFieldType" value="java.lang.Integer"/>
-                                <property name="javaFieldName" value="intcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.BIGINT"/>
-                                </property>
-                                <property name="databaseFieldName" value="LONGCOL"/>
-                                <property name="javaFieldType" value="java.lang.Long"/>
-                                <property name="javaFieldName" value="longcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.REAL"/>
-                                </property>
-                                <property name="databaseFieldName" value="FLOATCOL"/>
-                                <property name="javaFieldType" value="java.lang.Float"/>
-                                <property name="javaFieldName" value="floatcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.DOUBLE"/>
-                                </property>
-                                <property name="databaseFieldName" value="DOUBLECOL"/>
-                                <property name="javaFieldType" value="java.lang.Double"/>
-                                <property name="javaFieldName" value="doublecol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.DOUBLE"/>
-                                </property>
-                                <property name="databaseFieldName" value="DOUBLECOL2"/>
-                                <property name="javaFieldType" value="java.lang.Double"/>
-                                <property name="javaFieldName" value="doublecol2"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.DECIMAL"/>
-                                </property>
-                                <property name="databaseFieldName" value="BIGDECIMALCOL"/>
-                                <property name="javaFieldType" value="java.math.BigDecimal"/>
-                                <property name="javaFieldName" value="bigdecimalcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.VARCHAR"/>
-                                </property>
-                                <property name="databaseFieldName" value="STRCOL"/>
-                                <property name="javaFieldType" value="java.lang.String"/>
-                                <property name="javaFieldName" value="strcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.DATE"/>
-                                </property>
-                                <property name="databaseFieldName" value="DATECOL"/>
-                                <property name="javaFieldType" value="java.sql.Date"/>
-                                <property name="javaFieldName" value="datecol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.TIME"/>
-                                </property>
-                                <property name="databaseFieldName" value="TIMECOL"/>
-                                <property name="javaFieldType" value="java.sql.Time"/>
-                                <property name="javaFieldName" value="timecol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.TIMESTAMP"/>
-                                </property>
-                                <property name="databaseFieldName" value="TSCOL"/>
-                                <property name="javaFieldType" value="java.sql.Timestamp"/>
-                                <property name="javaFieldName" value="tscol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.VARBINARY"/>
-                                </property>
-                                <property name="databaseFieldName" value="ARRCOL"/>
-                                <property name="javaFieldType" value="java.lang.Object"/>
-                                <property name="javaFieldName" value="arrcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.VARCHAR"/>
-                                </property>
-                                <property name="databaseFieldName" value="FIELD_WITH_ALIAS"/>
-                                <property name="javaFieldType" value="java.lang.String"/>
-                                <property name="javaFieldName" value="fieldWithAlias"/>
-                            </bean>
-                        </list>
-                    </property>
-                </bean>
-                <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
-                    <property name="databaseSchema" value="PUBLIC"/>
-                    <property name="databaseTable" value="PRIMITIVES"/>
-                    <property name="keyType" value="org.apache.ignite.schema.test.model.PrimitivesKey"/>
-                    <property name="valueType" value="org.apache.ignite.schema.test.model.Primitives"/>
-                    <property name="keyFields">
-                        <list>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.INTEGER"/>
-                                </property>
-                                <property name="databaseFieldName" value="PK"/>
-                                <property name="javaFieldType" value="int"/>
-                                <property name="javaFieldName" value="pk"/>
-                            </bean>
-                        </list>
-                    </property>
-                    <property name="valueFields">
-                        <list>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.INTEGER"/>
-                                </property>
-                                <property name="databaseFieldName" value="PK"/>
-                                <property name="javaFieldType" value="int"/>
-                                <property name="javaFieldName" value="pk"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.BOOLEAN"/>
-                                </property>
-                                <property name="databaseFieldName" value="BOOLCOL"/>
-                                <property name="javaFieldType" value="boolean"/>
-                                <property name="javaFieldName" value="boolcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.TINYINT"/>
-                                </property>
-                                <property name="databaseFieldName" value="BYTECOL"/>
-                                <property name="javaFieldType" value="byte"/>
-                                <property name="javaFieldName" value="bytecol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.SMALLINT"/>
-                                </property>
-                                <property name="databaseFieldName" value="SHORTCOL"/>
-                                <property name="javaFieldType" value="short"/>
-                                <property name="javaFieldName" value="shortcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.INTEGER"/>
-                                </property>
-                                <property name="databaseFieldName" value="INTCOL"/>
-                                <property name="javaFieldType" value="int"/>
-                                <property name="javaFieldName" value="intcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.BIGINT"/>
-                                </property>
-                                <property name="databaseFieldName" value="LONGCOL"/>
-                                <property name="javaFieldType" value="long"/>
-                                <property name="javaFieldName" value="longcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.REAL"/>
-                                </property>
-                                <property name="databaseFieldName" value="FLOATCOL"/>
-                                <property name="javaFieldType" value="float"/>
-                                <property name="javaFieldName" value="floatcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.DOUBLE"/>
-                                </property>
-                                <property name="databaseFieldName" value="DOUBLECOL"/>
-                                <property name="javaFieldType" value="double"/>
-                                <property name="javaFieldName" value="doublecol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.DOUBLE"/>
-                                </property>
-                                <property name="databaseFieldName" value="DOUBLECOL2"/>
-                                <property name="javaFieldType" value="double"/>
-                                <property name="javaFieldName" value="doublecol2"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.DECIMAL"/>
-                                </property>
-                                <property name="databaseFieldName" value="BIGDECIMALCOL"/>
-                                <property name="javaFieldType" value="java.math.BigDecimal"/>
-                                <property name="javaFieldName" value="bigdecimalcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.VARCHAR"/>
-                                </property>
-                                <property name="databaseFieldName" value="STRCOL"/>
-                                <property name="javaFieldType" value="java.lang.String"/>
-                                <property name="javaFieldName" value="strcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.DATE"/>
-                                </property>
-                                <property name="databaseFieldName" value="DATECOL"/>
-                                <property name="javaFieldType" value="java.sql.Date"/>
-                                <property name="javaFieldName" value="datecol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.TIME"/>
-                                </property>
-                                <property name="databaseFieldName" value="TIMECOL"/>
-                                <property name="javaFieldType" value="java.sql.Time"/>
-                                <property name="javaFieldName" value="timecol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.TIMESTAMP"/>
-                                </property>
-                                <property name="databaseFieldName" value="TSCOL"/>
-                                <property name="javaFieldType" value="java.sql.Timestamp"/>
-                                <property name="javaFieldName" value="tscol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.VARBINARY"/>
-                                </property>
-                                <property name="databaseFieldName" value="ARRCOL"/>
-                                <property name="javaFieldType" value="java.lang.Object"/>
-                                <property name="javaFieldName" value="arrcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.VARCHAR"/>
-                                </property>
-                                <property name="databaseFieldName" value="FIELD_WITH_ALIAS"/>
-                                <property name="javaFieldType" value="java.lang.String"/>
-                                <property name="javaFieldName" value="fieldWithAlias"/>
-                            </bean>
-                        </list>
-                    </property>
-                </bean>
-                <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
-                    <property name="databaseSchema" value="TESTSCHEMA"/>
-                    <property name="databaseTable" value="TST"/>
-                    <property name="keyType" value="org.apache.ignite.schema.test.model.TstKey"/>
-                    <property name="valueType" value="org.apache.ignite.schema.test.model.Tst"/>
-                    <property name="keyFields">
-                        <list>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.INTEGER"/>
-                                </property>
-                                <property name="databaseFieldName" value="PK"/>
-                                <property name="javaFieldType" value="int"/>
-                                <property name="javaFieldName" value="pk"/>
-                            </bean>
-                        </list>
-                    </property>
-                    <property name="valueFields">
-                        <list>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.INTEGER"/>
-                                </property>
-                                <property name="databaseFieldName" value="PK"/>
-                                <property name="javaFieldType" value="int"/>
-                                <property name="javaFieldName" value="pk"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.BOOLEAN"/>
-                                </property>
-                                <property name="databaseFieldName" value="BOOLCOL"/>
-                                <property name="javaFieldType" value="boolean"/>
-                                <property name="javaFieldName" value="boolcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.TINYINT"/>
-                                </property>
-                                <property name="databaseFieldName" value="BYTECOL"/>
-                                <property name="javaFieldType" value="byte"/>
-                                <property name="javaFieldName" value="bytecol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.SMALLINT"/>
-                                </property>
-                                <property name="databaseFieldName" value="SHORTCOL"/>
-                                <property name="javaFieldType" value="short"/>
-                                <property name="javaFieldName" value="shortcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.INTEGER"/>
-                                </property>
-                                <property name="databaseFieldName" value="INTCOL"/>
-                                <property name="javaFieldType" value="int"/>
-                                <property name="javaFieldName" value="intcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.BIGINT"/>
-                                </property>
-                                <property name="databaseFieldName" value="LONGCOL"/>
-                                <property name="javaFieldType" value="long"/>
-                                <property name="javaFieldName" value="longcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.REAL"/>
-                                </property>
-                                <property name="databaseFieldName" value="FLOATCOL"/>
-                                <property name="javaFieldType" value="float"/>
-                                <property name="javaFieldName" value="floatcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.DOUBLE"/>
-                                </property>
-                                <property name="databaseFieldName" value="DOUBLECOL"/>
-                                <property name="javaFieldType" value="double"/>
-                                <property name="javaFieldName" value="doublecol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.DOUBLE"/>
-                                </property>
-                                <property name="databaseFieldName" value="DOUBLECOL2"/>
-                                <property name="javaFieldType" value="double"/>
-                                <property name="javaFieldName" value="doublecol2"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.DECIMAL"/>
-                                </property>
-                                <property name="databaseFieldName" value="BIGDECIMALCOL"/>
-                                <property name="javaFieldType" value="java.math.BigDecimal"/>
-                                <property name="javaFieldName" value="bigdecimalcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.VARCHAR"/>
-                                </property>
-                                <property name="databaseFieldName" value="STRCOL"/>
-                                <property name="javaFieldType" value="java.lang.String"/>
-                                <property name="javaFieldName" value="strcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.DATE"/>
-                                </property>
-                                <property name="databaseFieldName" value="DATECOL"/>
-                                <property name="javaFieldType" value="java.sql.Date"/>
-                                <property name="javaFieldName" value="datecol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.TIME"/>
-                                </property>
-                                <property name="databaseFieldName" value="TIMECOL"/>
-                                <property name="javaFieldType" value="java.sql.Time"/>
-                                <property name="javaFieldName" value="timecol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.TIMESTAMP"/>
-                                </property>
-                                <property name="databaseFieldName" value="TSCOL"/>
-                                <property name="javaFieldType" value="java.sql.Timestamp"/>
-                                <property name="javaFieldName" value="tscol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.VARBINARY"/>
-                                </property>
-                                <property name="databaseFieldName" value="ARRCOL"/>
-                                <property name="javaFieldType" value="java.lang.Object"/>
-                                <property name="javaFieldName" value="arrcol"/>
-                            </bean>
-                            <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                <property name="databaseFieldType">
-                                    <util:constant static-field="java.sql.Types.VARCHAR"/>
-                                </property>
-                                <property name="databaseFieldName" value="FIELD_WITH_ALIAS"/>
-                                <property name="javaFieldType" value="java.lang.String"/>
-                                <property name="javaFieldName" value="fieldWithAlias"/>
-                            </bean>
-                        </list>
-                    </property>
-                </bean>
-            </list>
-        </property>
-    </bean>
-    <bean class="org.apache.ignite.cache.QueryEntity">
-        <property name="keyType" value="org.apache.ignite.schema.test.model.ObjectsKey"/>
-        <property name="valueType" value="org.apache.ignite.schema.test.model.Objects"/>
-        <property name="fields">
-            <util:map map-class="java.util.LinkedHashMap">
-                <entry key="pk" value="java.lang.Integer"/>
-                <entry key="boolcol" value="java.lang.Boolean"/>
-                <entry key="bytecol" value="java.lang.Byte"/>
-                <entry key="shortcol" value="java.lang.Short"/>
-                <entry key="intcol" value="java.lang.Integer"/>
-                <entry key="longcol" value="java.lang.Long"/>
-                <entry key="floatcol" value="java.lang.Float"/>
-                <entry key="doublecol" value="java.lang.Double"/>
-                <entry key="doublecol2" value="java.lang.Double"/>
-                <entry key="bigdecimalcol" value="java.math.BigDecimal"/>
-                <entry key="strcol" value="java.lang.String"/>
-                <entry key="datecol" value="java.sql.Date"/>
-                <entry key="timecol" value="java.sql.Time"/>
-                <entry key="tscol" value="java.sql.Timestamp"/>
-                <entry key="arrcol" value="java.lang.Object"/>
-                <entry key="fieldWithAlias" value="java.lang.String"/>
-            </util:map>
-        </property>
-        <property name="aliases">
-            <map>
-                <entry key="fieldWithAlias" value="FIELD_WITH_ALIAS"/>
-            </map>
-        </property>
-        <property name="indexes">
-            <list>
-                <bean class="org.apache.ignite.cache.QueryIndex">
-                    <property name="name" value="PRIMARY_KEY_C"/>
-                    <property name="indexType">
-                        <util:constant static-field="org.apache.ignite.cache.QueryIndexType.SORTED"/>
-                    </property>
-                    <property name="fields">
-                        <map>
-                            <entry key="pk" value="true"/>
-                        </map>
-                    </property>
-                </bean>
-                <bean class="org.apache.ignite.cache.QueryIndex">
-                    <property name="name" value="IDX_1"/>
-                    <property name="indexType">
-                        <util:constant static-field="org.apache.ignite.cache.QueryIndexType.SORTED"/>
-                    </property>
-                    <property name="fields">
-                        <map>
-                            <entry key="intcol" value="true"/>
-                            <entry key="longcol" value="true"/>
-                        </map>
-                    </property>
-                </bean>
-                <bean class="org.apache.ignite.cache.QueryIndex">
-                    <property name="name" value="IDX_2"/>
-                    <property name="indexType">
-                        <util:constant static-field="org.apache.ignite.cache.QueryIndexType.SORTED"/>
-                    </property>
-                    <property name="fields">
-                        <map>
-                            <entry key="intcol" value="true"/>
-                            <entry key="longcol" value="false"/>
-                        </map>
-                    </property>
-                </bean>
-            </list>
-        </property>
-    </bean>
-    <bean class="org.apache.ignite.cache.QueryEntity">
-        <property name="keyType" value="org.apache.ignite.schema.test.model.PrimitivesKey"/>
-        <property name="valueType" value="org.apache.ignite.schema.test.model.Primitives"/>
-        <property name="fields">
-            <util:map map-class="java.util.LinkedHashMap">
-                <entry key="pk" value="java.lang.Integer"/>
-                <entry key="boolcol" value="java.lang.Boolean"/>
-                <entry key="bytecol" value="java.lang.Byte"/>
-                <entry key="shortcol" value="java.lang.Short"/>
-                <entry key="intcol" value="java.lang.Integer"/>
-                <entry key="longcol" value="java.lang.Long"/>
-                <entry key="floatcol" value="java.lang.Float"/>
-                <entry key="doublecol" value="java.lang.Double"/>
-                <entry key="doublecol2" value="java.lang.Double"/>
-                <entry key="bigdecimalcol" value="java.math.BigDecimal"/>
-                <entry key="strcol" value="java.lang.String"/>
-                <entry key="datecol" value="java.sql.Date"/>
-                <entry key="timecol" value="java.sql.Time"/>
-                <entry key="tscol" value="java.sql.Timestamp"/>
-                <entry key="arrcol" value="java.lang.Object"/>
-                <entry key="fieldWithAlias" value="java.lang.String"/>
-            </util:map>
-        </property>
-        <property name="aliases">
-            <map>
-                <entry key="fieldWithAlias" value="FIELD_WITH_ALIAS"/>
-            </map>
-        </property>
-        <property name="indexes">
-            <list>
-                <bean class="org.apache.ignite.cache.QueryIndex">
-                    <property name="name" value="PRIMARY_KEY_D"/>
-                    <property name="indexType">
-                        <util:constant static-field="org.apache.ignite.cache.QueryIndexType.SORTED"/>
-                    </property>
-                    <property name="fields">
-                        <map>
-                            <entry key="pk" value="true"/>
-                        </map>
-                    </property>
-                </bean>
-            </list>
-        </property>
-    </bean>
-    <bean class="org.apache.ignite.cache.QueryEntity">
-        <property name="keyType" value="org.apache.ignite.schema.test.model.TstKey"/>
-        <property name="valueType" value="org.apache.ignite.schema.test.model.Tst"/>
-        <property name="fields">
-            <util:map map-class="java.util.LinkedHashMap">
-                <entry key="pk" value="java.lang.Integer"/>
-                <entry key="boolcol" value="java.lang.Boolean"/>
-                <entry key="bytecol" value="java.lang.Byte"/>
-                <entry key="shortcol" value="java.lang.Short"/>
-                <entry key="intcol" value="java.lang.Integer"/>
-                <entry key="longcol" value="java.lang.Long"/>
-                <entry key="floatcol" value="java.lang.Float"/>
-                <entry key="doublecol" value="java.lang.Double"/>
-                <entry key="doublecol2" value="java.lang.Double"/>
-                <entry key="bigdecimalcol" value="java.math.BigDecimal"/>
-                <entry key="strcol" value="java.lang.String"/>
-                <entry key="datecol" value="java.sql.Date"/>
-                <entry key="timecol" value="java.sql.Time"/>
-                <entry key="tscol" value="java.sql.Timestamp"/>
-                <entry key="arrcol" value="java.lang.Object"/>
-                <entry key="fieldWithAlias" value="java.lang.String"/>
-            </util:map>
-        </property>
-        <property name="aliases">
-            <map>
-                <entry key="fieldWithAlias" value="FIELD_WITH_ALIAS"/>
-            </map>
-        </property>
-        <property name="indexes">
-            <list>
-                <bean class="org.apache.ignite.cache.QueryIndex">
-                    <property name="name" value="PRIMARY_KEY_1"/>
-                    <property name="indexType">
-                        <util:constant static-field="org.apache.ignite.cache.QueryIndexType.SORTED"/>
-                    </property>
-                    <property name="fields">
-                        <map>
-                            <entry key="pk" value="true"/>
-                        </map>
-                    </property>
-                </bean>
-                <bean class="org.apache.ignite.cache.QueryIndex">
-                    <property name="name" value="IDX_3"/>
-                    <property name="indexType">
-                        <util:constant static-field="org.apache.ignite.cache.QueryIndexType.SORTED"/>
-                    </property>
-                    <property name="fields">
-                        <map>
-                            <entry key="intcol" value="true"/>
-                            <entry key="longcol" value="true"/>
-                        </map>
-                    </property>
-                </bean>
-                <bean class="org.apache.ignite.cache.QueryIndex">
-                    <property name="name" value="IDX_4"/>
-                    <property name="indexType">
-                        <util:constant static-field="org.apache.ignite.cache.QueryIndexType.SORTED"/>
-                    </property>
-                    <property name="fields">
-                        <map>
-                            <entry key="intcol" value="true"/>
-                            <entry key="longcol" value="false"/>
-                        </map>
-                    </property>
-                </bean>
-            </list>
-        </property>
-    </bean>
-</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/parser/DbMetadataParserTest.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/parser/DbMetadataParserTest.java b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/parser/DbMetadataParserTest.java
deleted file mode 100644
index a550bfc..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/parser/DbMetadataParserTest.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.test.parser;
-
-import java.math.BigDecimal;
-import java.sql.Date;
-import java.sql.Time;
-import java.sql.Timestamp;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import org.apache.ignite.schema.model.PojoDescriptor;
-import org.apache.ignite.schema.model.PojoField;
-import org.apache.ignite.schema.test.AbstractSchemaImportTest;
-
-/**
- * Tests for metadata parsing.
- */
-public class DbMetadataParserTest extends AbstractSchemaImportTest {
-    /**
-     * Check that field is correspond to expected.
-     *
-     * @param field Field descriptor.
-     * @param name Expected field name.
-     * @param primitive Expected field primitive type.
-     * @param cls Expected field type.
-     */
-    private void checkField(PojoField field, String name, boolean primitive, Class<?> cls) {
-        assertEquals("Name of field should be " + name, name, field.javaName());
-
-        assertEquals("Type of field should be " + cls.getName(), cls.getName(), field.javaTypeName());
-
-        assertEquals("Field primitive should be " + primitive, primitive, field.primitive());
-    }
-
-    /**
-     * Check that type is correspond to expected.
-     *
-     * @param type Type descriptor.
-     */
-    private void checkType(PojoDescriptor type) {
-        assertFalse("Type key class name should be defined", type.keyClassName().isEmpty());
-
-        assertFalse("Type value class name should be defined", type.valueClassName().isEmpty());
-
-        Collection<PojoField> keyFields = type.keyFields();
-
-        assertEquals("Key type should have 1 field", 1, keyFields.size());
-
-        checkField(keyFields.iterator().next(), "pk", true, int.class);
-
-        List<PojoField> fields = type.fields();
-
-        assertEquals("Value type should have 15 fields", 16, fields.size());
-
-        Iterator<PojoField> fieldsIt = fields.iterator();
-
-        checkField(fieldsIt.next(), "pk", true, int.class);
-
-        if ("Objects".equals(type.valueClassName())) {
-            checkField(fieldsIt.next(), "boolcol", false, Boolean.class);
-            checkField(fieldsIt.next(), "bytecol", false, Byte.class);
-            checkField(fieldsIt.next(), "shortcol", false, Short.class);
-            checkField(fieldsIt.next(), "intcol", false, Integer.class);
-            checkField(fieldsIt.next(), "longcol", false, Long.class);
-            checkField(fieldsIt.next(), "floatcol", false, Float.class);
-            checkField(fieldsIt.next(), "doublecol", false, Double.class);
-            checkField(fieldsIt.next(), "doublecol2", false, Double.class);
-        }
-        else {
-            checkField(fieldsIt.next(), "boolcol", true, boolean.class);
-            checkField(fieldsIt.next(), "bytecol", true, byte.class);
-            checkField(fieldsIt.next(), "shortcol", true, short.class);
-            checkField(fieldsIt.next(), "intcol", true, int.class);
-            checkField(fieldsIt.next(), "longcol", true, long.class);
-            checkField(fieldsIt.next(), "floatcol", true, float.class);
-            checkField(fieldsIt.next(), "doublecol", true, double.class);
-            checkField(fieldsIt.next(), "doublecol2", true, double.class);
-        }
-
-        checkField(fieldsIt.next(), "bigdecimalcol", false, BigDecimal.class);
-        checkField(fieldsIt.next(), "strcol", false, String.class);
-        checkField(fieldsIt.next(), "datecol", false, Date.class);
-        checkField(fieldsIt.next(), "timecol", false, Time.class);
-        checkField(fieldsIt.next(), "tscol", false, Timestamp.class);
-        checkField(fieldsIt.next(), "arrcol", false, Object.class);
-    }
-
-    /**
-     * Check that type has not null full db name.
-     *
-     * @param type Type to check.
-     */
-    private void checkSchemaHasFullDbName(PojoDescriptor type) {
-        assertNotNull("The DB schema should have a non-null fullDbName", type.fullDbName());
-    }
-
-    /**
-     * Test that metadata generated correctly.
-     */
-    public void testCheckMetadata() {
-        assertEquals("Metadata should contain 5 elements", 5, all.size());
-
-        Iterator<PojoDescriptor> it = all.iterator();
-
-        PojoDescriptor schema = it.next();
-
-        assertTrue("First element is schema description. Its class name should be empty",
-                schema.valueClassName().isEmpty());
-
-        checkType(it.next());
-
-        checkType(it.next());
-
-        checkSchemaHasFullDbName(it.next());
-
-        checkType(it.next());
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/testsuites/IgniteSchemaImportTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/testsuites/IgniteSchemaImportTestSuite.java b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/testsuites/IgniteSchemaImportTestSuite.java
deleted file mode 100644
index ca769c8..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/testsuites/IgniteSchemaImportTestSuite.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.test.testsuites;
-
-import junit.framework.TestSuite;
-import org.apache.ignite.schema.test.generator.CodeGeneratorTest;
-import org.apache.ignite.schema.test.generator.XmlGeneratorTest;
-import org.apache.ignite.schema.test.parser.DbMetadataParserTest;
-
-/**
- * Ignite Schema Import Utility Tests.
- */
-public class IgniteSchemaImportTestSuite {
-    /**
-     * @return Test suite.
-     * @throws Exception Thrown in case of the failure.
-     */
-    public static TestSuite suite() throws Exception {
-        TestSuite suite = new TestSuite("Ignite Apache Schema Import Utility Test Suite");
-
-        suite.addTestSuite(CodeGeneratorTest.class);
-        suite.addTestSuite(XmlGeneratorTest.class);
-        suite.addTestSuite(DbMetadataParserTest.class);
-
-        return suite;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/web-console/web-agent/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/pom.xml b/modules/web-console/web-agent/pom.xml
index a2ead7d..530aef6 100644
--- a/modules/web-console/web-agent/pom.xml
+++ b/modules/web-console/web-agent/pom.xml
@@ -66,18 +66,6 @@
 
         <dependency>
             <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-schema-import-db</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.gridgain</groupId>
-                    <artifactId>ignite-shmem</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
             <artifactId>ignite-indexing</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/DbColumn.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/DbColumn.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/DbColumn.java
new file mode 100644
index 0000000..723ee25
--- /dev/null
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/DbColumn.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.console.agent.db;
+
+/**
+ * Database table column.
+ */
+public class DbColumn {
+    /** Column name. */
+    private final String name;
+
+    /** Column JDBC type. */
+    private final int type;
+
+    /** Is this column belongs to primary key. */
+    private final boolean key;
+
+    /** Is {@code NULL} allowed for column in database. */
+    private final boolean nullable;
+
+    /** Whether column unsigned. */
+    private final boolean unsigned;
+
+    /**
+     * @param name Column name.
+     * @param type Column JDBC type.
+     * @param key {@code true} if this column belongs to primary key.
+     * @param nullable {@code true} if {@code NULL } allowed for column in database.
+     * @param unsigned {@code true} if column is unsigned.
+     */
+    public DbColumn(String name, int type, boolean key, boolean nullable, boolean unsigned) {
+        this.name = name;
+        this.type = type;
+        this.key = key;
+        this.nullable = nullable;
+        this.unsigned = unsigned;
+    }
+
+    /**
+     * @return Column name.
+     */
+    public String name() {
+        return name;
+    }
+
+    /**
+     * @return Column JDBC type.
+     */
+    public int type() {
+        return type;
+    }
+
+    /**
+     * @return {@code true} if this column belongs to primary key.
+     */
+    public boolean key() {
+        return key;
+    }
+
+    /**
+     * @return {@code true} if {@code NULL } allowed for column in database.
+     */
+    public boolean nullable() {
+        return nullable;
+    }
+
+    /**
+     * @return {@code true} if column is unsigned.
+     */
+    public boolean unsigned() {
+        return unsigned;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/DbMetadataReader.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/DbMetadataReader.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/DbMetadataReader.java
new file mode 100644
index 0000000..9aa0321
--- /dev/null
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/DbMetadataReader.java
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.console.agent.db;
+
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.SQLException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import org.apache.ignite.console.agent.db.dialect.DB2MetadataDialect;
+import org.apache.ignite.console.agent.db.dialect.DatabaseMetadataDialect;
+import org.apache.ignite.console.agent.db.dialect.JdbcMetadataDialect;
+import org.apache.ignite.console.agent.db.dialect.MySQLMetadataDialect;
+import org.apache.ignite.console.agent.db.dialect.OracleMetadataDialect;
+import org.apache.log4j.Logger;
+
+/**
+ * Singleton to extract database metadata.
+ */
+public class DbMetadataReader {
+    /** Logger. */
+    private static final Logger log = Logger.getLogger(DbMetadataReader.class.getName());
+
+    /** */
+    private final Map<String, Driver> drivers = new HashMap<>();
+
+    /**
+     * Get specified dialect object for selected database.
+     *
+     * @param conn Connection to database.
+     * @return Specific dialect object.
+     */
+    private DatabaseMetadataDialect dialect(Connection conn) {
+        try {
+            String dbProductName = conn.getMetaData().getDatabaseProductName();
+
+            if ("Oracle".equals(dbProductName))
+                return new OracleMetadataDialect();
+
+            if (dbProductName.startsWith("DB2/"))
+                return new DB2MetadataDialect();
+
+            if ("MySQL".equals(dbProductName))
+                return new MySQLMetadataDialect();
+
+            return new JdbcMetadataDialect();
+        }
+        catch (SQLException e) {
+            log.error("Failed to resolve dialect (JdbcMetaDataDialect will be used.", e);
+
+            return new JdbcMetadataDialect();
+        }
+    }
+
+    /**
+     * Get list of schemas from database.
+     *
+     * @param conn Connection to database.
+     * @return List of schema names.
+     * @throws SQLException If schemas loading failed.
+     */
+    public Collection<String> schemas(Connection conn) throws SQLException  {
+        return dialect(conn).schemas(conn);
+    }
+
+    /**
+     * Extract DB metadata.
+     *
+     * @param conn Connection.
+     * @param schemas List of database schemas to process. In case of empty list all schemas will be processed.
+     * @param tblsOnly Tables only flag.
+     */
+    public Collection<DbTable> metadata(Connection conn, List<String> schemas, boolean tblsOnly) throws SQLException {
+        return dialect(conn).tables(conn, schemas, tblsOnly);
+    }
+
+    /**
+     * Connect to database.
+     *
+     * @param jdbcDrvJarPath Path to JDBC driver.
+     * @param jdbcDrvCls JDBC class name.
+     * @param jdbcUrl JDBC connection URL.
+     * @param jdbcInfo Connection properties.
+     * @return Connection to database.
+     * @throws SQLException if connection failed.
+     */
+    public Connection connect(String jdbcDrvJarPath, String jdbcDrvCls, String jdbcUrl, Properties jdbcInfo)
+        throws SQLException {
+        Driver drv = drivers.get(jdbcDrvCls);
+
+        if (drv == null) {
+            if (jdbcDrvJarPath.isEmpty())
+                throw new IllegalStateException("Driver jar file name is not specified.");
+
+            File drvJar = new File(jdbcDrvJarPath);
+
+            if (!drvJar.exists())
+                throw new IllegalStateException("Driver jar file is not found.");
+
+            try {
+                URL u = new URL("jar:" + drvJar.toURI() + "!/");
+
+                URLClassLoader ucl = URLClassLoader.newInstance(new URL[] {u});
+
+                drv = (Driver)Class.forName(jdbcDrvCls, true, ucl).newInstance();
+
+                drivers.put(jdbcDrvCls, drv);
+            }
+            catch (Exception e) {
+                throw new IllegalStateException(e);
+            }
+        }
+
+        Connection conn = drv.connect(jdbcUrl, jdbcInfo);
+
+        if (conn == null)
+            throw new IllegalStateException("Connection was not established (JDBC driver returned null value).");
+
+        return conn;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/DbTable.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/DbTable.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/DbTable.java
new file mode 100644
index 0000000..b74cfe5
--- /dev/null
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/DbTable.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.console.agent.db;
+
+import org.apache.ignite.cache.QueryIndex;
+
+import java.util.Collection;
+
+/**
+ * Database table.
+ */
+public class DbTable {
+    /** Schema name. */
+    private final String schema;
+
+    /** Table name. */
+    private final String tbl;
+
+    /** Columns. */
+    private final Collection<DbColumn> cols;
+
+    /** Indexes. */
+    private final Collection<QueryIndex> idxs;
+
+    /**
+     * Default columns.
+     *
+     * @param schema Schema name.
+     * @param tbl Table name.
+     * @param cols Columns.
+     * @param idxs Indexes;
+     */
+    public DbTable(String schema, String tbl, Collection<DbColumn> cols, Collection<QueryIndex> idxs) {
+        this.schema = schema;
+        this.tbl = tbl;
+        this.cols = cols;
+        this.idxs = idxs;
+    }
+
+    /**
+     * @return Schema name.
+     */
+    public String schema() {
+        return schema;
+    }
+
+    /**
+     * @return Table name.
+     */
+    public String table() {
+        return tbl;
+    }
+
+    /**
+     * @return Columns.
+     */
+    public Collection<DbColumn> columns() {
+        return cols;
+    }
+
+    /**
+     * @return Indexes.
+     */
+    public Collection<QueryIndex> indexes() {
+        return idxs;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/DB2MetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/DB2MetadataDialect.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/DB2MetadataDialect.java
new file mode 100644
index 0000000..2f41a8c
--- /dev/null
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/DB2MetadataDialect.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.console.agent.db.dialect;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * DB2 specific metadata dialect.
+ */
+public class DB2MetadataDialect extends JdbcMetadataDialect {
+    /** {@inheritDoc} */
+    @Override public Set<String> systemSchemas() {
+        return new HashSet<>(Arrays.asList("SYSIBM", "SYSCAT", "SYSSTAT", "SYSTOOLS", "SYSFUN", "SYSIBMADM",
+            "SYSIBMINTERNAL", "SYSIBMTS", "SYSPROC", "SYSPUBLIC"));
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/DatabaseMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/DatabaseMetadataDialect.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/DatabaseMetadataDialect.java
new file mode 100644
index 0000000..674bda5
--- /dev/null
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/DatabaseMetadataDialect.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.console.agent.db.dialect;
+
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.SQLException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.ignite.cache.QueryIndex;
+import org.apache.ignite.cache.QueryIndexType;
+import org.apache.ignite.console.agent.db.DbColumn;
+import org.apache.ignite.console.agent.db.DbTable;
+
+/**
+ * Base class for database metadata dialect.
+ */
+public abstract class DatabaseMetadataDialect {
+    /**
+     * Gets schemas from database.
+     *
+     * @param conn Database connection.
+     * @return Collection of schema descriptors.
+     * @throws SQLException If failed to get schemas.
+     */
+    public abstract Collection<String> schemas(Connection conn) throws SQLException;
+
+    /**
+     * Gets tables from database.
+     *
+     * @param conn Database connection.
+     * @param schemas Collection of schema names to load.
+     * @param tblsOnly If {@code true} then gets only tables otherwise gets tables and views.
+     * @return Collection of table descriptors.
+     * @throws SQLException If failed to get tables.
+     */
+    public abstract Collection<DbTable> tables(Connection conn, List<String> schemas, boolean tblsOnly)
+        throws SQLException;
+
+    /**
+     * @return Collection of database system schemas.
+     */
+    public Set<String> systemSchemas() {
+        return Collections.singleton("INFORMATION_SCHEMA");
+    }
+
+    /**
+     * @return Collection of unsigned type names.
+     * @throws SQLException If failed to get unsigned type names.
+     */
+    public Set<String> unsignedTypes(DatabaseMetaData dbMeta) throws SQLException {
+        return Collections.emptySet();
+    }
+
+    /**
+     * Create table descriptor.
+     *
+     * @param schema Schema name.
+     * @param tbl Table name.
+     * @param cols Table columns.
+     * @param idxs Table indexes.
+     * @return New {@code DbTable} instance.
+     */
+    protected DbTable table(String schema, String tbl, Collection<DbColumn> cols, Collection<QueryIndex>idxs) {
+        return new DbTable(schema, tbl, cols, idxs);
+    }
+
+    /**
+     * Create index descriptor.
+     *
+     * @param idxName Index name.
+     * @return New initialized {@code QueryIndex} instance.
+     */
+    protected QueryIndex index(String idxName) {
+        QueryIndex idx = new QueryIndex();
+
+        idx.setName(idxName);
+        idx.setIndexType(QueryIndexType.SORTED);
+        idx.setFields(new LinkedHashMap<String, Boolean>());
+
+        return idx;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/JdbcMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/JdbcMetadataDialect.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/JdbcMetadataDialect.java
new file mode 100644
index 0000000..dcfd9c0
--- /dev/null
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/JdbcMetadataDialect.java
@@ -0,0 +1,199 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.console.agent.db.dialect;
+
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.ignite.cache.QueryIndex;
+import org.apache.ignite.console.agent.db.DbColumn;
+import org.apache.ignite.console.agent.db.DbTable;
+
+/**
+ * Metadata dialect that uses standard JDBC for reading metadata.
+ */
+public class JdbcMetadataDialect extends DatabaseMetadataDialect {
+    /** */
+    private static final String[] TABLES_ONLY = {"TABLE"};
+
+    /** */
+    private static final String[] TABLES_AND_VIEWS = {"TABLE", "VIEW"};
+
+    /** Schema catalog index. */
+    private static final int TBL_CATALOG_IDX = 1;
+
+    /** Schema name index. */
+    private static final int TBL_SCHEMA_IDX = 2;
+
+    /** Table name index. */
+    private static final int TBL_NAME_IDX = 3;
+
+    /** Primary key column name index. */
+    private static final int PK_COL_NAME_IDX = 4;
+
+    /** Column name index. */
+    private static final int COL_NAME_IDX = 4;
+
+    /** Column data type index. */
+    private static final int COL_DATA_TYPE_IDX = 5;
+
+    /** Column type name index. */
+    private static final int COL_TYPE_NAME_IDX = 6;
+
+    /** Column nullable index. */
+    private static final int COL_NULLABLE_IDX = 11;
+
+    /** Index name index. */
+    private static final int IDX_NAME_IDX = 6;
+
+    /** Index column name index. */
+    private static final int IDX_COL_NAME_IDX = 9;
+
+    /** Index column descend index. */
+    private static final int IDX_ASC_OR_DESC_IDX = 10;
+
+    /** {@inheritDoc} */
+    @Override public Collection<String> schemas(Connection conn) throws SQLException {
+        Collection<String> schemas = new ArrayList<>();
+
+        ResultSet rs = conn.getMetaData().getSchemas();
+
+        Set<String> sys = systemSchemas();
+
+        while(rs.next()) {
+            String schema = rs.getString(1);
+
+            // Skip system schemas.
+            if (sys.contains(schema))
+                continue;
+
+            schemas.add(schema);
+        }
+
+        return schemas;
+    }
+
+    /**
+     * @return If {@code true} use catalogs for table division.
+     */
+    protected boolean useCatalog() {
+        return false;
+    }
+
+    /**
+     * @return If {@code true} use schemas for table division.
+     */
+    protected boolean useSchema() {
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Collection<DbTable> tables(Connection conn, List<String> schemas, boolean tblsOnly)
+        throws SQLException {
+        DatabaseMetaData dbMeta = conn.getMetaData();
+
+        Set<String> sys = systemSchemas();
+
+        Collection<String> unsignedTypes = unsignedTypes(dbMeta);
+
+        if (schemas.isEmpty())
+            schemas.add(null);
+
+        Collection<DbTable> tbls = new ArrayList<>();
+
+        for (String toSchema: schemas) {
+            try (ResultSet tblsRs = dbMeta.getTables(useCatalog() ? toSchema : null, useSchema() ? toSchema : null, "%",
+                    tblsOnly ? TABLES_ONLY : TABLES_AND_VIEWS)) {
+                while (tblsRs.next()) {
+                    String tblCatalog = tblsRs.getString(TBL_CATALOG_IDX);
+                    String tblSchema = tblsRs.getString(TBL_SCHEMA_IDX);
+                    String tblName = tblsRs.getString(TBL_NAME_IDX);
+
+                    // In case of MySql we should use catalog.
+                    String schema = tblSchema != null ? tblSchema : tblCatalog;
+
+                    // Skip system schemas.
+                    if (sys.contains(schema))
+                        continue;
+
+                    Collection<String> pkCols = new HashSet<>();
+
+                    try (ResultSet pkRs = dbMeta.getPrimaryKeys(tblCatalog, tblSchema, tblName)) {
+                        while (pkRs.next())
+                            pkCols.add(pkRs.getString(PK_COL_NAME_IDX));
+                    }
+
+                    Collection<DbColumn> cols = new ArrayList<>();
+
+                    try (ResultSet colsRs = dbMeta.getColumns(tblCatalog, tblSchema, tblName, null)) {
+                        while (colsRs.next()) {
+                            String colName = colsRs.getString(COL_NAME_IDX);
+
+                            cols.add(new DbColumn(
+                                colName,
+                                colsRs.getInt(COL_DATA_TYPE_IDX),
+                                pkCols.contains(colName),
+                                colsRs.getInt(COL_NULLABLE_IDX) == DatabaseMetaData.columnNullable,
+                                unsignedTypes.contains(colsRs.getString(COL_TYPE_NAME_IDX))));
+                        }
+                    }
+
+                    Map<String, QueryIndex> idxs = new LinkedHashMap<>();
+
+                    try (ResultSet idxRs = dbMeta.getIndexInfo(tblCatalog, tblSchema, tblName, false, true)) {
+                        while (idxRs.next()) {
+                            String idxName = idxRs.getString(IDX_NAME_IDX);
+
+                            String colName = idxRs.getString(IDX_COL_NAME_IDX);
+
+                            if (idxName == null || colName == null)
+                                continue;
+
+                            QueryIndex idx = idxs.get(idxName);
+
+                            if (idx == null) {
+                                idx = index(idxName);
+
+                                idxs.put(idxName, idx);
+                            }
+
+                            String askOrDesc = idxRs.getString(IDX_ASC_OR_DESC_IDX);
+
+                            Boolean asc = askOrDesc == null || "A".equals(askOrDesc);
+
+                            idx.getFields().put(colName, asc);
+                        }
+                    }
+
+                    tbls.add(table(schema, tblName, cols, idxs.values()));
+                }
+            }
+        }
+
+        return tbls;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/MySQLMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/MySQLMetadataDialect.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/MySQLMetadataDialect.java
new file mode 100644
index 0000000..4adeeb3
--- /dev/null
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/MySQLMetadataDialect.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.console.agent.db.dialect;
+
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * MySQL specific metadata dialect.
+ */
+public class MySQLMetadataDialect extends JdbcMetadataDialect {
+    /** Type name index. */
+    private static final int TYPE_NAME_IDX = 1;
+
+    /** {@inheritDoc} */
+    @Override public Collection<String> schemas(Connection conn) throws SQLException {
+        Collection<String> schemas = new ArrayList<>();
+
+        ResultSet rs = conn.getMetaData().getCatalogs();
+
+        Set<String> sys = systemSchemas();
+
+        while(rs.next()) {
+            String schema = rs.getString(1);
+
+            // Skip system schemas.
+            if (sys.contains(schema))
+                continue;
+
+            schemas.add(schema);
+        }
+
+        return schemas;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected boolean useCatalog() {
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected boolean useSchema() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Set<String> unsignedTypes(DatabaseMetaData dbMeta) throws SQLException {
+        Set<String> unsignedTypes = new HashSet<>();
+
+        try (ResultSet typeRs = dbMeta.getTypeInfo()) {
+            while (typeRs.next()) {
+                String typeName = typeRs.getString(TYPE_NAME_IDX);
+
+                if (typeName.contains("UNSIGNED"))
+                    unsignedTypes.add(typeName);
+            }
+        }
+
+        return unsignedTypes;
+    }
+}


[08/50] [abbrv] ignite git commit: Merge with 1.8.5. Compilation fix.

Posted by dm...@apache.org.
Merge with 1.8.5. Compilation fix.


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

Branch: refs/heads/ignite-1192
Commit: f223d3eb8122b06e762d82aaad6028bf35924ddb
Parents: eff3185
Author: dkarachentsev <dk...@gridgain.com>
Authored: Mon Apr 3 13:40:19 2017 +0300
Committer: dkarachentsev <dk...@gridgain.com>
Committed: Mon Apr 3 13:40:19 2017 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f223d3eb/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java
index 45600bd..b999189 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcConnectionSelfTest.java
@@ -276,7 +276,7 @@ public class JdbcConnectionSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testTxAllowedCommit() throws Exception {
-        String url = CFG_URL_PREFIX + "transactionsAllowed=true@" + CFG_URL;
+        String url = CFG_URL_PREFIX + "transactionsAllowed=true@" + configURL();
 
         try (final Connection conn = DriverManager.getConnection(url)) {
             conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
@@ -293,7 +293,7 @@ public class JdbcConnectionSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testTxAllowedRollback() throws Exception {
-        String url = CFG_URL_PREFIX + "transactionsAllowed=true@" + CFG_URL;
+        String url = CFG_URL_PREFIX + "transactionsAllowed=true@" + configURL();
 
         try (final Connection conn = DriverManager.getConnection(url)) {
             conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);


[39/50] [abbrv] ignite git commit: IGNITE-4812 - Disabled EventStorageSpi by default. This fixes #1623.

Posted by dm...@apache.org.
IGNITE-4812 - Disabled EventStorageSpi by default. This fixes #1623.


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

Branch: refs/heads/ignite-1192
Commit: 139efb10aac41fa0ba242793fc5d922cee31a9d5
Parents: 512b7af
Author: Valentin Kulichenko <va...@gmail.com>
Authored: Sun Apr 9 14:22:52 2017 +0200
Committer: Valentin Kulichenko <va...@gmail.com>
Committed: Sun Apr 9 14:22:52 2017 +0200

----------------------------------------------------------------------
 .../configuration/IgniteConfiguration.java      |  4 +-
 .../ignite/internal/IgniteEventsImpl.java       |  8 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |  4 +-
 .../eventstorage/GridEventStorageManager.java   | 12 ++-
 .../spi/eventstorage/NoopEventStorageSpi.java   | 53 +++++++++++
 .../GridEventStorageDefaultExceptionTest.java   | 94 ++++++++++++++++++++
 .../testframework/junits/GridAbstractTest.java  |  3 +
 .../testsuites/IgniteComputeGridTestSuite.java  |  2 +
 .../ignite/internal/GridFactorySelfTest.java    |  3 +
 9 files changed, 175 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/139efb10/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index b8e718d..49ae9bb 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -66,7 +66,7 @@ import org.apache.ignite.spi.deployment.local.LocalDeploymentSpi;
 import org.apache.ignite.spi.discovery.DiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.eventstorage.EventStorageSpi;
-import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi;
+import org.apache.ignite.spi.eventstorage.NoopEventStorageSpi;
 import org.apache.ignite.spi.failover.FailoverSpi;
 import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi;
 import org.apache.ignite.spi.indexing.IndexingSpi;
@@ -1591,7 +1591,7 @@ public class IgniteConfiguration {
 
     /**
      * Should return fully configured event SPI implementation. If not provided,
-     * {@link MemoryEventStorageSpi} will be used.
+     * {@link NoopEventStorageSpi} will be used.
      *
      * @return Grid event SPI implementation or {@code null} to use default implementation.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/139efb10/modules/core/src/main/java/org/apache/ignite/internal/IgniteEventsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteEventsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteEventsImpl.java
index 9acccab..030e2db 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteEventsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteEventsImpl.java
@@ -78,8 +78,7 @@ public class IgniteEventsImpl extends AsyncSupportAdapter<IgniteEvents> implemen
     }
 
     /** {@inheritDoc} */
-    @Override public <T extends Event> List<T> remoteQuery(IgnitePredicate<T> p, long timeout,
-        @Nullable int... types) {
+    @Override public <T extends Event> List<T> remoteQuery(IgnitePredicate<T> p, long timeout, @Nullable int... types) {
         A.notNull(p, "p");
 
         guard();
@@ -248,6 +247,9 @@ public class IgniteEventsImpl extends AsyncSupportAdapter<IgniteEvents> implemen
         try {
             return ctx.event().localEvents(compoundPredicate(p, types));
         }
+        catch (IgniteCheckedException e) {
+            throw U.convertException(e);
+        }
         finally {
             unguard();
         }
@@ -400,4 +402,4 @@ public class IgniteEventsImpl extends AsyncSupportAdapter<IgniteEvents> implemen
     protected Object readResolve() throws ObjectStreamException {
         return prj.events();
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/139efb10/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 1b8f920..7e99c77 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -93,7 +93,7 @@ import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
 import org.apache.ignite.spi.deployment.local.LocalDeploymentSpi;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder;
-import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi;
+import org.apache.ignite.spi.eventstorage.NoopEventStorageSpi;
 import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi;
 import org.apache.ignite.spi.indexing.noop.NoopIndexingSpi;
 import org.apache.ignite.spi.loadbalancing.LoadBalancingSpi;
@@ -2184,7 +2184,7 @@ public class IgnitionEx {
                 cfg.setDeploymentSpi(new LocalDeploymentSpi());
 
             if (cfg.getEventStorageSpi() == null)
-                cfg.setEventStorageSpi(new MemoryEventStorageSpi());
+                cfg.setEventStorageSpi(new NoopEventStorageSpi());
 
             if (cfg.getCheckpointSpi() == null)
                 cfg.setCheckpointSpi(new NoopCheckpointSpi());

http://git-wip-us.apache.org/repos/asf/ignite/blob/139efb10/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
index 77bd7d4..d49463e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
@@ -61,6 +61,8 @@ import org.apache.ignite.marshaller.Marshaller;
 import org.apache.ignite.plugin.security.SecurityPermission;
 import org.apache.ignite.spi.IgniteSpiException;
 import org.apache.ignite.spi.eventstorage.EventStorageSpi;
+import org.apache.ignite.spi.eventstorage.NoopEventStorageSpi;
+import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi;
 import org.jetbrains.annotations.Nullable;
 import org.jsr166.ConcurrentHashMap8;
 
@@ -954,9 +956,17 @@ public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
      * @return Collection of grid events.
      */
     @SuppressWarnings("unchecked")
-    public <T extends Event> Collection<T> localEvents(IgnitePredicate<T> p) {
+    public <T extends Event> Collection<T> localEvents(IgnitePredicate<T> p) throws IgniteCheckedException {
         assert p != null;
 
+        if (getSpi() instanceof NoopEventStorageSpi) {
+            throw new IgniteCheckedException(
+                "Failed to query events because default no-op event storage SPI is used. " +
+                "Consider configuring " + MemoryEventStorageSpi.class.getSimpleName() + " or another " +
+                EventStorageSpi.class.getSimpleName() + " implementation via " +
+                "IgniteConfiguration.setEventStorageSpi() configuration property.");
+        }
+
         if (p instanceof PlatformEventFilterListener) {
             PlatformEventFilterListener p0 = (PlatformEventFilterListener)p;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/139efb10/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/NoopEventStorageSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/NoopEventStorageSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/NoopEventStorageSpi.java
new file mode 100644
index 0000000..41cf7f6
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/NoopEventStorageSpi.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi.eventstorage;
+
+import java.util.Collection;
+import java.util.Collections;
+import org.apache.ignite.events.Event;
+import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.spi.IgniteSpiAdapter;
+import org.apache.ignite.spi.IgniteSpiException;
+import org.apache.ignite.spi.IgniteSpiMultipleInstancesSupport;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * No-op implementation of {@link EventStorageSpi}.
+ */
+@IgniteSpiMultipleInstancesSupport(true)
+public class NoopEventStorageSpi extends IgniteSpiAdapter implements EventStorageSpi {
+    /** {@inheritDoc} */
+    @Override public <T extends Event> Collection<T> localEvents(IgnitePredicate<T> p) {
+        return Collections.emptyList();
+    }
+
+    /** {@inheritDoc} */
+    @Override public void record(Event evt) throws IgniteSpiException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void spiStart(@Nullable String gridName) throws IgniteSpiException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void spiStop() throws IgniteSpiException {
+        // No-op.
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/139efb10/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java
new file mode 100644
index 0000000..2cf727e
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal;
+
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.events.Event;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.spi.eventstorage.NoopEventStorageSpi;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.testframework.junits.common.GridCommonTest;
+
+/**
+ * Event storage tests with default no-op spi.
+ */
+@GridCommonTest(group = "Kernal Self")
+public class GridEventStorageDefaultExceptionTest  extends GridCommonAbstractTest {
+    /** */
+    public GridEventStorageDefaultExceptionTest() {
+        super(/*start grid*/true);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(final String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        cfg.setEventStorageSpi(new NoopEventStorageSpi());
+
+        return cfg;
+    }
+
+    /**
+     * @throws Exception In case of error.
+     */
+    public void testLocalNodeEventStorage() throws Exception {
+        try {
+            grid().events().localQuery(F.<Event>alwaysTrue());
+
+            assert false : "Exception must be thrown.";
+        }
+        catch (IgniteException e) {
+            assertTrue(
+                "Wrong exception message: " + e.getMessage(),
+                e.getMessage().startsWith("Failed to query events because default no-op event storage SPI is used."));
+        }
+    }
+
+    /**
+     * @throws Exception In case of error.
+     */
+    public void testRemoteNodeEventStorage() throws Exception {
+        try {
+            grid().events().remoteQuery(F.<Event>alwaysTrue(), 0);
+
+            assert false : "Exception should be thrown";
+        }
+        catch (IgniteException e) {
+            assertTrue(
+                "Wrong exception message: " + e.getMessage(),
+                e.getMessage().startsWith("Failed to query events due to exception on remote node."));
+
+            boolean found = false;
+
+            Throwable t = e;
+
+            while ((t = t.getCause()) != null) {
+                if (t instanceof IgniteCheckedException && t.getMessage().startsWith(
+                        "Failed to query events because default no-op event storage SPI is used.")) {
+                    found = true;
+
+                    break;
+                }
+            }
+
+            assertTrue("Incorrect exception thrown.", found);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/139efb10/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
index 1bb4540..bfdf635 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
@@ -90,6 +90,7 @@ import org.apache.ignite.spi.discovery.tcp.TestTcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.config.GridTestProperties;
 import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger;
@@ -1498,6 +1499,8 @@ public abstract class GridAbstractTest extends TestCase {
 
         cfg.setCheckpointSpi(cpSpi);
 
+        cfg.setEventStorageSpi(new MemoryEventStorageSpi());
+
         cfg.setIncludeEventTypes(EventType.EVTS_ALL);
 
         return cfg;

http://git-wip-us.apache.org/repos/asf/ignite/blob/139efb10/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
index 810c488..41042f1 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
@@ -30,6 +30,7 @@ import org.apache.ignite.internal.GridCollisionJobsContextSelfTest;
 import org.apache.ignite.internal.GridDeploymentMultiThreadedSelfTest;
 import org.apache.ignite.internal.GridDeploymentSelfTest;
 import org.apache.ignite.internal.GridEventStorageCheckAllEventsSelfTest;
+import org.apache.ignite.internal.GridEventStorageDefaultExceptionTest;
 import org.apache.ignite.internal.GridEventStorageRuntimeConfigurationSelfTest;
 import org.apache.ignite.internal.GridEventStorageSelfTest;
 import org.apache.ignite.internal.GridFailoverCustomTopologySelfTest;
@@ -141,6 +142,7 @@ public class IgniteComputeGridTestSuite {
         suite.addTestSuite(GridTaskNameAnnotationSelfTest.class);
         suite.addTestSuite(GridJobCheckpointCleanupSelfTest.class);
         suite.addTestSuite(GridEventStorageSelfTest.class);
+        suite.addTestSuite(GridEventStorageDefaultExceptionTest.class);
         suite.addTestSuite(GridFailoverTaskWithPredicateSelfTest.class);
         suite.addTestSuite(GridProjectionLocalJobMultipleArgumentsSelfTest.class);
         suite.addTestSuite(GridAffinitySelfTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/139efb10/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
index 7764d46..75128fc 100644
--- a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
@@ -59,6 +59,7 @@ import org.apache.ignite.spi.collision.CollisionSpi;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.config.GridTestProperties;
 import org.apache.ignite.testframework.http.GridEmbeddedHttpServer;
@@ -317,6 +318,8 @@ public class GridFactorySelfTest extends GridCommonAbstractTest {
         cfg.setLifecycleBeans(bean1, bean2);
         cfg.setIgniteInstanceName(igniteInstanceName);
 
+        cfg.setEventStorageSpi(new MemoryEventStorageSpi());
+
         cfg.setConnectorConfiguration(null);
 
         try (Ignite g = IgniteSpring.start(cfg, new GenericApplicationContext())) {


[34/50] [abbrv] ignite git commit: IGNITE-4349 Discontinue the schema-import utility.

Posted by dm...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
deleted file mode 100644
index df54e04..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.generator;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import org.apache.ignite.cache.QueryEntity;
-import org.apache.ignite.cache.QueryIndex;
-import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory;
-import org.apache.ignite.cache.store.jdbc.JdbcType;
-import org.apache.ignite.cache.store.jdbc.JdbcTypeField;
-import org.apache.ignite.internal.util.typedef.T2;
-import org.apache.ignite.schema.model.PojoDescriptor;
-import org.apache.ignite.schema.model.PojoField;
-import org.apache.ignite.schema.ui.ConfirmCallable;
-import org.apache.ignite.schema.ui.MessageBox;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import static org.apache.ignite.schema.ui.MessageBox.Result.CANCEL;
-import static org.apache.ignite.schema.ui.MessageBox.Result.NO;
-import static org.apache.ignite.schema.ui.MessageBox.Result.NO_TO_ALL;
-
-/**
- * Generator of XML files for type metadata.
- */
-public class XmlGenerator {
-    /**
-     * Add comment with license and generation date.
-     *
-     * @param doc XML document.
-     */
-    private static void addComment(Document doc) {
-        doc.appendChild(doc.createComment("\n" +
-            "  Licensed to the Apache Software Foundation (ASF) under one or more\n" +
-            "  contributor license agreements.  See the NOTICE file distributed with\n" +
-            "  this work for additional information regarding copyright ownership.\n" +
-            "  The ASF licenses this file to You under the Apache License, Version 2.0\n" +
-            "  (the \"License\"); you may not use this file except in compliance with\n" +
-            "  the License.  You may obtain a copy of the License at\n\n" +
-            "       http://www.apache.org/licenses/LICENSE-2.0\n\n" +
-            "  Unless required by applicable law or agreed to in writing, software\n" +
-            "  distributed under the License is distributed on an \"AS IS\" BASIS,\n" +
-            "  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" +
-            "  See the License for the specific language governing permissions and\n" +
-            "  limitations under the License.\n"));
-
-        doc.appendChild(doc.createComment("\n    XML generated by Apache Ignite Schema Import utility: " +
-            new SimpleDateFormat("MM/dd/yyyy").format(new Date()) + "\n"));
-    }
-
-    /**
-     * Add bean to XML document.
-     *
-     * @param doc XML document.
-     * @param parent Parent XML node.
-     * @param cls Bean class.
-     */
-    private static Element addBean(Document doc, Node parent, Class<?> cls) {
-        Element elem = doc.createElement("bean");
-
-        elem.setAttribute("class", cls.getName());
-
-        parent.appendChild(elem);
-
-        return elem;
-    }
-
-    /**
-     * Add element to XML document.
-     *
-     * @param doc XML document.
-     * @param parent Parent XML node.
-     * @param tagName XML tag name.
-     * @param attr1 Name for first attr.
-     * @param val1 Value for first attribute.
-     * @param attr2 Name for second attr.
-     * @param val2 Value for second attribute.
-     */
-    private static Element addElement(Document doc, Node parent, String tagName,
-        String attr1, String val1, String attr2, String val2) {
-        Element elem = doc.createElement(tagName);
-
-        if (attr1 != null)
-            elem.setAttribute(attr1, val1);
-
-        if (attr2 != null)
-            elem.setAttribute(attr2, val2);
-
-        parent.appendChild(elem);
-
-        return elem;
-    }
-
-    /**
-     * Add element to XML document.
-     *
-     * @param doc XML document.
-     * @param parent Parent XML node.
-     * @param tagName XML tag name.
-     */
-    private static Element addElement(Document doc, Node parent, String tagName) {
-        return addElement(doc, parent, tagName, null, null, null, null);
-    }
-
-    /**
-     * Add element to XML document.
-     *
-     * @param doc XML document.
-     * @param parent Parent XML node.
-     * @param tagName XML tag name.
-     */
-    private static Element addElement(Document doc, Node parent, String tagName, String attrName, String attrVal) {
-        return addElement(doc, parent, tagName, attrName, attrVal, null, null);
-    }
-
-    /**
-     * Add &quot;property&quot; element to XML document.
-     *
-     * @param doc XML document.
-     * @param parent Parent XML node.
-     * @param name Value for &quot;name&quot; attribute
-     * @param val Value for &quot;value&quot; attribute
-     */
-    private static Element addProperty(Document doc, Node parent, String name, String val) {
-        String valAttr = val != null ? "value" : null;
-
-        return addElement(doc, parent, "property", "name", name, valAttr, val);
-    }
-
-    /**
-     * Add type descriptors to XML document.
-     *
-     * @param doc XML document.
-     * @param parent Parent XML node.
-     * @param name Property name.
-     * @param fields Collection of POJO fields.
-     */
-    private static void addJdbcFields(Document doc, Node parent, String name, Collection<PojoField> fields) {
-        if (!fields.isEmpty()) {
-            Element prop = addProperty(doc, parent, name, null);
-
-            Element list = addElement(doc, prop, "list");
-
-            for (PojoField field : fields) {
-                Element item = addBean(doc, list, JdbcTypeField.class);
-
-                Element dbType = addProperty(doc, item, "databaseFieldType", null);
-                addElement(doc, dbType, "util:constant", "static-field", "java.sql.Types." + field.dbTypeName());
-                addProperty(doc, item, "databaseFieldName", field.dbName());
-                addProperty(doc, item, "javaFieldType", field.javaTypeName());
-                addProperty(doc, item, "javaFieldName", field.javaName());
-            }
-        }
-    }
-
-    /**
-     * Add query fields to xml document.
-     *
-     * @param doc XML document.
-     * @param parent Parent XML node.
-     * @param fields Map with fields.
-     */
-    private static void addQueryFields(Document doc, Node parent, Collection<PojoField> fields) {
-        if (!fields.isEmpty()) {
-            Element prop = addProperty(doc, parent, "fields", null);
-
-            Element map = addElement(doc, prop, "util:map", "map-class", "java.util.LinkedHashMap");
-
-            for (PojoField field : fields)
-                addElement(doc, map, "entry", "key", field.javaName(), "value",
-                    GeneratorUtils.boxPrimitiveType(field.javaTypeName()));
-        }
-    }
-
-    /**
-     * Add query field aliases to xml document.
-     *
-     * @param doc XML document.
-     * @param parent Parent XML node.
-     * @param fields Map with fields.
-     */
-    private static void addQueryFieldAliases(Document doc, Node parent, Collection<PojoField> fields) {
-        Collection<PojoField> aliases = new ArrayList<>();
-
-        for (PojoField field : fields) {
-            if (!field.javaName().equalsIgnoreCase(field.dbName()))
-                aliases.add(field);
-        }
-
-        if (!aliases.isEmpty()) {
-            Element prop = addProperty(doc, parent, "aliases", null);
-
-            Element map = addElement(doc, prop, "map");
-
-            for (PojoField alias : aliases)
-                addElement(doc, map, "entry", "key", alias.javaName(), "value", alias.dbName());
-        }
-    }
-
-    /**
-     * Add indexes to xml document.
-     *
-     * @param doc XML document.
-     * @param parent Parent XML node.
-     * @param idxs Indexes.
-     */
-    private static void addQueryIndexes(Document doc, Node parent, Collection<PojoField> fields,
-        Collection<QueryIndex> idxs) {
-        if (!idxs.isEmpty()) {
-            boolean firstIdx = true;
-
-            Element list = null;
-
-            for (QueryIndex idx : idxs) {
-                Set<Map.Entry<String, Boolean>> dbIdxFlds = idx.getFields().entrySet();
-
-                int sz = dbIdxFlds.size();
-
-                List<T2<String, Boolean>> idxFlds = new ArrayList<>(sz);
-
-                for (Map.Entry<String, Boolean> idxFld : dbIdxFlds) {
-                    PojoField field = GeneratorUtils.findFieldByName(fields, idxFld.getKey());
-
-                    if (field != null)
-                        idxFlds.add(new T2<>(field.javaName(), idxFld.getValue()));
-                    else
-                        break;
-                }
-
-                // Only if all fields present, add index description.
-                if (idxFlds.size() == sz) {
-                    if (firstIdx) {
-                        Element prop = addProperty(doc, parent, "indexes", null);
-
-                        list = addElement(doc, prop, "list");
-
-                        firstIdx = false;
-                    }
-
-                    Element idxBean = addBean(doc, list, QueryIndex.class);
-
-                    addProperty(doc, idxBean, "name", idx.getName());
-
-                    Element idxType = addProperty(doc, idxBean, "indexType", null);
-                    addElement(doc, idxType, "util:constant", "static-field", "org.apache.ignite.cache.QueryIndexType." + idx.getIndexType());
-
-                    Element flds = addProperty(doc, idxBean, "fields", null);
-
-                    Element fldsMap = addElement(doc, flds, "map");
-
-                    for (T2<String, Boolean> fld : idxFlds)
-                        addElement(doc, fldsMap, "entry", "key", fld.getKey(), "value", fld.getValue().toString());
-                }
-            }
-        }
-    }
-
-    /**
-     * Add element with JDBC POJO store factory to XML document.
-     *
-     * @param doc XML document.
-     * @param parent Parent XML node.
-     * @param pkg Package fo types.
-     * @param pojo POJO descriptor.
-     */
-    private static void addJdbcPojoStoreFactory(Document doc, Node parent, String pkg, PojoDescriptor pojo,
-        boolean includeKeys) {
-        Element bean = addBean(doc, parent, JdbcType.class);
-
-        addProperty(doc, bean, "databaseSchema", pojo.schema());
-
-        addProperty(doc, bean, "databaseTable", pojo.table());
-
-        addProperty(doc, bean, "keyType", pkg + "." + pojo.keyClassName());
-
-        addProperty(doc, bean, "valueType", pkg + "." + pojo.valueClassName());
-
-        addJdbcFields(doc, bean, "keyFields", pojo.keyFields());
-
-        addJdbcFields(doc, bean, "valueFields", pojo.valueFields(includeKeys));
-    }
-
-    /**
-     * Add element with query entity to XML document.
-     *
-     * @param doc XML document.
-     * @param parent Parent XML node.
-     * @param pkg Package fo types.
-     * @param pojo POJO descriptor.
-     * @param generateAliases {@code true} if aliases should be generated for query fields.
-     */
-    private static void addQueryEntity(Document doc, Node parent, String pkg, PojoDescriptor pojo, boolean generateAliases) {
-        Element bean = addBean(doc, parent, QueryEntity.class);
-
-        addProperty(doc, bean, "keyType", pkg + "." + pojo.keyClassName());
-
-        addProperty(doc, bean, "valueType", pkg + "." + pojo.valueClassName());
-
-        Collection<PojoField> fields = pojo.valueFields(true);
-
-        addQueryFields(doc, bean, fields);
-
-        if (generateAliases)
-            addQueryFieldAliases(doc, bean, fields);
-
-        addQueryIndexes(doc, bean, fields, pojo.indexes());
-    }
-
-    /**
-     * Transform metadata into xml.
-     *
-     * @param pkg Package fo types.
-     * @param pojo POJO descriptor.
-     * @param includeKeys {@code true} if key fields should be included into value class.
-     * @param generateAliases {@code true} if aliases should be generated for query fields.
-     * @param out File to output result.
-     * @param askOverwrite Callback to ask user to confirm file overwrite.
-     */
-    public static void generate(String pkg, PojoDescriptor pojo, boolean includeKeys, boolean generateAliases, File out,
-        ConfirmCallable askOverwrite) {
-        generate(pkg, Collections.singleton(pojo), includeKeys, generateAliases, out, askOverwrite);
-    }
-
-    /**
-     * Transform metadata into xml.
-     *
-     * @param pkg Package fo types.
-     * @param pojos POJO descriptors.
-     * @param includeKeys {@code true} if key fields should be included into value class.
-     * @param generateAliases {@code true} if aliases should be generated for query fields.
-     * @param out File to output result.
-     * @param askOverwrite Callback to ask user to confirm file overwrite.
-     */
-    public static void generate(String pkg, Collection<PojoDescriptor> pojos, boolean includeKeys,
-        boolean generateAliases, File out, ConfirmCallable askOverwrite) {
-
-        File outFolder = out.getParentFile();
-
-        if (outFolder == null)
-            throw new IllegalStateException("Invalid output file: " + out);
-
-        if (!outFolder.exists() && !outFolder.mkdirs())
-            throw new IllegalStateException("Failed to create output folder for XML file: " + outFolder);
-
-        try {
-            if (out.exists()) {
-                MessageBox.Result choice = askOverwrite.confirm(out.getName());
-
-                if (CANCEL == choice)
-                    throw new IllegalStateException("XML generation was canceled!");
-
-                if (NO == choice || NO_TO_ALL == choice)
-                    return;
-            }
-
-            DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
-
-            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
-
-            Document doc = docBuilder.newDocument();
-            doc.setXmlStandalone(true);
-
-            addComment(doc);
-
-            Element beans = addElement(doc, doc, "beans");
-            beans.setAttribute("xmlns", "http://www.springframework.org/schema/beans");
-            beans.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
-            beans.setAttribute("xmlns:util", "http://www.springframework.org/schema/util");
-            beans.setAttribute("xsi:schemaLocation",
-                "http://www.springframework.org/schema/beans " +
-                "http://www.springframework.org/schema/beans/spring-beans.xsd " +
-                "http://www.springframework.org/schema/util " +
-                "http://www.springframework.org/schema/util/spring-util.xsd");
-
-            Element factoryBean = addBean(doc, beans, CacheJdbcPojoStoreFactory.class);
-            Element typesElem = addProperty(doc, factoryBean, "types", null);
-            Element typesItemsElem = addElement(doc, typesElem, "list");
-
-            for (PojoDescriptor pojo : pojos)
-                addJdbcPojoStoreFactory(doc, typesItemsElem, pkg, pojo, includeKeys);
-
-            for (PojoDescriptor pojo : pojos)
-                addQueryEntity(doc, beans, pkg, pojo, generateAliases);
-
-            TransformerFactory transformerFactory = TransformerFactory.newInstance();
-
-            Transformer transformer = transformerFactory.newTransformer();
-
-            transformer.setOutputProperty(OutputKeys.INDENT, "yes");
-            transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
-
-            ByteArrayOutputStream baos = new ByteArrayOutputStream(65536);
-
-            transformer.transform(new DOMSource(doc), new StreamResult(baos));
-
-            // Custom pretty-print of generated XML.
-            Files.write(out.toPath(), baos.toString()
-                .replaceAll("><", ">\n<")
-                .replaceFirst("<!--", "\n<!--")
-                .replaceFirst("-->", "-->\n")
-                .replaceAll("\" xmlns", "\"\n       xmlns")
-                .replaceAll("\" xsi", "\"\n       xsi")
-                .replaceAll(" http://www.springframework", "\n                           http://www.springframework")
-                .getBytes());
-        }
-        catch (ParserConfigurationException | TransformerException | IOException e) {
-            throw new IllegalStateException(e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
deleted file mode 100644
index 4f696d6..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.model;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import javafx.beans.property.BooleanProperty;
-import javafx.beans.property.SimpleBooleanProperty;
-import javafx.beans.property.SimpleStringProperty;
-import javafx.beans.property.StringProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.collections.FXCollections;
-import javafx.collections.ObservableList;
-import org.apache.ignite.cache.QueryIndex;
-import org.apache.ignite.schema.parser.DbColumn;
-import org.apache.ignite.schema.parser.DbTable;
-
-import static java.sql.Types.BIGINT;
-import static java.sql.Types.BIT;
-import static java.sql.Types.BOOLEAN;
-import static java.sql.Types.CHAR;
-import static java.sql.Types.CLOB;
-import static java.sql.Types.DATE;
-import static java.sql.Types.DECIMAL;
-import static java.sql.Types.DOUBLE;
-import static java.sql.Types.FLOAT;
-import static java.sql.Types.INTEGER;
-import static java.sql.Types.LONGNVARCHAR;
-import static java.sql.Types.LONGVARCHAR;
-import static java.sql.Types.NCHAR;
-import static java.sql.Types.NCLOB;
-import static java.sql.Types.NUMERIC;
-import static java.sql.Types.NVARCHAR;
-import static java.sql.Types.REAL;
-import static java.sql.Types.SMALLINT;
-import static java.sql.Types.SQLXML;
-import static java.sql.Types.TIME;
-import static java.sql.Types.TIMESTAMP;
-import static java.sql.Types.TINYINT;
-import static java.sql.Types.VARCHAR;
-
-/**
- * Descriptor for java type.
- */
-public class PojoDescriptor {
-    /** Database table. */
-    private final DbTable tbl;
-
-    /** Selected property. */
-    private final BooleanProperty useProp;
-
-    /** Previous name for key class. */
-    private final String keyClsNamePrev;
-
-    /** Key class name to show on screen. */
-    private final StringProperty keyClsNameProp;
-
-    /** Previous name for value class. */
-    private final String valClsNamePrev;
-
-    /** Value class name to show on screen. */
-    private final StringProperty valClsNameProp;
-
-    /** Parent item (schema name). */
-    private final PojoDescriptor parent;
-
-    /** Children items (tables names). */
-    private Collection<PojoDescriptor> children = Collections.emptyList();
-
-    /** Indeterminate state of parent. */
-    private final BooleanProperty indeterminateProp = new SimpleBooleanProperty(false);
-
-    /** Full database name: schema + table. */
-    private final String fullDbName;
-
-    /** Java class fields. */
-    private final ObservableList<PojoField> fields;
-
-    /**
-     * Constructor of POJO descriptor.
-     *
-     * @param prn Parent descriptor.
-     * @param tbl Database table Tab;e.
-     */
-    public PojoDescriptor(PojoDescriptor prn, DbTable tbl) {
-        parent = prn;
-
-        this.tbl = tbl;
-
-        fullDbName = tbl.schema() + "." + tbl.table();
-
-        valClsNamePrev = toJavaClassName(tbl.table());
-        valClsNameProp = new SimpleStringProperty(valClsNamePrev);
-
-        keyClsNamePrev = valClsNamePrev.isEmpty() ? "" : valClsNamePrev + "Key";
-        keyClsNameProp = new SimpleStringProperty(keyClsNamePrev);
-
-        Collection<DbColumn> cols = tbl.columns();
-
-        List<PojoField> flds = new ArrayList<>(cols.size());
-
-        for (DbColumn col : cols) {
-            String colName = col.name();
-
-            PojoField fld = new PojoField(colName, col.type(),
-                toJavaFieldName(colName), toJavaType(col).getName(),
-                col.key(), col.nullable());
-
-            fld.owner(this);
-
-            flds.add(fld);
-        }
-
-        fields = FXCollections.observableList(flds);
-
-        boolean isTbl = parent != null;
-
-        boolean hasKeys = !isTbl || !keyFields().isEmpty();
-
-        useProp = new SimpleBooleanProperty(hasKeys);
-
-        if (isTbl && !hasKeys && !parent.indeterminateProp.get())
-            parent.indeterminateProp.set(true);
-
-        useProp.addListener(new ChangeListener<Boolean>() {
-            @Override public void changed(ObservableValue<? extends Boolean> val, Boolean oldVal, Boolean newVal) {
-                for (PojoDescriptor child : children)
-                    child.useProp.set(newVal);
-
-                if (parent != null && !parent.children.isEmpty()) {
-                    Iterator<PojoDescriptor> it = parent.children.iterator();
-
-                    boolean parentIndeterminate = false;
-                    boolean first = it.next().useProp.get();
-
-                    while (it.hasNext()) {
-                        if (it.next().useProp.get() != first) {
-                            parentIndeterminate = true;
-
-                            break;
-                        }
-                    }
-
-                    parent.indeterminateProp.set(parentIndeterminate);
-
-                    if (!parentIndeterminate)
-                        parent.useProp.set(first);
-                }
-            }
-        });
-    }
-
-    /**
-     * @return Parent descriptor.
-     */
-    public PojoDescriptor parent() {
-        return parent;
-    }
-
-    /**
-     * @return Full database name: schema + table.
-     */
-    public String fullDbName() {
-        return fullDbName;
-    }
-
-    /**
-     * @return {@code true} if POJO descriptor is a table descriptor and checked in GUI.
-     */
-    public boolean checked() {
-        return parent != null && useProp.get();
-    }
-
-    /**
-     * @return Boolean property support for {@code use} property.
-     */
-    public BooleanProperty useProperty() {
-        return useProp;
-    }
-
-    /**
-     * @return Boolean property support for parent {@code indeterminate} property.
-     */
-    public BooleanProperty indeterminate() {
-        return indeterminateProp;
-    }
-
-    /**
-     * @return Key class name.
-     */
-    public String keyClassName() {
-        return keyClsNameProp.get();
-    }
-
-    /**
-     * @param name New key class name.
-     */
-    public void keyClassName(String name) {
-        keyClsNameProp.set(name);
-    }
-
-    /**
-     * @return Value class name.
-     */
-    public String valueClassName() {
-        return valClsNameProp.get();
-    }
-
-    /**
-     * @param name New value class name.
-     */
-    public void valueClassName(String name) {
-        valClsNameProp.set(name);
-    }
-
-    /**
-     * @return {@code true} if at least one field checked as &quot;used&quot;.
-     */
-    public boolean hasFields() {
-        for (PojoField field : fields)
-            if (field.use())
-                return true;
-
-        return false;
-    }
-
-    /**
-     * @return {@code true} if at least one field checked as &quot;used&quot; and checked as &quot;key&quot;.
-     */
-    public boolean hasKeyFields() {
-        for (PojoField field : fields)
-            if (field.use() && field.key())
-                return true;
-
-        return false;
-    }
-
-    /**
-     * @param includeKeys {@code true} if key fields should be included into value class.
-     * @return {@code true} if at least one field checked as &quot;used&quot; and not checked as &quot;key&quot;.
-     */
-    public boolean hasValueFields(boolean includeKeys) {
-        if (includeKeys)
-            return hasKeyFields();
-
-        for (PojoField field : fields)
-            if (field.use() && !field.key())
-                return true;
-
-        return false;
-    }
-
-    /**
-     * @return Collection of key fields.
-     */
-    public Collection<PojoField> keyFields() {
-        Collection<PojoField> keys = new ArrayList<>();
-
-        for (PojoField field : fields)
-            if (field.use() && field.key() )
-                keys.add(field);
-
-        return keys;
-    }
-
-    /**
-     * @param includeKeys {@code true} if key fields should be included into value class.
-     * @return Collection of value fields.
-     */
-    public Collection<PojoField> valueFields(boolean includeKeys) {
-        Collection<PojoField> vals = new ArrayList<>();
-
-        for (PojoField field : fields)
-            if (field.use() && (includeKeys || !field.key()))
-                vals.add(field);
-
-        return vals;
-    }
-
-    /**
-     * Gets indexes indexes.
-     *
-     * @return Collection with indexes.
-     */
-    public Collection<QueryIndex> indexes() {
-        return tbl.indexes();
-    }
-
-    /**
-     * @return Key class name property.
-     */
-    public StringProperty keyClassNameProperty() {
-        return keyClsNameProp;
-    }
-
-    /**
-     * @return Value class name property.
-     */
-    public StringProperty valueClassNameProperty() {
-        return valClsNameProp;
-    }
-
-    /**
-     * @return Schema name.
-     */
-    public String schema() {
-        return tbl.schema();
-    }
-
-    /**
-     * @return Table name.
-     */
-    public String table() {
-        return tbl.table();
-    }
-
-    /**
-     * Sets children items.
-     *
-     * @param children Items to set.
-     */
-    public void children(Collection<PojoDescriptor> children) {
-        this.children = children;
-    }
-
-    /**
-     * @return {@code true} if descriptor was changed by user via GUI.
-     */
-    public boolean changed() {
-        if (!keyClsNameProp.get().equals(keyClsNamePrev) || !valClsNameProp.get().equals(valClsNamePrev))
-            return true;
-
-        for (PojoField field : fields)
-            if (field.changed())
-                return true;
-
-        return false;
-    }
-
-    /**
-     * Revert changes to key class name made by user.
-     */
-    public void revertKeyClassName() {
-        keyClsNameProp.set(keyClsNamePrev);
-    }
-
-    /**
-     * Revert changes to value class name made by user.
-     */
-    public void revertValueClassName() {
-        valClsNameProp.set(valClsNamePrev);
-    }
-
-    /**
-     * Revert changes to java names made by user.
-     */
-    public void revertJavaNames() {
-        for (PojoField field : fields)
-            field.resetJavaName();
-    }
-
-    /**
-     * @return Java class fields.
-     */
-    public ObservableList<PojoField> fields() {
-        return fields;
-    }
-
-    /**
-     * @param name Source name.
-     * @return String converted to java class name notation.
-     */
-    private static String toJavaClassName(String name) {
-        int len = name.length();
-
-        StringBuilder buf = new StringBuilder(len);
-
-        boolean capitalizeNext = true;
-
-        for (int i = 0; i < len; i++) {
-            char ch = name.charAt(i);
-
-            if (Character.isWhitespace(ch) || '_' == ch)
-                capitalizeNext = true;
-            else if (capitalizeNext) {
-                buf.append(Character.toUpperCase(ch));
-
-                capitalizeNext = false;
-            }
-            else
-                buf.append(Character.toLowerCase(ch));
-        }
-
-        return buf.toString();
-    }
-
-    /**
-     * @param name Source name.
-     * @return String converted to java field name notation.
-     */
-    private static String toJavaFieldName(String name) {
-        String javaName = toJavaClassName(name);
-
-        return Character.toLowerCase(javaName.charAt(0)) + javaName.substring(1);
-    }
-
-    /**
-     * Convert JDBC data type to java type.
-     *
-     * @param col Database column descriptor.
-     * @return Java data type.
-     */
-    private static Class<?> toJavaType(DbColumn col) {
-        boolean nullable = col.nullable();
-        boolean unsigned = col.unsigned();
-
-        switch (col.type()) {
-            case BIT:
-            case BOOLEAN:
-                return nullable ? Boolean.class : boolean.class;
-
-            case TINYINT:
-                return unsigned
-                    ? (nullable ? Short.class : short.class)
-                    : (nullable ? Byte.class : byte.class);
-
-            case SMALLINT:
-                return unsigned
-                    ? (nullable ? Integer.class : int.class)
-                    : (nullable ? Short.class : short.class);
-
-            case INTEGER:
-                return unsigned
-                    ? (nullable ? Long.class : long.class)
-                    : (nullable ? Integer.class : int.class);
-
-            case BIGINT:
-                return nullable ? Long.class : long.class;
-
-            case REAL:
-                return nullable ? Float.class : float.class;
-
-            case FLOAT:
-            case DOUBLE:
-                return nullable ? Double.class : double.class;
-
-            case NUMERIC:
-            case DECIMAL:
-                return BigDecimal.class;
-
-            case CHAR:
-            case VARCHAR:
-            case LONGVARCHAR:
-            case NCHAR:
-            case NVARCHAR:
-            case LONGNVARCHAR:
-            case CLOB:
-            case NCLOB:
-            case SQLXML:
-                return String.class;
-
-            case DATE:
-                return java.sql.Date.class;
-
-            case TIME:
-                return java.sql.Time.class;
-
-            case TIMESTAMP:
-                return java.sql.Timestamp.class;
-
-            // BINARY, VARBINARY, LONGVARBINARY, ARRAY, BLOB, NULL, DATALINK
-            // OTHER, JAVA_OBJECT, DISTINCT, STRUCT, REF, ROWID
-            default:
-                return Object.class;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoField.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoField.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoField.java
deleted file mode 100644
index 3ee2f8c..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoField.java
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.model;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-import javafx.beans.property.BooleanProperty;
-import javafx.beans.property.SimpleBooleanProperty;
-import javafx.beans.property.SimpleStringProperty;
-import javafx.beans.property.StringProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.collections.FXCollections;
-import javafx.collections.ObservableList;
-
-import static java.sql.Types.ARRAY;
-import static java.sql.Types.BIGINT;
-import static java.sql.Types.BINARY;
-import static java.sql.Types.BIT;
-import static java.sql.Types.BLOB;
-import static java.sql.Types.BOOLEAN;
-import static java.sql.Types.CHAR;
-import static java.sql.Types.CLOB;
-import static java.sql.Types.DATALINK;
-import static java.sql.Types.DATE;
-import static java.sql.Types.DECIMAL;
-import static java.sql.Types.DISTINCT;
-import static java.sql.Types.DOUBLE;
-import static java.sql.Types.FLOAT;
-import static java.sql.Types.INTEGER;
-import static java.sql.Types.JAVA_OBJECT;
-import static java.sql.Types.LONGNVARCHAR;
-import static java.sql.Types.LONGVARBINARY;
-import static java.sql.Types.LONGVARCHAR;
-import static java.sql.Types.NCHAR;
-import static java.sql.Types.NCLOB;
-import static java.sql.Types.NULL;
-import static java.sql.Types.NUMERIC;
-import static java.sql.Types.NVARCHAR;
-import static java.sql.Types.OTHER;
-import static java.sql.Types.REAL;
-import static java.sql.Types.REF;
-import static java.sql.Types.ROWID;
-import static java.sql.Types.SMALLINT;
-import static java.sql.Types.SQLXML;
-import static java.sql.Types.STRUCT;
-import static java.sql.Types.TIME;
-import static java.sql.Types.TIMESTAMP;
-import static java.sql.Types.TINYINT;
-import static java.sql.Types.VARBINARY;
-import static java.sql.Types.VARCHAR;
-
-/**
- * Field descriptor with properties for JavaFX GUI bindings.
- */
-public class PojoField {
-    /** If this field should be used for code generation. */
-    private final BooleanProperty useProp;
-
-    /** If this field belongs to primary key. */
-    private final BooleanProperty keyProp;
-
-    /** If this field is an affinity key. */
-    private final BooleanProperty akProp;
-
-    /** If this field initially belongs to primary key. */
-    private final boolean keyPrev;
-
-    /** Field name in database. */
-    private final StringProperty dbNameProp;
-
-    /** Field type in database. */
-    private final StringProperty dbTypeNameProp;
-
-    /** Field name in POJO. */
-    private final StringProperty javaNameProp;
-
-    /** Initial field name in POJO. */
-    private final String javaNamePrev;
-
-    /** Field type in POJO. */
-    private final StringProperty javaTypeNameProp;
-
-    /** Initial field type in POJO. */
-    private final String javaTypeNamePrev;
-
-    /** Is {@code NULL} allowed for field in database. */
-    private final boolean nullable;
-
-    /** List of possible java type conversions. */
-    private final ObservableList<String> conversions;
-
-    /** Field owner. */
-    private PojoDescriptor owner;
-
-    /**
-     * @param clss List of classes to get class names.
-     * @return List of classes names to show in UI for manual select.
-     */
-    private static List<String> classNames(Class<?>... clss) {
-        List<String> names = new ArrayList<>(clss.length);
-
-        for (Class<?> cls : clss)
-            names.add(cls.getName());
-
-        return names;
-    }
-
-    /** Null number conversions. */
-    private static final ObservableList<String> NULL_NUM_CONVERSIONS = FXCollections.observableArrayList();
-
-    /** Not null number conversions. */
-    private static final ObservableList<String> NOT_NULL_NUM_CONVERSIONS = FXCollections.observableArrayList();
-
-    /** Primitive types. */
-    private static final List<String> PRIMITIVES = classNames(boolean.class, byte.class, short.class,
-        int.class, long.class, float.class, double.class);
-
-    /** Object types. */
-    private static final List<String> OBJECTS = classNames(Boolean.class, Byte.class, Short.class, Integer.class,
-        Long.class, Float.class, Double.class, BigDecimal.class);
-
-    static {
-        NOT_NULL_NUM_CONVERSIONS.addAll(PRIMITIVES);
-        NOT_NULL_NUM_CONVERSIONS.addAll(OBJECTS);
-
-        NULL_NUM_CONVERSIONS.addAll(OBJECTS);
-    }
-
-    /**
-     * @param dbType Database type.
-     * @param nullable Nullable.
-     * @param dflt Default.
-     * @return List of possible type conversions.
-     */
-    private static ObservableList<String> conversions(int dbType, boolean nullable, String dflt) {
-        switch (dbType) {
-            case TINYINT:
-            case SMALLINT:
-            case INTEGER:
-            case BIGINT:
-            case REAL:
-            case FLOAT:
-            case DOUBLE:
-                return nullable ? NULL_NUM_CONVERSIONS : NOT_NULL_NUM_CONVERSIONS;
-
-            default:
-                return FXCollections.singletonObservableList(dflt);
-        }
-    }
-
-    /**
-     * @param dbName Field name in database.
-     * @param dbType Field JDBC type in database.
-     * @param javaName Field name in POJO.
-     * @param javaTypeName Field type in POJO.
-     * @param key {@code true} if this field belongs to primary key.
-     * @param nullable {@code true} if  {@code NULL} allowed for field in database.
-     */
-    public PojoField(String dbName, int dbType, String javaName, String javaTypeName, boolean key, boolean nullable) {
-        dbNameProp = new SimpleStringProperty(dbName);
-
-        dbTypeNameProp = new SimpleStringProperty(jdbcTypeName(dbType));
-
-        javaNamePrev = javaName;
-
-        javaNameProp = new SimpleStringProperty(javaNamePrev);
-
-        javaTypeNamePrev = javaTypeName;
-
-        javaTypeNameProp = new SimpleStringProperty(javaTypeNamePrev);
-
-        useProp = new SimpleBooleanProperty(true);
-
-        keyPrev = key;
-
-        keyProp = new SimpleBooleanProperty(keyPrev);
-
-        this.nullable = nullable;
-
-        akProp = new SimpleBooleanProperty(false);
-
-        conversions = conversions(dbType, nullable, javaNamePrev);
-
-        keyProp.addListener(new ChangeListener<Boolean>() {
-            @Override public void changed(ObservableValue<? extends Boolean> val, Boolean oldVal, Boolean newVal) {
-                if (newVal) {
-                    if (!use())
-                        useProp.set(true);
-                }
-                else
-                    akProp.set(false);
-            }
-        });
-
-        akProp.addListener(new ChangeListener<Boolean>() {
-            @Override public void changed(ObservableValue<? extends Boolean> val, Boolean oldVal, Boolean newVal) {
-                if (newVal && owner != null) {
-                    keyProperty().set(true);
-
-                    for (PojoField field : owner.fields())
-                        if (field != PojoField.this && field.affinityKey())
-                            field.akProp.set(false);
-                }
-            }
-        });
-    }
-
-    /**
-     * @param jdbcType String name for JDBC type.
-     * @return String name for JDBC type.
-     */
-    private static String jdbcTypeName(int jdbcType) {
-        switch (jdbcType) {
-            case BIT:
-                return "BIT";
-            case TINYINT:
-                return "TINYINT";
-            case SMALLINT:
-                return "SMALLINT";
-            case INTEGER:
-                return "INTEGER";
-            case BIGINT:
-                return "BIGINT";
-            case FLOAT:
-                return "FLOAT";
-            case REAL:
-                return "REAL";
-            case DOUBLE:
-                return "DOUBLE";
-            case NUMERIC:
-                return "NUMERIC";
-            case DECIMAL:
-                return "DECIMAL";
-            case CHAR:
-                return "CHAR";
-            case VARCHAR:
-                return "VARCHAR";
-            case LONGVARCHAR:
-                return "LONGVARCHAR";
-            case DATE:
-                return "DATE";
-            case TIME:
-                return "TIME";
-            case TIMESTAMP:
-                return "TIMESTAMP";
-            case BINARY:
-                return "BINARY";
-            case VARBINARY:
-                return "VARBINARY";
-            case LONGVARBINARY:
-                return "LONGVARBINARY";
-            case NULL:
-                return "NULL";
-            case OTHER:
-                return "OTHER";
-            case JAVA_OBJECT:
-                return "JAVA_OBJECT";
-            case DISTINCT:
-                return "DISTINCT";
-            case STRUCT:
-                return "STRUCT";
-            case ARRAY:
-                return "ARRAY";
-            case BLOB:
-                return "BLOB";
-            case CLOB:
-                return "CLOB";
-            case REF:
-                return "REF";
-            case DATALINK:
-                return "DATALINK";
-            case BOOLEAN:
-                return "BOOLEAN";
-            case ROWID:
-                return "ROWID";
-            case NCHAR:
-                return "NCHAR";
-            case NVARCHAR:
-                return "NVARCHAR";
-            case LONGNVARCHAR:
-                return "LONGNVARCHAR";
-            case NCLOB:
-                return "NCLOB";
-            case SQLXML:
-                return "SQLXML";
-            default:
-                return "Unknown";
-        }
-    }
-
-    /**
-     * Revert changes to java names made by user.
-     */
-    public void resetJavaName() {
-        javaNameProp.set(javaNamePrev);
-    }
-
-    /**
-     * @param owner New field owner.
-     */
-    public void owner(PojoDescriptor owner) {
-        this.owner = owner;
-    }
-
-    /**
-     * @return {@code true} if filed should be used for code generation.
-     */
-    public boolean use() {
-        return useProp.get();
-    }
-
-    /**
-     * @return {@code true} if this field belongs to primary key.
-     */
-    public boolean key() {
-        return keyProp.get();
-    }
-
-    /**
-     * @param pk {@code true} if this field belongs to primary key.
-     */
-    public void key(boolean pk) {
-        keyProp.set(pk);
-    }
-
-    /**
-     * @return {@code true} if this field is an affinity key.
-     */
-    public boolean affinityKey() {
-        return akProp.get();
-    }
-
-    /**
-     * @return POJO field java name.
-     */
-    public String javaName() {
-        return javaNameProp.get();
-    }
-
-    /**
-     * @param name New POJO field java name.
-     */
-    public void javaName(String name) {
-        javaNameProp.set(name);
-    }
-
-    /**
-     * @return POJO field java type name.
-     */
-    public String javaTypeName() {
-        return javaTypeNameProp.get();
-    }
-
-    /**
-     * @return Field name in database.
-     */
-    public String dbName() {
-        return dbNameProp.get();
-    }
-
-    /**
-     * @return POJO field JDBC type name in database.
-     */
-    public String dbTypeName() {
-        return dbTypeNameProp.get();
-    }
-
-    /**
-     * @return Is NULL allowed for field in database.
-     */
-    public boolean nullable() {
-        return nullable;
-    }
-
-    /**
-     * @return List of possible java type conversions.
-     */
-    public ObservableList<String> conversions() {
-        return conversions;
-    }
-
-    /**
-     * @return {@code true} if type of field is primitive type.
-     */
-    public boolean primitive() {
-        return PRIMITIVES.contains(javaTypeName());
-    }
-
-    /**
-     * @return {@code true} if field was changed by user.
-     */
-    public boolean changed() {
-        return keyPrev != key() || !javaNamePrev.equals(javaName()) || !javaTypeNamePrev.equals(javaTypeName());
-    }
-
-    /**
-     * @return Boolean property support for {@code use} property.
-     */
-    public BooleanProperty useProperty() {
-        return useProp;
-    }
-
-    /**
-     * @return Boolean property support for {@code key} property.
-     */
-    public BooleanProperty keyProperty() {
-        return keyProp;
-    }
-
-    /**
-     * @return Boolean property support for {@code affinityKey} property.
-     */
-    public BooleanProperty affinityKeyProperty() {
-        return akProp;
-    }
-
-    /**
-     * @return String property support for {@code javaName} property.
-     */
-    public StringProperty javaNameProperty() {
-        return javaNameProp;
-    }
-
-    /**
-     * @return String property support for {@code javaTypeName} property.
-     */
-    public StringProperty javaTypeNameProperty() {
-        return javaTypeNameProp;
-    }
-
-    /**
-     * @return String property support for {@code dbName} property.
-     */
-    public StringProperty dbNameProperty() {
-        return dbNameProp;
-    }
-
-    /**
-     * @return String property support for {@code dbName} property.
-     */
-    public StringProperty dbTypeNameProperty() {
-        return dbTypeNameProp;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/model/SchemaDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/SchemaDescriptor.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/SchemaDescriptor.java
deleted file mode 100644
index 7de2247..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/SchemaDescriptor.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.model;
-
-import javafx.beans.property.BooleanProperty;
-import javafx.beans.property.SimpleBooleanProperty;
-
-/**
- * Descriptor for schema.
- */
-public class SchemaDescriptor {
-    /** Schema name */
-    private final String schema;
-
-    /** State of schema selection. */
-    private final BooleanProperty selected;
-
-    /**
-     * Constructor of schema descriptor.
-     *
-     * @param schema Schema.
-     * @param selected Selection state.
-     */
-    public SchemaDescriptor(String schema, boolean selected) {
-        this.schema = schema;
-        this.selected = new SimpleBooleanProperty(selected);
-    }
-
-    /**
-     * @return Schema name.
-     */
-    public String schema() {
-        return schema;
-    }
-
-    /**
-     * @return Boolean property support for {@code selected} property.
-     */
-    public BooleanProperty selected() {
-        return selected;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return schema;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
deleted file mode 100644
index 6d87ed5..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/DatabaseMetadataParser.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.parser;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javafx.collections.FXCollections;
-import javafx.collections.ObservableList;
-import org.apache.ignite.cache.QueryIndex;
-import org.apache.ignite.schema.model.PojoDescriptor;
-import org.apache.ignite.schema.model.SchemaDescriptor;
-
-/**
- * Database metadata parser.
- */
-public class DatabaseMetadataParser {
-    /**
-     * Get list of schemas from database.
-     *
-     * @param conn Connection to database.
-     * @return List of schema descriptors.
-     * @throws SQLException If schemas loading failed.
-     */
-    public static ObservableList<SchemaDescriptor> schemas(Connection conn) throws SQLException  {
-        Collection<String> dbSchemas = DbMetadataReader.getInstance().schemas(conn);
-
-        List<SchemaDescriptor> uiSchemas = new ArrayList<>(dbSchemas.size());
-
-        for (String schema : dbSchemas)
-            uiSchemas.add(new SchemaDescriptor(schema, false));
-
-        return FXCollections.observableList(uiSchemas);
-    }
-
-    /**
-     * Parse database metadata.
-     *
-     * @param conn Connection to database.
-     * @param schemas Collection of schema names to process.
-     * @param tblsOnly If {@code true} then process tables only else process tables and views.
-     * @return Collection of POJO descriptors.
-     * @throws SQLException If parsing failed.
-     */
-    public static ObservableList<PojoDescriptor> parse(Connection conn, List<String> schemas, boolean tblsOnly)
-        throws SQLException {
-        Map<String, PojoDescriptor> parents = new HashMap<>();
-
-        Map<String, Collection<PojoDescriptor>> childrens = new HashMap<>();
-
-        for (DbTable tbl : DbMetadataReader.getInstance().metadata(conn, schemas, tblsOnly)) {
-            String schema = tbl.schema();
-
-            PojoDescriptor parent = parents.get(schema);
-            Collection<PojoDescriptor> children = childrens.get(schema);
-
-            if (parent == null) {
-                parent = new PojoDescriptor(null, new DbTable(schema, "", Collections.<DbColumn>emptyList(),
-                    Collections.<QueryIndex>emptyList()));
-
-                children = new ArrayList<>();
-
-                parents.put(schema, parent);
-                childrens.put(schema, children);
-            }
-
-            children.add(new PojoDescriptor(parent, tbl));
-        }
-
-        List<PojoDescriptor> res = new ArrayList<>();
-
-        for (Map.Entry<String, PojoDescriptor> item : parents.entrySet()) {
-            String schema = item.getKey();
-            PojoDescriptor parent = item.getValue();
-
-            Collection<PojoDescriptor> children = childrens.get(schema);
-
-            if (!children.isEmpty()) {
-                parent.children(children);
-
-                res.add(parent); // Add schema description.
-                res.addAll(children); // Add tables in schema.
-            }
-        }
-
-        Collections.sort(res, new Comparator<PojoDescriptor>() {
-            @Override public int compare(PojoDescriptor o1, PojoDescriptor o2) {
-                return o1.fullDbName().compareTo(o2.fullDbName());
-            }
-        });
-
-        return FXCollections.observableList(res);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/ConfirmCallable.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/ConfirmCallable.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/ConfirmCallable.java
deleted file mode 100644
index b23ff11..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/ConfirmCallable.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.ui;
-
-import java.util.concurrent.Callable;
-import java.util.concurrent.FutureTask;
-import javafx.application.Platform;
-import javafx.stage.Stage;
-
-import static org.apache.ignite.schema.ui.MessageBox.Result.NO;
-import static org.apache.ignite.schema.ui.MessageBox.Result.NO_TO_ALL;
-import static org.apache.ignite.schema.ui.MessageBox.Result.YES_TO_ALL;
-
-/**
- * Callable to ask user for confirmation from non EDT thread.
- */
-public class ConfirmCallable implements Callable<MessageBox.Result> {
-    /** Owner window. */
-    private final Stage owner;
-
-    /** Message template. */
-    private final String template;
-
-    /** Message to show in confirmation dialog. */
-    private String msg;
-
-    /** User choice. */
-    private MessageBox.Result choice = NO;
-
-    /**
-     * @param owner Owner window.
-     * @param template Message template.
-     */
-    public ConfirmCallable(Stage owner, String template) {
-        this.owner = owner;
-        this.template = template;
-    }
-
-    /** {@inheritDoc} */
-    @Override public MessageBox.Result call() throws Exception {
-        choice = MessageBox.applyToAllChoiceDialog(owner, String.format(template, msg));
-
-        return choice;
-    }
-
-    /**
-     * Execute confirmation in EDT thread.
-     *
-     * @return Confirm result.
-     */
-    public MessageBox.Result confirm(String msg) {
-        this.msg = msg;
-
-        if (choice == YES_TO_ALL || choice == NO_TO_ALL)
-            return choice;
-
-        FutureTask<MessageBox.Result> fut = new FutureTask<>(this);
-
-        Platform.runLater(fut);
-
-        try {
-            return fut.get();
-        }
-        catch (Exception ignored) {
-            return NO;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/Controls.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/Controls.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/Controls.java
deleted file mode 100644
index 934a4c8..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/Controls.java
+++ /dev/null
@@ -1,697 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.ui;
-
-import com.sun.javafx.scene.control.skin.VirtualFlow;
-import javafx.application.Platform;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.collections.FXCollections;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
-import javafx.geometry.Insets;
-import javafx.geometry.Orientation;
-import javafx.geometry.Pos;
-import javafx.scene.Node;
-import javafx.scene.Parent;
-import javafx.scene.Scene;
-import javafx.scene.control.Button;
-import javafx.scene.control.CheckBox;
-import javafx.scene.control.ComboBox;
-import javafx.scene.control.Control;
-import javafx.scene.control.Label;
-import javafx.scene.control.ListView;
-import javafx.scene.control.PasswordField;
-import javafx.scene.control.ProgressIndicator;
-import javafx.scene.control.SelectionMode;
-import javafx.scene.control.SplitPane;
-import javafx.scene.control.TableCell;
-import javafx.scene.control.TableColumn;
-import javafx.scene.control.TableView;
-import javafx.scene.control.TextField;
-import javafx.scene.control.TitledPane;
-import javafx.scene.control.Tooltip;
-import javafx.scene.control.cell.CheckBoxListCell;
-import javafx.scene.control.cell.CheckBoxTableCell;
-import javafx.scene.control.cell.PropertyValueFactory;
-import javafx.scene.control.cell.TextFieldTableCell;
-import javafx.scene.image.Image;
-import javafx.scene.image.ImageView;
-import javafx.scene.input.KeyCode;
-import javafx.scene.input.KeyEvent;
-import javafx.scene.layout.BorderPane;
-import javafx.scene.layout.HBox;
-import javafx.scene.layout.Pane;
-import javafx.scene.layout.StackPane;
-import javafx.scene.layout.VBox;
-import javafx.scene.text.Font;
-import javafx.scene.text.Text;
-import javafx.util.Callback;
-import javafx.util.converter.DefaultStringConverter;
-
-/**
- * Utility class to create controls.
- */
-public class Controls {
-    /** */
-    public static final Insets DFLT_PADDING = new Insets(10, 10, 10, 10);
-
-    /**
-     * Create scene with predefined style.
-     *
-     * @param root The root node of the scene graph.
-     * @return New {@code Scene} instance.
-     */
-    public static Scene scene(Parent root) {
-        Scene scene = new Scene(root);
-
-        scene.getStylesheets().add("media/style.css");
-
-        return scene;
-    }
-
-    /**
-     * Create grid pane with default padding.
-     *
-     * @param top Top padding
-     * @param right Right padding.
-     * @param bottom Bottom padding.
-     * @param left Left padding.
-     * @return New {@code GridPaneEx} instance.
-     */
-    public static GridPaneEx paneEx(double top, double right, double bottom, double left) {
-        GridPaneEx paneEx = new GridPaneEx();
-
-        paneEx.setPadding(new Insets(top, right, bottom, left));
-
-        return paneEx;
-    }
-
-    /**
-     * Create new {@code HBox} with default padding.
-     *
-     * @param spacing Amount of horizontal space between each child.
-     * @param dfltPadding If {@code true} than set default padding for pane.
-     * @return New {@code HBox} instance.
-     */
-    public static HBox hBox(int spacing, boolean dfltPadding) {
-        HBox hb = new HBox(spacing);
-
-        if (dfltPadding)
-            hb.setPadding(DFLT_PADDING);
-
-        return hb;
-    }
-
-    /**
-     * Create new {@code HBox} with default padding and add controls.
-     *
-     * @param spacing Amount of horizontal space between each child.
-     * @param dfltPadding If {@code true} than set default padding for pane.
-     * @param controls Controls to add.
-     * @return New {@code HBox} instance.
-     */
-    public static HBox hBox(int spacing, boolean dfltPadding, Node... controls) {
-        HBox hb = hBox(spacing, dfltPadding);
-
-        hb.getChildren().addAll(controls);
-
-        return hb;
-    }
-
-    /**
-     * Create new {@code VBox} with default padding.
-     *
-     * @param spacing Amount of horizontal space between each child.
-     * @return New {@code VBox} instance.
-     */
-    public static VBox vBox(int spacing) {
-        VBox vb = new VBox(spacing);
-
-        vb.setPadding(DFLT_PADDING);
-
-        return vb;
-    }
-
-    /**
-     * Create new {@code VBox} with default padding and add controls.
-     *
-     * @param spacing Amount of horizontal space between each child.
-     * @param controls Controls to add.
-     * @return New {@code VBox} instance.
-     */
-    public static VBox vBox(int spacing, Node... controls) {
-        VBox vb = vBox(spacing);
-
-        vb.getChildren().addAll(controls);
-
-        return vb;
-    }
-
-    /**
-     * Create stack pane.
-     *
-     * @param controls Controls to add.
-     * @return New {@code StackPane} instance.
-     */
-    public static StackPane stackPane(Node... controls) {
-        StackPane sp = new StackPane();
-
-        sp.getChildren().addAll(controls);
-
-        return sp;
-    }
-
-    /**
-     * Create border pane.
-     *
-     * @param top Optional top control.
-     * @param center Optional center control.
-     * @param bottom Optional bottom control.
-     * @param left Optional left control.
-     * @param right Optional right control.
-     * @return New {@code BorderPane} instance.
-     */
-    public static BorderPane borderPane(Node top, Node center, Node bottom, Node left, Node right) {
-        BorderPane bp = new BorderPane();
-
-        bp.setTop(top);
-        bp.setCenter(center);
-        bp.setBottom(bottom);
-        bp.setLeft(left);
-        bp.setRight(right);
-
-        return bp;
-    }
-
-    /**
-     * Sets control tooltip if needed.
-     *
-     * @param ctrl Target control.
-     * @param tip Tooltip text.
-     * @return Control itself for method chaining.
-     */
-    public static <T extends Control> T tooltip(T ctrl, String tip) {
-        if (!tip.isEmpty())
-            ctrl.setTooltip(new Tooltip(tip));
-
-        return ctrl;
-    }
-
-    /**
-     * Create label.
-     *
-     * @param text Label text.
-     * @return New {@code Label} instance.
-     */
-    public static Label label(String text) {
-        return new Label(text);
-    }
-
-    /**
-     * Create button with text only.
-     *
-     * @param text Button text.
-     * @param tip Tooltip text.
-     * @param onAct Button action.
-     * @return New {@code Button} instance.
-     */
-    public static Button button(String text, String tip, EventHandler<ActionEvent> onAct) {
-        Button btn = new Button(text);
-
-        btn.setOnAction(onAct);
-
-        tooltip(btn, tip);
-
-        return btn;
-    }
-
-    /**
-     * Create button with icon only.
-     *
-     * @param icon Button icon.
-     * @param tip Tooltip text.
-     * @param onAct Button action.
-     * @return New {@code Button} instance.
-     */
-    public static Button button(ImageView icon, String tip, EventHandler<ActionEvent> onAct) {
-        Button btn = new Button();
-
-        btn.setGraphic(icon);
-        btn.setOnAction(onAct);
-
-        tooltip(btn, tip);
-
-        return btn;
-    }
-
-    /**
-     * Create pane with buttons.
-     *
-     * @param alignment Alignment of buttons.
-     * @param dfltPadding If {@code true} than set default padding for pane.
-     * @param btns Buttons that will be added to pane.
-     * @return New {@code HBox} instance with buttons.
-     */
-    public static Pane buttonsPane(Pos alignment, boolean dfltPadding, Button... btns) {
-        HBox hb = hBox(10, dfltPadding, btns);
-
-        hb.setAlignment(alignment);
-
-        return hb;
-    }
-
-    /**
-     * Create checkbox.
-     *
-     * @param text Checkbox text.
-     * @param tip Tooltip tex.
-     * @param sel Checkbox selected state.
-     * @return New {@code Checkbox} instance.
-     */
-    public static CheckBox checkBox(String text, String tip, boolean sel) {
-        CheckBox ch = new CheckBox(text);
-
-        ch.setSelected(sel);
-
-        tooltip(ch, tip);
-
-        return ch;
-    }
-
-    /**
-     * Create text field.
-     *
-     * @param tip Tooltip text.
-     * @return New {@code TextField} instance.
-     */
-    public static TextField textField(String tip) {
-        TextField tf = new TextField();
-
-        tooltip(tf, tip);
-
-        return tf;
-    }
-
-    /**
-     * Create static text.
-     *
-     * @param text Text to show.
-     * @param wrap Text wrapping width.
-     * @return New {@code Text} instance.
-     */
-    public static Text text(String text, int wrap) {
-        Text t = new Text(text);
-
-        t.setFont(new Font(14));
-
-        if (wrap > 0)
-            t.setWrappingWidth(wrap);
-
-        return t;
-    }
-
-    /**
-     * Create password field.
-     *
-     * @param tip Tooltip text.
-     * @return New {@code PasswordField} instance.
-     */
-    public static PasswordField passwordField(String tip) {
-        PasswordField pf = new PasswordField();
-
-        tooltip(pf, tip);
-
-        return pf;
-    }
-
-    /**
-     * Create combo box.
-     *
-     * @param tip Tooltip text.
-     * @param items Combo box items.
-     * @return New {@code ComboBox} instance.
-     */
-    public static <T> ComboBox<T> comboBox(String tip, T... items) {
-        ComboBox<T> cb = new ComboBox<>(FXCollections.observableArrayList(items));
-
-        cb.setMaxWidth(Double.MAX_VALUE);
-        cb.getSelectionModel().select(0);
-
-        tooltip(cb, tip);
-
-        return cb;
-    }
-
-    /**
-     * Create split pane for provided nodes.
-     *
-     * @param node1 First node.
-     * @param node2 Second node.
-     * @param pos Initial divider position.
-     * @return New {@code SplitPane} instance.
-     */
-    public static SplitPane splitPane(Node node1, Node node2, double pos) {
-        SplitPane sp = new SplitPane();
-
-        sp.setOrientation(Orientation.VERTICAL);
-        sp.getItems().addAll(node1, node2);
-        sp.setDividerPosition(0, pos);
-
-        return sp;
-    }
-
-    /**
-     * Create titled pane.
-     *
-     * @param title Title.
-     * @param node Node.
-     * @param collapsible Collapsible flag.
-     * @return New {@code TitledPane} instance.
-     */
-    public static TitledPane titledPane(String title, Node node, boolean collapsible) {
-        TitledPane tp = new TitledPane(title, node);
-
-        tp.setCollapsible(collapsible);
-        tp.setExpanded(false);
-
-        return tp;
-    }
-
-    /**
-     * Create list view.
-     *
-     * @param tip Tooltip text.
-     * @param cb Callback function for list view cell data binding.
-     * @param <T> Type of showed by viewer element.
-     * @return New {@code ListView} instance.
-     */
-    public static <T> ListView<T> list(String tip, Callback<T, ObservableValue<Boolean>> cb) {
-        ListView lst = new ListView<>();
-
-        lst.setCellFactory(CheckBoxListCell.forListView(cb));
-
-        lst.setMinHeight(70);
-        lst.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
-
-        tooltip(lst, tip);
-
-        return lst;
-    }
-
-    /**
-     * Create table column.
-     *
-     * @param colName Column name to display.
-     * @param propName Property name column is bound to.
-     * @param tip Column tooltip text.
-     * @param minWidth The minimum width column is permitted to be resized to.
-     * @param maxWidth The maximum width column is permitted to be resized to.
-     * @param editable {@code true} if column is editable.
-     * @return New {@code TableColumn} instance.
-     */
-    private static <S, T> TableColumn<S, T> tableColumn(String colName, String propName, String tip,
-        int minWidth, int maxWidth, boolean editable) {
-        TableColumn<S, T> col = new TableColumn<>();
-
-        col.setGraphic(tooltip(new Label(colName), tip));
-
-        col.setSortable(false);
-
-        if (minWidth > 0)
-            col.setMinWidth(minWidth);
-
-        if (maxWidth > 0)
-            col.setMaxWidth(maxWidth);
-
-        col.setCellValueFactory(new PropertyValueFactory<S, T>(propName));
-
-        col.setEditable(editable);
-
-        return col;
-    }
-
-    /**
-     * Create table column.
-     *
-     * @param colName Column name to display.
-     * @param propName Property name column is bound to.
-     * @param tip Column tooltip text.
-     * @return New {@code TableColumn} instance.
-     */
-    public static <S, T> TableColumn<S, T> tableColumn(String colName, String propName, String tip) {
-        return tableColumn(colName, propName, tip, 100, 0, false);
-    }
-
-    /**
-     * Create table column.
-     *
-     * @param colName Column name to display.
-     * @param propName Property name column is bound to.
-     * @param tip Column tooltip text.
-     * @param cellFactory Custom cell factory.
-     * @return New {@code TableColumn} instance.
-     */
-    public static <S, T> TableColumn<S, T> customColumn(String colName, String propName, String tip,
-        Callback<TableColumn<S, T>, TableCell<S, T>> cellFactory) {
-        TableColumn<S, T> col = tableColumn(colName, propName, tip, 100, 0, true);
-
-        col.setCellFactory(cellFactory);
-
-        return col;
-    }
-
-    /**
-     * Create editable boolean table column.
-     *
-     * @param colName Column name to display.
-     * @param propName Property name column is bound to.
-     * @param tip Column tooltip text.
-     * @return New {@code TableColumn} instance.
-     */
-    public static <S> TableColumn<S, Boolean> booleanColumn(String colName, String propName, String tip) {
-        TableColumn<S, Boolean> col = tableColumn(colName, propName, tip, 50, 50, true);
-
-        col.setCellFactory(CheckBoxTableCellEx.<S>cellFactory());
-
-        return col;
-
-    }
-
-    /**
-     * Create editable text table column.
-     *
-     * @param colName Column name to display.
-     * @param propName Property name column is bound to.
-     * @param tip Column tooltip text.
-     * @return New {@code TableColumn} instance.
-     */
-    public static <S> TableColumn<S, String> textColumn(String colName, String propName, String tip,
-        TextColumnValidator<S> validator) {
-        TableColumn<S, String> col = tableColumn(colName, propName, tip, 100, 0, true);
-
-        col.setCellFactory(TextFieldTableCellEx.cellFactory(validator));
-
-        return col;
-    }
-
-    /**
-     * Create table view.
-     *
-     * @param placeholder Text to show if table model is empty.
-     * @param cols Columns to add.
-     * @return New {@code TableView} instance.
-     */
-    public static <S> TableView<S> tableView(String placeholder, TableColumn<S, ?>... cols) {
-        TableView<S> tbl = new TableView<>();
-
-        tbl.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
-        tbl.setEditable(true);
-        tbl.setMinHeight(70);
-        tbl.setPlaceholder(text(placeholder, 0));
-
-        tbl.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
-
-        tbl.getColumns().addAll(cols);
-
-        return tbl;
-    }
-
-    /**
-     * Create progress indicator.
-     *
-     * @param sz Indicator diameter.
-     * @return New {@code ProgressIndicator} instance.
-     */
-    public static ProgressIndicator progressIndicator(int sz) {
-        ProgressIndicator pi = new ProgressIndicator();
-
-        pi.setMaxWidth(sz);
-        pi.setMaxHeight(sz);
-
-        return pi;
-    }
-
-    /**
-     * Create image view.
-     *
-     * @param imgFileName Image filename.
-     * @return New {@code ImageView} instance.
-     */
-    public static ImageView imageView(String imgFileName, int sz) {
-        return new ImageView(image(imgFileName, sz));
-    }
-
-    /**
-     * Gets image by its filename.
-     *
-     * @param imgFileName Image filename.
-     * @return Loaded image.
-     */
-    public static Image image(String imgFileName, int sz) {
-        return new Image(Controls.class.getClassLoader()
-            .getResourceAsStream(String.format("media/%1$s_%2$dx%2$d.png", imgFileName, sz)));
-    }
-
-    /**
-     * Customized checkbox.
-     */
-    private static class CheckBoxTableCellEx<S> extends CheckBoxTableCell<S, Boolean> {
-        /** Creates a ComboBox cell factory for use in TableColumn controls. */
-        public static <S> Callback<TableColumn<S, Boolean>, TableCell<S, Boolean>> cellFactory() {
-            return new Callback<TableColumn<S, Boolean>, TableCell<S, Boolean>>() {
-                @Override public TableCell<S, Boolean> call(TableColumn<S, Boolean> col) {
-                    return new CheckBoxTableCellEx<>();
-                }
-            };
-        }
-
-        /**
-         * Default constructor.
-         */
-        private CheckBoxTableCellEx() {
-            setAlignment(Pos.CENTER);
-        }
-    }
-
-    /**
-     * Special table text field cell that commit its content on focus lost.
-     */
-    private static class TextFieldTableCellEx<S> extends TextFieldTableCell<S, String> {
-        /** */
-        private final TextColumnValidator<S> validator;
-        /** */
-        private String curTxt = "";
-
-        /** Row value. */
-        private S rowVal;
-
-        /** Create cell factory. */
-        public static <S> Callback<TableColumn<S, String>, TableCell<S, String>>
-        cellFactory(final TextColumnValidator<S> validator) {
-            return new Callback<TableColumn<S, String>, TableCell<S, String>>() {
-                @Override public TableCell<S, String> call(TableColumn<S, String> col) {
-                    return new TextFieldTableCellEx<>(validator);
-                }
-            };
-        }
-
-        /**
-         * Text field cell constructor.
-         *
-         * @param validator Input text validator.
-         */
-        private TextFieldTableCellEx(TextColumnValidator<S> validator) {
-            super(new DefaultStringConverter());
-
-            this.validator = validator;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void startEdit() {
-            String item = getItem();
-
-            if (item == null || item.isEmpty())
-                return;
-
-            super.startEdit();
-
-            rowVal = getTableView().getSelectionModel().getSelectedItem();
-
-            Node g = getGraphic();
-
-            if (g != null) {
-                final TextField tf = (TextField)g;
-
-                curTxt = tf.getText();
-
-                tf.textProperty().addListener(new ChangeListener<String>() {
-                    @Override public void changed(ObservableValue<? extends String> val, String oldVal, String newVal) {
-                        curTxt = newVal;
-                    }
-                });
-
-                tf.setOnKeyPressed(new EventHandler<KeyEvent>() {
-                    @Override public void handle(KeyEvent evt) {
-                        if (KeyCode.ENTER == evt.getCode() || KeyCode.ESCAPE == evt.getCode())
-                            cancelEdit();
-                    }
-                });
-
-                tf.setOnKeyReleased(new EventHandler<KeyEvent>() {
-                    @Override public void handle(KeyEvent evt) {
-                        // No-op to overwrite JavaFX implementation.
-                    }
-                });
-
-                // Special hack for editable TextFieldTableCell.
-                // Cancel edit when focus lost from text field, but do not cancel if focus lost to VirtualFlow.
-                tf.focusedProperty().addListener(new ChangeListener<Boolean>() {
-                    @Override public void changed(ObservableValue<? extends Boolean> val, Boolean oldVal, Boolean newVal) {
-                        Node fo = getScene().getFocusOwner();
-
-                        if (!newVal) {
-                            if (fo instanceof VirtualFlow) {
-                                if (fo.getParent().getParent() != getTableView())
-                                    cancelEdit();
-                            }
-                            else
-                                cancelEdit();
-                        }
-                    }
-                });
-
-                Platform.runLater(new Runnable() {
-                    @Override public void run() {
-                        tf.requestFocus();
-                    }
-                });
-            }
-        }
-
-        /** {@inheritDoc} */
-        @Override public void cancelEdit() {
-            boolean editing = isEditing();
-
-            super.cancelEdit();
-
-            if (editing && validator.valid(rowVal, curTxt))
-                updateItem(curTxt, false);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/GridPaneEx.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/GridPaneEx.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/GridPaneEx.java
deleted file mode 100644
index 292a7a0..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/GridPaneEx.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.ui;
-
-import javafx.geometry.Pos;
-import javafx.scene.Node;
-import javafx.scene.control.Label;
-import javafx.scene.layout.ColumnConstraints;
-import javafx.scene.layout.GridPane;
-import javafx.scene.layout.Priority;
-import javafx.scene.layout.RowConstraints;
-
-/**
- * Utility extension of {@code GridPane}.
- */
-public class GridPaneEx extends GridPane {
-    /** Current column. */
-    private int col;
-
-    /** Current row. */
-    private int row;
-
-    /**
-     * Create pane.
-     */
-    public GridPaneEx() {
-        setAlignment(Pos.TOP_LEFT);
-        setHgap(5);
-        setVgap(10);
-    }
-
-    /**
-     * Add default column.
-     */
-    public void addColumn() {
-        getColumnConstraints().add(new ColumnConstraints());
-    }
-
-    /**
-     * Add column with constraints and horizontal grow priority for the column.
-     *
-     * @param min Column minimum size.
-     * @param pref Column preferred size.
-     * @param max Column max size.
-     * @param hgrow Column horizontal grow priority.
-     */
-    public void addColumn(double min, double pref, double max, Priority hgrow) {
-        ColumnConstraints cc = new ColumnConstraints(min, pref, max);
-
-        cc.setHgrow(hgrow);
-
-        getColumnConstraints().add(cc);
-    }
-
-    /**
-     * Add default row.
-     */
-    public void addRow() {
-        getRowConstraints().add(new RowConstraints());
-    }
-
-    /**
-     * Add default rows.
-     *
-     * @param n Number of rows to add.
-     */
-    public void addRows(int n) {
-        for (int i = 0; i < n; i++)
-            addRow();
-    }
-
-    /**
-     * Add row with constraints and vertical grow priority for the row.
-     *
-     * @param min Row minimum size.
-     * @param pref Row preferred size.
-     * @param max Row max size.
-     * @param vgrow Row vertical grow priority.
-     */
-    public void addRow(double min, double pref, double max, Priority vgrow) {
-        RowConstraints rc = new RowConstraints(min, pref, max);
-
-        rc.setVgrow(vgrow);
-
-        getRowConstraints().add(rc);
-    }
-
-    /**
-     * Wrap to next row.
-     */
-    public void wrap() {
-        col = 0;
-
-        row++;
-    }
-
-    /**
-     * Skip columns.
-     *
-     * @param span How many columns should be skipped.
-     */
-    public void skip(int span) {
-        add(new Label(""), span);
-    }
-
-    /**
-     * Move to next column.
-     */
-    private void nextCol(int span) {
-        col += span;
-
-        if (col >= getColumnConstraints().size())
-            wrap();
-    }
-
-    /**
-     * Add control to grid pane.
-     *
-     * @param ctrl Control to add.
-     * @param span How many columns control should take.
-     * @return Added control.
-     */
-    public <T extends Node> T add(T ctrl, int span) {
-        add(ctrl, col, row, span, 1);
-
-        nextCol(span);
-
-        return ctrl;
-    }
-
-    /**
-     * Add control to grid pane.
-     *
-     * @param ctrl Control to add.
-     * @return Added control.
-     */
-    public <T extends Node> T add(T ctrl) {
-        return add(ctrl, 1);
-    }
-
-    /**
-     * Add control with label.
-     *
-     * @param text Label text.
-     * @param ctrl Control to add.
-     * @param span How many columns control should take.
-     * @return Added control.
-     */
-    public <T extends Node> T addLabeled(String text, T ctrl, int span) {
-        add(new Label(text));
-
-        return add(ctrl, span);
-    }
-
-    /**
-     * Add control with label.
-     *
-     * @param text Label text.
-     * @param ctrl Control to add.
-     * @return Added control.
-     */
-    public <T extends Node> T addLabeled(String text, T ctrl) {
-        return addLabeled(text, ctrl, 1);
-    }
-}
\ No newline at end of file


[43/50] [abbrv] ignite git commit: IGNITE-4733: Removed unused methods in GridFunc and F0 classes. This closes #1563.

Posted by dm...@apache.org.
IGNITE-4733: Removed unused methods in GridFunc and F0 classes. This closes #1563.


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

Branch: refs/heads/ignite-1192
Commit: 62a3b4d718cd37ab6964d757b285daa126342424
Parents: 4425b40
Author: devozerov <vo...@gridgain.com>
Authored: Mon Apr 10 15:01:01 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Mon Apr 10 15:01:01 2017 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/util/F0.java     | 196 +-----
 .../ignite/internal/util/lang/GridFunc.java     | 620 +------------------
 2 files changed, 9 insertions(+), 807 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/62a3b4d7/modules/core/src/main/java/org/apache/ignite/internal/util/F0.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/F0.java b/modules/core/src/main/java/org/apache/ignite/internal/util/F0.java
index 130987b..497baaf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/F0.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/F0.java
@@ -21,18 +21,11 @@ import java.util.Collection;
 import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
-import org.apache.ignite.internal.processors.cache.CacheEntryPredicateAdapter;
-import org.apache.ignite.internal.processors.cache.CacheEntrySerializablePredicate;
-import org.apache.ignite.internal.processors.cache.GridCacheContext;
-import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;
 import org.apache.ignite.internal.util.lang.GridFunc;
 import org.apache.ignite.internal.util.lang.GridNodePredicate;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.P1;
 import org.apache.ignite.internal.util.typedef.internal.A;
-import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.lang.IgnitePredicate;
 import org.jetbrains.annotations.Nullable;
 
@@ -52,6 +45,7 @@ public class F0 {
      * @param <T> Type of the free variable, i.e. the element the predicate is called on.
      * @return Negated predicate (not peer-deployable).
      */
+    @SuppressWarnings("unchecked")
     public static <T> IgnitePredicate<T> not(@Nullable final IgnitePredicate<? super T>... p) {
         return F.isAlwaysFalse(p) ? F.<T>alwaysTrue() : F.isAlwaysTrue(p) ? F.<T>alwaysFalse() : new P1<T>() {
             @Override public boolean apply(T t) {
@@ -90,8 +84,6 @@ public class F0 {
     public static <T> IgnitePredicate<T> notIn(@Nullable final Collection<? extends T> c) {
         return F.isEmpty(c) ? GridFunc.<T>alwaysTrue() : new P1<T>() {
             @Override public boolean apply(T t) {
-                assert c != null;
-
                 return !c.contains(t);
             }
         };
@@ -115,151 +107,6 @@ public class F0 {
     }
 
     /**
-     * @param p1 Filter1.
-     * @param p2 Filter2.
-     * @return And filter.
-     */
-    public static CacheEntryPredicate and0(@Nullable final CacheEntryPredicate[] p1,
-        @Nullable final CacheEntryPredicate... p2) {
-        if (CU.isAlwaysFalse0(p1) || CU.isAlwaysFalse0(p2))
-            return CU.alwaysFalse0();
-
-        if (CU.isAlwaysTrue0(p1) && CU.isAlwaysTrue0(p2))
-            return CU.alwaysTrue0();
-
-        final boolean e1 = F.isEmpty(p1);
-        final boolean e2 = F.isEmpty(p2);
-
-        if (e1 && e2)
-            return CU.alwaysTrue0();
-
-        if (e1 && !e2) {
-            assert p2 != null;
-
-            if (p2.length == 1)
-                return p2[0];
-        }
-
-        if (!e1 && e2) {
-            assert p1 != null;
-
-            if (p1.length == 1)
-                return p1[0];
-        }
-
-        return new CacheEntrySerializablePredicate(new CacheEntryPredicateAdapter() {
-            @Override public boolean apply(GridCacheEntryEx e) {
-                if (!e1) {
-                    assert p1 != null;
-
-                    for (CacheEntryPredicate p : p1)
-                        if (p != null && !p.apply(e))
-                            return false;
-                }
-
-                if (!e2) {
-                    assert p2 != null;
-
-                    for (CacheEntryPredicate p : p2)
-                        if (p != null && !p.apply(e))
-                            return false;
-                }
-
-                return true;
-            }
-
-            @Override public void entryLocked(boolean locked) {
-                if (p1 != null) {
-                    for (CacheEntryPredicate p : p1) {
-                        if (p != null)
-                            p.entryLocked(locked);
-                    }
-                }
-
-                if (p2 != null) {
-                    for (CacheEntryPredicate p : p2) {
-                        if (p != null)
-                            p.entryLocked(locked);
-                    }
-                }
-            }
-
-            @Override public void prepareMarshal(GridCacheContext ctx) throws IgniteCheckedException {
-                if (!e1) {
-                    assert p1 != null;
-
-                    for (CacheEntryPredicate p : p1)
-                        p.prepareMarshal(ctx);
-                }
-
-                if (!e2) {
-                    assert p2 != null;
-
-                    for (CacheEntryPredicate p : p2)
-                        p.prepareMarshal(ctx);
-                }
-            }
-        });
-    }
-
-    /**
-     * @param p Filter1.
-     * @param ps Filter2.
-     * @return And filter.
-     */
-    public static CacheEntryPredicate and0(
-        @Nullable final CacheEntryPredicate p,
-        @Nullable final CacheEntryPredicate... ps) {
-        if (p == null && F.isEmptyOrNulls(ps))
-            return CU.alwaysTrue0();
-
-        if (F.isAlwaysFalse(p) && F.isAlwaysFalse(ps))
-            return CU.alwaysFalse0();
-
-        if (F.isAlwaysTrue(p) && F.isAlwaysTrue(ps))
-            return CU.alwaysTrue0();
-
-        return new CacheEntrySerializablePredicate(new CacheEntryPredicateAdapter() {
-            @Override public boolean apply(GridCacheEntryEx e) {
-                assert ps != null;
-
-                if (p != null && !p.apply(e))
-                    return false;
-
-                for (CacheEntryPredicate p : ps) {
-                    if (p != null && !p.apply(e))
-                        return false;
-                }
-
-                return true;
-            }
-
-            @Override public void entryLocked(boolean locked) {
-                assert ps != null;
-
-                if (p != null)
-                    p.entryLocked(locked);
-
-                for (CacheEntryPredicate p : ps) {
-                    if (p != null)
-                        p.entryLocked(locked);
-                }
-            }
-
-            @Override public void prepareMarshal(GridCacheContext ctx) throws IgniteCheckedException {
-                assert ps != null;
-
-                if (p != null)
-                    p.prepareMarshal(ctx);
-
-                for (CacheEntryPredicate p : ps)
-                    if (p != null)
-                        p.prepareMarshal(ctx);
-            }
-        });
-    }
-
-    /**
      * Get a predicate (non peer-deployable) that evaluates to {@code true} if each of its component predicates
      * evaluates to {@code true}. The components are evaluated in order they are supplied.
      * Evaluation will be stopped as soon as first predicate evaluates to {@code false}.
@@ -272,7 +119,7 @@ public class F0 {
      * @return Predicate that evaluates to {@code true} if each of its component predicates
      *      evaluates to {@code true}.
      */
-    @SuppressWarnings({"unchecked"})
+    @SuppressWarnings({"unchecked", "ConfusingArgumentToVarargsMethod"})
     public static <T> IgnitePredicate<T> and(@Nullable final IgnitePredicate<? super T>[] p1,
         @Nullable final IgnitePredicate<? super T>... p2) {
         if (F.isAlwaysFalse(p1) || F.isAlwaysFalse(p2))
@@ -287,16 +134,12 @@ public class F0 {
         if (e1 && e2)
             return F.alwaysTrue();
 
-        if (e1 && !e2) {
-            assert p2 != null;
-
+        if (e1) {
             if (p2.length == 1)
                 return (IgnitePredicate<T>)p2[0];
         }
 
         if (!e1 && e2) {
-            assert p1 != null;
-
             if (p1.length == 1)
                 return (IgnitePredicate<T>)p1[0];
         }
@@ -305,15 +148,11 @@ public class F0 {
             Set<UUID> ids = new GridLeanSet<>();
 
             if (!e1) {
-                assert p1 != null;
-
                 for (IgnitePredicate<? super T> p : p1)
                     ids.addAll(((GridNodePredicate)p).nodeIds());
             }
 
             if (!e2) {
-                assert p2 != null;
-
                 for (IgnitePredicate<? super T> p : p2)
                     ids.addAll(((GridNodePredicate)p).nodeIds());
             }
@@ -325,16 +164,12 @@ public class F0 {
             return new P1<T>() {
                 @Override public boolean apply(T t) {
                     if (!e1) {
-                        assert p1 != null;
-
                         for (IgnitePredicate<? super T> p : p1)
                             if (p != null && !p.apply(t))
                                 return false;
                     }
 
                     if (!e2) {
-                        assert p2 != null;
-
                         for (IgnitePredicate<? super T> p : p2)
                             if (p != null && !p.apply(t))
                                 return false;
@@ -359,7 +194,7 @@ public class F0 {
      * @return Predicate that evaluates to {@code true} if each of its component predicates
      *      evaluates to {@code true}.
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({"unchecked", "ConfusingArgumentToVarargsMethod", "ConstantConditions"})
     public static <T> IgnitePredicate<T> and(
         @Nullable final IgnitePredicate<? super T> p,
         @Nullable final IgnitePredicate<? super T>... ps
@@ -428,8 +263,6 @@ public class F0 {
     public static <T> IgnitePredicate<T> in(@Nullable final Collection<? extends T> c) {
         return F.isEmpty(c) ? GridFunc.<T>alwaysFalse() : new P1<T>() {
             @Override public boolean apply(T t) {
-                assert c != null;
-
                 return c.contains(t);
             }
         };
@@ -475,31 +308,10 @@ public class F0 {
      * @param ps Collection of predicates to test.
      * @return {@code True} if all passed in predicates are instances of {@link GridNodePredicate} class.
      */
-    public static boolean isAllNodePredicates(@Nullable Iterable<? extends IgnitePredicate<?>> ps) {
-        if (F.isEmpty(ps))
-            return false;
-
-        assert ps != null;
-
-        for (IgnitePredicate<?> p : ps)
-            if (!(p instanceof GridNodePredicate))
-                return false;
-
-        return true;
-    }
-
-    /**
-     * Tests if all passed in predicates are instances of {@link GridNodePredicate} class.
-     *
-     * @param ps Collection of predicates to test.
-     * @return {@code True} if all passed in predicates are instances of {@link GridNodePredicate} class.
-     */
     public static boolean isAllNodePredicates(@Nullable IgnitePredicate<?>... ps) {
         if (F.isEmpty(ps))
             return false;
 
-        assert ps != null;
-
         for (IgnitePredicate<?> p : ps)
             if (!(p instanceof GridNodePredicate))
                 return false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/62a3b4d7/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
index 5eb27d3..a00abe9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
@@ -35,14 +35,11 @@ import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicReference;
 import javax.cache.Cache;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.compute.ComputeJobResult;
 import org.apache.ignite.internal.IgniteFutureTimeoutCheckedException;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.util.F0;
@@ -52,7 +49,6 @@ import org.apache.ignite.internal.util.GridLeanMap;
 import org.apache.ignite.internal.util.GridLeanSet;
 import org.apache.ignite.internal.util.GridSerializableCollection;
 import org.apache.ignite.internal.util.GridSerializableIterator;
-import org.apache.ignite.internal.util.GridSerializableList;
 import org.apache.ignite.internal.util.GridSerializableMap;
 import org.apache.ignite.internal.util.GridSerializableSet;
 import org.apache.ignite.internal.util.typedef.C1;
@@ -68,7 +64,6 @@ import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgniteCallable;
 import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lang.IgniteInClosure;
-import org.apache.ignite.lang.IgniteOutClosure;
 import org.apache.ignite.lang.IgnitePredicate;
 import org.apache.ignite.lang.IgniteReducer;
 import org.jetbrains.annotations.NotNull;
@@ -153,13 +148,6 @@ public class GridFunc {
     };
 
     /** */
-    private static final IgnitePredicate<Object> IS_NULL = new P1<Object>() {
-        @Override public boolean apply(Object o) {
-            return o == null;
-        }
-    };
-
-    /** */
     private static final IgnitePredicate<Object> IS_NOT_NULL = new P1<Object>() {
         @Override public boolean apply(Object o) {
             return o != null;
@@ -167,28 +155,6 @@ public class GridFunc {
     };
 
     /** */
-    private static final IgniteCallable<?> LIST_FACTORY = new IgniteCallable<List>() {
-        @Override public List call() {
-            return new ArrayList();
-        }
-
-        @Override public String toString() {
-            return "Array list factory.";
-        }
-    };
-
-    /** */
-    private static final IgniteCallable<?> LINKED_LIST_FACTORY = new IgniteCallable<LinkedList>() {
-        @Override public LinkedList call() {
-            return new LinkedList();
-        }
-
-        @Override public String toString() {
-            return "Linked list factory.";
-        }
-    };
-
-    /** */
     private static final IgniteCallable<?> SET_FACTORY = new IgniteCallable<Set>() {
         @Override public Set call() {
             return new HashSet();
@@ -211,39 +177,6 @@ public class GridFunc {
     };
 
     /** */
-    private static final IgniteCallable<AtomicLong> ATOMIC_LONG_FACTORY = new IgniteCallable<AtomicLong>() {
-        @Override public AtomicLong call() {
-            return new AtomicLong(0);
-        }
-
-        @Override public String toString() {
-            return "Atomic long factory.";
-        }
-    };
-
-    /** */
-    private static final IgniteCallable<AtomicBoolean> ATOMIC_BOOL_FACTORY = new IgniteCallable<AtomicBoolean>() {
-        @Override public AtomicBoolean call() {
-            return new AtomicBoolean();
-        }
-
-        @Override public String toString() {
-            return "Atomic boolean factory.";
-        }
-    };
-
-    /** */
-    private static final IgniteCallable<?> ATOMIC_REF_FACTORY = new IgniteCallable<AtomicReference>() {
-        @Override public AtomicReference call() {
-            return new AtomicReference();
-        }
-
-        @Override public String toString() {
-            return "Atomic reference factory.";
-        }
-    };
-
-    /** */
     private static final IgniteCallable<?> MAP_FACTORY = new IgniteCallable<Map>() {
         @Override public Map call() {
             return new HashMap();
@@ -322,35 +255,6 @@ public class GridFunc {
         }
     };
 
-    /** */
-    private static final IgniteClosure<ClusterNode, String> NODE2ID8 = new IgniteClosure<ClusterNode, String>() {
-        @Override public String apply(ClusterNode n) {
-            return U.id8(n.id());
-        }
-
-        @Override public String toString() {
-            return "Grid node to node ID8 transformer closure.";
-        }
-    };
-
-    /** */
-    private static final IgniteClosure<UUID, String> ID2ID8 = new IgniteClosure<UUID, String>() {
-        @Override public String apply(UUID id) {
-            return U.id8(id);
-        }
-
-        @Override public String toString() {
-            return "UUID to ID8 transformer closure.";
-        }
-    };
-
-    /** */
-    private static final IgnitePredicate<IgniteInternalFuture<?>> UNFINISHED_FUTURE = new IgnitePredicate<IgniteInternalFuture<?>>() {
-        @Override public boolean apply(IgniteInternalFuture<?> f) {
-            return !f.isDone();
-        }
-    };
-
     /**
      * Gets predicate that evaluates to {@code true} only for given local node ID.
      *
@@ -562,39 +466,6 @@ public class GridFunc {
     }
 
     /**
-     * Gets collections of data items from grid job res casted to specified type.
-     * <p>
-     * Here's the typical example of how this method is used in {@code reduce()} method
-     * implementation (this example sums up all the values of {@code Integer} type):
-     * <pre name="code" class="java">
-     * public Integer reduce(List&lt;ComputeJobResult&gt; res) throws IgniteCheckedException {
-     *     return F.sum(F.&lt;Integer&gt;jobResults(res));
-     * }
-     * </pre>
-     * <p>
-     * Note that this method doesn't create a new collection but simply iterates over the input one.
-     *
-     * @param res Collection of grid job res.
-     * @param <T> Type of the data item to cast to. See {@link org.apache.ignite.compute.ComputeJobResult#getData()} method.
-     * @return Collections of data items casted to type {@code T}.
-     * @see org.apache.ignite.compute.ComputeJobResult#getData()
-     */
-    @Deprecated
-    public static <T> Collection<T> jobResults(@Nullable Collection<? extends ComputeJobResult> res) {
-        if (isEmpty(res))
-            return Collections.emptyList();
-
-        assert res != null;
-
-        Collection<T> c = new ArrayList<>(res.size());
-
-        for (ComputeJobResult r : res)
-            c.add(r.<T>getData());
-
-        return c;
-    }
-
-    /**
      * Convenient utility method that returns collection of node IDs for a given
      * collection of grid nodes.
      * <p>
@@ -612,43 +483,6 @@ public class GridFunc {
     }
 
     /**
-     * Convenient utility method that returns collection of node ID8s for a given
-     * collection of grid nodes. ID8 is a shorter string representation of node ID,
-     * mainly the first 8 characters.
-     * <p>
-     * Note that this method doesn't create a new collection but simply iterates
-     * over the input one.
-     *
-     * @param nodes Collection of grid nodes.
-     * @return Collection of node IDs for given collection of grid nodes.
-     */
-    public static Collection<String> nodeId8s(@Nullable Collection<? extends ClusterNode> nodes) {
-        if (nodes == null || nodes.isEmpty())
-            return Collections.emptyList();
-
-        return F.viewReadOnly(nodes, NODE2ID8);
-    }
-
-    /**
-     * Convenient utility method that returns collection of node ID8s for a given
-     * collection of node IDs. ID8 is a shorter string representation of node ID,
-     * mainly the first 8 characters.
-     * <p>
-     * Note that this method doesn't create a new collection but simply iterates
-     * over the input one.
-     *
-     * @param ids Collection of nodeIds.
-     * @return Collection of node IDs for given collection of grid nodes.
-     */
-    @Deprecated
-    public static Collection<String> id8s(@Nullable Collection<UUID> ids) {
-        if (ids == null || ids.isEmpty())
-            return Collections.emptyList();
-
-        return F.viewReadOnly(ids, ID2ID8);
-    }
-
-    /**
      * Creates absolute closure that does <tt>System.out.println(msg)</tt>.
      *
      * @param msg Message to print.
@@ -739,8 +573,6 @@ public class GridFunc {
                 return l;
             }
 
-            assert c != null;
-
             Collection<T> ret = new ArrayList<>(c.size() + 1);
 
             ret.add(t);
@@ -752,8 +584,6 @@ public class GridFunc {
             if (isEmpty(c))
                 return Collections.singletonList(t);
 
-            assert c != null;
-
             return new GridSerializableCollection<T>() {
                 @NotNull
                 @Override public Iterator<T> iterator() {
@@ -804,6 +634,7 @@ public class GridFunc {
      * @param <T> Element type.
      * @return Concatenated {@code non-null} collection.
      */
+    @SuppressWarnings("ConstantConditions")
     public static <T> Collection<T> concat(boolean cp, @Nullable final Collection<T> c1,
         @Nullable final Collection<T> c2) {
         if (cp) {
@@ -1079,55 +910,6 @@ public class GridFunc {
     }
 
     /**
-     * Loses all entries in input map which keys are evaluated to {@code true} by all
-     * given predicates.
-     *
-     * @param m Map to filter.
-     * @param cp If {@code true} method creates new map not modifying input, otherwise does
-     *      <tt>in-place</tt> modifications.
-     * @param p Optional set of predicates to use for filtration. If none provided - original
-     *      map (or its copy) will be returned.
-     * @param <K> Type of the free variable for the predicate and type of map's keys.
-     * @param <V> Type of map's values.
-     * @return Filtered map.
-     */
-    @Deprecated
-    public static <K, V> Map<K, V> loseKeys(
-        Map<K, V> m,
-        boolean cp,
-        @Nullable final IgnitePredicate<? super K>... p
-    ) {
-        return lose(m, cp, new P1<Map.Entry<K, V>>() {
-            @Override public boolean apply(Map.Entry<K, V> e) {
-                return isAll(e.getKey(), p);
-            }
-        });
-    }
-
-    /**
-     * Loses all entries in input map which values are evaluated to {@code true} by all
-     * given predicates.
-     *
-     * @param m Map to filter.
-     * @param cp If {@code true} method creates new map not modifying input, otherwise does
-     *      <tt>in-place</tt> modifications.
-     * @param p Optional set of predicates to use for filtration. If none provided - original
-     *      map (or its copy) will be returned.
-     * @param <K> Type of the free variable for the predicate and type of map's keys.
-     * @param <V> Type of map's values.
-     * @return Filtered map.
-     */
-    @Deprecated
-    public static <K, V> Map<K, V> loseValues(Map<K, V> m, boolean cp,
-        @Nullable final IgnitePredicate<? super V>... p) {
-        return lose(m, cp, new P1<Map.Entry<K, V>>() {
-            @Override public boolean apply(Map.Entry<K, V> e) {
-                return isAll(e.getValue(), p);
-            }
-        });
-    }
-
-    /**
      * Loses all elements in input list that are contained in {@code filter} collection.
      *
      * @param c Input list.
@@ -1138,6 +920,7 @@ public class GridFunc {
      * @param <T> Type of list.
      * @return List of remaining elements
      */
+    @SuppressWarnings("SuspiciousMethodCalls")
     public static <T> List<T> loseList(List<T> c, boolean cp, @Nullable Collection<? super T> filter) {
         A.notNull(c, "c");
 
@@ -1361,41 +1144,6 @@ public class GridFunc {
     }
 
     /**
-     * Curries given closure.
-     *
-     * @param f Closure.
-     * @param e Parameter.
-     * @param <T> Input type.
-     * @param <R> Output type.
-     * @return Curried closure.
-     */
-    @Deprecated
-    public static <T, R> IgniteOutClosure<R> curry(final IgniteClosure<? super T, R> f, final T e) {
-        return new IgniteOutClosure<R>() {
-            @Override public R apply() {
-                return f.apply(e);
-            }
-        };
-    }
-
-    /**
-     * Curries given closure.
-     *
-     * @param f Closure.
-     * @param e Parameter.
-     * @param <T> Input type.
-     * @return Curried closure.
-     */
-    @Deprecated
-    public static <T> GridAbsClosure curry(final IgniteInClosure<? super T> f, final T e) {
-        return new GridAbsClosure() {
-            @Override public void apply() {
-                f.apply(e);
-            }
-        };
-    }
-
-    /**
      * Converts array to {@link List}. Note that resulting list cannot
      * be altered in size, as it it based on the passed in array -
      * only current elements can be changed.
@@ -1650,8 +1398,6 @@ public class GridFunc {
         if (isEmpty(c) || isAlwaysFalse(p))
             return Collections.emptyList();
 
-        assert c != null;
-
         return isEmpty(p) || isAlwaysTrue(p) ? c : new GridSerializableCollection<T>() {
             // Pass through (will fail for readonly).
             @Override public boolean add(T e) {
@@ -1696,8 +1442,6 @@ public class GridFunc {
         if (isEmpty(c) || isAlwaysFalse(p))
             return Collections.emptyList();
 
-        assert c != null;
-
         return new GridSerializableCollection<T2>() {
             @NotNull
             @Override public Iterator<T2> iterator() {
@@ -1715,72 +1459,6 @@ public class GridFunc {
     }
 
     /**
-     * Creates read-only light-weight view on given list with provided transformation.
-     * Resulting list will only "have" {@code transformed} elements. Note that only wrapping
-     * list will be created and no duplication of data will occur.
-     *
-     * @param c Input list that serves as a base for the view.
-     * @param trans Transformation closure.
-     * @param <T1> Type of the list.
-     * @return Light-weight view on given list with provided transformation.
-     */
-    @SuppressWarnings("RedundantTypeArguments")
-    @Deprecated
-    public static <T1, T2> List<T2> viewListReadOnly(@Nullable final List<? extends T1> c,
-        final IgniteClosure<? super T1, T2> trans) {
-        A.notNull(trans, "trans");
-
-        if (isEmpty(c))
-            return Collections.emptyList();
-
-        assert c != null;
-
-        return new GridSerializableList<T2>() {
-            /** */
-            private static final long serialVersionUID = 3126625219739967068L;
-
-            @Override public T2 get(int idx) {
-                return trans.apply(c.get(idx));
-            }
-
-            @NotNull
-            @Override public Iterator<T2> iterator() {
-                return F.<T1, T2>iterator(c, trans, true);
-            }
-
-            @Override public int size() {
-                return c.size();
-            }
-
-            @Override public boolean isEmpty() {
-                return c.isEmpty();
-            }
-        };
-    }
-
-    /**
-     * Creates a view on given list with provided transformer and predicates.
-     * Resulting list will only "have" elements for which all provided predicates, if any,
-     * evaluate to {@code true}. Note that a new collection will be created and data will
-     * be copied.
-     *
-     * @param c Input list that serves as a base for the view.
-     * @param trans Transforming closure from T1 to T2.
-     * @param p Optional predicates. If predicates are not provided - all elements will be in the view.
-     * @return View on given list with provided predicate.
-     */
-    @Deprecated
-    public static <T1, T2> List<T2> transformList(Collection<? extends T1> c,
-        IgniteClosure<? super T1, T2> trans, @Nullable IgnitePredicate<? super T1>... p) {
-        A.notNull(c, "c", trans, "trans");
-
-        if (isAlwaysFalse(p))
-            return Collections.emptyList();
-
-        return new ArrayList<>(transform(retain(c, true, p), trans));
-    }
-
-    /**
      * Creates light-weight view on given map with provided predicates. Resulting map will
      * only "have" keys for which all provided predicates, if any, evaluates to {@code true}.
      * Note that only wrapping map will be created and no duplication of data will occur.
@@ -1798,8 +1476,6 @@ public class GridFunc {
         if (isEmpty(m) || isAlwaysFalse(p))
             return Collections.emptyMap();
 
-        assert m != null;
-
         return isEmpty(p) || isAlwaysTrue(p) ? m : new GridSerializableMap<K, V>() {
             /** */
             private static final long serialVersionUID = 5531745605372387948L;
@@ -1886,8 +1562,6 @@ public class GridFunc {
         if (isEmpty(m) || isAlwaysFalse(p))
             return Collections.emptyMap();
 
-        assert m != null;
-
         final boolean hasPred = p != null && p.length > 0;
 
         return new GridSerializableMap<K, V1>() {
@@ -2008,8 +1682,6 @@ public class GridFunc {
         if (isEmpty(m) || isAlwaysFalse(p))
             return Collections.emptyMap();
 
-        assert m != null;
-
         return new GridSerializableMap<K, V1>() {
             /** Entry predicate. */
             private IgnitePredicate<Entry<K, V>> ep = new P1<Map.Entry<K, V>>() {
@@ -2130,8 +1802,6 @@ public class GridFunc {
         if (isEmpty(c) || isAlwaysFalse(p))
             return Collections.emptyMap();
 
-        assert c != null;
-
         return new GridSerializableMap<K, V>() {
             /** Entry predicate. */
             private IgnitePredicate<K> ep = new P1<K>() {
@@ -2313,60 +1983,6 @@ public class GridFunc {
     }
 
     /**
-     * Converts collection of numbers to primitive {@code int[]} array.
-     *
-     * @param col Collection of numbers.
-     * @return Array of integers.
-     */
-    public static int[] toIntArray(Collection<? extends Number> col) {
-        if (col == null)
-            return null;
-
-        int[] res = new int[col.size()];
-
-        Iterator<? extends Number> iter = col.iterator();
-
-        for (int i = 0; i < res.length; i++)
-            res[i] = iter.next().intValue();
-
-        return res;
-    }
-
-    /**
-     * Utility map getter. This method analogous to {@link #addIfAbsent(Map, Object, Callable)}
-     * method but this one doesn't put the default value into the map when key is not found.
-     *
-     * @param map Map to get value from.
-     * @param key Map key (can be {@code null}).
-     * @param c Optional factory closure for the default value to be returned in
-     *      when {@code key} is not found. If closure is not provided - {@code null} will be returned.
-     * @param <K> Map key type.
-     * @param <V> Map value type.
-     * @return Value for the {@code key} or default value produced by {@code c} if key is not
-     *      found (or {@code null} if key is not found and closure is not provided).
-     * @throws GridClosureException Thrown in case when callable throws exception.
-     * @see #newLinkedList()
-     * @see #newList()
-     * @see #newSet()
-     * @see #newAtomicLong()
-     * @see #newAtomicInt()
-     * @see #newAtomicRef()
-     * @see #newAtomicBoolean()
-     */
-    @Deprecated
-    @Nullable public static <K, V> V returnIfAbsent(Map<? extends K, ? extends V> map, @Nullable K key,
-        @Nullable Callable<V> c) {
-        A.notNull(map, "map");
-
-        try {
-            return !map.containsKey(key) ? c == null ? null : c.call() : map.get(key);
-        }
-        catch (Exception e) {
-            throw wrap(e);
-        }
-    }
-
-    /**
      * Returns a factory closure that creates new {@link ConcurrentLinkedDeque8} instance.
      * Note that this method does not create a new closure but returns a static one.
      *
@@ -2380,20 +1996,6 @@ public class GridFunc {
     }
 
     /**
-     * Returns a factory closure that creates new {@link List} instance. Note that this
-     * method does not create a new closure but returns a static one.
-     *
-     * @param <T> Type parameters for the created {@link List}.
-     * @return Factory closure that creates new {@link List} instance every
-     *      time its {@link org.apache.ignite.lang.IgniteOutClosure#apply()} method is called.
-     */
-    @SuppressWarnings("unchecked")
-    @Deprecated
-    public static <T> IgniteCallable<List<T>> newList() {
-        return (IgniteCallable<List<T>>)LIST_FACTORY;
-    }
-
-    /**
      * Returns a factory closure that creates new {@link AtomicInteger} instance
      * initialized to {@code zero}. Note that this method does not create a new
      * closure but returns a static one.
@@ -2407,61 +2009,6 @@ public class GridFunc {
     }
 
     /**
-     * Returns a factory closure that creates new {@link AtomicLong} instance
-     * initialized to {@code zero}. Note that this method does not create a new
-     * closure but returns a static one.
-     *
-     * @return Factory closure that creates new {@link AtomicLong} instance
-     *      initialized to {@code zero} every time its {@link org.apache.ignite.lang.IgniteOutClosure#apply()} method is called.
-     */
-    @Deprecated
-    public static IgniteCallable<AtomicLong> newAtomicLong() {
-        return ATOMIC_LONG_FACTORY;
-    }
-
-    /**
-     * Returns a factory closure that creates new {@link AtomicReference} instance
-     * initialized to {@code null}. Note that this method does not create a new closure
-     * but returns a static one.
-     *
-     * @param <T> Type of the atomic reference.
-     * @return Factory closure that creates new {@link AtomicReference} instance
-     *      initialized to {@code null} every time its {@link org.apache.ignite.lang.IgniteOutClosure#apply()} method is called.
-     */
-    @SuppressWarnings("unchecked")
-    @Deprecated
-    public static <T> IgniteCallable<AtomicReference<T>> newAtomicRef() {
-        return (IgniteCallable<AtomicReference<T>>)ATOMIC_REF_FACTORY;
-    }
-
-    /**
-     * Returns a factory closure that creates new {@link AtomicBoolean} instance
-     * initialized to {@code false}. Note that this method does not create a new
-     * closure but returns a static one.
-     *
-     * @return Factory closure that creates new {@link AtomicBoolean} instance
-     *      initialized to {@code false} every time its {@link org.apache.ignite.lang.IgniteOutClosure#apply()} method is called.
-     */
-    @Deprecated
-    public static IgniteCallable<AtomicBoolean> newAtomicBoolean() {
-        return ATOMIC_BOOL_FACTORY;
-    }
-
-    /**
-     * Returns a factory closure that creates new {@link LinkedList} instance.
-     * Note that this method does not create a new closure but returns a static one.
-     *
-     * @param <T> Type parameters for the created {@link LinkedList}.
-     * @return Factory closure that creates new {@link LinkedList} instance every time its {@link
-     *         org.apache.ignite.lang.IgniteOutClosure#apply()} method is called.
-     */
-    @SuppressWarnings("unchecked")
-    @Deprecated
-    public static <T> IgniteCallable<LinkedList<T>> newLinkedList() {
-        return (IgniteCallable<LinkedList<T>>)LINKED_LIST_FACTORY;
-    }
-
-    /**
      * Returns a factory closure that creates new {@link Set} instance. Note that this
      * method does not create a new closure but returns a static one.
      *
@@ -2793,17 +2340,6 @@ public class GridFunc {
     }
 
     /**
-     * Gets predicate that evaluates to {@code true} if its free variable is {@code null}.
-     *
-     * @param <T> Type of the free variable, i.e. the element the predicate is called on.
-     * @return Predicate that evaluates to {@code true} if its free variable is {@code null}.
-     */
-    @Deprecated
-    public static <T> IgnitePredicate<T> isNull() {
-        return (IgnitePredicate<T>) IS_NULL;
-    }
-
-    /**
      * Gets predicate that evaluates to {@code true} if its free variable is not {@code null}.
      *
      * @param <T> Type of the free variable, i.e. the element the predicate is called on.
@@ -2869,25 +2405,6 @@ public class GridFunc {
     }
 
     /**
-     * Gets predicate that evaluates to {@code true} if its free variable is instance of the given class.
-     *
-     * @param cls Class to compare to.
-     * @param <T> Type of the free variable, i.e. the element the predicate is called on.
-     * @return Predicate that evaluates to {@code true} if its free variable is instance
-     *      of the given class.
-     */
-    @Deprecated
-    public static <T> IgnitePredicate<T> instanceOf(final Class<?> cls) {
-        A.notNull(cls, "cls");
-
-        return new P1<T>() {
-            @Override public boolean apply(T t) {
-                return t != null && cls.isAssignableFrom(t.getClass());
-            }
-        };
-    }
-
-    /**
      * Gets first element from given collection or returns {@code null} if the collection is empty.
      *
      * @param c A collection.
@@ -2931,8 +2448,6 @@ public class GridFunc {
         if (c == null)
             return null;
 
-        assert c != null;
-
         if (c instanceof RandomAccess && c instanceof List) {
             List<T> l = (List<T>)c;
 
@@ -3006,7 +2521,7 @@ public class GridFunc {
      * @return Predicate that evaluates to {@code true} if each of its component predicates
      *      evaluates to {@code true}.
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({"unchecked", "ConfusingArgumentToVarargsMethod"})
     public static <T> IgnitePredicate<T> and(@Nullable final IgnitePredicate<? super T>... ps) {
         if (isEmpty(ps))
             return F.alwaysTrue();
@@ -3018,8 +2533,6 @@ public class GridFunc {
             return F.alwaysTrue();
 
         if (F0.isAllNodePredicates(ps)) {
-            assert ps != null;
-
             Set<UUID> ids = new HashSet<>();
 
             for (IgnitePredicate<? super T> p : ps) {
@@ -3039,8 +2552,6 @@ public class GridFunc {
         else {
             return new P1<T>() {
                 @Override public boolean apply(T t) {
-                    assert ps != null;
-
                     for (IgnitePredicate<? super T> p : ps)
                         if (p != null && !p.apply(t))
                             return false;
@@ -3090,8 +2601,6 @@ public class GridFunc {
     public static <T> IgnitePredicate<T> notIn(@Nullable final Collection<? extends T> c) {
         return isEmpty(c) ? GridFunc.<T>alwaysTrue() : new P1<T>() {
             @Override public boolean apply(T t) {
-                assert c != null;
-
                 return !c.contains(t);
             }
         };
@@ -3203,13 +2712,8 @@ public class GridFunc {
      *      found (or {@code null} if key is not found and closure is not provided). Note that
      *      in case when key is not found the default value will be put into the map.
      * @throws GridClosureException Thrown in case when callable throws exception.
-     * @see #newLinkedList()
-     * @see #newList()
      * @see #newSet()
-     * @see #newAtomicLong()
      * @see #newAtomicInt()
-     * @see #newAtomicRef()
-     * @see #newAtomicBoolean()
      */
     @Nullable public static <K, V> V addIfAbsent(Map<? super K, V> map, @Nullable K key,
         @Nullable Callable<? extends V> c) {
@@ -3388,20 +2892,6 @@ public class GridFunc {
     }
 
     /**
-     * Upcasts collection type.
-     *
-     * @param c Initial collection.
-     * @return Resulting collection.
-     */
-    @SuppressWarnings("unchecked")
-    @Deprecated
-    public static <T extends R, R> Collection<R> upcast(Collection<T> c) {
-        A.notNull(c, "c");
-
-        return (Collection<R>)c;
-    }
-
-    /**
      * Transforms an array to read only collection using provided closure.
      *
      * @param c Initial array to transform.
@@ -3780,8 +3270,6 @@ public class GridFunc {
 
         if (!isEmpty(fs))
             for (D e : c) {
-                assert fs != null;
-
                 for (IgniteBiClosure<? super D, ? super B, B> f : fs)
                     b = f.apply(e, b);
             }
@@ -4445,75 +3933,6 @@ public class GridFunc {
     }
 
     /**
-     * Compares two arrays. Unlike {@code Arrays#equals(...)} method this implementation
-     * checks two arrays as sets allowing the same elements to be in different indexes.
-     *
-     * @param a1 First array to check.
-     * @param a2 Second array to check.
-     * @param sorted Tells whether or not both arrays are pre-sorted so that binary
-     *      search could be used instead of iteration.
-     * @param dups Tells whether or not arrays can contain duplicates. If arrays contain
-     *      duplicate the implementation will have to do double work.
-     * @return {@code True} if arrays are equal, {@code false} otherwise.
-     */
-    @Deprecated
-    public static boolean eqArray(Object[] a1, Object[] a2, boolean sorted, boolean dups) {
-        if (a1 == a2)
-            return true;
-
-        if (a1 == null || a2 == null || a1.length != a2.length)
-            return false;
-
-        // Short circuit.
-        if (a1.length == 1)
-            return eq(a1[0], a2[0]);
-
-        for (Object o1 : a1) {
-            boolean found = false;
-
-            if (sorted)
-                found = Arrays.binarySearch(a2, o1) >= 0;
-            else {
-                for (Object o2 : a2) {
-                    if (eq(o1, o2)) {
-                        found = true;
-
-                        break;
-                    }
-                }
-            }
-
-            if (!found)
-                return false;
-        }
-
-        // If there are no dups - we can't skip checking seconds array
-        // against first one.
-        if (dups) {
-            for (Object o2 : a2) {
-                boolean found = false;
-
-                if (sorted)
-                    found = Arrays.binarySearch(a1, o2) >= 0;
-                else {
-                    for (Object o1 : a1) {
-                        if (eq(o2, o1)) {
-                            found = true;
-
-                            break;
-                        }
-                    }
-                }
-
-                if (!found)
-                    return false;
-            }
-        }
-
-        return true;
-    }
-
-    /**
      * Compares two {@link org.apache.ignite.cluster.ClusterNode} instances for equality.
      * <p>
      * Since introduction of {@link org.apache.ignite.cluster.ClusterNode} in Apache Ignite 3.0 the semantic of equality between
@@ -4583,26 +4002,6 @@ public class GridFunc {
     }
 
     /**
-     * Checks if two collections passed in intersect.
-     *
-     * @param <E> Element type.
-     * @param s1 Set1.
-     * @param s2 Set2.
-     * @return {@code True} if there is an intersection, {@code false} otherwise.
-     */
-    @Deprecated
-    public static <E> boolean intersects(Iterable<E> s1, Collection<E>... s2) {
-        for (E e1 : s1) {
-            for (Collection<E> s : s2) {
-                if (s.contains(e1))
-                    return true;
-            }
-        }
-
-        return false;
-    }
-
-    /**
      * Waits until all passed futures will be executed.
      *
      * @param futs Futures. If none provided - this method is no-op.
@@ -4621,7 +4020,8 @@ public class GridFunc {
      * @throws IgniteCheckedException If any of the futures failed.
      */
     @Deprecated
-    public static <T> void awaitAll(long timeout, @Nullable Collection<IgniteInternalFuture<T>> futs) throws IgniteCheckedException {
+    public static <T> void awaitAll(long timeout, @Nullable Collection<IgniteInternalFuture<T>> futs)
+        throws IgniteCheckedException {
         awaitAll(timeout, null, futs);
     }
 
@@ -4674,14 +4074,4 @@ public class GridFunc {
 
         return rdc == null ? null : rdc.reduce();
     }
-
-    /**
-     * Returns predicate for filtering unfinished futures.
-     *
-     * @return Predicate for filtering unfinished futures.
-     */
-    @Deprecated
-    public static IgnitePredicate<IgniteInternalFuture<?>> unfinishedFutures() {
-        return UNFINISHED_FUTURE;
-    }
 }


[19/50] [abbrv] ignite git commit: IGNITE-4839: Removed CacheTypeMetadata. This closes #1667.

Posted by dm...@apache.org.
IGNITE-4839: Removed CacheTypeMetadata. This closes #1667.


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

Branch: refs/heads/ignite-1192
Commit: 1811ede439b1273f4904666ecb0a49ac8efd2f11
Parents: c3431e9
Author: tledkov-gridgain <tl...@gridgain.com>
Authored: Wed Apr 5 11:53:33 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Wed Apr 5 11:53:33 2017 +0300

----------------------------------------------------------------------
 .../src/test/resources/spring-server-node.xml   |  71 ++--
 .../test/resources/spring-server-ssl-node.xml   |  69 ++--
 .../java/org/apache/ignite/IgniteBinary.java    |  35 +-
 .../ignite/cache/CacheTypeFieldMetadata.java    | 149 --------
 .../apache/ignite/cache/CacheTypeMetadata.java  | 379 -------------------
 .../org/apache/ignite/cache/QueryEntity.java    |   3 +
 .../store/jdbc/CacheAbstractJdbcStore.java      |  55 ---
 .../configuration/CacheConfiguration.java       |  27 --
 .../processors/query/GridQueryProcessor.java    |  10 -
 .../internal/processors/query/QueryUtils.java   | 326 ----------------
 .../visor/cache/VisorCacheConfiguration.java    |   2 +-
 .../cache/VisorCacheTypeFieldMetadata.java      |  14 +-
 .../visor/cache/VisorCacheTypeMetadata.java     |  91 +----
 .../resources/META-INF/classnames.properties    |   1 -
 .../test/config/store/jdbc/ignite-jdbc-type.xml | 279 ++++++++++++++
 .../config/store/jdbc/ignite-type-metadata.xml  | 276 --------------
 ...eJdbcStoreAbstractMultithreadedSelfTest.java |  71 ++--
 ...ryDuplicateIndexObjectsAbstractSelfTest.java | 161 --------
 ...ateIndexObjectPartitionedAtomicSelfTest.java |  38 --
 ...xObjectPartitionedTransactionalSelfTest.java |  41 --
 .../cache/BinarySerializationQuerySelfTest.java |  30 +-
 ...ryDuplicateIndexObjectsAbstractSelfTest.java | 159 ++++++++
 .../cache/IncorrectCacheTypeMetadataTest.java   |  72 ----
 .../cache/IncorrectQueryEntityTest.java         |   3 +
 ...ateIndexObjectPartitionedAtomicSelfTest.java |  38 ++
 ...xObjectPartitionedTransactionalSelfTest.java |  41 ++
 .../IgniteBinaryCacheQueryTestSuite.java        |   4 +-
 .../IgniteCacheQuerySelfTestSuite.java          |   2 -
 .../cpp/core-test/config/cache-query.xml        |  37 +-
 .../Config/cache-query-continuous.xml           | 118 ++++--
 modules/schema-import/README.txt                |   4 +-
 modules/spring/pom.xml                          |   6 +
 .../IgniteExcludeInConfigurationTest.java       |  14 +-
 .../org/apache/ignite/spring/sprint-exclude.xml |  19 +-
 modules/web-console/web-agent/README.txt        |   2 +-
 .../IgniteCacheRandomOperationBenchmark.java    |  25 +-
 36 files changed, 849 insertions(+), 1823 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/clients/src/test/resources/spring-server-node.xml
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/resources/spring-server-node.xml b/modules/clients/src/test/resources/spring-server-node.xml
index 093b35d..3211b80 100644
--- a/modules/clients/src/test/resources/spring-server-node.xml
+++ b/modules/clients/src/test/resources/spring-server-node.xml
@@ -123,52 +123,77 @@
                         </bean>
                     </property>
 
-                    <property name="binaryEnabled" value="true"/>
+                    <!--<property name="binaryEnabled" value="true"/>-->
 
-                    <property name="typeMetadata">
+                    <property name="queryEntities">
                         <list>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+                            <bean class="org.apache.ignite.cache.QueryEntity">
                                 <property name="valueType" value="GridBinaryPerson"/>
-                                <property name="ascendingFields">
-                                    <map>
-                                        <entry key="age" value="java.lang.Integer"/>
-                                    </map>
-                                </property>
-                                <property name="queryFields">
+                                <property name="fields">
                                     <map>
                                         <entry key="name" value="java.lang.String"/>
+                                        <entry key="address" value="java.lang.String"/>
+                                        <entry key="age" value="java.lang.Integer"/>
                                     </map>
                                 </property>
-                                <property name="textFields">
+                                <property name="indexes">
                                     <list>
-                                        <value>address</value>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="age" value="true"/>
+                                                </map>
+                                            </property>
+                                        </bean>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="indexType" value="FULLTEXT"/>
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="address" value="false"/>
+                                                </map>
+                                            </property>
+                                        </bean>
                                     </list>
                                 </property>
                             </bean>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+                            <bean class="org.apache.ignite.cache.QueryEntity">
                                 <property name="valueType" value="GridImplicitBinaryPerson"/>
-                                <property name="ascendingFields">
+                                <property name="fields">
                                     <map>
+                                        <entry key="name" value="java.lang.String"/>
                                         <entry key="age" value="java.lang.Integer"/>
                                     </map>
                                 </property>
-                                <property name="queryFields">
-                                    <map>
-                                        <entry key="name" value="java.lang.String"/>
-                                    </map>
+                                <property name="indexes">
+                                    <list>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="age" value="true"/>
+                                                </map>
+                                            </property>
+                                        </bean>
+                                    </list>
                                 </property>
                             </bean>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+                            <bean class="org.apache.ignite.cache.QueryEntity">
                                 <property name="valueType" value="GridNoDefBinaryPerson"/>
-                                <property name="ascendingFields">
+                                <property name="fields">
                                     <map>
+                                        <entry key="name" value="java.lang.String"/>
                                         <entry key="age" value="java.lang.Integer"/>
                                     </map>
                                 </property>
-                                <property name="queryFields">
-                                    <map>
-                                        <entry key="name" value="java.lang.String"/>
-                                    </map>
+                                <property name="indexes">
+                                    <list>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="age" value="true"/>
+                                                </map>
+                                            </property>
+                                        </bean>
+                                    </list>
                                 </property>
                             </bean>
                         </list>

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/clients/src/test/resources/spring-server-ssl-node.xml
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/resources/spring-server-ssl-node.xml b/modules/clients/src/test/resources/spring-server-ssl-node.xml
index 98b5e1f..05b1d51 100644
--- a/modules/clients/src/test/resources/spring-server-ssl-node.xml
+++ b/modules/clients/src/test/resources/spring-server-ssl-node.xml
@@ -127,50 +127,75 @@
 
                     <property name="binaryEnabled" value="true"/>
 
-                    <property name="typeMetadata">
+                    <property name="queryEntities">
                         <list>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+                            <bean class="org.apache.ignite.cache.QueryEntity">
                                 <property name="valueType" value="GridBinaryPerson"/>
-                                <property name="ascendingFields">
-                                    <map>
-                                        <entry key="age" value="java.lang.Integer"/>
-                                    </map>
-                                </property>
-                                <property name="queryFields">
+                                <property name="fields">
                                     <map>
                                         <entry key="name" value="java.lang.String"/>
+                                        <entry key="address" value="java.lang.String"/>
+                                        <entry key="age" value="java.lang.Integer"/>
                                     </map>
                                 </property>
-                                <property name="textFields">
+                                <property name="indexes">
                                     <list>
-                                        <value>address</value>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="age" value="true"/>
+                                                </map>
+                                            </property>
+                                        </bean>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="indexType" value="FULLTEXT"/>
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="address" value="false"/>
+                                                </map>
+                                            </property>
+                                        </bean>
                                     </list>
                                 </property>
                             </bean>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+                            <bean class="org.apache.ignite.cache.QueryEntity">
                                 <property name="valueType" value="GridImplicitBinaryPerson"/>
-                                <property name="ascendingFields">
+                                <property name="fields">
                                     <map>
+                                        <entry key="name" value="java.lang.String"/>
                                         <entry key="age" value="java.lang.Integer"/>
                                     </map>
                                 </property>
-                                <property name="queryFields">
-                                    <map>
-                                        <entry key="name" value="java.lang.String"/>
-                                    </map>
+                                <property name="indexes">
+                                    <list>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="age" value="true"/>
+                                                </map>
+                                            </property>
+                                        </bean>
+                                    </list>
                                 </property>
                             </bean>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+                            <bean class="org.apache.ignite.cache.QueryEntity">
                                 <property name="valueType" value="GridNoDefBinaryPerson"/>
-                                <property name="ascendingFields">
+                                <property name="fields">
                                     <map>
+                                        <entry key="name" value="java.lang.String"/>
                                         <entry key="age" value="java.lang.Integer"/>
                                     </map>
                                 </property>
-                                <property name="queryFields">
-                                    <map>
-                                        <entry key="name" value="java.lang.String"/>
-                                    </map>
+                                <property name="indexes">
+                                    <list>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="age" value="true"/>
+                                                </map>
+                                            </property>
+                                        </bean>
+                                    </list>
                                 </property>
                             </bean>
                         </list>

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java b/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java
index 450cf70..1d1c0c3 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java
@@ -256,27 +256,48 @@ import org.jetbrains.annotations.Nullable;
  * or for a specific type via {@link org.apache.ignite.binary.BinaryTypeConfiguration} instance.
  * <h1 class="header">Query Indexing</h1>
  * Binary objects can be indexed for querying by specifying index fields in
- * {@link org.apache.ignite.cache.CacheTypeMetadata} inside of specific
+ * {@link org.apache.ignite.cache.QueryEntity} inside of specific
  * {@link org.apache.ignite.configuration.CacheConfiguration} instance,
  * like so:
  * <pre name=code class=xml>
  * ...
  * &lt;bean class="org.apache.ignite.cache.CacheConfiguration"&gt;
  *     ...
- *     &lt;property name="typeMetadata"&gt;
+ *     &lt;property name="queryEntities"&gt;
  *         &lt;list&gt;
- *             &lt;bean class="CacheTypeMetadata"&gt;
+ *             &lt;bean class="QueryEntity"&gt;
  *                 &lt;property name="type" value="Employee"/&gt;
  *
- *                 &lt;!-- Fields to index in ascending order. --&gt;
- *                 &lt;property name="ascendingFields"&gt;
+ *                 &lt;!-- Fields available from query. --&gt;
+ *                 &lt;property name="fields"&gt;
  *                     &lt;map&gt;
  *                     &lt;entry key="name" value="java.lang.String"/&gt;
  *
- *                         &lt;!-- Nested binary objects can also be indexed. --&gt;
- *                         &lt;entry key="address.zip" value="java.lang.Integer"/&gt;
+ *                     &lt;!-- Nested binary objects can also be indexed. --&gt;
+ *                     &lt;entry key="address.zip" value="java.lang.Integer" /&gt;
  *                     &lt;/map&gt;
  *                 &lt;/property&gt;
+ *
+ *                 &lt;!-- Aliases for full property name in dot notation. --&gt;
+ *                 &lt;property name="fields"&gt;
+ *                     &lt;map&gt;
+ *                     &lt;entry key="address.zip" value="zip" /&gt;
+ *                     &lt;/map&gt;
+ *                 &lt;/property&gt;
+ *
+ *                 &lt;!-- Indexes configuration. --&gt;
+ *                 &lt;property name="indexes"&gt;
+ *                 &lt;list&gt;
+ *                 &lt;bean class="org.apache.ignite.cache.QueryIndex"&gt;
+ *                     &lt;property name="fields"&gt;
+ *                          &lt;map&gt;
+ *                          &lt;!-- The boolean value is the acceding flag. --&gt;
+ *                          &lt;entry key="name" value="true"/&gt;
+ *                          &lt;/map&gt;
+ *                     &lt;/property&gt;
+ *                 &lt;/bean&gt;
+ *                 &lt;/list&gt;
+ *                 &lt;/property&gt;
  *             &lt;/bean&gt;
  *         &lt;/list&gt;
  *     &lt;/property&gt;

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/main/java/org/apache/ignite/cache/CacheTypeFieldMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheTypeFieldMetadata.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheTypeFieldMetadata.java
deleted file mode 100644
index 1ec2408..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheTypeFieldMetadata.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache;
-
-import java.io.Serializable;
-import org.apache.ignite.internal.util.typedef.internal.S;
-
-/**
- * Type field metadata.
- */
-public class CacheTypeFieldMetadata implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Column name in database. */
-    private String dbName;
-
-    /** Column JDBC type in database. */
-    private int dbType;
-
-    /** Field name in java object. */
-    private String javaName;
-
-    /** Corresponding java type. */
-    private Class<?> javaType;
-
-    /**
-     * Default constructor.
-     */
-    public CacheTypeFieldMetadata() {
-        // No-op.
-    }
-
-    /**
-     * Full constructor.
-     *
-     * @param dbName Column name in database.
-     * @param dbType Column JDBC type in database.
-     * @param javaName Field name in java object.
-     * @param javaType Field java type.
-     */
-    public CacheTypeFieldMetadata(String dbName, int dbType, String javaName, Class<?> javaType) {
-        this.dbName = dbName;
-        this.dbType = dbType;
-        this.javaName = javaName;
-        this.javaType = javaType;
-    }
-
-    /**
-     * @return Column name in database.
-     */
-    public String getDatabaseName() {
-        return dbName;
-    }
-
-    /**
-     * @param dbName Column name in database.
-     */
-    public void setDatabaseName(String dbName) {
-        this.dbName = dbName;
-    }
-
-    /**
-     * @return Column JDBC type in database.
-     */
-    public int getDatabaseType() {
-        return dbType;
-    }
-
-    /**
-     * @param dbType Column JDBC type in database.
-     */
-    public void setDatabaseType(int dbType) {
-        this.dbType = dbType;
-    }
-
-    /**
-     * @return Field name in java object.
-     */
-    public String getJavaName() {
-        return javaName;
-    }
-
-    /**
-     * @param javaName Field name in java object.
-     */
-    public void setJavaName(String javaName) {
-        this.javaName = javaName;
-    }
-
-    /**
-     * @return Field java type.
-     */
-    public Class<?> getJavaType() {
-        return javaType;
-    }
-
-    /**
-     * @param javaType Corresponding java type.
-     */
-    public void setJavaType(Class<?> javaType) {
-        this.javaType = javaType;
-    }
-
-     /** {@inheritDoc} */
-    @Override public boolean equals(Object o) {
-        if (this == o)
-            return true;
-
-        if (!(o instanceof CacheTypeFieldMetadata))
-            return false;
-
-        CacheTypeFieldMetadata that = (CacheTypeFieldMetadata)o;
-
-        return javaName.equals(that.javaName) && dbName.equals(that.dbName) &&
-            javaType == that.javaType && dbType == that.dbType;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        int res = dbName.hashCode();
-
-        res = 31 * res + dbType;
-        res = 31 * res + javaName.hashCode();
-        res = 31 * res + javaType.hashCode();
-
-        return res;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(CacheTypeFieldMetadata.class, this);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/main/java/org/apache/ignite/cache/CacheTypeMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheTypeMetadata.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheTypeMetadata.java
deleted file mode 100644
index 0c91394..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheTypeMetadata.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.Map;
-import javax.cache.CacheException;
-import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore;
-import org.apache.ignite.internal.processors.query.QueryUtils;
-import org.apache.ignite.internal.util.tostring.GridToStringInclude;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteBiTuple;
-
-/**
- * Cache type metadata need for configuration of indexes or automatic persistence.
- * @deprecated Use {@link org.apache.ignite.cache.QueryEntity} instead.
- */
-@Deprecated
-public class CacheTypeMetadata implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Schema name in database. */
-    private String dbSchema;
-
-    /** Table name in database. */
-    private String dbTbl;
-
-    /** Key class used to store key in cache. */
-    private String keyType;
-
-    /** Value class used to store value in cache. */
-    private String valType;
-
-    /** Simple value type name that will be used as SQL table name.*/
-    private String simpleValType;
-
-    /** Optional persistent key fields (needed only if {@link CacheJdbcPojoStore} is used). */
-    @GridToStringInclude
-    private Collection<CacheTypeFieldMetadata> keyFields;
-
-    /** Optional persistent value fields (needed only if {@link CacheJdbcPojoStore} is used). */
-    @GridToStringInclude
-    private Collection<CacheTypeFieldMetadata> valFields;
-
-    /** Field name-to-type map to be queried, in addition to indexed fields. */
-    @GridToStringInclude
-    private Map<String, Class<?>> qryFlds;
-
-    /** Field name-to-type map to index in ascending order. */
-    @GridToStringInclude
-    private Map<String, Class<?>> ascFlds;
-
-    /** Field name-to-type map to index in descending order. */
-    @GridToStringInclude
-    private Map<String, Class<?>> descFlds;
-
-    /** Fields to index as text. */
-    @GridToStringInclude
-    private Collection<String> txtFlds;
-
-    /** Fields to create group indexes for. */
-    @GridToStringInclude
-    private Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> grps;
-
-    /** */
-    @GridToStringInclude
-    private Map<String,String> aliases;
-
-    /**
-     * Default constructor.
-     */
-    public CacheTypeMetadata() {
-        keyFields = new ArrayList<>();
-        valFields = new ArrayList<>();
-        qryFlds = new LinkedHashMap<>();
-        ascFlds = new LinkedHashMap<>();
-        descFlds = new LinkedHashMap<>();
-        txtFlds = new LinkedHashSet<>();
-        grps = new LinkedHashMap<>();
-    }
-
-    /**
-     * Copy constructor.
-     */
-    public CacheTypeMetadata(CacheTypeMetadata src) {
-        dbSchema = src.getDatabaseSchema();
-        dbTbl = src.getDatabaseTable();
-        keyType = src.getKeyType();
-        valType = src.getValueType();
-        simpleValType = src.simpleValType;
-        keyFields = new ArrayList<>(src.getKeyFields());
-        valFields = new ArrayList<>(src.getValueFields());
-        qryFlds = new LinkedHashMap<>(src.getQueryFields());
-        ascFlds = new LinkedHashMap<>(src.getAscendingFields());
-        descFlds = new LinkedHashMap<>(src.getDescendingFields());
-        txtFlds = new LinkedHashSet<>(src.getTextFields());
-        grps = new LinkedHashMap<>(src.getGroups());
-    }
-
-    /**
-     * Gets database schema name.
-     *
-     * @return Schema name.
-     */
-    public String getDatabaseSchema() {
-        return dbSchema;
-    }
-
-    /**
-     * Sets database schema name.
-     *
-     * @param dbSchema Schema name.
-     */
-    public void setDatabaseSchema(String dbSchema) {
-        this.dbSchema = dbSchema;
-    }
-
-    /**
-     * Gets table name in database.
-     *
-     * @return Table name in database.
-     */
-    public String getDatabaseTable() {
-        return dbTbl;
-    }
-
-    /**
-     * Table name in database.
-     *
-     * @param dbTbl Table name in database.
-     */
-    public void setDatabaseTable(String dbTbl) {
-        this.dbTbl = dbTbl;
-    }
-
-    /**
-     * Gets key type.
-     *
-     * @return Key type.
-     */
-    public String getKeyType() {
-        return keyType;
-    }
-
-    /**
-     * Sets key type.
-     *
-     * @param keyType Key type.
-     */
-    public void setKeyType(String keyType) {
-        this.keyType = keyType;
-    }
-
-    /**
-     * Sets key type.
-     *
-     * @param cls Key type class.
-     */
-    public void setKeyType(Class<?> cls) {
-        setKeyType(cls.getName());
-    }
-
-    /**
-     * Gets value type.
-     *
-     * @return Key type.
-     */
-    public String getValueType() {
-        return valType;
-    }
-
-    /**
-     * Gets simple value type.
-     *
-     * @return Simple value type.
-     */
-    public String getSimpleValueType() {
-        return simpleValType;
-    }
-
-    /**
-     * Sets value type.
-     *
-     * @param valType Value type.
-     */
-    public void setValueType(String valType) {
-        if (this.valType != null)
-            throw new CacheException("Value type can be set only once.");
-
-        this.valType = valType;
-
-        Class<?> cls = U.classForName(valType, null);
-
-        simpleValType = cls == null ? valType : QueryUtils.typeName(cls);
-    }
-
-    /**
-     * Sets value type.
-     *
-     * @param cls Value type class.
-     */
-    public void setValueType(Class<?> cls) {
-        setValueType(cls.getName());
-    }
-
-    /**
-     * Gets optional persistent key fields (needed only if {@link CacheJdbcPojoStore} is used).
-     *
-     * @return Persistent key fields.
-     */
-    public Collection<CacheTypeFieldMetadata> getKeyFields() {
-        return keyFields;
-    }
-
-    /**
-     * Sets optional persistent key fields (needed only if {@link CacheJdbcPojoStore} is used).
-     *
-     * @param keyFields Persistent key fields.
-     */
-    public void setKeyFields(Collection<CacheTypeFieldMetadata> keyFields) {
-        this.keyFields = keyFields;
-    }
-
-    /**
-     * Gets optional persistent value fields (needed only if {@link CacheJdbcPojoStore} is used).
-     *
-     * @return Persistent value fields.
-     */
-    public Collection<CacheTypeFieldMetadata> getValueFields() {
-        return valFields;
-    }
-
-    /**
-     * Sets optional persistent value fields (needed only if {@link CacheJdbcPojoStore} is used).
-     *
-     * @param valFields Persistent value fields.
-     */
-    public void setValueFields(Collection<CacheTypeFieldMetadata> valFields) {
-        this.valFields = valFields;
-    }
-
-    /**
-     * Gets name-to-type map for query-enabled fields.
-     *
-     * @return Name-to-type map for query-enabled fields.
-     */
-    public Map<String, Class<?>> getQueryFields() {
-        return qryFlds;
-    }
-
-    /**
-     * Sets name-to-type map for query-enabled fields.
-     *
-     * @param qryFlds Name-to-type map for query-enabled fields.
-     */
-    public void setQueryFields(Map<String, Class<?>> qryFlds) {
-        this.qryFlds = qryFlds;
-    }
-
-    /**
-     * Gets name-to-type map for ascending-indexed fields.
-     *
-     * @return Name-to-type map for ascending-indexed fields.
-     */
-    public Map<String, Class<?>> getAscendingFields() {
-        return ascFlds;
-    }
-
-    /**
-     * Sets name-to-type map for ascending-indexed fields.
-     *
-     * @param ascFlds Name-to-type map for ascending-indexed fields.
-     */
-    public void setAscendingFields(Map<String, Class<?>> ascFlds) {
-        if (ascFlds == null)
-            this.ascFlds = ascFlds;
-        else
-            this.ascFlds.putAll(ascFlds);
-    }
-
-    /**
-     * Gets name-to-type map for descending-indexed fields.
-     *
-     * @return Name-to-type map of descending-indexed fields.
-     */
-    public Map<String, Class<?>> getDescendingFields() {
-        return descFlds;
-    }
-
-    /**
-     * Sets name-to-type map for descending-indexed fields.
-     *
-     * @param descFlds Name-to-type map of descending-indexed fields.
-     */
-    public void setDescendingFields(Map<String, Class<?>> descFlds) {
-        this.descFlds = descFlds;
-    }
-
-    /**
-     * Gets text-indexed fields.
-     *
-     * @return Collection of text indexed fields.
-     */
-    public Collection<String> getTextFields() {
-        return txtFlds;
-    }
-
-    /**
-     * Sets text-indexed fields.
-     *
-     * @param txtFlds Text-indexed fields.
-     */
-    public void setTextFields(Collection<String> txtFlds) {
-        this.txtFlds = txtFlds;
-    }
-
-    /**
-     * Gets group-indexed fields.
-     *
-     * @return Map of group-indexed fields.
-     */
-    public Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> getGroups() {
-        return grps;
-    }
-
-    /**
-     * Sets group-indexed fields.
-     *
-     * @param grps Map of group-indexed fields from index name to index fields.
-     */
-    public void setGroups(Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> grps) {
-        this.grps = grps;
-    }
-
-    /**
-     * Sets mapping from full property name in dot notation to an alias that will be used as SQL column name.
-     * Example: {"parent.name" -> "parentName"}.
-     *
-     * @param aliases Aliases.
-     */
-    public void setAliases(Map<String,String> aliases) {
-        this.aliases = aliases;
-    }
-
-    /**
-     * Gets aliases mapping.
-     *
-     * @return Aliases.
-     */
-    public Map<String,String> getAliases() {
-        return aliases;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(CacheTypeMetadata.class, this);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/main/java/org/apache/ignite/cache/QueryEntity.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/QueryEntity.java b/modules/core/src/main/java/org/apache/ignite/cache/QueryEntity.java
index f791c1c..9f4313e 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/QueryEntity.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/QueryEntity.java
@@ -238,6 +238,9 @@ public class QueryEntity implements Serializable {
 
     /**
      * Utility method for building query entities programmatically.
+     * @param fullName Full name of the field.
+     * @param type Type of the field.
+     * @param alias Field alias.
      * @return {@code this} for chaining.
      */
     public QueryEntity addQueryField(String fullName, String type, String alias) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
index 41709a1..c774e65 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
@@ -49,8 +49,6 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.binary.BinaryObject;
-import org.apache.ignite.cache.CacheTypeFieldMetadata;
-import org.apache.ignite.cache.CacheTypeMetadata;
 import org.apache.ignite.cache.store.CacheStore;
 import org.apache.ignite.cache.store.CacheStoreSession;
 import org.apache.ignite.cache.store.jdbc.dialect.BasicJdbcDialect;
@@ -60,7 +58,6 @@ import org.apache.ignite.cache.store.jdbc.dialect.JdbcDialect;
 import org.apache.ignite.cache.store.jdbc.dialect.MySQLDialect;
 import org.apache.ignite.cache.store.jdbc.dialect.OracleDialect;
 import org.apache.ignite.cache.store.jdbc.dialect.SQLServerDialect;
-import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.typedef.C1;
@@ -534,28 +531,6 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
     }
 
     /**
-     * For backward compatibility translate old field type descriptors to new format.
-     *
-     * @param oldFlds Fields in old format.
-     * @return Fields in new format.
-     */
-    @Deprecated
-    private JdbcTypeField[] translateFields(Collection<CacheTypeFieldMetadata> oldFlds) {
-        JdbcTypeField[] newFlds = new JdbcTypeField[oldFlds.size()];
-
-        int idx = 0;
-
-        for (CacheTypeFieldMetadata oldField : oldFlds) {
-            newFlds[idx] = new JdbcTypeField(oldField.getDatabaseType(), oldField.getDatabaseName(),
-                oldField.getJavaType(), oldField.getJavaName());
-
-            idx++;
-        }
-
-        return newFlds;
-    }
-
-    /**
      * @param type Type name to check.
      * @return {@code True} if class not found.
      */
@@ -591,36 +566,6 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
             if (entryMappings != null)
                 return entryMappings;
 
-            // If no types configured, check CacheTypeMetadata for backward compatibility.
-            if (types == null) {
-                CacheConfiguration ccfg = ignite.cache(cacheName).getConfiguration(CacheConfiguration.class);
-
-                Collection<CacheTypeMetadata> oldTypes = ccfg.getTypeMetadata();
-
-                types = new JdbcType[oldTypes.size()];
-
-                int idx = 0;
-
-                for (CacheTypeMetadata oldType : oldTypes) {
-                    JdbcType newType = new JdbcType();
-
-                    newType.setCacheName(cacheName);
-
-                    newType.setDatabaseSchema(oldType.getDatabaseSchema());
-                    newType.setDatabaseTable(oldType.getDatabaseTable());
-
-                    newType.setKeyType(oldType.getKeyType());
-                    newType.setKeyFields(translateFields(oldType.getKeyFields()));
-
-                    newType.setValueType(oldType.getValueType());
-                    newType.setValueFields(translateFields(oldType.getValueFields()));
-
-                    types[idx] = newType;
-
-                    idx++;
-                }
-            }
-
             List<JdbcType> cacheTypes = new ArrayList<>(types.length);
 
             for (JdbcType type : types)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index c4fc98b..ab0aff2 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -51,7 +51,6 @@ import org.apache.ignite.cache.CacheInterceptor;
 import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheRebalanceMode;
-import org.apache.ignite.cache.CacheTypeMetadata;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.QueryIndex;
@@ -372,9 +371,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      */
     private boolean readFromBackup = DFLT_READ_FROM_BACKUP;
 
-    /** Collection of type metadata. */
-    private Collection<CacheTypeMetadata> typeMeta;
-
     /** Node filter specifying nodes on which this cache should be deployed. */
     private IgnitePredicate<ClusterNode> nodeFilter;
 
@@ -498,7 +494,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
         swapEnabled = cc.isSwapEnabled();
         tmLookupClsName = cc.getTransactionManagerLookupClassName();
         topValidator = cc.getTopologyValidator();
-        typeMeta = cc.getTypeMetadata();
         writeBehindBatchSize = cc.getWriteBehindBatchSize();
         writeBehindEnabled = cc.isWriteBehindEnabled();
         writeBehindFlushFreq = cc.getWriteBehindFlushFrequency();
@@ -1724,28 +1719,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     }
 
     /**
-     * Gets collection of type metadata objects.
-     *
-     * @return Collection of type metadata.
-     */
-    public Collection<CacheTypeMetadata> getTypeMetadata() {
-        return typeMeta;
-    }
-
-    /**
-     * Sets collection of type metadata objects.
-     *
-     * @param typeMeta Collection of type metadata.
-     * @return {@code this} for chaining.
-     * @deprecated Use {@link #setQueryEntities(java.util.Collection)} instead.
-     */
-    public CacheConfiguration<K, V> setTypeMetadata(Collection<CacheTypeMetadata> typeMeta) {
-        this.typeMeta = new ArrayList<>(typeMeta);
-
-        return this;
-    }
-
-    /**
      * Gets flag indicating whether data can be read from backup.
      * If {@code false} always get data from primary node (never from backup).
      * <p>

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 676c836..74a0213 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -32,7 +32,6 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteDataStreamer;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.binary.Binarylizable;
-import org.apache.ignite.cache.CacheTypeMetadata;
 import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
@@ -158,15 +157,6 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             }
         }
 
-        if (!F.isEmpty(ccfg.getTypeMetadata())) {
-            for (CacheTypeMetadata meta : ccfg.getTypeMetadata()) {
-                QueryTypeCandidate cand = QueryUtils.typeForCacheMetadata(space, cctx, meta, mustDeserializeClss);
-
-                if (cand != null)
-                    cands.add(cand);
-            }
-        }
-
         // Register candidates.
         idx.registerCache(space, cctx, cctx.config());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
index 19a752a..896c62b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.query;
 
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.CacheTypeMetadata;
 import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.QueryIndex;
 import org.apache.ignite.cache.QueryIndexType;
@@ -39,7 +38,6 @@ import org.apache.ignite.internal.processors.query.property.QueryReadOnlyMethods
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.A;
 import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteBiTuple;
 import org.jetbrains.annotations.Nullable;
 
 import java.lang.reflect.Method;
@@ -48,7 +46,6 @@ import java.sql.Time;
 import java.sql.Timestamp;
 import java.util.Collections;
 import java.util.HashSet;
-import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -200,314 +197,6 @@ public class QueryUtils {
     }
 
     /**
-     * Create type candidate for type metadata.
-     *
-     * @param space Space.
-     * @param cctx Cache context.
-     * @param meta Type metadata.
-     * @param mustDeserializeClss Classes which must be deserialized.
-     * @return Type candidate.
-     * @throws IgniteCheckedException If failed.
-     */
-    @SuppressWarnings("deprecation")
-    @Nullable public static QueryTypeCandidate typeForCacheMetadata(String space, GridCacheContext cctx,
-        CacheTypeMetadata meta, List<Class<?>> mustDeserializeClss) throws IgniteCheckedException {
-        if (F.isEmpty(meta.getValueType()))
-            throw new IgniteCheckedException("Value type is not set: " + meta);
-
-        GridKernalContext ctx = cctx.kernalContext();
-        CacheConfiguration<?,?> ccfg = cctx.config();
-
-        boolean binaryEnabled = ctx.cacheObjects().isBinaryEnabled(ccfg);
-
-        CacheObjectContext coCtx = binaryEnabled ? ctx.cacheObjects().contextForCache(ccfg) : null;
-
-        if (meta.getQueryFields().isEmpty() && meta.getAscendingFields().isEmpty() &&
-            meta.getDescendingFields().isEmpty() && meta.getGroups().isEmpty())
-            return null;
-
-        QueryTypeDescriptorImpl desc = new QueryTypeDescriptorImpl();
-
-        // Key and value classes still can be available if they are primitive or JDK part.
-        // We need that to set correct types for _key and _val columns.
-        Class<?> keyCls = U.classForName(meta.getKeyType(), null);
-        Class<?> valCls = U.classForName(meta.getValueType(), null);
-
-        // If local node has the classes and they are externalizable, we must use reflection properties.
-        boolean keyMustDeserialize = mustDeserializeBinary(ctx, keyCls);
-        boolean valMustDeserialize = mustDeserializeBinary(ctx, valCls);
-
-        boolean keyOrValMustDeserialize = keyMustDeserialize || valMustDeserialize;
-
-        if (keyCls == null)
-            keyCls = Object.class;
-
-        String simpleValType = meta.getSimpleValueType();
-
-        if (simpleValType == null)
-            simpleValType = typeName(meta.getValueType());
-
-        desc.name(simpleValType);
-
-        if (binaryEnabled && !keyOrValMustDeserialize) {
-            // Safe to check null.
-            if (SQL_TYPES.contains(valCls))
-                desc.valueClass(valCls);
-            else
-                desc.valueClass(Object.class);
-
-            if (SQL_TYPES.contains(keyCls))
-                desc.keyClass(keyCls);
-            else
-                desc.keyClass(Object.class);
-        }
-        else {
-            desc.valueClass(valCls);
-            desc.keyClass(keyCls);
-        }
-
-        desc.keyTypeName(meta.getKeyType());
-        desc.valueTypeName(meta.getValueType());
-
-        if (binaryEnabled && keyOrValMustDeserialize) {
-            if (keyMustDeserialize)
-                mustDeserializeClss.add(keyCls);
-
-            if (valMustDeserialize)
-                mustDeserializeClss.add(valCls);
-        }
-
-        QueryTypeIdKey typeId;
-        QueryTypeIdKey altTypeId = null;
-
-        if (valCls == null || (binaryEnabled && !keyOrValMustDeserialize)) {
-            processBinaryMeta(ctx, meta, desc);
-
-            typeId = new QueryTypeIdKey(space, ctx.cacheObjects().typeId(meta.getValueType()));
-
-            if (valCls != null)
-                altTypeId = new QueryTypeIdKey(space, valCls);
-        }
-        else {
-            processClassMeta(meta, desc, coCtx);
-
-            typeId = new QueryTypeIdKey(space, valCls);
-            altTypeId = new QueryTypeIdKey(space, ctx.cacheObjects().typeId(meta.getValueType()));
-        }
-
-        return new QueryTypeCandidate(typeId, altTypeId, desc);
-    }
-    
-    /**
-     * Processes declarative metadata for class.
-     *
-     * @param meta Type metadata.
-     * @param d Type descriptor.
-     * @param coCtx Cache object context.
-     * @throws IgniteCheckedException If failed.
-     */
-    @SuppressWarnings("deprecation")
-    private static void processClassMeta(CacheTypeMetadata meta, QueryTypeDescriptorImpl d, CacheObjectContext coCtx)
-        throws IgniteCheckedException {
-        Map<String,String> aliases = meta.getAliases();
-
-        if (aliases == null)
-            aliases = Collections.emptyMap();
-
-        Class<?> keyCls = d.keyClass();
-        Class<?> valCls = d.valueClass();
-
-        assert keyCls != null;
-        assert valCls != null;
-
-        for (Map.Entry<String, Class<?>> entry : meta.getAscendingFields().entrySet())
-            addToIndex(d, keyCls, valCls, entry.getKey(), entry.getValue(), 0, IndexType.ASC, null, aliases, coCtx);
-
-        for (Map.Entry<String, Class<?>> entry : meta.getDescendingFields().entrySet())
-            addToIndex(d, keyCls, valCls, entry.getKey(), entry.getValue(), 0, IndexType.DESC, null, aliases, coCtx);
-
-        for (String txtField : meta.getTextFields())
-            addToIndex(d, keyCls, valCls, txtField, String.class, 0, IndexType.TEXT, null, aliases, coCtx);
-
-        Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> grps = meta.getGroups();
-
-        if (grps != null) {
-            for (Map.Entry<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> entry : grps.entrySet()) {
-                String idxName = entry.getKey();
-
-                LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>> idxFields = entry.getValue();
-
-                int order = 0;
-
-                for (Map.Entry<String, IgniteBiTuple<Class<?>, Boolean>> idxField : idxFields.entrySet()) {
-                    Boolean descending = idxField.getValue().get2();
-
-                    if (descending == null)
-                        descending = false;
-
-                    addToIndex(d, keyCls, valCls, idxField.getKey(), idxField.getValue().get1(), order,
-                        descending ? IndexType.DESC : IndexType.ASC, idxName, aliases, coCtx);
-
-                    order++;
-                }
-            }
-        }
-
-        for (Map.Entry<String, Class<?>> entry : meta.getQueryFields().entrySet()) {
-            QueryClassProperty prop = buildClassProperty(
-                keyCls,
-                valCls,
-                entry.getKey(),
-                entry.getValue(),
-                aliases,
-                coCtx);
-
-            d.addProperty(prop, false);
-        }
-    }
-    
-    /**
-     * @param d Type descriptor.
-     * @param keyCls Key class.
-     * @param valCls Value class.
-     * @param pathStr Path string.
-     * @param resType Result type.
-     * @param idxOrder Order number in index or {@code -1} if no need to index.
-     * @param idxType Index type.
-     * @param idxName Index name.
-     * @param aliases Aliases.
-     * @throws IgniteCheckedException If failed.
-     */
-    private static void addToIndex(
-        QueryTypeDescriptorImpl d,
-        Class<?> keyCls,
-        Class<?> valCls,
-        String pathStr,
-        Class<?> resType,
-        int idxOrder,
-        IndexType idxType,
-        String idxName,
-        Map<String,String> aliases,
-        CacheObjectContext coCtx
-    ) throws IgniteCheckedException {
-        String propName;
-        Class<?> propCls;
-
-        if (_VAL.equals(pathStr)) {
-            propName = _VAL;
-            propCls = valCls;
-        }
-        else {
-            QueryClassProperty prop = buildClassProperty(
-                keyCls,
-                valCls,
-                pathStr,
-                resType,
-                aliases,
-                coCtx);
-
-            d.addProperty(prop, false);
-
-            propName = prop.name();
-            propCls = prop.type();
-        }
-
-        if (idxType != null) {
-            if (idxName == null)
-                idxName = propName + "_idx";
-
-            if (idxOrder == 0) // Add index only on the first field.
-                d.addIndex(idxName, isGeometryClass(propCls) ? QueryIndexType.GEOSPATIAL : QueryIndexType.SORTED);
-
-            if (idxType == IndexType.TEXT)
-                d.addFieldToTextIndex(propName);
-            else
-                d.addFieldToIndex(idxName, propName, idxOrder, idxType == IndexType.DESC);
-        }
-    }
-    
-    /**
-     * Processes declarative metadata for binary object.
-     *
-     * @param ctx Kernal context.
-     * @param meta Declared metadata.
-     * @param d Type descriptor.
-     * @throws IgniteCheckedException If failed.
-     */
-    @SuppressWarnings("deprecation")
-    public static void processBinaryMeta(GridKernalContext ctx, CacheTypeMetadata meta, QueryTypeDescriptorImpl d)
-        throws IgniteCheckedException {
-        Map<String,String> aliases = meta.getAliases();
-
-        if (aliases == null)
-            aliases = Collections.emptyMap();
-
-        for (Map.Entry<String, Class<?>> entry : meta.getAscendingFields().entrySet()) {
-            QueryBinaryProperty prop = buildBinaryProperty(ctx, entry.getKey(), entry.getValue(), aliases, null);
-
-            d.addProperty(prop, false);
-
-            String idxName = prop.name() + "_idx";
-
-            d.addIndex(idxName, isGeometryClass(prop.type()) ? QueryIndexType.GEOSPATIAL : QueryIndexType.SORTED);
-
-            d.addFieldToIndex(idxName, prop.name(), 0, false);
-        }
-
-        for (Map.Entry<String, Class<?>> entry : meta.getDescendingFields().entrySet()) {
-            QueryBinaryProperty prop = buildBinaryProperty(ctx, entry.getKey(), entry.getValue(), aliases, null);
-
-            d.addProperty(prop, false);
-
-            String idxName = prop.name() + "_idx";
-
-            d.addIndex(idxName, isGeometryClass(prop.type()) ? QueryIndexType.GEOSPATIAL : QueryIndexType.SORTED);
-
-            d.addFieldToIndex(idxName, prop.name(), 0, true);
-        }
-
-        for (String txtIdx : meta.getTextFields()) {
-            QueryBinaryProperty prop = buildBinaryProperty(ctx, txtIdx, String.class, aliases, null);
-
-            d.addProperty(prop, false);
-
-            d.addFieldToTextIndex(prop.name());
-        }
-
-        Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> grps = meta.getGroups();
-
-        if (grps != null) {
-            for (Map.Entry<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> entry : grps.entrySet()) {
-                String idxName = entry.getKey();
-
-                LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>> idxFields = entry.getValue();
-
-                int order = 0;
-
-                for (Map.Entry<String, IgniteBiTuple<Class<?>, Boolean>> idxField : idxFields.entrySet()) {
-                    QueryBinaryProperty prop = buildBinaryProperty(ctx, idxField.getKey(), idxField.getValue().get1(),
-                        aliases, null);
-
-                    d.addProperty(prop, false);
-
-                    Boolean descending = idxField.getValue().get2();
-
-                    d.addFieldToIndex(idxName, prop.name(), order, descending != null && descending);
-
-                    order++;
-                }
-            }
-        }
-
-        for (Map.Entry<String, Class<?>> entry : meta.getQueryFields().entrySet()) {
-            QueryBinaryProperty prop = buildBinaryProperty(ctx, entry.getKey(), entry.getValue(), aliases, null);
-
-            if (!d.properties().containsKey(prop.name()))
-                d.addProperty(prop, false);
-        }
-    }
-    
-    /**
      * Processes declarative metadata for binary object.
      *
      * @param ctx Kernal context.
@@ -976,7 +665,6 @@ public class QueryUtils {
      */
     public static boolean isEnabled(CacheConfiguration<?,?> ccfg) {
         return !F.isEmpty(ccfg.getIndexedTypes()) ||
-            !F.isEmpty(ccfg.getTypeMetadata()) ||
             !F.isEmpty(ccfg.getQueryEntities());
     }
 
@@ -986,18 +674,4 @@ public class QueryUtils {
     private QueryUtils() {
         // No-op.
     }
-    /**
-     * The way to index.
-     */
-    private enum IndexType {
-        /** Ascending index. */
-        ASC,
-
-        /** Descending index. */
-        DESC,
-
-        /** Text index. */
-        TEXT
-    }
-    
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
index cf2ba7a..30973b0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
@@ -139,7 +139,7 @@ public class VisorCacheConfiguration implements Serializable, LessNamingBean {
         maxConcurrentAsyncOps = ccfg.getMaxConcurrentAsyncOperations();
         memoryMode = ccfg.getMemoryMode();
         interceptor = compactClass(ccfg.getInterceptor());
-        typeMeta = VisorCacheTypeMetadata.list(ccfg.getQueryEntities(), ccfg.getCacheStoreFactory(), ccfg.getTypeMetadata());
+        typeMeta = VisorCacheTypeMetadata.list(ccfg.getQueryEntities(), ccfg.getCacheStoreFactory());
         statisticsEnabled = ccfg.isStatisticsEnabled();
         mgmtEnabled = ccfg.isManagementEnabled();
         ldrFactory = compactClass(ccfg.getCacheLoaderFactory());

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java
index f3dffd6..c9bf960 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java
@@ -18,12 +18,11 @@
 package org.apache.ignite.internal.visor.cache;
 
 import java.io.Serializable;
-import org.apache.ignite.cache.CacheTypeFieldMetadata;
+import org.apache.ignite.cache.store.jdbc.JdbcTypeField;
 import org.apache.ignite.internal.LessNamingBean;
-import org.apache.ignite.internal.util.typedef.internal.U;
 
 /**
- * Data transfer object for {@link CacheTypeFieldMetadata}.
+ * Data transfer object for {@link JdbcTypeField}.
  */
 public class VisorCacheTypeFieldMetadata implements Serializable, LessNamingBean {
     /** */
@@ -42,15 +41,6 @@ public class VisorCacheTypeFieldMetadata implements Serializable, LessNamingBean
     private String javaType;
 
     /**
-     * @param f Actual field metadata.
-     * @return Data transfer object for given cache field metadata.
-     */
-    public static VisorCacheTypeFieldMetadata from(CacheTypeFieldMetadata f) {
-        return new VisorCacheTypeFieldMetadata(f.getDatabaseName(), f.getDatabaseType(),
-            f.getJavaName(), U.compact(f.getJavaType().getName()));
-    }
-
-    /**
      * Empty constructor.
      */
     public VisorCacheTypeFieldMetadata() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java
index c87ad05..7463887 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java
@@ -23,8 +23,6 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.Map;
-import org.apache.ignite.cache.CacheTypeFieldMetadata;
-import org.apache.ignite.cache.CacheTypeMetadata;
 import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.QueryIndex;
 import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory;
@@ -39,7 +37,7 @@ import org.apache.ignite.lang.IgniteBiTuple;
 import javax.cache.configuration.Factory;
 
 /**
- * Data transfer object for {@link CacheTypeMetadata}.
+ * Data transfer object for {@link JdbcType}.
  */
 public class VisorCacheTypeMetadata implements Serializable, LessNamingBean {
     /** */
@@ -88,11 +86,9 @@ public class VisorCacheTypeMetadata implements Serializable, LessNamingBean {
     /**
      * @param qryEntities Collection of query entities.
      * @param factory Store factory to extract JDBC types info.
-     * @param types Cache types metadata configurations.
      * @return Data transfer object for cache type metadata configurations.
      */
-    public static Collection<VisorCacheTypeMetadata> list(Collection<QueryEntity> qryEntities, Factory factory,
-        Collection<CacheTypeMetadata> types) {
+    public static Collection<VisorCacheTypeMetadata> list(Collection<QueryEntity> qryEntities, Factory factory) {
         final Collection<VisorCacheTypeMetadata> metas = new ArrayList<>();
 
         Map<String, VisorCacheTypeMetadata> metaMap =
@@ -164,11 +160,6 @@ public class VisorCacheTypeMetadata implements Serializable, LessNamingBean {
             }
         }
 
-        // Add old deprecated CacheTypeMetadata for compatibility.
-        if (types != null)
-            for (CacheTypeMetadata type : types)
-                metas.add(from(type));
-
         return metas;
     }
 
@@ -220,84 +211,6 @@ public class VisorCacheTypeMetadata implements Serializable, LessNamingBean {
     }
 
     /**
-     * @param m Actual cache type metadata.
-     * @return Data transfer object for given cache type metadata.
-     */
-    public static VisorCacheTypeMetadata from(CacheTypeMetadata m) {
-        assert m != null;
-
-        VisorCacheTypeMetadata metadata = new VisorCacheTypeMetadata();
-
-        metadata.dbSchema = m.getDatabaseSchema();
-        metadata.dbTbl = m.getDatabaseTable();
-        metadata.keyType = m.getKeyType();
-        metadata.valType = m.getValueType();
-
-        ArrayList<VisorCacheTypeFieldMetadata> fields = new ArrayList<>(m.getKeyFields().size());
-
-        for (CacheTypeFieldMetadata field : m.getKeyFields())
-            fields.add(VisorCacheTypeFieldMetadata.from(field));
-
-        metadata.keyFields = fields;
-
-        fields = new ArrayList<>(m.getValueFields().size());
-
-        for (CacheTypeFieldMetadata field : m.getValueFields())
-            fields.add(VisorCacheTypeFieldMetadata.from(field));
-
-        metadata.valFields = fields;
-
-        metadata.qryFlds = convertFieldsMap(m.getQueryFields());
-        metadata.ascFlds = convertFieldsMap(m.getAscendingFields());
-        metadata.descFlds = convertFieldsMap(m.getDescendingFields());
-        metadata.txtFlds = m.getTextFields();
-        metadata.grps = convertGrpsMap(m.getGroups());
-
-        return metadata;
-    }
-
-    /**
-     * Convert class object to string class name in the fields map.
-     *
-     * @param base Map with class object.
-     * @return Map with string class name.
-     */
-    private static Map<String, String> convertFieldsMap(Map<String, Class<?>> base) {
-        Map<String, String> res = new LinkedHashMap<>(base.size());
-
-        for (Map.Entry<String, Class<?>> e : base.entrySet())
-            res.put(e.getKey(), U.compact(e.getValue().getName()));
-
-        return res;
-    }
-
-    /**
-     * Convert class object to string class name in the  groups map.
-     *
-     * @param base Map with class object.
-     * @return Map with string class name.
-     */
-    private static Map<String, LinkedHashMap<String, IgniteBiTuple<String, Boolean>>> convertGrpsMap(
-        Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> base) {
-        Map<String, LinkedHashMap<String, IgniteBiTuple<String, Boolean>>> res = new LinkedHashMap<>(base.size());
-
-        for (Map.Entry<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> e : base.entrySet()) {
-            LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>> intBase = e.getValue();
-            LinkedHashMap<String, IgniteBiTuple<String, Boolean>> intRes = new LinkedHashMap<>(intBase.size());
-
-            for (Map.Entry<String, IgniteBiTuple<Class<?>, Boolean>> intE : intBase.entrySet()) {
-                IgniteBiTuple<Class<?>, Boolean> val = intE.getValue();
-
-                intRes.put(intE.getKey(), new IgniteBiTuple<>(U.compact(val.get1().getName()), val.get2()));
-            }
-
-            res.put(e.getKey(), intRes);
-        }
-
-        return res;
-    }
-
-    /**
      * @return Schema name in database.
      */
     public String dbSchema() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties b/modules/core/src/main/resources/META-INF/classnames.properties
index c5f4b92..9cce826 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -44,7 +44,6 @@ org.apache.ignite.cache.CachePeekMode
 org.apache.ignite.cache.CacheRebalanceMode
 org.apache.ignite.cache.CacheServerNotFoundException
 org.apache.ignite.cache.CacheTypeFieldMetadata
-org.apache.ignite.cache.CacheTypeMetadata
 org.apache.ignite.cache.CacheWriteSynchronizationMode
 org.apache.ignite.cache.QueryEntity
 org.apache.ignite.cache.QueryIndex

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/test/config/store/jdbc/ignite-jdbc-type.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/store/jdbc/ignite-jdbc-type.xml b/modules/core/src/test/config/store/jdbc/ignite-jdbc-type.xml
new file mode 100644
index 0000000..4df4f04
--- /dev/null
+++ b/modules/core/src/test/config/store/jdbc/ignite-jdbc-type.xml
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!--
+    XML generated by Apache Ignite Schema Import utility: 02/03/2015
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                           http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://www.springframework.org/schema/util
+                           http://www.springframework.org/schema/util/spring-util.xsd">
+    <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
+        <property name="databaseSchema" value="PUBLIC"/>
+        <property name="databaseTable" value="ORGANIZATION"/>
+        <property name="keyType" value="org.apache.ignite.cache.store.jdbc.model.OrganizationKey"/>
+        <property name="valueType" value="org.apache.ignite.cache.store.jdbc.model.Organization"/>
+        <property name="keyFields">
+            <list>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="ID"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
+                    <property name="javaFieldName" value="id"/>
+                    <property name="javaFieldType" value="java.lang.Integer"/>
+                </bean>
+            </list>
+        </property>
+        <property name="valueFields">
+            <list>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="ID"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
+                    <property name="javaFieldName" value="id"/>
+                    <property name="javaFieldType" value="java.lang.Integer"/>
+                </bean>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="NAME"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                    </property>
+                    <property name="javaFieldName" value="name"/>
+                    <property name="javaFieldType" value="java.lang.String"/>
+                </bean>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="CITY"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                    </property>
+                    <property name="javaFieldName" value="city"/>
+                    <property name="javaFieldType" value="java.lang.String"/>
+                </bean>
+            </list>
+        </property>
+    </bean>
+
+    <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
+        <property name="databaseSchema" value="PUBLIC"/>
+        <property name="databaseTable" value="PERSON"/>
+        <property name="keyType" value="org.apache.ignite.cache.store.jdbc.model.PersonKey"/>
+        <property name="valueType" value="org.apache.ignite.cache.store.jdbc.model.Person"/>
+        <property name="keyFields">
+            <list>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="ID"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
+                    <property name="javaFieldName" value="id"/>
+                    <property name="javaFieldType" value="java.lang.Integer"/>
+                </bean>
+            </list>
+        </property>
+        <property name="valueFields">
+            <list>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="ID"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
+                    <property name="javaFieldName" value="id"/>
+                    <property name="javaFieldType" value="java.lang.Integer"/>
+                </bean>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="ORG_ID"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
+                    <property name="javaFieldName" value="orgId"/>
+                    <property name="javaFieldType" value="java.lang.Integer"/>
+                </bean>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="NAME"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                    </property>
+                    <property name="javaFieldName" value="name"/>
+                    <property name="javaFieldType" value="java.lang.String"/>
+                </bean>
+            </list>
+        </property>
+    </bean>
+
+    <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
+        <property name="databaseSchema" value="PUBLIC"/>
+        <property name="databaseTable" value="PERSON_COMPLEX"/>
+        <property name="keyType" value="org.apache.ignite.cache.store.jdbc.model.PersonComplexKey"/>
+        <property name="valueType" value="org.apache.ignite.cache.store.jdbc.model.Person"/>
+        <property name="keyFields">
+            <list>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="ID"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
+                    <property name="javaFieldName" value="id"/>
+                    <property name="javaFieldType" value="int"/>
+                </bean>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="ORG_ID"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
+                    <property name="javaFieldName" value="orgId"/>
+                    <property name="javaFieldType" value="int"/>
+                </bean>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="CITY_ID"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
+                    <property name="javaFieldName" value="cityId"/>
+                    <property name="javaFieldType" value="int"/>
+                </bean>
+            </list>
+        </property>
+        <property name="valueFields">
+            <list>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="ID"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
+                    <property name="javaFieldName" value="id"/>
+                    <property name="javaFieldType" value="java.lang.Integer"/>
+                </bean>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="ORG_ID"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
+                    <property name="javaFieldName" value="orgId"/>
+                    <property name="javaFieldType" value="java.lang.Integer"/>
+                </bean>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="NAME"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                    </property>
+                    <property name="javaFieldName" value="name"/>
+                    <property name="javaFieldType" value="java.lang.String"/>
+                </bean>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="salary"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
+                    <property name="javaFieldName" value="salary"/>
+                    <property name="javaFieldType" value="java.lang.Integer"/>
+                </bean>
+            </list>
+        </property>
+    </bean>
+
+    <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
+        <property name="databaseSchema" value="PUBLIC"/>
+        <property name="databaseTable" value="STRING_ENTRIES"/>
+        <property name="keyType" value="java.lang.String"/>
+        <property name="valueType" value="java.lang.String"/>
+        <property name="keyFields">
+            <list>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="KEY"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                    </property>
+                </bean>
+            </list>
+        </property>
+        <property name="valueFields">
+            <list>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="VAL"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                    </property>
+                </bean>
+            </list>
+        </property>
+    </bean>
+
+    <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
+        <property name="databaseSchema" value="PUBLIC"/>
+        <property name="databaseTable" value="UUID_ENTRIES"/>
+        <property name="keyType" value="java.util.UUID"/>
+        <property name="valueType" value="java.util.UUID"/>
+        <property name="keyFields">
+            <list>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="KEY"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.BINARY"/>
+                    </property>
+                    <property name="javaFieldType" value="java.util.UUID"/>
+                </bean>
+            </list>
+        </property>
+        <property name="valueFields">
+            <list>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="VAL"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.BINARY"/>
+                    </property>
+                    <property name="javaFieldType" value="java.util.UUID"/>
+                </bean>
+            </list>
+        </property>
+    </bean>
+
+    <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
+        <property name="databaseSchema" value="PUBLIC"/>
+        <property name="databaseTable" value="TIMESTAMP_ENTRIES"/>
+        <property name="keyType" value="java.sql.Timestamp"/>
+        <property name="valueType" value="java.lang.Integer"/>
+        <property name="keyFields">
+            <list>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="KEY"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.TIMESTAMP"/>
+                    </property>
+                    <property name="javaFieldType" value="java.sql.Timestamp"/>
+                </bean>
+            </list>
+        </property>
+        <property name="valueFields">
+            <list>
+                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
+                    <property name="databaseFieldName" value="VAL"/>
+                    <property name="databaseFieldType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
+                    <property name="javaFieldType" value="java.lang.Integer"/>
+                </bean>
+            </list>
+        </property>
+    </bean>
+</beans>


[15/50] [abbrv] ignite git commit: master Updated version.

Posted by dm...@apache.org.
master Updated version.


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

Branch: refs/heads/ignite-1192
Commit: 5469626c9a3765c9151643c7ec7af5ed98606a28
Parents: 3b84f34
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Tue Apr 4 16:14:56 2017 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Tue Apr 4 16:14:56 2017 +0700

----------------------------------------------------------------------
 .../frontend/app/modules/configuration/Version.service.js          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5469626c/modules/web-console/frontend/app/modules/configuration/Version.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/Version.service.js b/modules/web-console/frontend/app/modules/configuration/Version.service.js
index 3fc7199..164bd20 100644
--- a/modules/web-console/frontend/app/modules/configuration/Version.service.js
+++ b/modules/web-console/frontend/app/modules/configuration/Version.service.js
@@ -24,7 +24,7 @@ const numberComparator = (a, b) => a > b ? 1 : a < b ? -1 : 0;
 
 export default class IgniteVersion {
     /** Current product version. */
-    static ignite = '1.8.0';
+    static ignite = '1.9.0';
 
     /**
      * Tries to parse product version from it's string representation.


[44/50] [abbrv] ignite git commit: IGNITE-4354: Sorted fields sorting logc in BinaryObjectBuilder. This closes #1759.

Posted by dm...@apache.org.
IGNITE-4354: Sorted fields sorting logc in BinaryObjectBuilder. This closes #1759.


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

Branch: refs/heads/ignite-1192
Commit: 5c48260f3d79bafd72af87e19077f150831d07e9
Parents: 62a3b4d
Author: Alexander Paschenko <al...@gmail.com>
Authored: Mon Apr 10 16:34:35 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Mon Apr 10 16:34:35 2017 +0300

----------------------------------------------------------------------
 .../binary/builder/BinaryObjectBuilderImpl.java | 36 +++++++++++---------
 1 file changed, 19 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5c48260f/modules/core/src/main/java/org/apache/ignite/internal/binary/builder/BinaryObjectBuilderImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/builder/BinaryObjectBuilderImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/builder/BinaryObjectBuilderImpl.java
index 6827c96..02e06fd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/builder/BinaryObjectBuilderImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/builder/BinaryObjectBuilderImpl.java
@@ -500,6 +500,21 @@ public class BinaryObjectBuilderImpl implements BinaryObjectBuilder {
         }
     }
 
+    /**
+     * If value of {@link #assignedVals} is null, set it according to
+     * {@link BinaryUtils#FIELDS_SORTED_ORDER}.
+     */
+    private Map<String, Object> assignedValues() {
+        if (assignedVals == null) {
+            if (BinaryUtils.FIELDS_SORTED_ORDER)
+                assignedVals = new TreeMap<>();
+            else
+                assignedVals = new LinkedHashMap<>();
+        }
+
+        return assignedVals;
+    }
+
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Override public <T> T getField(String name) {
@@ -526,19 +541,12 @@ public class BinaryObjectBuilderImpl implements BinaryObjectBuilder {
     @Override public BinaryObjectBuilder setField(String name, Object val0) {
         Object val = val0 == null ? new BinaryValueWithType(BinaryUtils.typeByClass(Object.class), null) : val0;
 
-        if (assignedVals == null) {
-            if (BinaryUtils.FIELDS_SORTED_ORDER)
-                assignedVals = new TreeMap<>();
-            else
-                assignedVals = new LinkedHashMap<>();
-        }
-
-        Object oldVal = assignedVals.put(name, val);
+        Object oldVal = assignedValues().put(name, val);
 
         if (oldVal instanceof BinaryValueWithType && val0 != null) {
             ((BinaryValueWithType)oldVal).value(val);
 
-            assignedVals.put(name, oldVal);
+            assignedValues().put(name, oldVal);
         }
 
         return this;
@@ -555,10 +563,7 @@ public class BinaryObjectBuilderImpl implements BinaryObjectBuilder {
         else
             typeId = BinaryUtils.typeByClass(type);
 
-        if (assignedVals == null)
-            assignedVals = new LinkedHashMap<>();
-
-        assignedVals.put(name, new BinaryValueWithType(typeId, val));
+        assignedValues().put(name, new BinaryValueWithType(typeId, val));
 
         return this;
     }
@@ -578,10 +583,7 @@ public class BinaryObjectBuilderImpl implements BinaryObjectBuilder {
      * @return {@code this} instance for chaining.
      */
     @Override public BinaryObjectBuilderImpl removeField(String name) {
-        if (assignedVals == null)
-            assignedVals = new LinkedHashMap<>();
-
-        assignedVals.put(name, REMOVED_FIELD_MARKER);
+        assignedValues().put(name, REMOVED_FIELD_MARKER);
 
         return this;
     }


[40/50] [abbrv] ignite git commit: Merge remote-tracking branch 'origin/master'

Posted by dm...@apache.org.
Merge remote-tracking branch 'origin/master'


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

Branch: refs/heads/ignite-1192
Commit: 7201f2c415b8c8e77585ad3585fa7f42a6804180
Parents: 139efb1 676d6f7
Author: Valentin Kulichenko <va...@gmail.com>
Authored: Sun Apr 9 14:23:04 2017 +0200
Committer: Valentin Kulichenko <va...@gmail.com>
Committed: Sun Apr 9 14:23:04 2017 +0200

----------------------------------------------------------------------
 .../processors/rest/JettyRestProcessorAbstractSelfTest.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[07/50] [abbrv] ignite git commit: IGNITE-4827: Minor bug fix in ServerImpl invariant.

Posted by dm...@apache.org.
IGNITE-4827: Minor bug fix in ServerImpl invariant.


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

Branch: refs/heads/ignite-1192
Commit: eff3185d790b57118a9eaaa35057d712bc59b3f7
Parents: d449493
Author: tledkov-gridgain <tl...@gridgain.com>
Authored: Mon Apr 3 12:37:45 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Mon Apr 3 12:37:45 2017 +0300

----------------------------------------------------------------------
 .../main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/eff3185d/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index f9df356..91baca6 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -6229,7 +6229,8 @@ class ServerImpl extends TcpDiscoveryImpl {
                                 "[sock=" + sock + ", locNodeId=" + getLocalNodeId() +
                                 ", rmtNodeId=" + clientNodeId + ", msg=" + msg + ']');
                     }
-                    else {
+
+                    if (clientVer != null) {
                         if (msgLog.isDebugEnabled())
                             msgLog.debug("Sending message ack to client [sock=" + sock + ", locNodeId="
                                 + getLocalNodeId() + ", rmtNodeId=" + clientNodeId + ", msg=" + msg + ']');


[18/50] [abbrv] ignite git commit: IGNITE-4839: Removed CacheTypeMetadata. This closes #1667.

Posted by dm...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/test/config/store/jdbc/ignite-type-metadata.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/store/jdbc/ignite-type-metadata.xml b/modules/core/src/test/config/store/jdbc/ignite-type-metadata.xml
deleted file mode 100644
index 3e3d6e0..0000000
--- a/modules/core/src/test/config/store/jdbc/ignite-type-metadata.xml
+++ /dev/null
@@ -1,276 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!--
-    XML generated by Apache Ignite Schema Import utility: 02/03/2015
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:util="http://www.springframework.org/schema/util"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans
-                           http://www.springframework.org/schema/beans/spring-beans.xsd
-                           http://www.springframework.org/schema/util
-                           http://www.springframework.org/schema/util/spring-util.xsd">
-    <bean class="org.apache.ignite.cache.CacheTypeMetadata">
-        <property name="databaseSchema" value="PUBLIC"/>
-        <property name="databaseTable" value="ORGANIZATION"/>
-        <property name="keyType" value="org.apache.ignite.cache.store.jdbc.model.OrganizationKey"/>
-        <property name="valueType" value="org.apache.ignite.cache.store.jdbc.model.Organization"/>
-        <property name="keyFields">
-            <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="ID"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="id"/>
-                    <property name="javaType" value="java.lang.Integer"/>
-                </bean>
-            </list>
-        </property>
-        <property name="valueFields">
-            <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="ID"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="id"/>
-                    <property name="javaType" value="java.lang.Integer"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="NAME"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.VARCHAR"/>
-                    </property>
-                    <property name="javaName" value="name"/>
-                    <property name="javaType" value="java.lang.String"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="CITY"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.VARCHAR"/>
-                    </property>
-                    <property name="javaName" value="city"/>
-                    <property name="javaType" value="java.lang.String"/>
-                </bean>
-            </list>
-        </property>
-
-    </bean>
-    <bean class="org.apache.ignite.cache.CacheTypeMetadata">
-        <property name="databaseSchema" value="PUBLIC"/>
-        <property name="databaseTable" value="PERSON"/>
-        <property name="keyType" value="org.apache.ignite.cache.store.jdbc.model.PersonKey"/>
-        <property name="valueType" value="org.apache.ignite.cache.store.jdbc.model.Person"/>
-        <property name="keyFields">
-            <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="ID"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="id"/>
-                    <property name="javaType" value="java.lang.Integer"/>
-                </bean>
-            </list>
-        </property>
-        <property name="valueFields">
-            <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="ID"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="id"/>
-                    <property name="javaType" value="java.lang.Integer"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="ORG_ID"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="orgId"/>
-                    <property name="javaType" value="java.lang.Integer"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="NAME"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.VARCHAR"/>
-                    </property>
-                    <property name="javaName" value="name"/>
-                    <property name="javaType" value="java.lang.String"/>
-                </bean>
-            </list>
-        </property>
-
-    </bean>
-    <bean class="org.apache.ignite.cache.CacheTypeMetadata">
-        <property name="databaseSchema" value="PUBLIC"/>
-        <property name="databaseTable" value="PERSON_COMPLEX"/>
-        <property name="keyType" value="org.apache.ignite.cache.store.jdbc.model.PersonComplexKey"/>
-        <property name="valueType" value="org.apache.ignite.cache.store.jdbc.model.Person"/>
-        <property name="keyFields">
-            <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="ID"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="id"/>
-                    <property name="javaType" value="int"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="ORG_ID"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="orgId"/>
-                    <property name="javaType" value="int"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="CITY_ID"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="cityId"/>
-                    <property name="javaType" value="int"/>
-                </bean>
-            </list>
-        </property>
-        <property name="valueFields">
-            <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="ID"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="id"/>
-                    <property name="javaType" value="java.lang.Integer"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="ORG_ID"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="orgId"/>
-                    <property name="javaType" value="java.lang.Integer"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="NAME"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.VARCHAR"/>
-                    </property>
-                    <property name="javaName" value="name"/>
-                    <property name="javaType" value="java.lang.String"/>
-                </bean>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="salary"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaName" value="salary"/>
-                    <property name="javaType" value="java.lang.Integer"/>
-                </bean>
-            </list>
-        </property>
-    </bean>
-    <bean class="org.apache.ignite.cache.CacheTypeMetadata">
-        <property name="databaseSchema" value="PUBLIC"/>
-        <property name="databaseTable" value="STRING_ENTRIES"/>
-        <property name="keyType" value="java.lang.String"/>
-        <property name="valueType" value="java.lang.String"/>
-        <property name="keyFields">
-            <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="KEY"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.VARCHAR"/>
-                    </property>
-                </bean>
-            </list>
-        </property>
-        <property name="valueFields">
-            <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="VAL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.VARCHAR"/>
-                    </property>
-                </bean>
-            </list>
-        </property>
-    </bean>
-    <bean class="org.apache.ignite.cache.CacheTypeMetadata">
-        <property name="databaseSchema" value="PUBLIC"/>
-        <property name="databaseTable" value="UUID_ENTRIES"/>
-        <property name="keyType" value="java.util.UUID"/>
-        <property name="valueType" value="java.util.UUID"/>
-        <property name="keyFields">
-            <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="KEY"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.BINARY"/>
-                    </property>
-                    <property name="javaType" value="java.util.UUID"/>
-                </bean>
-            </list>
-        </property>
-        <property name="valueFields">
-            <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="VAL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.BINARY"/>
-                    </property>
-                    <property name="javaType" value="java.util.UUID"/>
-                </bean>
-            </list>
-        </property>
-    </bean>
-    <bean class="org.apache.ignite.cache.CacheTypeMetadata">
-        <property name="databaseSchema" value="PUBLIC"/>
-        <property name="databaseTable" value="TIMESTAMP_ENTRIES"/>
-        <property name="keyType" value="java.sql.Timestamp"/>
-        <property name="valueType" value="java.lang.Integer"/>
-        <property name="keyFields">
-            <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="KEY"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.TIMESTAMP"/>
-                    </property>
-                    <property name="javaType" value="java.sql.Timestamp"/>
-                </bean>
-            </list>
-        </property>
-        <property name="valueFields">
-            <list>
-                <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="databaseName" value="VAL"/>
-                    <property name="databaseType">
-                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                    </property>
-                    <property name="javaType" value="java.lang.Integer"/>
-                </bean>
-            </list>
-        </property>
-    </bean>
-</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java
index 89841f8..e7a4af0 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreAbstractMultithreadedSelfTest.java
@@ -32,7 +32,6 @@ import java.util.Random;
 import java.util.concurrent.Callable;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.CacheTypeMetadata;
 import org.apache.ignite.cache.store.jdbc.model.Gender;
 import org.apache.ignite.cache.store.jdbc.model.Organization;
 import org.apache.ignite.cache.store.jdbc.model.OrganizationKey;
@@ -65,7 +64,7 @@ import static org.apache.ignite.testframework.GridTestUtils.runMultiThreadedAsyn
 public abstract class CacheJdbcStoreAbstractMultithreadedSelfTest<T extends CacheAbstractJdbcStore>
     extends GridCommonAbstractTest {
     /** Default config with mapping. */
-    private static final String DFLT_MAPPING_CONFIG = "modules/core/src/test/config/store/jdbc/ignite-type-metadata.xml";
+    private static final String DFLT_MAPPING_CONFIG = "modules/core/src/test/config/store/jdbc/ignite-jdbc-type.xml";
 
     /** Database connection URL. */
     protected static final String DFLT_CONN_URL = "jdbc:h2:mem:autoCacheStore;DB_CLOSE_DELAY=-1";
@@ -85,6 +84,40 @@ public abstract class CacheJdbcStoreAbstractMultithreadedSelfTest<T extends Cach
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
         store = store();
+
+        URL cfgUrl;
+
+        try {
+            cfgUrl = new URL(DFLT_MAPPING_CONFIG);
+        }
+        catch (MalformedURLException ignore) {
+            cfgUrl = U.resolveIgniteUrl(DFLT_MAPPING_CONFIG);
+        }
+
+        if (cfgUrl == null)
+            throw new Exception("Failed to resolve metadata path: " + DFLT_MAPPING_CONFIG);
+
+        try {
+            GenericApplicationContext springCtx = new GenericApplicationContext();
+
+            new XmlBeanDefinitionReader(springCtx).loadBeanDefinitions(new UrlResource(cfgUrl));
+
+            springCtx.refresh();
+
+            Collection<JdbcType> types = new ArrayList<>(springCtx.getBeansOfType(JdbcType.class).values());
+
+            store.setTypes(types.toArray(new JdbcType[types.size()]));
+        }
+        catch (BeansException e) {
+            if (X.hasCause(e, ClassNotFoundException.class))
+                throw new IgniteCheckedException("Failed to instantiate Spring XML application context " +
+                    "(make sure all classes used in Spring configuration are present at CLASSPATH) " +
+                    "[springUrl=" + cfgUrl + ']', e);
+            else
+                throw new IgniteCheckedException("Failed to instantiate Spring XML application context [springUrl=" +
+                    cfgUrl + ", err=" + e.getMessage() + ']', e);
+        }
+
     }
 
     /** {@inheritDoc} */
@@ -151,40 +184,8 @@ public abstract class CacheJdbcStoreAbstractMultithreadedSelfTest<T extends Cach
         cc.setSwapEnabled(false);
         cc.setWriteBehindEnabled(false);
 
-        URL cfgUrl;
-
-        try {
-            cfgUrl = new URL(DFLT_MAPPING_CONFIG);
-        }
-        catch (MalformedURLException ignore) {
-            cfgUrl = U.resolveIgniteUrl(DFLT_MAPPING_CONFIG);
-        }
-
-        if (cfgUrl == null)
-            throw new Exception("Failed to resolve metadata path: " + DFLT_MAPPING_CONFIG);
-
-        try {
-            GenericApplicationContext springCtx = new GenericApplicationContext();
-
-            new XmlBeanDefinitionReader(springCtx).loadBeanDefinitions(new UrlResource(cfgUrl));
-
-            springCtx.refresh();
-
-            Collection<CacheTypeMetadata> tp = new ArrayList<>(springCtx.getBeansOfType(CacheTypeMetadata.class).values());
-
-            cc.setTypeMetadata(tp);
-        }
-        catch (BeansException e) {
-            if (X.hasCause(e, ClassNotFoundException.class))
-                throw new IgniteCheckedException("Failed to instantiate Spring XML application context " +
-                    "(make sure all classes used in Spring configuration are present at CLASSPATH) " +
-                    "[springUrl=" + cfgUrl + ']', e);
-            else
-                throw new IgniteCheckedException("Failed to instantiate Spring XML application context [springUrl=" +
-                    cfgUrl + ", err=" + e.getMessage() + ']', e);
-        }
-
         cc.setCacheStoreFactory(singletonFactory(store));
+
         cc.setReadThrough(true);
         cc.setWriteThrough(true);
         cc.setLoadPreviousValue(true);

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridBinaryDuplicateIndexObjectsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridBinaryDuplicateIndexObjectsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridBinaryDuplicateIndexObjectsAbstractSelfTest.java
deleted file mode 100644
index ccfe68b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridBinaryDuplicateIndexObjectsAbstractSelfTest.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.binary;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.CacheTypeMetadata;
-import org.apache.ignite.cache.query.SqlFieldsQuery;
-import org.apache.ignite.configuration.BinaryConfiguration;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.binary.BinaryObject;
-
-/**
- * Tests that binary object is the same in cache entry and in index.
- */
-public abstract class GridBinaryDuplicateIndexObjectsAbstractSelfTest extends GridCacheAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 1;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        BinaryConfiguration bCfg = new BinaryConfiguration();
-
-        bCfg.setClassNames(Collections.singletonList(TestBinary.class.getName()));
-
-        cfg.setBinaryConfiguration(bCfg);
-
-        cfg.setMarshaller(new BinaryMarshaller());
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
-        ccfg.setCopyOnRead(false);
-
-        CacheTypeMetadata meta = new CacheTypeMetadata();
-
-        meta.setKeyType(Integer.class);
-        meta.setValueType(TestBinary.class.getName());
-
-        Map<String, Class<?>> idx = new HashMap<>();
-
-        idx.put("fieldOne", String.class);
-        idx.put("fieldTwo", Integer.class);
-
-        meta.setAscendingFields(idx);
-
-        ccfg.setTypeMetadata(Collections.singletonList(meta));
-
-        return ccfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override public abstract CacheAtomicityMode atomicityMode();
-
-    /** {@inheritDoc} */
-    @Override public abstract CacheMode cacheMode();
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testIndexReferences() throws Exception {
-        IgniteCache<Integer, TestBinary> cache = grid(0).cache(null);
-
-        String fieldOneVal = "123";
-        int fieldTwoVal = 123;
-        int key = 0;
-
-        cache.put(key, new TestBinary(fieldOneVal, fieldTwoVal));
-
-        IgniteCache<Integer, BinaryObject> prj = grid(0).cache(null).withKeepBinary();
-
-        BinaryObject cacheVal = prj.get(key);
-
-        assertEquals(fieldOneVal, cacheVal.field("fieldOne"));
-        assertEquals(new Integer(fieldTwoVal), cacheVal.field("fieldTwo"));
-
-        List<?> row = F.first(prj.query(new SqlFieldsQuery("select _val from " +
-            "TestBinary where _key = ?").setArgs(key)).getAll());
-
-        assertEquals(1, row.size());
-
-        BinaryObject qryVal = (BinaryObject)row.get(0);
-
-        assertEquals(fieldOneVal, qryVal.field("fieldOne"));
-        assertEquals(new Integer(fieldTwoVal), qryVal.field("fieldTwo"));
-        assertSame(cacheVal, qryVal);
-    }
-
-    /**
-     * Test binary object.
-     */
-    private static class TestBinary {
-        /** */
-        private String fieldOne;
-
-        /** */
-        private int fieldTwo;
-
-        /**
-         *
-         */
-        private TestBinary() {
-            // No-op.
-        }
-
-        /**
-         * @param fieldOne Field one.
-         * @param fieldTwo Field two.
-         */
-        private TestBinary(String fieldOne, int fieldTwo) {
-            this.fieldOne = fieldOne;
-            this.fieldTwo = fieldTwo;
-        }
-
-        /**
-         * @return Field one.
-         */
-        public String fieldOne() {
-            return fieldOne;
-        }
-
-        /**
-         * @return Field two.
-         */
-        public int fieldTwo() {
-            return fieldTwo;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest.java
deleted file mode 100644
index 459d0ee..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.binary.distributed.dht;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.internal.processors.cache.binary.GridBinaryDuplicateIndexObjectsAbstractSelfTest;
-
-/**
- * Test PARTITIONED ATOMIC.
- */
-public class GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest extends
-    GridBinaryDuplicateIndexObjectsAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override public CacheAtomicityMode atomicityMode() {
-        return CacheAtomicityMode.ATOMIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override public CacheMode cacheMode() {
-        return CacheMode.PARTITIONED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest.java
deleted file mode 100644
index e319fe4..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.binary.distributed.dht;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.internal.processors.cache.binary.GridBinaryDuplicateIndexObjectsAbstractSelfTest;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-
-/**
- * Test PARTITIONED and TRANSACTIONAL.
- */
-public class GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest extends
-    GridBinaryDuplicateIndexObjectsAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override public CacheAtomicityMode atomicityMode() {
-        return TRANSACTIONAL;
-    }
-
-    /** {@inheritDoc} */
-    @Override public CacheMode cacheMode() {
-        return PARTITIONED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java
index d205065..2b2e9de 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
+import java.util.Collections;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
@@ -29,8 +30,9 @@ import org.apache.ignite.binary.Binarylizable;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheRebalanceMode;
-import org.apache.ignite.cache.CacheTypeMetadata;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.cache.QueryEntity;
+import org.apache.ignite.cache.QueryIndex;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.cache.query.SqlQuery;
 import org.apache.ignite.configuration.BinaryConfiguration;
@@ -52,7 +54,6 @@ import java.io.ObjectOutput;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
@@ -114,15 +115,15 @@ public class BinarySerializationQuerySelfTest extends GridCommonAbstractTest {
         cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
         cacheCfg.setRebalanceMode(CacheRebalanceMode.SYNC);
 
-        List<CacheTypeMetadata> metas = new ArrayList<>();
+        List<QueryEntity> queryEntities = new ArrayList<>();
 
-        metas.add(metaForClass(EntityPlain.class));
-        metas.add(metaForClass(EntitySerializable.class));
-        metas.add(metaForClass(EntityExternalizable.class));
-        metas.add(metaForClass(EntityBinarylizable.class));
-        metas.add(metaForClass(EntityWriteReadObject.class));
+        queryEntities.add(entityForClass(EntityPlain.class));
+        queryEntities.add(entityForClass(EntitySerializable.class));
+        queryEntities.add(entityForClass(EntityExternalizable.class));
+        queryEntities.add(entityForClass(EntityBinarylizable.class));
+        queryEntities.add(entityForClass(EntityWriteReadObject.class));
 
-        cacheCfg.setTypeMetadata(metas);
+        cacheCfg.setQueryEntities(queryEntities);
 
         cfg.setCacheConfiguration(cacheCfg);
 
@@ -137,14 +138,13 @@ public class BinarySerializationQuerySelfTest extends GridCommonAbstractTest {
      * @param cls Class.
      * @return Type metadata.
      */
-    private static CacheTypeMetadata metaForClass(Class cls) {
-        CacheTypeMetadata meta = new CacheTypeMetadata();
+    private static QueryEntity entityForClass(Class cls) {
+        QueryEntity entity = new QueryEntity(Integer.class.getName(), cls.getName());
 
-        meta.setKeyType(Integer.class);
-        meta.setValueType(cls);
-        meta.setAscendingFields(Collections.<String, Class<?>>singletonMap("val", Integer.class));
+        entity.addQueryField("val", Integer.class.getName(), null);
+        entity.setIndexes(Collections.singletonList(new QueryIndex("val", true)));
 
-        return meta;
+        return entity;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridBinaryDuplicateIndexObjectsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridBinaryDuplicateIndexObjectsAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridBinaryDuplicateIndexObjectsAbstractSelfTest.java
new file mode 100644
index 0000000..e257378
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridBinaryDuplicateIndexObjectsAbstractSelfTest.java
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.QueryEntity;
+import org.apache.ignite.cache.QueryIndex;
+import org.apache.ignite.cache.query.SqlFieldsQuery;
+import org.apache.ignite.configuration.BinaryConfiguration;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.binary.BinaryObject;
+
+/**
+ * Tests that binary object is the same in cache entry and in index.
+ */
+public abstract class GridBinaryDuplicateIndexObjectsAbstractSelfTest extends GridCacheAbstractSelfTest {
+    /** {@inheritDoc} */
+    @Override protected int gridCount() {
+        return 1;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+
+        BinaryConfiguration bCfg = new BinaryConfiguration();
+
+        bCfg.setClassNames(Collections.singletonList(TestBinary.class.getName()));
+
+        cfg.setBinaryConfiguration(bCfg);
+
+        cfg.setMarshaller(new BinaryMarshaller());
+
+        return cfg;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
+        CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
+
+        ccfg.setCopyOnRead(false);
+
+        QueryEntity queryEntity = new QueryEntity(Integer.class.getName(), TestBinary.class.getName());
+
+        queryEntity.addQueryField("fieldOne", String.class.getName(), null);
+        queryEntity.addQueryField("fieldTwo", Integer.class.getName(), null);
+
+        queryEntity.setIndexes(Arrays.asList(
+            new QueryIndex("fieldOne", true),
+            new QueryIndex("fieldTwo", true)));
+
+        ccfg.setQueryEntities(Collections.singletonList(queryEntity));
+
+        return ccfg;
+    }
+
+    /** {@inheritDoc} */
+    @Override public abstract CacheAtomicityMode atomicityMode();
+
+    /** {@inheritDoc} */
+    @Override public abstract CacheMode cacheMode();
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testIndexReferences() throws Exception {
+        IgniteCache<Integer, TestBinary> cache = grid(0).cache(null);
+
+        String fieldOneVal = "123";
+        int fieldTwoVal = 123;
+        int key = 0;
+
+        cache.put(key, new TestBinary(fieldOneVal, fieldTwoVal));
+
+        IgniteCache<Integer, BinaryObject> prj = grid(0).cache(null).withKeepBinary();
+
+        BinaryObject cacheVal = prj.get(key);
+
+        assertEquals(fieldOneVal, cacheVal.field("fieldOne"));
+        assertEquals(new Integer(fieldTwoVal), cacheVal.field("fieldTwo"));
+
+        List<?> row = F.first(prj.query(new SqlFieldsQuery("select _val from " +
+            "TestBinary where _key = ?").setArgs(key)).getAll());
+
+        assertEquals(1, row.size());
+
+        BinaryObject qryVal = (BinaryObject)row.get(0);
+
+        assertEquals(fieldOneVal, qryVal.field("fieldOne"));
+        assertEquals(new Integer(fieldTwoVal), qryVal.field("fieldTwo"));
+        assertSame(cacheVal, qryVal);
+    }
+
+    /**
+     * Test binary object.
+     */
+    private static class TestBinary {
+        /** */
+        private String fieldOne;
+
+        /** */
+        private int fieldTwo;
+
+        /**
+         *
+         */
+        private TestBinary() {
+            // No-op.
+        }
+
+        /**
+         * @param fieldOne Field one.
+         * @param fieldTwo Field two.
+         */
+        private TestBinary(String fieldOne, int fieldTwo) {
+            this.fieldOne = fieldOne;
+            this.fieldTwo = fieldTwo;
+        }
+
+        /**
+         * @return Field one.
+         */
+        public String fieldOne() {
+            return fieldOne;
+        }
+
+        /**
+         * @return Field two.
+         */
+        public int fieldTwo() {
+            return fieldTwo;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectCacheTypeMetadataTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectCacheTypeMetadataTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectCacheTypeMetadataTest.java
deleted file mode 100644
index 9695ffb..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectCacheTypeMetadataTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.ignite.cache.CacheTypeMetadata;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.processors.query.QueryUtils;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-/**
- * A test for {@link CacheTypeMetadata} initialization with incorrect query field name
- */
-public class IncorrectCacheTypeMetadataTest extends GridCommonAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(gridName);
-
-        CacheConfiguration dfltCacheCfg = defaultCacheConfiguration();
-
-        CacheTypeMetadata cacheTypeMetadata = new CacheTypeMetadata();
-
-        Map<String, Class<?>> queryFieldsMap = new HashMap<>();
-
-        queryFieldsMap.put("exceptionOid", Object.class);
-
-        cacheTypeMetadata.setQueryFields(queryFieldsMap);
-        cacheTypeMetadata.setValueType(Object.class);
-
-        dfltCacheCfg.setTypeMetadata(Collections.singleton(cacheTypeMetadata));
-
-        cfg.setCacheConfiguration(dfltCacheCfg);
-
-        return cfg;
-    }
-
-    /**
-     * Grid must be stopped with property initialization exception.
-     *
-     * @throws Exception If failed.
-     */
-    public void testIncorrectQueryField() throws Exception {
-        try {
-            startGrid();
-        }
-        catch (Exception exception) {
-            if (!exception.getMessage().contains(
-                QueryUtils.propertyInitializationExceptionMessage(
-                    Object.class, Object.class, "exceptionOid", Object.class))) {
-                fail("property initialization exception must be thrown, but got " + exception.getMessage());
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java
index 9bdadc6..38a02e9 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java
@@ -27,6 +27,9 @@ import org.apache.ignite.internal.processors.query.QueryUtils;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
+/**
+ * A test for {@link QueryEntity} initialization with incorrect query field name
+ */
 public class IncorrectQueryEntityTest extends GridCommonAbstractTest {
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest.java
new file mode 100644
index 0000000..d36b794
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.internal.processors.cache.GridBinaryDuplicateIndexObjectsAbstractSelfTest;
+
+/**
+ * Test PARTITIONED ATOMIC.
+ */
+public class GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest extends
+    GridBinaryDuplicateIndexObjectsAbstractSelfTest {
+    /** {@inheritDoc} */
+    @Override public CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.ATOMIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override public CacheMode cacheMode() {
+        return CacheMode.PARTITIONED;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest.java
new file mode 100644
index 0000000..529b556
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.distributed;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.internal.processors.cache.GridBinaryDuplicateIndexObjectsAbstractSelfTest;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+
+/**
+ * Test PARTITIONED and TRANSACTIONAL.
+ */
+public class GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest extends
+    GridBinaryDuplicateIndexObjectsAbstractSelfTest {
+    /** {@inheritDoc} */
+    @Override public CacheAtomicityMode atomicityMode() {
+        return TRANSACTIONAL;
+    }
+
+    /** {@inheritDoc} */
+    @Override public CacheMode cacheMode() {
+        return PARTITIONED;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
index 3cb603c..e957f0f 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
@@ -22,8 +22,8 @@ import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.internal.processors.cache.BinarySerializationQuerySelfTest;
 import org.apache.ignite.internal.processors.cache.BinarySerializationQueryWithReflectiveSerializerSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheBinaryObjectsScanSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest;
 import org.apache.ignite.testframework.config.GridTestProperties;
 
 /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index 5b74de7..24edd44 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -68,7 +68,6 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheQueryIndexSelfTest
 import org.apache.ignite.internal.processors.cache.IgniteCacheQueryLoadSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheUpdateSqlQuerySelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCrossCachesJoinsQueryTest;
-import org.apache.ignite.internal.processors.cache.IncorrectCacheTypeMetadataTest;
 import org.apache.ignite.internal.processors.cache.IncorrectQueryEntityTest;
 import org.apache.ignite.internal.processors.cache.QueryEntityCaseMismatchTest;
 import org.apache.ignite.internal.processors.cache.SqlFieldsQuerySelfTest;
@@ -134,7 +133,6 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
 
         // Config.
         suite.addTestSuite(IgniteCacheDuplicateEntityConfigurationSelfTest.class);
-        suite.addTestSuite(IncorrectCacheTypeMetadataTest.class);
         suite.addTestSuite(IncorrectQueryEntityTest.class);
 
         // Queries tests.

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/platforms/cpp/core-test/config/cache-query.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/config/cache-query.xml b/modules/platforms/cpp/core-test/config/cache-query.xml
index 036c464..b565822 100644
--- a/modules/platforms/cpp/core-test/config/cache-query.xml
+++ b/modules/platforms/cpp/core-test/config/cache-query.xml
@@ -46,16 +46,11 @@
                         </bean>
                     </property>
                     
-                    <property name="typeMetadata">
+                    <property name="queryEntities">
                         <list>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+                            <bean class="org.apache.ignite.cache.QueryEntity">
                                 <property name="valueType" value="QueryPerson"/>
-                                <property name="ascendingFields">
-                                    <map>
-                                        <entry key="age" value="java.lang.Integer"/>
-                                    </map>
-                                </property>
-                                <property name="queryFields">
+                                <property name="fields">
                                     <map>
                                         <entry key="name" value="java.lang.String"/>
                                         <entry key="age" value="java.lang.Integer"/>
@@ -63,9 +58,23 @@
                                         <entry key="recordCreated" value="java.sql.Timestamp"/>
                                     </map>
                                 </property>
-                                <property name="textFields">
+                                <property name="indexes">
                                     <list>
-                                        <value>name</value>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="age" value="true"/>
+                                                </map>
+                                            </property>
+                                        </bean>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="indexType" value="FULLTEXT"/>
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="name" value="false"/>
+                                                </map>
+                                            </property>
+                                        </bean>
                                     </list>
                                 </property>
                             </bean>
@@ -84,12 +93,12 @@
                             <property name="partitions" value="256"/>
                         </bean>
                     </property>
-                    
-                    <property name="typeMetadata">
+
+                    <property name="queryEntities">
                         <list>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+                            <bean class="org.apache.ignite.cache.QueryEntity">
                                 <property name="valueType" value="QueryRelation"/>
-                                <property name="queryFields">
+                                <property name="fields">
                                     <map>
                                         <entry key="personId" value="java.lang.Integer"/>
                                         <entry key="someVal" value="java.lang.Integer"/>

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml
index 72d9d46..5fc973b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml
@@ -38,23 +38,33 @@
                     <property name="writeSynchronizationMode" value="FULL_SYNC"/>
                     <property name="backups" value="0"/>
                     <property name="startSize" value="10"/>
-                    <property name="typeMetadata">
+
+                    <property name="queryEntities">
                         <list>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+                            <bean class="org.apache.ignite.cache.QueryEntity">
                                 <property name="valueType" value="BinarizableEntry"/>
-                                <property name="ascendingFields">
-                                    <map>
-                                        <entry key="val" value="java.lang.Integer"/>
-                                    </map>
-                                </property>
-                                <property name="queryFields">
+                                <property name="fields">
                                     <map>
                                         <entry key="val" value="java.lang.Integer"/>
                                     </map>
                                 </property>
-                                <property name="textFields">
+                                <property name="indexes">
                                     <list>
-                                        <value>val</value>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="val" value="true"/>
+                                                </map>
+                                            </property>
+                                        </bean>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="indexType" value="FULLTEXT"/>
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="val" value="false"/>
+                                                </map>
+                                            </property>
+                                        </bean>
                                     </list>
                                 </property>
                             </bean>
@@ -68,23 +78,33 @@
                     <property name="writeSynchronizationMode" value="FULL_SYNC"/>
                     <property name="backups" value="1"/>
                     <property name="startSize" value="10"/>
-                    <property name="typeMetadata">
+
+                    <property name="queryEntities">
                         <list>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+                            <bean class="org.apache.ignite.cache.QueryEntity">
                                 <property name="valueType" value="BinarizableEntry"/>
-                                <property name="ascendingFields">
-                                    <map>
-                                        <entry key="val" value="java.lang.Integer"/>
-                                    </map>
-                                </property>
-                                <property name="queryFields">
+                                <property name="fields">
                                     <map>
                                         <entry key="val" value="java.lang.Integer"/>
                                     </map>
                                 </property>
-                                <property name="textFields">
+                                <property name="indexes">
                                     <list>
-                                        <value>val</value>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="val" value="true"/>
+                                                </map>
+                                            </property>
+                                        </bean>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="indexType" value="FULLTEXT"/>
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="val" value="false"/>
+                                                </map>
+                                            </property>
+                                        </bean>
                                     </list>
                                 </property>
                             </bean>
@@ -98,23 +118,32 @@
                     <property name="writeSynchronizationMode" value="FULL_SYNC"/>
                     <property name="backups" value="0"/>
                     <property name="startSize" value="10"/>
-                    <property name="typeMetadata">
+                    <property name="queryEntities">
                         <list>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+                            <bean class="org.apache.ignite.cache.QueryEntity">
                                 <property name="valueType" value="BinarizableEntry"/>
-                                <property name="ascendingFields">
-                                    <map>
-                                        <entry key="val" value="java.lang.Integer"/>
-                                    </map>
-                                </property>
-                                <property name="queryFields">
+                                <property name="fields">
                                     <map>
                                         <entry key="val" value="java.lang.Integer"/>
                                     </map>
                                 </property>
-                                <property name="textFields">
+                                <property name="indexes">
                                     <list>
-                                        <value>val</value>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="val" value="true"/>
+                                                </map>
+                                            </property>
+                                        </bean>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="indexType" value="FULLTEXT"/>
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="val" value="false"/>
+                                                </map>
+                                            </property>
+                                        </bean>
                                     </list>
                                 </property>
                             </bean>
@@ -128,23 +157,32 @@
                     <property name="writeSynchronizationMode" value="FULL_SYNC"/>
                     <property name="backups" value="1"/>
                     <property name="startSize" value="10"/>
-                    <property name="typeMetadata">
+                    <property name="queryEntities">
                         <list>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+                            <bean class="org.apache.ignite.cache.QueryEntity">
                                 <property name="valueType" value="BinarizableEntry"/>
-                                <property name="ascendingFields">
-                                    <map>
-                                        <entry key="val" value="java.lang.Integer"/>
-                                    </map>
-                                </property>
-                                <property name="queryFields">
+                                <property name="fields">
                                     <map>
                                         <entry key="val" value="java.lang.Integer"/>
                                     </map>
                                 </property>
-                                <property name="textFields">
+                                <property name="indexes">
                                     <list>
-                                        <value>val</value>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="val" value="true"/>
+                                                </map>
+                                            </property>
+                                        </bean>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="indexType" value="FULLTEXT"/>
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="val" value="false"/>
+                                                </map>
+                                            </property>
+                                        </bean>
                                     </list>
                                 </property>
                             </bean>

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/schema-import/README.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/README.txt b/modules/schema-import/README.txt
index 31a8ff0..ba185b6 100644
--- a/modules/schema-import/README.txt
+++ b/modules/schema-import/README.txt
@@ -28,12 +28,12 @@ insert into PERSON(id, first_name, last_name, salary) values(6, 'Isaac', 'Newton
 
 The Ignite Schema Import utility generates the following artifacts:
  # Java POJO key and value classes (enter "org.apache.ignite.schema" package name before generation).
- # XML CacheTypeMetadata configuration.
+ # XML QueryEntities configuration.
  # Java configuration snippet (alternative to XML).
 
 After you exit from the wizard, you should:
  # Copy generated POJO java classes to you project source folder.
- # Copy XML declaration of CacheTypeMetadata to your Ignite XML configuration file under appropriate
+ # Copy XML declaration of QueryEntitres to your Ignite XML configuration file under appropriate
   CacheConfiguration root.
  # Setup your Ignite XML configuration file DataSource to your RDBMS system for CacheJdbcPojoStore.
  # Or paste Java snippet with cache configuration into your Ignite initialization logic.

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/spring/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index 6deb52e..275243f 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -42,6 +42,12 @@
         </dependency>
 
         <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-indexing</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-core</artifactId>
             <version>${spring.version}</version>

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
index fefcb69..3104b8e 100644
--- a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
@@ -19,9 +19,10 @@ package org.apache.ignite.spring;
 
 import java.net.URL;
 import java.util.Collection;
-import org.apache.ignite.cache.CacheTypeMetadata;
+import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.util.spring.IgniteSpringHelper;
+import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
@@ -40,7 +41,7 @@ public class IgniteExcludeInConfigurationTest extends GridCommonAbstractTest {
          IgniteSpringHelper spring = SPRING.create(false);
 
         Collection<IgniteConfiguration> cfgs = spring.loadConfigurations(cfgLocation, "fileSystemConfiguration",
-            "typeMetadata").get1();
+            "queryEntities").get1();
 
         assertNotNull(cfgs);
         assertEquals(1, cfgs.size());
@@ -48,7 +49,8 @@ public class IgniteExcludeInConfigurationTest extends GridCommonAbstractTest {
         IgniteConfiguration cfg = cfgs.iterator().next();
 
         assertEquals(1, cfg.getCacheConfiguration().length);
-        assertNull(cfg.getCacheConfiguration()[0].getTypeMetadata());
+
+        assertTrue(F.isEmpty(cfg.getCacheConfiguration()[0].getQueryEntities()));
 
         assertNull(cfg.getFileSystemConfiguration());
 
@@ -61,10 +63,10 @@ public class IgniteExcludeInConfigurationTest extends GridCommonAbstractTest {
 
         assertEquals(1, cfg.getCacheConfiguration().length);
 
-        Collection<CacheTypeMetadata> typeMetadatas = cfg.getCacheConfiguration()[0].getTypeMetadata();
+        Collection<QueryEntity> queryEntities = cfg.getCacheConfiguration()[0].getQueryEntities();
 
-        assertEquals(1, typeMetadatas.size());
-        assertNull(typeMetadatas.iterator().next().getKeyType());
+        assertEquals(1, queryEntities.size());
+        assertNull(queryEntities.iterator().next().getKeyType());
     }
 
     /** Spring should fail if bean class not exist in classpath. */

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml b/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
index 091b6ff..adc87a9 100644
--- a/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
@@ -51,18 +51,29 @@
             <list>
                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
                     <!-- Configure type metadata to enable queries. -->
-                    <property name="typeMetadata">
+                    <property name="queryEntities">
                         <list>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
+                            <bean class="org.apache.ignite.cache.QueryEntity">
                                 <property name="keyType" value="java.lang.Integer"/>
                                 <property name="valueType" value="Organization"/>
-                                <property name="ascendingFields">
+                                <property name="fields">
                                     <map>
                                         <entry key="name" value="java.lang.String"/>
                                     </map>
                                 </property>
+                                <property name="indexes">
+                                    <list>
+                                        <bean class="org.apache.ignite.cache.QueryIndex">
+                                            <property name="fields">
+                                                <map>
+                                                    <entry key="name" value="true"/>
+                                                </map>
+                                            </property>
+                                        </bean>
+                                    </list>
+                                </property>
                             </bean>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata2"/>
+                            <bean class="org.apache.ignite.cache.QueryEntity2"/>
                         </list>
                     </property>
                 </bean>

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/web-console/web-agent/README.txt
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/README.txt b/modules/web-console/web-agent/README.txt
index 81df1cb..c915871 100644
--- a/modules/web-console/web-agent/README.txt
+++ b/modules/web-console/web-agent/README.txt
@@ -7,7 +7,7 @@ Two main functions of Ignite Web Agent:
  1. Proxy between Ignite Web Console and Ignite Grid to execute SQL statements and collect metrics for monitoring.
    You may need to specify URI for connect to Ignite REST server via "-n" option.
 
- 2. Proxy between Ignite Web Console and user RDBMS to collect database metadata for later CacheTypeMetadata configuration.
+ 2. Proxy between Ignite Web Console and user RDBMS to collect database metadata for later indexed types configuration.
    You may need to copy JDBC driver into "./jdbc-drivers" subfolder or specify path via "-d" option.
 
 Usage example:

http://git-wip-us.apache.org/repos/asf/ignite/blob/1811ede4/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
index c85595d..437d309 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
@@ -49,7 +49,6 @@ import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
 import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.CacheTypeMetadata;
 import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.QueryIndex;
 import org.apache.ignite.cache.affinity.Affinity;
@@ -300,29 +299,29 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
                     }
                 }
 
-                if (configuration.getTypeMetadata() != null) {
-                    Collection<CacheTypeMetadata> entries = configuration.getTypeMetadata();
+                if (configuration.getQueryEntities() != null) {
+                    Collection<QueryEntity> entities = configuration.getQueryEntities();
 
-                    for (CacheTypeMetadata cacheTypeMetadata : entries) {
+                    for (QueryEntity entity : entities) {
                         try {
-                            if (cacheTypeMetadata.getKeyType() != null) {
-                                Class keyCls = Class.forName(cacheTypeMetadata.getKeyType());
+                            if (entity.getKeyType() != null) {
+                                Class keyCls = Class.forName(entity.getKeyType());
 
                                 if (ModelUtil.canCreateInstance(keyCls))
                                     keys.add(keyCls);
                                 else
                                     throw new IgniteException("Class is unknown for the load test. Make sure you " +
-                                        "specified its full name [clsName=" + cacheTypeMetadata.getKeyType() + ']');
+                                        "specified its full name [clsName=" + entity.getKeyType() + ']');
                             }
 
-                            if (cacheTypeMetadata.getValueType() != null) {
-                                Class valCls = Class.forName(cacheTypeMetadata.getValueType());
+                            if (entity.getValueType() != null) {
+                                Class valCls = Class.forName(entity.getValueType());
 
                                 if (ModelUtil.canCreateInstance(valCls))
                                     values.add(valCls);
                                 else
                                     throw new IgniteException("Class is unknown for the load test. Make sure you " +
-                                        "specified its full name [clsName=" + cacheTypeMetadata.getKeyType() + ']');
+                                        "specified its full name [clsName=" + entity.getKeyType() + ']');
                             }
                         }
                         catch (ClassNotFoundException e) {
@@ -443,8 +442,7 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
      */
     private boolean isClassDefinedInConfig(CacheConfiguration configuration) {
         return (configuration.getIndexedTypes() != null && configuration.getIndexedTypes().length > 0)
-            || !CollectionUtils.isEmpty(configuration.getQueryEntities())
-            || !CollectionUtils.isEmpty(configuration.getTypeMetadata());
+            || !CollectionUtils.isEmpty(configuration.getQueryEntities());
     }
 
     /**
@@ -978,7 +976,8 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
     }
 
     /**
-     * @return SQL string.
+     * @param sql Base SQL.
+     * @return Randomized SQL string.
      */
     private String randomizeSql(String sql) {
         int cnt = StringUtils.countOccurrencesOf(sql, "%s");


[48/50] [abbrv] ignite git commit: IGNITE-1192: finished implementation, working on the test

Posted by dm...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/app/helpers/jade/mixins.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/mixins.pug b/modules/web-console/frontend/app/helpers/jade/mixins.pug
index bf49fa9..4b98d42 100644
--- a/modules/web-console/frontend/app/helpers/jade/mixins.pug
+++ b/modules/web-console/frontend/app/helpers/jade/mixins.pug
@@ -17,15 +17,15 @@
 include ./form
 include ../../primitives/tooltip/index
 
-//- Mixin for advanced options toggle.
-mixin advanced-options-toggle(click, cond, showMessage, hideMessage)
-    .advanced-options
+//- Mixin for advanced option toggle.
+mixin advanced-option-toggle(click, cond, showMessage, hideMessage)
+    .advanced-option
         i.fa(ng-click=`${click}` ng-class=`${cond} ? 'fa-chevron-circle-down' : 'fa-chevron-circle-right'`)
         a(ng-click=click) {{ #{cond} ? '#{hideMessage}' : '#{showMessage}' }}
 
-//- Mixin for advanced options toggle with default settings.
-mixin advanced-options-toggle-default
-    +advanced-options-toggle('toggleExpanded()', 'ui.expanded', 'Show advanced settings...', 'Hide advanced settings...')
+//- Mixin for advanced option toggle with default settings.
+mixin advanced-option-toggle-default
+    +advanced-option-toggle('toggleExpanded()', 'ui.expanded', 'Show advanced settings...', 'Hide advanced settings...')
 
 //- Mixin for main table on screen with list of items.
 mixin main-table(title, rows, focusId, click, rowTemplate, searchField)
@@ -143,11 +143,11 @@ mixin java-class(lbl, model, name, enabled, required, tip, validationActive)
         if  block
             block
 
-//- Mixin for text field with enabled condition with options.
-mixin java-class-typeahead(lbl, model, name, options, enabled, required, placeholder, tip, validationActive)
+//- Mixin for text field with enabled condition with option.
+mixin java-class-typeahead(lbl, model, name, option, enabled, required, placeholder, tip, validationActive)
     -var errLbl = lbl.substring(0, lbl.length - 1)
 
-    +form-field-datalist(lbl, model, name, enabledToDisabled(enabled), required, placeholder, options, tip)(
+    +form-field-datalist(lbl, model, name, enabledToDisabled(enabled), required, placeholder, option, tip)(
         data-java-identifier='true'
         data-java-package-specified='allow-built-in'
         data-java-keywords='true'
@@ -204,9 +204,9 @@ mixin password(lbl, model, name, required, placeholder, tip)
         if  block
             block
 
-//- Mixin for text field with enabled condition with options.
-mixin text-options(lbl, model, name, options, enabled, required, placeholder, tip)
-    +form-field-datalist(lbl, model, name, enabledToDisabled(enabled), required, placeholder, options, tip)
+//- Mixin for text field with enabled condition with option.
+mixin text-option(lbl, model, name, option, enabled, required, placeholder, tip)
+    +form-field-datalist(lbl, model, name, enabledToDisabled(enabled), required, placeholder, option, tip)
 
 //- Mixin for required numeric field.
 mixin number-required(lbl, model, name, enabled, required, placeholder, min, tip)
@@ -225,42 +225,42 @@ mixin number(lbl, model, name, enabled, placeholder, min, tip)
     +ignite-form-field-number(lbl, model, name, enabledToDisabled(enabled), false, placeholder, min, false, false, tip)
 
 //- Mixin for required dropdown field.
-mixin dropdown-required-empty(lbl, model, name, enabled, required, placeholder, placeholderEmpty, options, tip)
-    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, placeholderEmpty, options, tip)
+mixin dropdown-required-empty(lbl, model, name, enabled, required, placeholder, placeholderEmpty, option, tip)
+    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, placeholderEmpty, option, tip)
         if  block
             block
 
 //- Mixin for required dropdown field with autofocus.
-mixin dropdown-required-empty-autofocus(lbl, model, name, enabled, required, placeholder, placeholderEmpty, options, tip)
-    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, placeholderEmpty, options, tip)(
+mixin dropdown-required-empty-autofocus(lbl, model, name, enabled, required, placeholder, placeholderEmpty, option, tip)
+    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, placeholderEmpty, option, tip)(
         data-ignite-form-field-input-autofocus='true'
     )
         if  block
             block
 
 //- Mixin for required dropdown field.
-mixin dropdown-required(lbl, model, name, enabled, required, placeholder, options, tip)
-    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, '', options, tip)
+mixin dropdown-required(lbl, model, name, enabled, required, placeholder, option, tip)
+    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, '', option, tip)
         if  block
             block
 
 //- Mixin for required dropdown field with autofocus.
-mixin dropdown-required-autofocus(lbl, model, name, enabled, required, placeholder, options, tip)
-    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, '', options, tip)(
+mixin dropdown-required-autofocus(lbl, model, name, enabled, required, placeholder, option, tip)
+    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, '', option, tip)(
         data-ignite-form-field-input-autofocus='true'
     )
         if  block
             block
 
 //- Mixin for dropdown field.
-mixin dropdown(lbl, model, name, enabled, placeholder, options, tip)
-    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), false, false, placeholder, '', options, tip)
+mixin dropdown(lbl, model, name, enabled, placeholder, option, tip)
+    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), false, false, placeholder, '', option, tip)
         if  block
             block
 
 //- Mixin for dropdown-multiple field.
-mixin dropdown-multiple(lbl, model, name, enabled, placeholder, placeholderEmpty, options, tip)
-    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), false, true, placeholder, placeholderEmpty, options, tip)
+mixin dropdown-multiple(lbl, model, name, enabled, placeholder, placeholderEmpty, option, tip)
+    +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), false, true, placeholder, placeholderEmpty, option, tip)
         if  block
             block
 
@@ -562,7 +562,7 @@ mixin table-pair-edit(tbl, prefix, keyPlaceholder, valPlaceholder, keyJavaBuiltI
         .fieldSep !{divider}
         .input-tip
             if keyJavaBuiltInTypes
-                input.form-control(id=keyFocusId ignite-on-enter-focus-move=valFocusId type='text' ng-model=keyModel placeholder=keyPlaceholder bs-typeahead container='body' ignite-retain-selection data-min-length='1' bs-options='javaClass for javaClass in javaBuiltInClasses' ignite-on-escape='tableReset(false)')
+                input.form-control(id=keyFocusId ignite-on-enter-focus-move=valFocusId type='text' ng-model=keyModel placeholder=keyPlaceholder bs-typeahead container='body' ignite-retain-selection data-min-length='1' bs-option='javaClass for javaClass in javaBuiltInClasses' ignite-on-escape='tableReset(false)')
             else
                 input.form-control(id=keyFocusId ignite-on-enter-focus-move=valFocusId type='text' ng-model=keyModel placeholder=keyPlaceholder ignite-on-escape='tableReset(false)')
     .col-xs-6.col-sm-6.col-md-6
@@ -573,7 +573,7 @@ mixin table-pair-edit(tbl, prefix, keyPlaceholder, valPlaceholder, keyJavaBuiltI
         +btn-save(btnVisible, btnSave)
         .input-tip
             if valueJavaBuiltInTypes
-                input.form-control(id=valFocusId type='text' ng-model=valModel placeholder=valPlaceholder bs-typeahead container='body' ignite-retain-selection data-min-length='1' bs-options='javaClass for javaClass in javaBuiltInClasses' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
+                input.form-control(id=valFocusId type='text' ng-model=valModel placeholder=valPlaceholder bs-typeahead container='body' ignite-retain-selection data-min-length='1' bs-option='javaClass for javaClass in javaBuiltInClasses' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
             else
                 input.form-control(id=valFocusId type='text' ng-model=valModel placeholder=valPlaceholder ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/app/modules/nodes/nodes-dialog.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/nodes/nodes-dialog.tpl.pug b/modules/web-console/frontend/app/modules/nodes/nodes-dialog.tpl.pug
index d9ea68c..1ae7361 100644
--- a/modules/web-console/frontend/app/modules/nodes/nodes-dialog.tpl.pug
+++ b/modules/web-console/frontend/app/modules/nodes/nodes-dialog.tpl.pug
@@ -21,7 +21,7 @@
                 button.close(ng-click='$cancel()' aria-hidden='true') &times;
                 h4.modal-title Select Node
             .modal-body.modal-body-with-scroll
-                p Choose node to execute query for cache: #[strong {{ $ctrl.options.target }}]
+                p Choose node to execute query for cache: #[strong {{ $ctrl.option.target }}]
 
                 .panel.panel-default.nodes-grid
                     .panel-heading

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/app/modules/states/configuration/caches/node-filter.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/caches/node-filter.pug b/modules/web-console/frontend/app/modules/states/configuration/caches/node-filter.pug
index 6715dcd..0974337 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/caches/node-filter.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/caches/node-filter.pug
@@ -46,7 +46,7 @@ include /app/helpers/jade/mixins
                         -var igfsNodeFilter = `${nodeFilter}.IGFS`
                         -var required = `${nodeFilterKind} === 'IGFS'`
 
-                        //(lbl, model, name, enabled, required, placeholder, options, tip)
+                        //(lbl, model, name, enabled, required, placeholder, option, tip)
                         +dropdown-required-empty('IGFS:', `${igfsNodeFilter}.igfs`, '"igfsNodeFilter"', 'true', required,
                             'Choose IGFS', 'No IGFS configured', 'igfss', 'Select IGFS to filter nodes')
                     div(ng-show=`${nodeFilterKind} === 'Custom'`)

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.pug
index dcb3b21..d9c483a 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/ssl.pug
@@ -36,7 +36,7 @@ include /app/helpers/jade/mixins
                 .settings-row
                     +checkbox('Enabled', enabled, '"sslEnabled"', 'Flag indicating whether to configure SSL configuration')
                 .settings-row
-                    +text-options('Algorithm to create a key manager:', `${model}.keyAlgorithm`, '"keyAlgorithm"', '["SumX509", "X509"]', enabled, 'false', 'SumX509',
+                    +text-option('Algorithm to create a key manager:', `${model}.keyAlgorithm`, '"keyAlgorithm"', '["SumX509", "X509"]', enabled, 'false', 'SumX509',
                         'Sets key manager algorithm that will be used to create a key manager<br/>\
                         Notice that in most cased default value suites well, however, on Android platform this value need to be set to X509')
                 .settings-row
@@ -44,10 +44,10 @@ include /app/helpers/jade/mixins
                         'Path to the key store file<br/>\
                         This is a mandatory parameter since ssl context could not be initialized without key manager')
                 .settings-row
-                    +text-options('Key store type:', `${model}.keyStoreType`, '"keyStoreType"', '["JKS", "PCKS11", "PCKS12"]', enabled, 'false', 'JKS',
+                    +text-option('Key store type:', `${model}.keyStoreType`, '"keyStoreType"', '["JKS", "PCKS11", "PCKS12"]', enabled, 'false', 'JKS',
                         'Key store type used in context initialization')
                 .settings-row
-                    +text-options('Protocol:', `${model}.protocol`, '"protocol"', '["TSL", "SSL"]', enabled, 'false', 'TSL', 'Protocol for secure transport')
+                    +text-option('Protocol:', `${model}.protocol`, '"protocol"', '["TSL", "SSL"]', enabled, 'false', 'TSL', 'Protocol for secure transport')
                 .settings-row
                     -var form = 'trustManagers'
 
@@ -105,6 +105,6 @@ include /app/helpers/jade/mixins
                 .settings-row(ng-show=`!${trust}.length`)
                     +text-enabled('Trust store file:', `${model}.trustStoreFilePath`, '"trustStoreFilePath"', enabled, 'false', 'Path to the trust store file', 'Path to the trust store file')
                 .settings-row(ng-show=`!${trust}.length`)
-                    +text-options('Trust store type:', `${model}.trustStoreType`, '"trustStoreType"', '["JKS", "PCKS11", "PCKS12"]', enabled, 'false', 'JKS', 'Trust store type used in context initialization')
+                    +text-option('Trust store type:', `${model}.trustStoreType`, '"trustStoreType"', '["JKS", "PCKS11", "PCKS12"]', enabled, 'false', 'JKS', 'Trust store type used in context initialization')
             .col-sm-6
                 +preview-xml-java(cluster, 'clusterSsl')

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/app/modules/states/configuration/domains/query.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/domains/query.pug b/modules/web-console/frontend/app/modules/states/configuration/domains/query.pug
index a057f59..d32ac63 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/domains/query.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/domains/query.pug
@@ -41,15 +41,15 @@ mixin table-index-item-edit(prefix, index, sortAvailable, idAddition)
         .col-xs-8.col-sm-8.col-md-8
             label.fieldSep /
             .input-tip
-                button.select-toggle.form-control(id=`{{::'${fieldName}' + ${idAddition}}}` ignite-on-enter-focus-move=`{{::'${direction}S' + ${idAddition}}}` ng-model=fieldNameModel placeholder=`{{fields('${prefix}', ${fieldNameModel}).length > 0 ? 'Choose field' : 'No fields configured'}}` bs-select bs-options=`item.value as item.label for item in fields('${prefix}', ${fieldNameModel})` ng-disabled=`fields('${prefix}', ${fieldNameModel}).length === 0` ignite-on-escape='tableReset(false)' tabindex='0')
+                button.select-toggle.form-control(id=`{{::'${fieldName}' + ${idAddition}}}` ignite-on-enter-focus-move=`{{::'${direction}S' + ${idAddition}}}` ng-model=fieldNameModel placeholder=`{{fields('${prefix}', ${fieldNameModel}).length > 0 ? 'Choose field' : 'No fields configured'}}` bs-select bs-option=`item.value as item.label for item in fields('${prefix}', ${fieldNameModel})` ng-disabled=`fields('${prefix}', ${fieldNameModel}).length === 0` ignite-on-escape='tableReset(false)' tabindex='0')
         .col-xs-4.col-sm-4.col-md-4
             +btn-save(btnVisible, btnSave)
             .input-tip
-                button.select-toggle.form-control(id=`{{::'${direction}' + ${idAddition}}}` ng-model=directionModel bs-select bs-options='item.value as item.label for item in {{sortDirections}}' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)' tabindex='0')
+                button.select-toggle.form-control(id=`{{::'${direction}' + ${idAddition}}}` ng-model=directionModel bs-select bs-option='item.value as item.label for item in {{sortDirections}}' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)' tabindex='0')
     .col-xs-12(ng-if=`!(${sortAvailable})`)
         +btn-save(btnVisible, btnSave)
         .input-tip
-            button.select-toggle.form-control(id=`{{::'${fieldName}' + ${idAddition}}}` ng-model=fieldNameModel placeholder=`{{fields('${prefix}', ${fieldNameModel}).length > 0 ? 'Choose index field' : 'No fields configured'}}` bs-select bs-options=`item.value as item.label for item in fields('${prefix}', ${fieldNameModel})` ng-disabled=`fields('${prefix}', ${fieldNameModel}).length === 0` ignite-on-escape='tableReset(false)' tabindex='0')
+            button.select-toggle.form-control(id=`{{::'${fieldName}' + ${idAddition}}}` ng-model=fieldNameModel placeholder=`{{fields('${prefix}', ${fieldNameModel}).length > 0 ? 'Choose index field' : 'No fields configured'}}` bs-select bs-option=`item.value as item.label for item in fields('${prefix}', ${fieldNameModel})` ng-disabled=`fields('${prefix}', ${fieldNameModel}).length === 0` ignite-on-escape='tableReset(false)' tabindex='0')
 
 .panel.panel-default(ng-form=form novalidate)
     .panel-heading(bs-collapse-toggle)
@@ -141,7 +141,7 @@ mixin table-index-item-edit(prefix, index, sortAvailable, idAddition)
                                                     .col-sm-5
                                                         +btn-save('tableIndexSaveVisible(indexesTbl, $index)', 'tableIndexSave(indexesTbl, $index)')
                                                         .input-tip
-                                                            button.select-toggle.form-control(id='curIndexType{{$index}}' bs-select ng-model='indexesTbl.curIndexType' data-placeholder='Select index type' bs-options='item.value as item.label for item in indexType' tabindex='0' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
+                                                            button.select-toggle.form-control(id='curIndexType{{$index}}' bs-select ng-model='indexesTbl.curIndexType' data-placeholder='Select index type' bs-option='item.value as item.label for item in indexType' tabindex='0' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
                                                 .margin-left-dflt
                                                     table.links-edit-sub(st-table='item.fields' ng-init='itemIndex = $index')
                                                         tbody
@@ -167,6 +167,6 @@ mixin table-index-item-edit(prefix, index, sortAvailable, idAddition)
                                                 .col-sm-5
                                                     +btn-save('tableIndexSaveVisible(indexesTbl, -1)', 'tableIndexSave(indexesTbl, -1)')
                                                     .input-tip
-                                                        button#newIndexType.select-toggle.form-control(bs-select ng-model='indexesTbl.newIndexType' data-placeholder='Select index type' bs-options='item.value as item.label for item in indexType' tabindex='0' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
+                                                        button#newIndexType.select-toggle.form-control(bs-select ng-model='indexesTbl.newIndexType' data-placeholder='Select index type' bs-option='item.value as item.label for item in indexType' tabindex='0' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
             .col-sm-6
                 +preview-xml-java(model, 'domainModelQuery')

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/app/modules/states/configuration/domains/store.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/domains/store.pug b/modules/web-console/frontend/app/modules/states/configuration/domains/store.pug
index 4dee986..cb19078 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/domains/store.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/domains/store.pug
@@ -47,7 +47,7 @@ mixin table-db-field-edit(tbl, prefix, focusId, index)
     .col-xs-3.col-sm-3.col-md-3
         .fieldSep /
         .input-tip
-            button.select-toggle.form-control(id=databaseTypeId ignite-on-enter-focus-move=javaNameId ng-model=databaseTypeModel data-placeholder='DB type' ng-class=`{placeholder: !${databaseTypeModel}}` bs-select bs-options='item.value as item.label for item in {{supportedJdbcTypes}}' ignite-on-escape='tableReset(false)' tabindex='0')
+            button.select-toggle.form-control(id=databaseTypeId ignite-on-enter-focus-move=javaNameId ng-model=databaseTypeModel data-placeholder='DB type' ng-class=`{placeholder: !${databaseTypeModel}}` bs-select bs-option='item.value as item.label for item in {{supportedJdbcTypes}}' ignite-on-escape='tableReset(false)' tabindex='0')
     .col-xs-3.col-sm-3.col-md-3
         .fieldSep /
         .input-tip
@@ -59,7 +59,7 @@ mixin table-db-field-edit(tbl, prefix, focusId, index)
 
         +btn-save(btnVisible, btnSave)
         .input-tip
-            button.select-toggle.form-control(id=javaTypeId ng-model=javaTypeModel data-placeholder='Java type' ng-class=`{placeholder: !${javaTypeModel}}` bs-select bs-options='item.value as item.label for item in {{supportedJavaTypes}}' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)' tabindex='0')
+            button.select-toggle.form-control(id=javaTypeId ng-model=javaTypeModel data-placeholder='Java type' ng-class=`{placeholder: !${javaTypeModel}}` bs-select bs-option='item.value as item.label for item in {{supportedJavaTypes}}' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)' tabindex='0')
 
 .panel.panel-default(ng-form=form novalidate)
     .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/app/modules/states/configuration/igfs/misc.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/igfs/misc.pug b/modules/web-console/frontend/app/modules/states/configuration/igfs/misc.pug
index aa4b957..639eda6 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/igfs/misc.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/igfs/misc.pug
@@ -40,7 +40,7 @@ mixin table-igfs-path-mode-edit(prefix, focusId, index)
         -var btnVisibleAndSave = `${btnVisible} && ${btnSave}`
         +btn-save(btnVisible, btnSave)
         .input-tip
-            button.select-toggle.form-control(id=valFocusId bs-select ng-model=valModel data-placeholder='Mode' bs-options='item.value as item.label for item in igfsModes' tabindex='0' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
+            button.select-toggle.form-control(id=valFocusId bs-select ng-model=valModel data-placeholder='Mode' bs-option='item.value as item.label for item in igfsModes' tabindex='0' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
 
 .panel.panel-default(ng-form=form novalidate)
     .panel-heading(bs-collapse-toggle='' ng-click=`ui.loadPanel('${form}')`)

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/app/primitives/tooltip/index.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/primitives/tooltip/index.pug b/modules/web-console/frontend/app/primitives/tooltip/index.pug
index de1b116..ae10279 100644
--- a/modules/web-console/frontend/app/primitives/tooltip/index.pug
+++ b/modules/web-console/frontend/app/primitives/tooltip/index.pug
@@ -14,12 +14,12 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
-mixin tooltip(title, options)
+mixin tooltip(title, option)
     if title
         i.tipField.icon-help(
             bs-tooltip=''
 
             data-title=title
-            data-container=options && options.container || false
-            data-placement=options && options.placement || false
+            data-container=option && option.container || false
+            data-placement=option && option.placement || false
         )

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/public/stylesheets/style.scss b/modules/web-console/frontend/public/stylesheets/style.scss
index 8dbf123..4c118ae 100644
--- a/modules/web-console/frontend/public/stylesheets/style.scss
+++ b/modules/web-console/frontend/public/stylesheets/style.scss
@@ -1564,7 +1564,7 @@ th[st-sort] {
     margin-bottom: 20px;
 }
 
-.advanced-options {
+.advanced-option {
     @extend .section;
     margin-bottom: 20px;
 
@@ -1573,8 +1573,8 @@ th[st-sort] {
     }
 }
 
-.modal-advanced-options {
-    @extend .advanced-options;
+.modal-advanced-option {
+    @extend .advanced-option;
     margin-top: 10px;
     margin-bottom: 10px;
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/views/configuration/caches.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/caches.tpl.pug b/modules/web-console/frontend/views/configuration/caches.tpl.pug
index fca41a8..cfe6c6d 100644
--- a/modules/web-console/frontend/views/configuration/caches.tpl.pug
+++ b/modules/web-console/frontend/views/configuration/caches.tpl.pug
@@ -41,7 +41,7 @@ include /app/helpers/jade/mixins
                         include /app/modules/states/configuration/caches/query
                         include /app/modules/states/configuration/caches/store
 
-                        +advanced-options-toggle-default
+                        +advanced-option-toggle-default
 
                         div(ng-show='ui.expanded')
                             include /app/modules/states/configuration/caches/affinity
@@ -52,4 +52,4 @@ include /app/helpers/jade/mixins
                             include /app/modules/states/configuration/caches/rebalance
                             include /app/modules/states/configuration/caches/statistics
 
-                            +advanced-options-toggle-default
+                            +advanced-option-toggle-default

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/views/configuration/clusters.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/clusters.tpl.pug b/modules/web-console/frontend/views/configuration/clusters.tpl.pug
index c979012..9ce13b8 100644
--- a/modules/web-console/frontend/views/configuration/clusters.tpl.pug
+++ b/modules/web-console/frontend/views/configuration/clusters.tpl.pug
@@ -38,7 +38,7 @@ include /app/helpers/jade/mixins
                     .panel-group
                         include /app/modules/states/configuration/clusters/general
 
-                        +advanced-options-toggle-default
+                        +advanced-option-toggle-default
 
                         div(ng-show='ui.expanded')
                             include /app/modules/states/configuration/clusters/atomic
@@ -65,4 +65,4 @@ include /app/helpers/jade/mixins
                             include /app/modules/states/configuration/clusters/transactions
                             include /app/modules/states/configuration/clusters/attributes
 
-                            +advanced-options-toggle-default
+                            +advanced-option-toggle-default

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/views/configuration/domains-import.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/domains-import.tpl.pug b/modules/web-console/frontend/views/configuration/domains-import.tpl.pug
index 04de07a..866816d 100644
--- a/modules/web-console/frontend/views/configuration/domains-import.tpl.pug
+++ b/modules/web-console/frontend/views/configuration/domains-import.tpl.pug
@@ -137,21 +137,21 @@ mixin td-ellipses-lbl(w, lbl)
                                                         div.td-ellipsis
                                                             a(ng-if='!table.edit' ng-click='startEditDbTableCache(table)') {{tableActionView(table)}}
                                                             div(style='display: flex' ng-if='table.edit')
-                                                                button.select-toggle.form-control(style='width: 35%; margin-right: 5px' bs-select ng-model='table.action' data-container='.modal-domain-import' bs-options='item.value as item.shortLabel for item in importActions')
-                                                                button.select-toggle.form-control(style='width: 65%; margin-right: 0' bs-select ng-model='table.cacheOrTemplate' data-container='.modal-domain-import' bs-options='item.value as item.label for item in table.cachesOrTemplates')
+                                                                button.select-toggle.form-control(style='width: 35%; margin-right: 5px' bs-select ng-model='table.action' data-container='.modal-domain-import' bs-option='item.value as item.shortLabel for item in importActions')
+                                                                button.select-toggle.form-control(style='width: 65%; margin-right: 0' bs-select ng-model='table.cacheOrTemplate' data-container='.modal-domain-import' bs-option='item.value as item.label for item in table.cachesOrTemplates')
                                                     td
                     .settings-row
                         label Defaults to be applied for filtered tables
-                        i.tipLabel.icon-help(bs-tooltip='' data-title='Select and apply options for caches generation')
+                        i.tipLabel.icon-help(bs-tooltip='' data-title='Select and apply option for caches generation')
                     .settings-row
                         .col-sm-11
                             .col-sm-6(style='padding-right: 5px')
-                                button.select-toggle.form-control(bs-select ng-model='importCommon.action' data-container='.modal-domain-import' bs-options='item.value as item.label for item in importActions')
+                                button.select-toggle.form-control(bs-select ng-model='importCommon.action' data-container='.modal-domain-import' bs-option='item.value as item.label for item in importActions')
                             .col-sm-6(style='padding-left: 5px; padding-right: 5px')
-                                button.select-toggle.form-control(bs-select ng-model='importCommon.cacheOrTemplate' data-container='.modal-domain-import' bs-options='item.value as item.label for item in importCommon.cachesOrTemplates')
+                                button.select-toggle.form-control(bs-select ng-model='importCommon.cacheOrTemplate' data-container='.modal-domain-import' bs-option='item.value as item.label for item in importCommon.cachesOrTemplates')
                         .col-sm-1(style='padding-left: 5px')
                             button.btn.btn-primary(ng-click='applyDefaults()') Apply
-                .import-domain-model-wizard-page(ng-show='importDomain.action == "options"')
+                .import-domain-model-wizard-page(ng-show='importDomain.action == "option"')
                     -var form = 'optionsForm'
 
                     form.form-horizontal(name=form novalidate)

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/views/configuration/igfs.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/igfs.tpl.pug b/modules/web-console/frontend/views/configuration/igfs.tpl.pug
index 89e0920..a540922 100644
--- a/modules/web-console/frontend/views/configuration/igfs.tpl.pug
+++ b/modules/web-console/frontend/views/configuration/igfs.tpl.pug
@@ -39,7 +39,7 @@ include /app/helpers/jade/mixins
                     .panel-group
                         include /app/modules/states/configuration/igfs/general
 
-                        +advanced-options-toggle-default
+                        +advanced-option-toggle-default
 
                         div(ng-show='ui.expanded')
                             include /app/modules/states/configuration/igfs/secondary
@@ -48,4 +48,4 @@ include /app/helpers/jade/mixins
                             include /app/modules/states/configuration/igfs/dual
                             include /app/modules/states/configuration/igfs/misc
 
-                            +advanced-options-toggle-default
+                            +advanced-option-toggle-default

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/views/configuration/summary-project-structure.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/summary-project-structure.tpl.pug b/modules/web-console/frontend/views/configuration/summary-project-structure.tpl.pug
index 31a557f..15efd24 100644
--- a/modules/web-console/frontend/views/configuration/summary-project-structure.tpl.pug
+++ b/modules/web-console/frontend/views/configuration/summary-project-structure.tpl.pug
@@ -19,7 +19,7 @@
         label.labelField Project structure
         button.close(id='summary-project-structure-close' ng-click='$hide()') &times;
     .popover-content
-        treecontrol.tree-classic(tree-model='projectStructure' options='projectStructureOptions' expanded-nodes='projectStructureExpanded')
+        treecontrol.tree-classic(tree-model='projectStructure' option='projectStructureOptions' expanded-nodes='projectStructureExpanded')
             span(ng-switch='node.type')
                 span(ng-switch-when='folder')
                     label {{node.name}}

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/views/settings/admin.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/settings/admin.tpl.pug b/modules/web-console/frontend/views/settings/admin.tpl.pug
index a09fda9..ee483d2 100644
--- a/modules/web-console/frontend/views/settings/admin.tpl.pug
+++ b/modules/web-console/frontend/views/settings/admin.tpl.pug
@@ -22,4 +22,4 @@
         .docs-body
             .row
                 .col-xs-12
-                    ignite-list-of-registered-users(data-options='ctrl.data')
+                    ignite-list-of-registered-users(data-option='ctrl.data')

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/views/settings/profile.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/settings/profile.tpl.pug b/modules/web-console/frontend/views/settings/profile.tpl.pug
index 6f91f8f..68fb812 100644
--- a/modules/web-console/frontend/views/settings/profile.tpl.pug
+++ b/modules/web-console/frontend/views/settings/profile.tpl.pug
@@ -44,9 +44,9 @@ mixin lbl(txt)
                     .details-row
                         +lbl('Country:')
                         .col-xs-5.col-sm-4
-                            button#profile-country.select-toggle.form-control(bs-select bs-options='item.name as item.name for item in countries' type='text' ng-model='user.country' placeholder='Choose your country' ng-required='true')
+                            button#profile-country.select-toggle.form-control(bs-select bs-option='item.name as item.name for item in countries' type='text' ng-model='user.country' placeholder='Choose your country' ng-required='true')
                     .details-row
-                        .advanced-options
+                        .advanced-option
                             i.fa(
                             ng-click='toggleToken()'
                             ng-class='expandedToken ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')
@@ -58,7 +58,7 @@ mixin lbl(txt)
                             i.tipLabel.fa.fa-clipboard(ignite-copy-to-clipboard='{{user.token}}' bs-tooltip='' data-title='Copy security token to clipboard')
                             i.tipLabel.icon-help(ng-if=lines bs-tooltip='' data-title='The security token is used for authorization of web agent')
                     .details-row
-                        .advanced-options
+                        .advanced-option
                             i.fa(
                             ng-click='togglePassword()'
                             ng-class='expandedPassword ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/views/signin.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/signin.tpl.pug b/modules/web-console/frontend/views/signin.tpl.pug
index a6c64a8..ce3e556 100644
--- a/modules/web-console/frontend/views/signin.tpl.pug
+++ b/modules/web-console/frontend/views/signin.tpl.pug
@@ -76,7 +76,7 @@ header#header.header
                             .settings-row(ng-show='action == "signup"')
                                 +lblRequired('Country:')
                                 .col-xs-9.col-md-8
-                                    button#country.select-toggle.form-control(ignite-on-enter-focus-move='signup' bs-select bs-options='item.name as item.name for item in countries' type='text' ng-model='ui.country' placeholder='Choose your country' ng-required='action=="signup"')
+                                    button#country.select-toggle.form-control(ignite-on-enter-focus-move='signup' bs-select bs-option='item.name as item.name for item in countries' type='text' ng-model='ui.country' placeholder='Choose your country' ng-required='action=="signup"')
                             .settings-row(ignite-terms)
                                 .col-md-offset-3(ng-if='action == "signup" && terms.termsState')
                                     label

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/views/sql/cache-metadata.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/cache-metadata.tpl.pug b/modules/web-console/frontend/views/sql/cache-metadata.tpl.pug
index 385960a..fd13fce 100644
--- a/modules/web-console/frontend/views/sql/cache-metadata.tpl.pug
+++ b/modules/web-console/frontend/views/sql/cache-metadata.tpl.pug
@@ -20,7 +20,7 @@
         .input-tip
             input.form-control(type='text' ng-model='metaFilter' placeholder='Filter metadata...')
     .popover-content(ng-if='metadata && metadata.length > 0')
-        treecontrol.tree-classic(tree-model='metadata' options='metaOptions' filter-expression='metaFilter')
+        treecontrol.tree-classic(tree-model='metadata' option='metaOptions' filter-expression='metaFilter')
             span(ng-switch='node.type')
                 span(ng-switch-when='type' ng-dblclick='dblclickMetadata(paragraph, node)')
                     i.fa.fa-table

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/views/sql/chart-settings.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/chart-settings.tpl.pug b/modules/web-console/frontend/views/sql/chart-settings.tpl.pug
index 5a1ceed..efe3100 100644
--- a/modules/web-console/frontend/views/sql/chart-settings.tpl.pug
+++ b/modules/web-console/frontend/views/sql/chart-settings.tpl.pug
@@ -36,5 +36,5 @@
                 ul.chart-settings-columns-list(dnd-list='paragraph.chartValCols' dnd-drop='chartAcceptValColumn(paragraph, item)')
                     li(ng-repeat='col in paragraph.chartValCols track by $index')
                         .btn.btn-default.btn-chart-column(ng-style='chartColor($index)') {{col.label}}
-                            button.btn-chart-column-agg-fx.select-toggle(ng-change='applyChartSettings(paragraph)' ng-show='paragraphTimeSpanVisible(paragraph)' ng-style='chartColor($index)' ng-model='col.aggFx' placeholder='...' bs-select bs-options='item for item in aggregateFxs' data-container='false' tabindex='-1')
+                            button.btn-chart-column-agg-fx.select-toggle(ng-change='applyChartSettings(paragraph)' ng-show='paragraphTimeSpanVisible(paragraph)' ng-style='chartColor($index)' ng-model='col.aggFx' placeholder='...' bs-select bs-option='item for item in aggregateFxs' data-container='false' tabindex='-1')
                             i.fa.fa-close(ng-click='chartRemoveValColumn(paragraph, $index)')

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/views/sql/paragraph-rate.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/paragraph-rate.tpl.pug b/modules/web-console/frontend/views/sql/paragraph-rate.tpl.pug
index 03c6497..37ae9da 100644
--- a/modules/web-console/frontend/views/sql/paragraph-rate.tpl.pug
+++ b/modules/web-console/frontend/views/sql/paragraph-rate.tpl.pug
@@ -24,7 +24,7 @@
                 .col-sm-4
                     input.form-control(id='paragraph-rate' ng-init='value = paragraph.rate.value' ng-model='value' type='number' min='1' required ignite-auto-focus)
                 .col-sm-8(style='padding-left: 5px')
-                    button.form-control.select-toggle(id='paragraph-unit' ng-init='unit = paragraph.rate.unit' ng-model='unit' required placeholder='Time unit' bs-select bs-options='item.value as item.label for item in timeUnit' data-container='false' tabindex='0')
+                    button.form-control.select-toggle(id='paragraph-unit' ng-init='unit = paragraph.rate.unit' ng-model='unit' required placeholder='Time unit' bs-select bs-option='item.value as item.label for item in timeUnit' data-container='false' tabindex='0')
             .form-actions(style='margin-top: 30px; padding: 5px')
                 button.btn.btn-primary(id='paragraph-rate-start' ng-disabled='popoverForm.$invalid' ng-click='startRefresh(paragraph, value, unit); $hide()') Start
                 button.btn.btn-primary.btn-default(id='paragraph-rate-stop' ng-click='stopRefresh(paragraph); $hide()' ng-disabled='!paragraph.rate.installed') Stop

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/views/sql/sql.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/sql.tpl.pug b/modules/web-console/frontend/views/sql/sql.tpl.pug
index dcfc531..6899734 100644
--- a/modules/web-console/frontend/views/sql/sql.tpl.pug
+++ b/modules/web-console/frontend/views/sql/sql.tpl.pug
@@ -40,7 +40,7 @@ mixin chart-settings
                     | Chart settings
                 div(ng-show='paragraphTimeSpanVisible(paragraph)')
                     label Show
-                    button.select-manual-caret.btn.btn-default(ng-model='paragraph.timeLineSpan' ng-change='applyChartSettings(paragraph)' bs-options='item for item in timeLineSpans' bs-select data-caret-html='<span class="caret"></span>')
+                    button.select-manual-caret.btn.btn-default(ng-model='paragraph.timeLineSpan' ng-change='applyChartSettings(paragraph)' bs-option='item for item in timeLineSpans' bs-select data-caret-html='<span class="caret"></span>')
                     label min
         .col-xs-4
             +result-toolbar
@@ -96,10 +96,10 @@ mixin query-settings
             button.btn.btn-default.fa.fa-clock-o.tipLabel(ng-class='{"btn-info": paragraph.rate && paragraph.rate.installed}' bs-popover data-template-url='{{ $ctrl.paragraphRateTemplateUrl }}' data-placement='left' data-auto-close='1' data-trigger='click') {{rateAsString(paragraph)}}
 
         label.tipLabel(bs-tooltip data-placement='bottom' data-title='Max number of rows to show in query result as one page') Page size:
-            button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.pageSize' bs-select bs-options='item for item in pageSizes')
+            button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.pageSize' bs-select bs-option='item for item in pageSizes')
 
         label.tipLabel(bs-tooltip data-placement='bottom' data-title='Limit query max results to specified number of pages') Max pages:
-            button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.maxPages' bs-select bs-options='item.value as item.label for item in maxPages')
+            button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.maxPages' bs-select bs-option='item.value as item.label for item in maxPages')
 
         .panel-tip-container
             .row(ng-if='nonCollocatedJoinsAvailable(paragraph)')
@@ -167,7 +167,7 @@ mixin chart-result
         div(ng-show='paragraph.chartColumnsConfigured()')
             div(ng-show='paragraph.timeLineSupported() || !paragraph.chartTimeLineEnabled()')
                 div(ng-repeat='chart in paragraph.charts')
-                    nvd3(options='chart.options' data='chart.data' api='chart.api')
+                    nvd3(option='chart.option' data='chart.data' api='chart.api')
             .empty(ng-show='!paragraph.timeLineSupported() && paragraph.chartTimeLineEnabled()') Pie chart does not support 'TIME_LINE' column for X-axis. Please use another column for X-axis or switch to another chart.
     .empty(ng-show='paragraph.scanExplain()')
         .row
@@ -189,7 +189,7 @@ mixin paragraph-scan
                         input(type='checkbox' ng-model='paragraph.caseSensitive')
                         span(bs-tooltip data-title='Select this checkbox for case sensitive search') Cs
             label.tipLabel(bs-tooltip data-placement='bottom' data-title='Max number of rows to show in query result as one page') Page size:
-                button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.pageSize' bs-select bs-options='item for item in pageSizes')
+                button.btn.btn-default.select-toggle.tipLabel(ng-model='paragraph.pageSize' bs-select bs-option='item for item in pageSizes')
 
         .col-sm-12.sql-controls
             button.btn.btn-primary(ng-disabled='!actionAvailable(paragraph, false)' ng-click='scan(paragraph)')

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/views/templates/agent-download.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/agent-download.tpl.pug b/modules/web-console/frontend/views/templates/agent-download.tpl.pug
index b913636..57da8f8 100644
--- a/modules/web-console/frontend/views/templates/agent-download.tpl.pug
+++ b/modules/web-console/frontend/views/templates/agent-download.tpl.pug
@@ -29,7 +29,7 @@
                     li Download and unzip #[a(href='/api/v1/agent/download/zip' target='_self') ignite-web-agent] archive
                     li Run shell file #[b ignite-web-agent.{sh|bat}]
                 p Refer to #[b README.txt] in agent folder for more information
-                .modal-advanced-options
+                .modal-advanced-option
                     i.fa.fa-chevron-circle-down(ng-show='agentLoad.showToken' ng-click='agentLoad.showToken = ! agentLoad.showToken')
                     i.fa.fa-chevron-circle-right(ng-show='!agentLoad.showToken' ng-click='agentLoad.showToken = ! agentLoad.showToken')
                     a(ng-click='agentLoad.showToken = ! agentLoad.showToken') {{agentLoad.showToken ? 'Hide security token...' : 'Show security token...'}}

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/web-agent/README.txt
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/README.txt b/modules/web-console/web-agent/README.txt
index c915871..1211495 100644
--- a/modules/web-console/web-agent/README.txt
+++ b/modules/web-console/web-agent/README.txt
@@ -66,7 +66,7 @@ Demo of Ignite Web Agent:
      1.2) Click "Import from database". You should see modal with demo description.
      1.3) Click "Next" button. You should see list of available schemas.
      1.4) Click "Next" button. You should see list of available tables.
-     1.5) Click "Next" button. You should see import options.
+     1.5) Click "Next" button. You should see import option.
      1.6) Select some of them and click "Save".
 
    2) Demo for SQL.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/web-agent/bin/ignite-web-agent.bat
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/bin/ignite-web-agent.bat b/modules/web-console/web-agent/bin/ignite-web-agent.bat
index 1f1b52d..e65da18 100644
--- a/modules/web-console/web-agent/bin/ignite-web-agent.bat
+++ b/modules/web-console/web-agent/bin/ignite-web-agent.bat
@@ -49,7 +49,7 @@ goto error_finish
 :run_java
 
 ::
-:: JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
+:: JVM option. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
 ::
 :: ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
 ::

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/web-agent/bin/ignite-web-agent.sh
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/bin/ignite-web-agent.sh b/modules/web-console/web-agent/bin/ignite-web-agent.sh
index c2958fc..6408700 100644
--- a/modules/web-console/web-agent/bin/ignite-web-agent.sh
+++ b/modules/web-console/web-agent/bin/ignite-web-agent.sh
@@ -76,7 +76,7 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
 cd $DIR
 
 #
-# JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
+# JVM option. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
 #
 # ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
 #

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-atomic-win.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-atomic-win.properties b/modules/yardstick/config/benchmark-atomic-win.properties
index 202306e..9be69d8 100644
--- a/modules/yardstick/config/benchmark-atomic-win.properties
+++ b/modules/yardstick/config/benchmark-atomic-win.properties
@@ -17,7 +17,7 @@
 :: Contains benchmarks for ATOMIC cache.
 ::
 
-:: JVM options.
+:: JVM option.
 set JVM_OPTS=%JVM_OPTS% -DIGNITE_QUIET=false
 
 :: Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-atomic.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-atomic.properties b/modules/yardstick/config/benchmark-atomic.properties
index f296041..d73ca47 100644
--- a/modules/yardstick/config/benchmark-atomic.properties
+++ b/modules/yardstick/config/benchmark-atomic.properties
@@ -17,7 +17,7 @@
 # Contains benchmarks for ATOMIC cache.
 #
 
-# JVM options.
+# JVM option.
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-bin-identity.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-bin-identity.properties b/modules/yardstick/config/benchmark-bin-identity.properties
index d5d18b6..85f2702 100644
--- a/modules/yardstick/config/benchmark-bin-identity.properties
+++ b/modules/yardstick/config/benchmark-bin-identity.properties
@@ -19,7 +19,7 @@
 
 now0=`date +'%H%M%S'`
 
-# JVM options.
+# JVM option.
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-cache-load-win.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-cache-load-win.properties b/modules/yardstick/config/benchmark-cache-load-win.properties
index 3ee11a3..256da20 100644
--- a/modules/yardstick/config/benchmark-cache-load-win.properties
+++ b/modules/yardstick/config/benchmark-cache-load-win.properties
@@ -17,7 +17,7 @@
 :: Contains benchmarks for execute random operation on various caches.
 ::
 
-:: JVM options.
+:: JVM option.
 set JVM_OPTS=%JVM_OPTS% -DIGNITE_QUIET=false
 
 :: Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-cache-load.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-cache-load.properties b/modules/yardstick/config/benchmark-cache-load.properties
index c055694..ad3ccde 100644
--- a/modules/yardstick/config/benchmark-cache-load.properties
+++ b/modules/yardstick/config/benchmark-cache-load.properties
@@ -16,7 +16,7 @@
 
 now0=`date +'%H%M%S'`
 
-# JVM options.
+# JVM option.
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-client-mode.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-client-mode.properties b/modules/yardstick/config/benchmark-client-mode.properties
index ad501f1..1645ab8 100644
--- a/modules/yardstick/config/benchmark-client-mode.properties
+++ b/modules/yardstick/config/benchmark-client-mode.properties
@@ -19,7 +19,7 @@
 
 now0=`date +'%H%M%S'`
 
-# JVM options.
+# JVM option.
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-compute-win.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-compute-win.properties b/modules/yardstick/config/benchmark-compute-win.properties
index a4c6f44..4e47ecf 100644
--- a/modules/yardstick/config/benchmark-compute-win.properties
+++ b/modules/yardstick/config/benchmark-compute-win.properties
@@ -17,7 +17,7 @@
 :: Contains benchmarks for distributed computations.
 ::
 
-:: JVM options.
+:: JVM option.
 set JVM_OPTS=%JVM_OPTS% -DIGNITE_QUIET=false
 
 :: Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-compute.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-compute.properties b/modules/yardstick/config/benchmark-compute.properties
index 30d411a..d96511a 100644
--- a/modules/yardstick/config/benchmark-compute.properties
+++ b/modules/yardstick/config/benchmark-compute.properties
@@ -17,7 +17,7 @@
 # Contains benchmarks for distributed computations.
 #
 
-# JVM options.
+# JVM option.
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-failover.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-failover.properties b/modules/yardstick/config/benchmark-failover.properties
index a1b9d8f..e31a399 100644
--- a/modules/yardstick/config/benchmark-failover.properties
+++ b/modules/yardstick/config/benchmark-failover.properties
@@ -21,7 +21,7 @@
 
 now0=`date +'%H%M%S'`
 
-# JVM options.
+# JVM option.
 #JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false -Xms15g -Xmx15g"
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false -ea"
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-full.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-full.properties b/modules/yardstick/config/benchmark-full.properties
index 96da0a6..d13f5f2 100644
--- a/modules/yardstick/config/benchmark-full.properties
+++ b/modules/yardstick/config/benchmark-full.properties
@@ -19,7 +19,7 @@
 
 now0=`date +'%H%M%S'`
 
-# JVM options.
+# JVM option.
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-multicast.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-multicast.properties b/modules/yardstick/config/benchmark-multicast.properties
index 2b4d99b..b31e868 100644
--- a/modules/yardstick/config/benchmark-multicast.properties
+++ b/modules/yardstick/config/benchmark-multicast.properties
@@ -19,7 +19,7 @@
 
 now0=`date +'%H%M%S'`
 
-# JVM options.
+# JVM option.
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-put-indexed-val.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-put-indexed-val.properties b/modules/yardstick/config/benchmark-put-indexed-val.properties
index a2bc956..f83ac34 100644
--- a/modules/yardstick/config/benchmark-put-indexed-val.properties
+++ b/modules/yardstick/config/benchmark-put-indexed-val.properties
@@ -17,7 +17,7 @@
 # Contains benchmarks for SQL queries.
 #
 
-# JVM options.
+# JVM option.
 # JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-query-put-separated.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-query-put-separated.properties b/modules/yardstick/config/benchmark-query-put-separated.properties
index b4437bf..03a030b 100644
--- a/modules/yardstick/config/benchmark-query-put-separated.properties
+++ b/modules/yardstick/config/benchmark-query-put-separated.properties
@@ -19,7 +19,7 @@
 
 now0=`date +'%H%M%S'`
 
-# JVM options.
+# JVM option.
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-query-win.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-query-win.properties b/modules/yardstick/config/benchmark-query-win.properties
index 6bd8fb9..0acf2f0 100644
--- a/modules/yardstick/config/benchmark-query-win.properties
+++ b/modules/yardstick/config/benchmark-query-win.properties
@@ -17,7 +17,7 @@
 :: Contains benchmarks for SQL queries.
 ::
 
-:: JVM options.
+:: JVM option.
 :: set JVM_OPTS=%JVM_OPTS% -DIGNITE_QUIET=false
 
 :: Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-query.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-query.properties b/modules/yardstick/config/benchmark-query.properties
index c364cfd..aa446e1 100644
--- a/modules/yardstick/config/benchmark-query.properties
+++ b/modules/yardstick/config/benchmark-query.properties
@@ -17,7 +17,7 @@
 # Contains benchmarks for SQL queries.
 #
 
-# JVM options.
+# JVM option.
 # JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-remote-sample.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-remote-sample.properties b/modules/yardstick/config/benchmark-remote-sample.properties
index e9754fe..f67bc39 100644
--- a/modules/yardstick/config/benchmark-remote-sample.properties
+++ b/modules/yardstick/config/benchmark-remote-sample.properties
@@ -17,7 +17,7 @@
 # Contains benchmarks for ATOMIC cache.
 #
 
-# JVM options.
+# JVM option.
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-remote.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-remote.properties b/modules/yardstick/config/benchmark-remote.properties
index 4d671d3..70b47d4 100644
--- a/modules/yardstick/config/benchmark-remote.properties
+++ b/modules/yardstick/config/benchmark-remote.properties
@@ -19,7 +19,7 @@
 
 now0=`date +'%H%M%S'`
 
-# JVM options.
+# JVM option.
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-sample.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-sample.properties b/modules/yardstick/config/benchmark-sample.properties
index b235e9a..433e4bc 100644
--- a/modules/yardstick/config/benchmark-sample.properties
+++ b/modules/yardstick/config/benchmark-sample.properties
@@ -17,7 +17,7 @@
 # Contains benchmarks for ATOMIC cache.
 #
 
-# JVM options.
+# JVM option.
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-sql-dml.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-sql-dml.properties b/modules/yardstick/config/benchmark-sql-dml.properties
index 3bb4107..d95abf9 100644
--- a/modules/yardstick/config/benchmark-sql-dml.properties
+++ b/modules/yardstick/config/benchmark-sql-dml.properties
@@ -17,7 +17,7 @@
 # Contains benchmarks for SQL queries.
 #
 
-# JVM options.
+# JVM option.
 # JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-store.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-store.properties b/modules/yardstick/config/benchmark-store.properties
index 3146c24..1ddd207 100644
--- a/modules/yardstick/config/benchmark-store.properties
+++ b/modules/yardstick/config/benchmark-store.properties
@@ -21,7 +21,7 @@
 
 now0=`date +'%H%M%S'`
 
-# JVM options.
+# JVM option.
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-tx-win.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-tx-win.properties b/modules/yardstick/config/benchmark-tx-win.properties
index 490b9d7..b506cc3 100644
--- a/modules/yardstick/config/benchmark-tx-win.properties
+++ b/modules/yardstick/config/benchmark-tx-win.properties
@@ -17,7 +17,7 @@
 :: Contains benchmarks for TRANSACTIONAL cache.
 ::
 
-:: JVM options.
+:: JVM option.
 set JVM_OPTS=%JVM_OPTS% -DIGNITE_QUIET=false
 
 :: Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-tx.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-tx.properties b/modules/yardstick/config/benchmark-tx.properties
index 8a75bf5..aeef1c2 100644
--- a/modules/yardstick/config/benchmark-tx.properties
+++ b/modules/yardstick/config/benchmark-tx.properties
@@ -17,7 +17,7 @@
 # Contains benchmarks for TRANSACTIONAL cache.
 #
 
-# JVM options.
+# JVM option.
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark-win.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-win.properties b/modules/yardstick/config/benchmark-win.properties
index e97d036..e47b91c 100644
--- a/modules/yardstick/config/benchmark-win.properties
+++ b/modules/yardstick/config/benchmark-win.properties
@@ -20,7 +20,7 @@
 :: - SQL queries
 ::
 
-:: JVM options.
+:: JVM option.
 set JVM_OPTS=%JVM_OPTS% -DIGNITE_QUIET=false
 
 :: Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/benchmark.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark.properties b/modules/yardstick/config/benchmark.properties
index cccbf2a..cd6934e 100644
--- a/modules/yardstick/config/benchmark.properties
+++ b/modules/yardstick/config/benchmark.properties
@@ -19,7 +19,7 @@
 
 now0=`date +'%H%M%S'`
 
-# JVM options.
+# JVM option.
 JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/test-max-int-values-offheap.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/test-max-int-values-offheap.properties b/modules/yardstick/config/test-max-int-values-offheap.properties
index 4a42538..4516f9a 100644
--- a/modules/yardstick/config/test-max-int-values-offheap.properties
+++ b/modules/yardstick/config/test-max-int-values-offheap.properties
@@ -17,7 +17,7 @@
 # Contains benchmarks for SQL queries.
 #
 
-# JVM options.
+# JVM option.
 # JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/test-max-int-values-onheap.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/test-max-int-values-onheap.properties b/modules/yardstick/config/test-max-int-values-onheap.properties
index 4346b54..9b73628 100644
--- a/modules/yardstick/config/test-max-int-values-onheap.properties
+++ b/modules/yardstick/config/test-max-int-values-onheap.properties
@@ -17,7 +17,7 @@
 # Contains benchmarks for SQL queries.
 #
 
-# JVM options.
+# JVM option.
 # JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/yardstick/config/test-max-int-values-swap.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/test-max-int-values-swap.properties b/modules/yardstick/config/test-max-int-values-swap.properties
index be0aed4..8109ec7 100644
--- a/modules/yardstick/config/test-max-int-values-swap.properties
+++ b/modules/yardstick/config/test-max-int-values-swap.properties
@@ -17,7 +17,7 @@
 # Contains benchmarks for SQL queries.
 #
 
-# JVM options.
+# JVM option.
 # JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 
 # Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.


[22/50] [abbrv] ignite git commit: IGNITE-4885 .NET: Disallow abstract and open generic types in BinaryConfiguration

Posted by dm...@apache.org.
IGNITE-4885 .NET: Disallow abstract and open generic types in BinaryConfiguration

This closes #1733


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

Branch: refs/heads/ignite-1192
Commit: 21d34757c7132dff125b904f2d45c07707bc940c
Parents: 17d00a4
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Thu Apr 6 09:38:28 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Thu Apr 6 09:38:28 2017 +0300

----------------------------------------------------------------------
 .../Binary/BinaryEqualityComparerTest.cs        |  7 +++-
 .../BinaryConfigurationTest.cs                  | 43 ++++++++++++++++++++
 .../Apache.Ignite.Core.Tests/ExecutableTest.cs  |  5 ++-
 .../Plugin/PluginTest.cs                        | 16 +++++---
 .../dotnet/Apache.Ignite.Core/Ignition.cs       |  6 ++-
 .../Impl/Binary/Marshaller.cs                   | 27 ++++++++++++
 6 files changed, 94 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/21d34757/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryEqualityComparerTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryEqualityComparerTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryEqualityComparerTest.cs
index f0550a8..7c6d769 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryEqualityComparerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryEqualityComparerTest.cs
@@ -79,9 +79,10 @@ namespace Apache.Ignite.Core.Tests.Binary
                     }
                 }));
 
+            Assert.IsNotNull(ex.InnerException);
             Assert.AreEqual("Unsupported IEqualityComparer<IBinaryObject> implementation: " +
                             "Apache.Ignite.Core.Tests.Binary.BinaryEqualityComparerTest+MyComparer. " +
-                            "Only predefined implementations are supported.", ex.Message);
+                            "Only predefined implementations are supported.", ex.InnerException.Message);
         }
 
         /// <summary>
@@ -216,7 +217,9 @@ namespace Apache.Ignite.Core.Tests.Binary
                     }
                 }));
 
-            Assert.AreEqual("BinaryFieldEqualityComparer.FieldNames can not be null or empty.", ex.Message);
+            Assert.IsNotNull(ex.InnerException);
+            Assert.AreEqual("BinaryFieldEqualityComparer.FieldNames can not be null or empty.", 
+                ex.InnerException.Message);
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/21d34757/modules/platforms/dotnet/Apache.Ignite.Core.Tests/BinaryConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/BinaryConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/BinaryConfigurationTest.cs
index 74ae244..4f6bf02 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/BinaryConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/BinaryConfigurationTest.cs
@@ -18,10 +18,12 @@
 namespace Apache.Ignite.Core.Tests
 {
     using System;
+    using System.Collections;
     using System.Collections.Generic;
     using System.Linq;
     using Apache.Ignite.Core.Binary;
     using Apache.Ignite.Core.Cache;
+    using Apache.Ignite.Core.Common;
     using NUnit.Framework;
 
     /// <summary>
@@ -113,6 +115,47 @@ namespace Apache.Ignite.Core.Tests
         }
 
         /// <summary>
+        /// Tests that invalid configuration produces meaningful error message.
+        /// </summary>
+        [Test]
+        public void TestInvalidConfiguration()
+        {
+            // Pass open generic type.
+            var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
+            {
+                // Open generics are not allowed
+                BinaryConfiguration = new BinaryConfiguration(typeof(List<>))
+            };
+
+            var ex = Assert.Throws<IgniteException>(() => Ignition.Start(cfg));
+            Assert.AreEqual("Failed to start Ignite.NET, check inner exception for details", ex.Message);
+            Assert.IsNotNull(ex.InnerException);
+            Assert.IsTrue(ex.InnerException.Message.StartsWith(
+                "Open generic types (Type.IsGenericTypeDefinition == true) are not allowed in BinaryConfiguration: " +
+                "System.Collections.Generic.List`1, mscorlib"));
+
+            // Pass open generic type name.
+            cfg.BinaryConfiguration = new BinaryConfiguration {Types = new[] {typeof(IList<>).AssemblyQualifiedName}};
+            
+            ex = Assert.Throws<IgniteException>(() => Ignition.Start(cfg));
+            Assert.AreEqual("Failed to start Ignite.NET, check inner exception for details", ex.Message);
+            Assert.IsNotNull(ex.InnerException);
+            Assert.IsTrue(ex.InnerException.Message.StartsWith(
+                "Open generic types (Type.IsGenericTypeDefinition == true) are not allowed in BinaryConfiguration: " +
+                "System.Collections.Generic.IList`1, mscorlib"));
+
+            // Pass interface.
+            cfg.BinaryConfiguration = new BinaryConfiguration(typeof(ICollection));
+            
+            ex = Assert.Throws<IgniteException>(() => Ignition.Start(cfg));
+            Assert.AreEqual("Failed to start Ignite.NET, check inner exception for details", ex.Message);
+            Assert.IsNotNull(ex.InnerException);
+            Assert.IsTrue(ex.InnerException.Message.StartsWith(
+                "Abstract types and interfaces are not allowed in BinaryConfiguration: " +
+                "System.Collections.ICollection, mscorlib"));
+        }
+
+        /// <summary>
         /// Checks that specified types are binarizable and can be successfully used in cache.
         /// </summary>
         private void CheckBinarizableTypes(IEnumerable<Type> testTypes)

http://git-wip-us.apache.org/repos/asf/ignite/blob/21d34757/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
index 0aebd78..ae945e9 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
@@ -323,8 +323,9 @@ namespace Apache.Ignite.Core.Tests
             checkError("assembly=", "ERROR: Apache.Ignite.Core.Common.IgniteException: Missing argument value: " +
                                  "'assembly'. See 'Apache.Ignite.exe /help'");
 
-            checkError("assembly=x.dll", "ERROR: Apache.Ignite.Core.Common.IgniteException: " +
-                                         "Failed to load assembly: x.dll");
+            checkError("assembly=x.dll", "ERROR: Apache.Ignite.Core.Common.IgniteException: Failed to start " +
+                                         "Ignite.NET, check inner exception for details ---> Apache.Ignite.Core." +
+                                         "Common.IgniteException: Failed to load assembly: x.dll");
 
             checkError("configFileName=wrong.config", "ERROR: System.Configuration.ConfigurationErrorsException: " +
                                                       "Specified config file does not exist: wrong.config");

http://git-wip-us.apache.org/repos/asf/ignite/blob/21d34757/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/PluginTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/PluginTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/PluginTest.cs
index 7e766a0..00b1cca 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/PluginTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/PluginTest.cs
@@ -176,13 +176,15 @@ namespace Apache.Ignite.Core.Tests.Plugin
 
             // Missing attribute.
             var ex = Assert.Throws<IgniteException>(() => check(new[] { new NoAttributeConfig(),  }));
+            Assert.IsNotNull(ex.InnerException);
             Assert.AreEqual(string.Format("{0} of type {1} has no {2}", typeof(IPluginConfiguration),
-                typeof(NoAttributeConfig), typeof(PluginProviderTypeAttribute)), ex.Message);
+                typeof(NoAttributeConfig), typeof(PluginProviderTypeAttribute)), ex.InnerException.Message);
 
             // Empty plugin name.
             ex = Assert.Throws<IgniteException>(() => check(new[] {new EmptyNameConfig()}));
+            Assert.IsNotNull(ex.InnerException);
             Assert.AreEqual(string.Format("{0}.Name should not be null or empty: {1}", typeof(IPluginProvider<>),
-                typeof(EmptyNamePluginProvider)), ex.Message);
+                typeof(EmptyNamePluginProvider)), ex.InnerException.Message);
 
             // Duplicate plugin name.
             ex = Assert.Throws<IgniteException>(() => check(new[]
@@ -190,17 +192,21 @@ namespace Apache.Ignite.Core.Tests.Plugin
                 new TestIgnitePluginConfiguration(),
                 new TestIgnitePluginConfiguration()
             }));
+            Assert.IsNotNull(ex.InnerException);
             Assert.AreEqual(string.Format("Duplicate plugin name 'TestPlugin1' is used by plugin providers " +
-                                          "'{0}' and '{0}'", typeof(TestIgnitePluginProvider)), ex.Message);
+                                          "'{0}' and '{0}'", typeof(TestIgnitePluginProvider)),
+                                          ex.InnerException.Message);
 
             // Provider throws an exception.
             PluginLog.Clear();
 
-            var ioex = Assert.Throws<IOException>(() => check(new IPluginConfiguration[]
+            ex = Assert.Throws<IgniteException>(() => check(new IPluginConfiguration[]
             {
                 new NormalConfig(), new ExceptionConfig()
             }));
-            Assert.AreEqual("Failure in plugin provider", ioex.Message);
+            Assert.IsNotNull(ex.InnerException);
+            Assert.IsInstanceOf<IOException>(ex.InnerException);
+            Assert.AreEqual("Failure in plugin provider", ex.InnerException.Message);
 
             // Verify that plugins are started and stopped in correct order:
             Assert.AreEqual(

http://git-wip-us.apache.org/repos/asf/ignite/blob/21d34757/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
index 13e3f61..f3b8c98 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
@@ -276,7 +276,11 @@ namespace Apache.Ignite.Core
 
                     // 3. Throw error further (use startup error if exists because it is more precise).
                     if (_startup.Error != null)
-                        throw _startup.Error;
+                    {
+                        // Wrap in a new exception to preserve original stack trace.
+                        throw new IgniteException("Failed to start Ignite.NET, check inner exception for details", 
+                            _startup.Error);
+                    }
 
                     throw;
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/21d34757/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
index 5effc5c..5a4460a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
@@ -557,12 +557,16 @@ namespace Apache.Ignite.Core.Impl.Binary
 
             if (type != null)
             {
+                ValidateUserType(type);
+
                 if (typeCfg.IsEnum != type.IsEnum)
+                {
                     throw new BinaryObjectException(
                         string.Format(
                             "Invalid IsEnum flag in binary type configuration. " +
                             "Configuration value: IsEnum={0}, actual type: IsEnum={1}",
                             typeCfg.IsEnum, type.IsEnum));
+                }
 
                 // Type is found.
                 var typeName = BinaryUtils.GetTypeName(type);
@@ -740,5 +744,28 @@ namespace Apache.Ignite.Core.Impl.Binary
                       "DateTime fields would not work in SQL; " +
                       "sbyte, ushort, uint, ulong fields would not work in DML.", type, typeof(ISerializable));
         }
+
+        /// <summary>
+        /// Validates binary type.
+        /// </summary>
+        // ReSharper disable once UnusedParameter.Local
+        private static void ValidateUserType(Type type)
+        {
+            Debug.Assert(type != null);
+
+            if (type.IsGenericTypeDefinition)
+            {
+                throw new BinaryObjectException(
+                    "Open generic types (Type.IsGenericTypeDefinition == true) are not allowed " +
+                    "in BinaryConfiguration: " + type.AssemblyQualifiedName);
+            }
+
+            if (type.IsAbstract)
+            {
+                throw new BinaryObjectException(
+                    "Abstract types and interfaces are not allowed in BinaryConfiguration: " +
+                    type.AssemblyQualifiedName);
+            }
+        }
     }
 }


[05/50] [abbrv] ignite git commit: Merge remote-tracking branch 'apache/master'

Posted by dm...@apache.org.
Merge remote-tracking branch 'apache/master'


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

Branch: refs/heads/ignite-1192
Commit: 513ca3ae51d49f33e492842a11a4567ee16708d4
Parents: df2504c 32faeb9
Author: dkarachentsev <dk...@gridgain.com>
Authored: Mon Apr 3 11:30:48 2017 +0300
Committer: dkarachentsev <dk...@gridgain.com>
Committed: Mon Apr 3 11:30:48 2017 +0300

----------------------------------------------------------------------
 .../internal/processors/hadoop/impl/v2/HadoopV2Context.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



[06/50] [abbrv] ignite git commit: Merge with 1.8.5. Compilation fix.

Posted by dm...@apache.org.
Merge with 1.8.5. Compilation fix.


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

Branch: refs/heads/ignite-1192
Commit: d449493a2806055eeed4c37832bf73b08f897ad8
Parents: 513ca3a
Author: dkarachentsev <dk...@gridgain.com>
Authored: Mon Apr 3 12:22:32 2017 +0300
Committer: dkarachentsev <dk...@gridgain.com>
Committed: Mon Apr 3 12:22:32 2017 +0300

----------------------------------------------------------------------
 .../apache/ignite/testframework/junits/GridTestKernalContext.java   | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d449493a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestKernalContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestKernalContext.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestKernalContext.java
index 40f0e43..a579094 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestKernalContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestKernalContext.java
@@ -65,6 +65,7 @@ public class GridTestKernalContext extends GridKernalContextImpl {
                 null,
                 null,
                 null,
+                null,
                 U.allPluginProviders()
         );
 


[41/50] [abbrv] ignite git commit: minor

Posted by dm...@apache.org.
minor


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

Branch: refs/heads/ignite-1192
Commit: 118baebf800b91089981754e349688b8e07ac517
Parents: 7201f2c
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Apr 10 11:54:48 2017 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Apr 10 11:54:48 2017 +0300

----------------------------------------------------------------------
 .../apache/ignite/spi/deployment/local/LocalDeploymentSpi.java  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/118baebf/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java
index 9d46737..b0088d6 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java
@@ -19,7 +19,6 @@ package org.apache.ignite.spi.deployment.local;
 
 import java.io.InputStream;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -232,7 +231,7 @@ public class LocalDeploymentSpi extends IgniteSpiAdapter implements DeploymentSp
 
         // Maps resources to classes.
         // Map may contain 2 entries for one class.
-        Map<String, String> regRsrcs = new HashMap<>(2, 1.0f);
+        Map<String, String> regRsrcs = U.newHashMap(2);
 
         // Check alias collision for added classes.
         String alias = null;
@@ -416,4 +415,4 @@ public class LocalDeploymentSpi extends IgniteSpiAdapter implements DeploymentSp
             super(spiAdapter);
         }
     }
-}
\ No newline at end of file
+}


[49/50] [abbrv] ignite git commit: IGNITE-1192: finished implementation, working on the test

Posted by dm...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/platforms/dotnet/Apache.Ignite.dxg
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.dxg b/modules/platforms/dotnet/Apache.Ignite.dxg
index 012a1eb..806db33 100644
--- a/modules/platforms/dotnet/Apache.Ignite.dxg
+++ b/modules/platforms/dotnet/Apache.Ignite.dxg
@@ -14,7 +14,7 @@
 # Values that contain spaces should be placed between quotes (\" \").
 
 #---------------------------------------------------------------------------
-# Project related configuration options
+# Project related configuration option
 #---------------------------------------------------------------------------
 
 # This tag specifies the encoding used for all characters in the config file
@@ -398,7 +398,7 @@ TYPEDEF_HIDES_STRUCT   = NO
 LOOKUP_CACHE_SIZE      = 0
 
 #---------------------------------------------------------------------------
-# Build related configuration options
+# Build related configuration option
 #---------------------------------------------------------------------------
 
 # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
@@ -690,7 +690,7 @@ LAYOUT_FILE            =
 CITE_BIB_FILES         =
 
 #---------------------------------------------------------------------------
-# Configuration options related to warning and progress messages
+# Configuration option related to warning and progress messages
 #---------------------------------------------------------------------------
 
 # The QUIET tag can be used to turn on/off the messages that are generated to
@@ -749,7 +749,7 @@ WARN_FORMAT            = "$file:$line: $text"
 WARN_LOGFILE           =
 
 #---------------------------------------------------------------------------
-# Configuration options related to the input files
+# Configuration option related to the input files
 #---------------------------------------------------------------------------
 
 # The INPUT tag is used to specify the files and/or directories that contain
@@ -897,7 +897,7 @@ FILTER_SOURCE_PATTERNS =
 USE_MDFILE_AS_MAINPAGE =
 
 #---------------------------------------------------------------------------
-# Configuration options related to source browsing
+# Configuration option related to source browsing
 #---------------------------------------------------------------------------
 
 # If the SOURCE_BROWSER tag is set to YES then a list of source files will be
@@ -994,7 +994,7 @@ VERBATIM_HEADERS       = YES
 CLANG_ASSISTED_PARSING = NO
 
 # If clang assisted parsing is enabled you can provide the compiler with command
-# line options that you would normally use when invoking the compiler. Note that
+# line option that you would normally use when invoking the compiler. Note that
 # the include paths will already be set by doxygen for the files and directories
 # specified with INPUT and INCLUDE_PATH.
 # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
@@ -1002,7 +1002,7 @@ CLANG_ASSISTED_PARSING = NO
 CLANG_OPTIONS          =
 
 #---------------------------------------------------------------------------
-# Configuration options related to the alphabetical class index
+# Configuration option related to the alphabetical class index
 #---------------------------------------------------------------------------
 
 # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
@@ -1028,7 +1028,7 @@ COLS_IN_ALPHA_INDEX    = 5
 IGNORE_PREFIX          =
 
 #---------------------------------------------------------------------------
-# Configuration options related to the HTML output
+# Configuration option related to the HTML output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
@@ -1056,7 +1056,7 @@ HTML_FILE_EXTENSION    = .html
 # standard header.
 #
 # To get valid HTML the header file that includes any scripts and style sheets
-# that doxygen needs, which is dependent on the configuration options used (e.g.
+# that doxygen needs, which is dependent on the configuration option used (e.g.
 # the setting GENERATE_TREEVIEW). It is highly recommended to start with a
 # default header using
 # doxygen -w html new_header.html new_footer.html new_stylesheet.css
@@ -1496,7 +1496,7 @@ MATHJAX_CODEFILE       =
 # <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
 # key> to jump into the search results window, the results can be navigated
 # using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
-# the search. The filter options can be selected when the cursor is inside the
+# the search. The filter option can be selected when the cursor is inside the
 # search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
 # to select a filter and <Enter> or <escape> to activate or cancel the filter
 # option.
@@ -1571,7 +1571,7 @@ EXTERNAL_SEARCH_ID     =
 EXTRA_SEARCH_MAPPINGS  =
 
 #---------------------------------------------------------------------------
-# Configuration options related to the LaTeX output
+# Configuration option related to the LaTeX output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
@@ -1729,7 +1729,7 @@ LATEX_SOURCE_CODE      = NO
 LATEX_BIB_STYLE        = plain
 
 #---------------------------------------------------------------------------
-# Configuration options related to the RTF output
+# Configuration option related to the RTF output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
@@ -1795,7 +1795,7 @@ RTF_EXTENSIONS_FILE    =
 RTF_SOURCE_CODE        = NO
 
 #---------------------------------------------------------------------------
-# Configuration options related to the man page output
+# Configuration option related to the man page output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
@@ -1839,7 +1839,7 @@ MAN_SUBDIR             =
 MAN_LINKS              = NO
 
 #---------------------------------------------------------------------------
-# Configuration options related to the XML output
+# Configuration option related to the XML output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
@@ -1866,7 +1866,7 @@ XML_OUTPUT             = xml
 XML_PROGRAMLISTING     = YES
 
 #---------------------------------------------------------------------------
-# Configuration options related to the DOCBOOK output
+# Configuration option related to the DOCBOOK output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
@@ -1893,7 +1893,7 @@ DOCBOOK_OUTPUT         = docbook
 DOCBOOK_PROGRAMLISTING = NO
 
 #---------------------------------------------------------------------------
-# Configuration options for the AutoGen Definitions output
+# Configuration option for the AutoGen Definitions output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
@@ -1905,7 +1905,7 @@ DOCBOOK_PROGRAMLISTING = NO
 GENERATE_AUTOGEN_DEF   = NO
 
 #---------------------------------------------------------------------------
-# Configuration options related to the Perl module output
+# Configuration option related to the Perl module output
 #---------------------------------------------------------------------------
 
 # If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
@@ -1943,7 +1943,7 @@ PERLMOD_PRETTY         = YES
 PERLMOD_MAKEVAR_PREFIX =
 
 #---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
+# Configuration option related to the preprocessor
 #---------------------------------------------------------------------------
 
 # If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
@@ -2021,7 +2021,7 @@ EXPAND_AS_DEFINED      =
 SKIP_FUNCTION_MACROS   = YES
 
 #---------------------------------------------------------------------------
-# Configuration options related to external references
+# Configuration option related to external references
 #---------------------------------------------------------------------------
 
 # The TAGFILES tag can be used to specify one or more tag files. For each tag
@@ -2073,7 +2073,7 @@ EXTERNAL_PAGES         = YES
 PERL_PATH              = /usr/bin/perl
 
 #---------------------------------------------------------------------------
-# Configuration options related to the dot tool
+# Configuration option related to the dot tool
 #---------------------------------------------------------------------------
 
 # If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
@@ -2110,7 +2110,7 @@ HIDE_UNDOC_RELATIONS   = YES
 # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
 # available from the path. This tool is part of Graphviz (see:
 # http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
-# Bell Labs. The other options in this section have no effect if this option is
+# Bell Labs. The other option in this section have no effect if this option is
 # set to NO
 # The default value is: NO.
 
@@ -2357,7 +2357,7 @@ MAX_DOT_GRAPH_DEPTH    = 0
 DOT_TRANSPARENT        = NO
 
 # Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
+# files in one run (i.e. multiple -o and -T option on the command line). This
 # makes dot run faster, but since only newer versions of dot (>1.8.10) support
 # this, this feature is disabled by default.
 # The default value is: NO.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/platforms/dotnet/build.ps1
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/build.ps1 b/modules/platforms/dotnet/build.ps1
index 4b5d937..a6b782c 100644
--- a/modules/platforms/dotnet/build.ps1
+++ b/modules/platforms/dotnet/build.ps1
@@ -49,7 +49,7 @@ Build platform ("Any CPU", "x86", "x64").
 Build configuration ("Release", "Debug").
 
 .PARAMETER mavenOpts
-Custom Maven options, default is "-U -P-lgpl,-scala,-examples,-test,-benchmarks -Dmaven.javadoc.skip=true".
+Custom Maven option, default is "-U -P-lgpl,-scala,-examples,-test,-benchmarks -Dmaven.javadoc.skip=true".
 
 .EXAMPLE
 .\build.ps1 -clean  

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/scalar/src/test/resources/spring-ping-pong-partner.xml
----------------------------------------------------------------------
diff --git a/modules/scalar/src/test/resources/spring-ping-pong-partner.xml b/modules/scalar/src/test/resources/spring-ping-pong-partner.xml
index 766d9fb..643bc16 100644
--- a/modules/scalar/src/test/resources/spring-ping-pong-partner.xml
+++ b/modules/scalar/src/test/resources/spring-ping-pong-partner.xml
@@ -63,8 +63,8 @@
             <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                 <property name="ipFinder">
                     <!--
-                        Ignite provides several options for automatic discovery that can be used
-                        instead os static IP based discovery. For information on all options refer
+                        Ignite provides several option for automatic discovery that can be used
+                        instead os static IP based discovery. For information on all option refer
                         to our documentation: http://apacheignite.readme.io/docs/cluster-config
                     -->
                     <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spring-data/pom.xml b/modules/spring-data/pom.xml
index 6cce90a..5954760 100644
--- a/modules/spring-data/pom.xml
+++ b/modules/spring-data/pom.xml
@@ -42,9 +42,22 @@
         </dependency>
 
         <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-indexing</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-log4j</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-core</artifactId>
-            <version>${spring.version}</version>
+            <version>4.3.7.RELEASE</version>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/main/java/org/apache/ignite/springdata/IgniteKeyValueAdapter.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/main/java/org/apache/ignite/springdata/IgniteKeyValueAdapter.java b/modules/spring-data/src/main/java/org/apache/ignite/springdata/IgniteKeyValueAdapter.java
index bd299a9..ff5b727 100644
--- a/modules/spring-data/src/main/java/org/apache/ignite/springdata/IgniteKeyValueAdapter.java
+++ b/modules/spring-data/src/main/java/org/apache/ignite/springdata/IgniteKeyValueAdapter.java
@@ -185,7 +185,7 @@ public class IgniteKeyValueAdapter extends AbstractKeyValueAdapter {
         if (!keyspace.getClass().equals(String.class))
             throw new IgniteException("Keyspace must be of String type");
 
-        return ignite.cache((String)keyspace);
+        return ignite.getOrCreateCache((String)keyspace);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/Query.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/Query.java b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/Query.java
new file mode 100644
index 0000000..08b7266
--- /dev/null
+++ b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/Query.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.springdata.repository;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation to provide a user defined SQL query for a method.
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface Query {
+    /**
+     * SQL query text string.
+     */
+    String value() default "";
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/config/EnableIgniteRepositories.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/config/EnableIgniteRepositories.java b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/config/EnableIgniteRepositories.java
index 0705e88..1b18e4d 100644
--- a/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/config/EnableIgniteRepositories.java
+++ b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/config/EnableIgniteRepositories.java
@@ -22,6 +22,8 @@ import java.lang.annotation.Inherited;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
+import org.apache.ignite.springdata.repository.support.IgniteRepositoryFactoryBean;
+import org.apache.ignite.springdata.repository.support.SimpleIgniteRepository;
 import org.springframework.beans.factory.FactoryBean;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.annotation.ComponentScan.Filter;
@@ -39,15 +41,12 @@ import org.springframework.data.repository.query.QueryLookupStrategy.Key;
 /**
  * Annotation to activate Apache Ignite repositories. If no base package is configured through either {@link #value()},
  * {@link #basePackages()} or {@link #basePackageClasses()} it will trigger scanning of the package of annotated class.
- *
- * TODO: replace QueryCreatorType with Ignite version of the querying engine.
  */
 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.RUNTIME)
 @Documented
 @Inherited
 @Import(IgniteRepositoriesRegistar.class)
-@QueryCreatorType(value = SpelQueryCreator.class, repositoryQueryType = CachingKeyValuePartTreeQuery.class)
 public @interface EnableIgniteRepositories {
     /**
      * Alias for the {@link #basePackages()} attribute. Allows for more concise annotation declarations e.g.:
@@ -106,20 +105,19 @@ public @interface EnableIgniteRepositories {
     Key queryLookupStrategy() default Key.CREATE_IF_NOT_FOUND;
 
     /**
-     * TODO: replace with Ignite factory bean.
      * Returns the {@link FactoryBean} class to be used for each repository instance. Defaults to
-     * {@link KeyValueRepositoryFactoryBean}.
+     * {@link IgniteRepositoryFactoryBean}.
      *
      * @return
      */
-    Class<?> repositoryFactoryBeanClass() default KeyValueRepositoryFactoryBean.class;
+    Class<?> repositoryFactoryBeanClass() default IgniteRepositoryFactoryBean.class;
 
     /**
      * Configure the repository base class to be used to create repository proxies for this particular configuration.
      *
      * @return
      */
-    Class<?> repositoryBaseClass() default DefaultRepositoryBaseClass.class;
+    Class<?> repositoryBaseClass() default SimpleIgniteRepository.class;
 
     /**
      * Configures the name of the {@link KeyValueOperations} bean to be used with the repositories detected.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/config/IgniteRepositoryConfigurationExtension.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/config/IgniteRepositoryConfigurationExtension.java b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/config/IgniteRepositoryConfigurationExtension.java
index 30f9385..9c2965c 100644
--- a/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/config/IgniteRepositoryConfigurationExtension.java
+++ b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/config/IgniteRepositoryConfigurationExtension.java
@@ -16,6 +16,10 @@
  */
 package org.apache.ignite.springdata.repository.config;
 
+import java.util.Collection;
+import java.util.Collections;
+import org.apache.ignite.springdata.repository.IgniteRepository;
+import org.apache.ignite.springdata.repository.support.IgniteRepositoryFactoryBean;
 import org.springframework.data.keyvalue.repository.config.KeyValueRepositoryConfigurationExtension;
 import org.springframework.data.repository.config.RepositoryConfigurationExtension;
 
@@ -37,4 +41,14 @@ public class IgniteRepositoryConfigurationExtension extends KeyValueRepositoryCo
     @Override protected String getDefaultKeyValueTemplateRef() {
         return "igniteKeyValueTemplate";
     }
+
+    /** {@inheritDoc} */
+    @Override public String getRepositoryFactoryClassName() {
+        return IgniteRepositoryFactoryBean.class.getName();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected Collection<Class<?>> getIdentifyingTypes() {
+        return Collections.<Class<?>>singleton(IgniteRepository.class);
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/config/RepositoryConfig.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/config/RepositoryConfig.java b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/config/RepositoryConfig.java
new file mode 100644
index 0000000..b30ef2e
--- /dev/null
+++ b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/config/RepositoryConfig.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.springdata.repository.config;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The annotation can be used to pass Ignite specific parameters to a bound repository.
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Inherited
+public @interface RepositoryConfig {
+    /**
+     * @return A name of a distributed Apache Ignite cache the repository will be mapped to.
+     */
+    String cacheName() default "";
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/query/IgniteQuery.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/query/IgniteQuery.java b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/query/IgniteQuery.java
new file mode 100644
index 0000000..f630ca0
--- /dev/null
+++ b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/query/IgniteQuery.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.springdata.repository.query;
+
+/**
+ * Ignite query helper class. For internal use only.
+ */
+public class IgniteQuery {
+    /** */
+    enum Option {
+        /** Query will be used with Sort object. */
+        SORTING,
+
+        /** Query will be used with Pageable object. */
+        PAGINATION,
+
+        /** No advanced option. */
+        NONE
+    }
+
+    /** Sql query text string. */
+    private final String sql;
+
+    /** */
+    private final boolean isFieldQuery;
+
+    /** Type of option. */
+    private final Option option;
+
+    /**
+     * @param sql Sql.
+     * @param isFieldQuery Is field query.
+     * @param option Option.
+     */
+    public IgniteQuery(String sql, boolean isFieldQuery, Option option) {
+        this.sql = sql;
+        this.isFieldQuery = isFieldQuery;
+        this.option = option;
+    }
+
+    /**
+     * Text string of the query.
+     *
+     * @return SQL query text string.
+     */
+    public String sql() {
+        return sql;
+    }
+
+    /**
+     * Returns {@code true} if it's Ignite SQL fields query, {@code false} otherwise.
+     *
+     * @return {@code true} if it's Ignite SQL fields query, {@code false} otherwise.
+     */
+    public boolean isFieldQuery() {
+        return isFieldQuery;
+    }
+
+    /**
+     * Advanced querying option.
+     *
+     * @return querying option.
+     */
+    public Option options() {
+        return option;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/query/IgniteQueryGenerator.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/query/IgniteQueryGenerator.java b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/query/IgniteQueryGenerator.java
new file mode 100644
index 0000000..2db2789
--- /dev/null
+++ b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/query/IgniteQueryGenerator.java
@@ -0,0 +1,243 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.springdata.repository.query;
+
+import java.lang.reflect.Method;
+import org.jetbrains.annotations.NotNull;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
+import org.springframework.data.repository.core.RepositoryMetadata;
+import org.springframework.data.repository.query.parser.Part;
+import org.springframework.data.repository.query.parser.PartTree;
+
+/**
+ * Ignite query generator for Spring Data framework.
+ */
+public class IgniteQueryGenerator {
+
+    /**
+     * @param mtd Method.
+     * @param metadata Metadata.
+     */
+    @NotNull public static IgniteQuery generateSql(Method mtd, RepositoryMetadata metadata) {
+        PartTree parts = new PartTree(mtd.getName(), metadata.getDomainType());
+
+        StringBuilder sql = new StringBuilder();
+
+        if (parts.isDelete())
+            throw new UnsupportedOperationException("DELETE clause is not supported now.");
+        else {
+            sql.append("SELECT ");
+
+            if (parts.isDistinct())
+                throw new UnsupportedOperationException("DISTINCT clause in not supported.");
+
+            if (parts.isCountProjection())
+                sql.append("COUNT(1) ");
+            else
+                sql.append(" * ");
+        }
+
+        sql.append("FROM ").append(metadata.getDomainType().getSimpleName());
+
+        if (parts.iterator().hasNext()) {
+            sql.append(" WHERE ");
+
+            for (PartTree.OrPart orPart : parts) {
+                sql.append("(");
+                for (Part part : orPart) {
+                    handleQueryPart(sql, part);
+                    sql.append(" AND ");
+                }
+
+                sql.delete(sql.length() - 5, sql.length());
+
+                sql.append(") OR ");
+            }
+
+            sql.delete(sql.length() - 4, sql.length());
+        }
+
+        addSorting(sql, parts.getSort());
+
+        if (parts.isLimiting()) {
+            sql.append(" LIMIT ");
+            sql.append(parts.getMaxResults().intValue());
+        }
+
+        return new IgniteQuery(sql.toString(), parts.isCountProjection(), getOptions(mtd));
+    }
+
+    /**
+     * Add a dynamic part of query for the sorting support.
+     *
+     * @param sql SQL text string.
+     * @param sort Sort method.
+     */
+    public static StringBuilder addSorting(StringBuilder sql, Sort sort) {
+        if (sort != null) {
+            sql.append(" ORDER BY ");
+
+            for (Sort.Order order : sort) {
+                sql.append(order.getProperty()).append(" ").append(order.getDirection());
+
+                if (order.getNullHandling() != Sort.NullHandling.NATIVE) {
+                    sql.append(" ").append("NULL ");
+                    switch (order.getNullHandling()) {
+                        case NULLS_FIRST:
+                            sql.append("FIRST");
+                            break;
+                        case NULLS_LAST:
+                            sql.append("LAST");
+                            break;
+                    }
+                }
+                sql.append(", ");
+            }
+
+            sql.delete(sql.length() - 2, sql.length());
+        }
+
+        return sql;
+    }
+
+    /**
+     * Add a dynamic part of a query for the pagination support.
+     *
+     * @param sql
+     * @param pageable
+     * @return
+     */
+    public static StringBuilder addPaging(StringBuilder sql, Pageable pageable) {
+        if (pageable.getSort() != null)
+            addSorting(sql, pageable.getSort());
+
+        sql.append(" LIMIT ").append(pageable.getPageSize()).append(" OFFSET ").append(pageable.getOffset());
+
+        return sql;
+    }
+
+    /**
+     * Determines whether query is dynamic or not (by list of method parameters)
+     *
+     * @param mtd
+     * @return type of options
+     */
+    public static IgniteQuery.Option getOptions(Method mtd) {
+        IgniteQuery.Option option;
+
+        Class<?>[] types = mtd.getParameterTypes();
+        Class<?> type = types[types.length - 1];
+
+        if (Sort.class.isAssignableFrom(type))
+            option = IgniteQuery.Option.SORTING;
+        else if (Pageable.class.isAssignableFrom(type))
+            option = IgniteQuery.Option.PAGINATION;
+        else
+            option = IgniteQuery.Option.NONE;
+
+        for (int i = 0; i < types.length - 1; i++) {
+            Class<?> tp = types[i];
+            if (tp == Sort.class || tp == Pageable.class)
+                throw new AssertionError("Sort and Pageable parameters are allowed only in the last position");
+        }
+
+        return option;
+    }
+
+    /**
+     * Transform part to sql expression
+     */
+    private static void handleQueryPart(StringBuilder sql, Part part) {
+        sql.append("(");
+
+        sql.append(part.getProperty());
+
+        switch (part.getType()) {
+            case SIMPLE_PROPERTY:
+                sql.append("=?");
+                break;
+            case NEGATING_SIMPLE_PROPERTY:
+                sql.append("<>?");
+                break;
+            case GREATER_THAN:
+                sql.append(">?");
+                break;
+            case GREATER_THAN_EQUAL:
+                sql.append(">=?");
+                break;
+            case LESS_THAN:
+                sql.append("<?");
+                break;
+            case LESS_THAN_EQUAL:
+                sql.append("<=?");
+                break;
+            case IS_NOT_NULL:
+                sql.append(" IS NOT NULL");
+                break;
+            case IS_NULL:
+                sql.append(" IS NULL");
+                break;
+            case BETWEEN:
+                sql.append(" BETWEEN ? AND ?");
+                break;
+            case FALSE:
+                sql.append(" = FALSE");
+                break;
+            case TRUE:
+                sql.append(" = TRUE");
+                break;
+            case CONTAINING:
+                sql.append(" LIKE '%' || ? || '%'");
+                break;
+            case NOT_CONTAINING:
+                sql.append(" NOT LIKE '%' || ? || '%'");
+                break;
+            case LIKE:
+                sql.append(" LIKE '%' || ? || '%'");
+                break;
+            case NOT_LIKE:
+                sql.append(" NOT LIKE '%' || ? || '%'");
+                break;
+            case STARTING_WITH:
+                sql.append(" LIKE  ? || '%'");
+                break;
+            case ENDING_WITH:
+                sql.append(" LIKE '%' || ?");
+                break;
+            case IN:
+                sql.append(" IN ?");
+                break;
+            case NOT_IN:
+                sql.append(" NOT IN ?");
+                break;
+            case REGEX:
+                sql.append(" REGEXP ?");
+                break;
+            case NEAR:
+            case AFTER:
+            case BEFORE:
+            case EXISTS:
+            default:
+                throw new UnsupportedOperationException(part.getType() + " is not supported!");
+        }
+
+        sql.append(")");
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/query/IgniteRepositoryQuery.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/query/IgniteRepositoryQuery.java b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/query/IgniteRepositoryQuery.java
new file mode 100644
index 0000000..c6e171f
--- /dev/null
+++ b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/query/IgniteRepositoryQuery.java
@@ -0,0 +1,306 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.springdata.repository.query;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import javax.cache.Cache;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.query.Query;
+import org.apache.ignite.cache.query.QueryCursor;
+import org.apache.ignite.cache.query.SqlFieldsQuery;
+import org.apache.ignite.cache.query.SqlQuery;
+import org.apache.ignite.internal.processors.cache.CacheEntryImpl;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Slice;
+import org.springframework.data.domain.SliceImpl;
+import org.springframework.data.domain.Sort;
+import org.springframework.data.projection.ProjectionFactory;
+import org.springframework.data.repository.core.RepositoryMetadata;
+import org.springframework.data.repository.query.QueryMethod;
+import org.springframework.data.repository.query.RepositoryQuery;
+
+/**
+ * Ignite SQL query implementation.
+ */
+@SuppressWarnings("unchecked")
+public class IgniteRepositoryQuery implements RepositoryQuery {
+    /** Defines the way how to process query result */
+    private enum ReturnStrategy {
+        /** Need to return only one value. */
+        ONE_VALUE,
+
+        /** Need to return one cache entry */
+        CACHE_ENTRY,
+
+        /** Need to return list of cache entries */
+        LIST_OF_CACHE_ENTRIES,
+
+        /** Need to return list of values */
+        LIST_OF_VALUES,
+
+        /** Need to return list of lists */
+        LIST_OF_LISTS,
+
+        /** Need to return slice */
+        SLICE_OF_VALUES,
+
+        /** Slice of cache entries. */
+        SLICE_OF_CACHE_ENTRIES,
+
+        /** Slice of lists. */
+        SLICE_OF_LISTS
+    }
+
+    /** Type. */
+    private final Class<?> type;
+    /** Sql. */
+    private final IgniteQuery qry;
+    /** Cache. */
+    private final IgniteCache cache;
+
+    /** Method. */
+    private final Method mtd;
+    /** Metadata. */
+    private final RepositoryMetadata metadata;
+    /** Factory. */
+    private final ProjectionFactory factory;
+
+    /** Return strategy. */
+    private final ReturnStrategy returnStgy;
+
+    /**
+     * @param metadata Metadata.
+     * @param qry Query.
+     * @param mtd Method.
+     * @param factory Factory.
+     * @param cache Cache.
+     */
+    public IgniteRepositoryQuery(RepositoryMetadata metadata, IgniteQuery qry,
+        Method mtd, ProjectionFactory factory, IgniteCache cache) {
+        type = metadata.getDomainType();
+        this.qry = qry;
+        this.cache = cache;
+
+        this.metadata = metadata;
+        this.mtd = mtd;
+        this.factory = factory;
+
+        returnStgy = calcReturnType(mtd, qry.isFieldQuery());
+    }
+
+    /** {@inheritDoc} */
+    @Override public Object execute(Object[] prmtrs) {
+        Query qry = prepareQuery(prmtrs);
+
+        QueryCursor qryCursor = cache.query(qry);
+
+        return transformQueryCursor(prmtrs, qryCursor);
+    }
+
+    /** {@inheritDoc} */
+    @Override public QueryMethod getQueryMethod() {
+        return new QueryMethod(mtd, metadata, factory);
+    }
+
+    /**
+     * @param mtd Method.
+     * @param isFieldQry Is field query.
+     */
+    private ReturnStrategy calcReturnType(Method mtd, boolean isFieldQry) {
+        Class<?> returnType = mtd.getReturnType();
+
+        if (returnType.isAssignableFrom(ArrayList.class)) {
+            if (isFieldQry) {
+                if (hasAssignableGenericReturnTypeFrom(ArrayList.class, mtd))
+                    return ReturnStrategy.LIST_OF_LISTS;
+            }
+            else if (hasAssignableGenericReturnTypeFrom(Cache.Entry.class, mtd))
+                return ReturnStrategy.LIST_OF_CACHE_ENTRIES;
+
+            return ReturnStrategy.LIST_OF_VALUES;
+        }
+        else if (returnType == Slice.class) {
+            if (isFieldQry) {
+                if (hasAssignableGenericReturnTypeFrom(ArrayList.class, mtd))
+                    return ReturnStrategy.SLICE_OF_LISTS;
+            }
+            else if (hasAssignableGenericReturnTypeFrom(Cache.Entry.class, mtd))
+                return ReturnStrategy.SLICE_OF_CACHE_ENTRIES;
+
+            return ReturnStrategy.SLICE_OF_VALUES;
+        }
+        else if (Cache.Entry.class.isAssignableFrom(returnType))
+            return ReturnStrategy.CACHE_ENTRY;
+        else
+            return ReturnStrategy.ONE_VALUE;
+    }
+
+    /**
+     * @param cls Class 1.
+     * @param mtd Method.
+     */
+    private boolean hasAssignableGenericReturnTypeFrom(Class<?> cls, Method mtd) {
+        Type[] actualTypeArguments = ((ParameterizedType)mtd.getGenericReturnType()).getActualTypeArguments();
+
+        if (actualTypeArguments.length == 0)
+            return false;
+
+        if (actualTypeArguments[0] instanceof ParameterizedType) {
+            ParameterizedType type = (ParameterizedType)actualTypeArguments[0];
+
+            Class<?> type1 = (Class)type.getRawType();
+
+            return type1.isAssignableFrom(cls);
+        }
+
+        if (actualTypeArguments[0] instanceof Class) {
+            Class typeArg = (Class)actualTypeArguments[0];
+
+            return typeArg.isAssignableFrom(cls);
+        }
+
+        return false;
+    }
+
+    /**
+     * @param prmtrs Prmtrs.
+     * @param qryCursor Query cursor.
+     */
+    @Nullable private Object transformQueryCursor(Object[] prmtrs, QueryCursor qryCursor) {
+        if (this.qry.isFieldQuery()) {
+            Iterable<ArrayList> qryIter = (Iterable<ArrayList>)qryCursor;
+
+            switch (returnStgy) {
+                case LIST_OF_VALUES:
+                    ArrayList list = new ArrayList();
+
+                    for (ArrayList entry : qryIter)
+                        list.add(entry.get(0));
+
+                    return list;
+                case ONE_VALUE:
+                    Iterator<ArrayList> iter = qryIter.iterator();
+
+                    if (iter.hasNext())
+                        return iter.next().get(0);
+
+                    return null;
+                case SLICE_OF_VALUES:
+                    ArrayList content = new ArrayList();
+
+                    for (ArrayList entry : qryIter)
+                        content.add(entry.get(0));
+
+                    return new SliceImpl(content, (Pageable)prmtrs[prmtrs.length - 1], true);
+                case SLICE_OF_LISTS:
+                    return new SliceImpl(qryCursor.getAll(), (Pageable)prmtrs[prmtrs.length - 1], true);
+                case LIST_OF_LISTS:
+                    return qryCursor.getAll();
+                default:
+                    throw new IllegalStateException();
+            }
+        }
+        else {
+            Iterable<CacheEntryImpl> qryIter = (Iterable<CacheEntryImpl>)qryCursor;
+
+            switch (returnStgy) {
+                case LIST_OF_VALUES:
+                    ArrayList list = new ArrayList();
+
+                    for (CacheEntryImpl entry : qryIter)
+                        list.add(entry.getValue());
+
+                    return list;
+                case ONE_VALUE:
+                    Iterator<CacheEntryImpl> iter1 = qryIter.iterator();
+
+                    if (iter1.hasNext())
+                        return iter1.next().getValue();
+
+                    return null;
+                case CACHE_ENTRY:
+                    Iterator<CacheEntryImpl> iter2 = qryIter.iterator();
+
+                    if (iter2.hasNext())
+                        return iter2.next();
+
+                    return null;
+                case SLICE_OF_VALUES:
+                    ArrayList content = new ArrayList();
+
+                    for (CacheEntryImpl entry : qryIter)
+                        content.add(entry.getValue());
+
+                    return new SliceImpl(content, (Pageable)prmtrs[prmtrs.length - 1], true);
+                case SLICE_OF_CACHE_ENTRIES:
+                    return new SliceImpl(qryCursor.getAll(), (Pageable)prmtrs[prmtrs.length - 1], true);
+                case LIST_OF_CACHE_ENTRIES:
+                    return qryCursor.getAll();
+                default:
+                    throw new IllegalStateException();
+            }
+        }
+    }
+
+    /**
+     * @param prmtrs Prmtrs.
+     * @return prepared query for execution
+     */
+    @NotNull private Query prepareQuery(Object[] prmtrs) {
+        Object[] parameters = prmtrs;
+        String sql = qry.sql();
+
+        Query query;
+
+        switch (qry.options()) {
+            case SORTING:
+                sql = IgniteQueryGenerator.addSorting(new StringBuilder(sql),
+                    (Sort)parameters[parameters.length - 1]).toString();
+                parameters = Arrays.copyOfRange(parameters, 0, parameters.length - 1);
+                break;
+            case PAGINATION:
+                sql = IgniteQueryGenerator.addPaging(new StringBuilder(sql),
+                    (Pageable)parameters[parameters.length - 1]).toString();
+                parameters = Arrays.copyOfRange(parameters, 0, parameters.length - 1);
+                break;
+        }
+
+        if (qry.isFieldQuery()) {
+            SqlFieldsQuery sqlFieldsQry = new SqlFieldsQuery(sql);
+            sqlFieldsQry.setArgs(parameters);
+
+            query = sqlFieldsQry;
+        }
+        else {
+            SqlQuery sqlQry = new SqlQuery(type, sql);
+            sqlQry.setArgs(parameters);
+
+            query = sqlQry;
+        }
+
+        return query;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/support/IgniteRepositoryFactory.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/support/IgniteRepositoryFactory.java b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/support/IgniteRepositoryFactory.java
new file mode 100644
index 0000000..006bd5a
--- /dev/null
+++ b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/support/IgniteRepositoryFactory.java
@@ -0,0 +1,176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ignite.springdata.repository.support;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.springdata.IgniteKeyValueAdapter;
+import org.apache.ignite.springdata.repository.IgniteRepository;
+import org.apache.ignite.springdata.repository.Query;
+import org.apache.ignite.springdata.repository.config.RepositoryConfig;
+import org.apache.ignite.springdata.repository.query.IgniteQuery;
+import org.apache.ignite.springdata.repository.query.IgniteQueryGenerator;
+import org.apache.ignite.springdata.repository.query.IgniteRepositoryQuery;
+import org.springframework.data.keyvalue.core.KeyValueAdapter;
+import org.springframework.data.keyvalue.core.KeyValueOperations;
+import org.springframework.data.keyvalue.core.KeyValueTemplate;
+import org.springframework.data.keyvalue.repository.support.KeyValueRepositoryFactory;
+import org.springframework.data.projection.ProjectionFactory;
+import org.springframework.data.repository.core.NamedQueries;
+import org.springframework.data.repository.core.RepositoryMetadata;
+import org.springframework.data.repository.query.EvaluationContextProvider;
+import org.springframework.data.repository.query.QueryLookupStrategy;
+import org.springframework.data.repository.query.RepositoryQuery;
+import org.springframework.data.repository.query.parser.AbstractQueryCreator;
+import org.springframework.data.util.ReflectionUtils;
+import org.springframework.util.Assert;
+import org.springframework.util.StringUtils;
+
+/**
+ * Crucial for spring-data functionality class. Create proxies for repositories.
+ */
+public class IgniteRepositoryFactory extends KeyValueRepositoryFactory {
+    /** Ignite instance */
+    private Ignite ignite;
+
+    /** Mapping of a repository to a cache. */
+    private final Map<Class<?>, String> repoToCache = new HashMap<>();
+
+    public IgniteRepositoryFactory(KeyValueOperations keyValueOperations) {
+        super(keyValueOperations);
+
+        initRepositoryFactory(keyValueOperations);
+    }
+
+    public IgniteRepositoryFactory(KeyValueOperations keyValueOperations,
+        Class<? extends AbstractQueryCreator<?, ?>> queryCreator) {
+        super(keyValueOperations, queryCreator);
+
+        initRepositoryFactory(keyValueOperations);
+    }
+
+    public IgniteRepositoryFactory(KeyValueOperations keyValueOperations,
+        Class<? extends AbstractQueryCreator<?, ?>> queryCreator,
+        Class<? extends RepositoryQuery> repositoryQueryType) {
+        super(keyValueOperations, queryCreator, repositoryQueryType);
+
+        initRepositoryFactory(keyValueOperations);
+    }
+
+    private void initRepositoryFactory(KeyValueOperations keyValueOperations) {
+        try {
+            Field field = ReflectionUtils.findField(KeyValueTemplate.class,
+                new org.springframework.util.ReflectionUtils.FieldFilter() {
+                    @Override public boolean matches(Field field) {
+                        return field.getName().equals("adapter");
+                    }
+                });
+
+            field.setAccessible(true);
+
+            IgniteKeyValueAdapter adapter = (IgniteKeyValueAdapter)field.get(keyValueOperations);
+
+            field = ReflectionUtils.findField(IgniteKeyValueAdapter.class,
+                new org.springframework.util.ReflectionUtils.FieldFilter() {
+                    @Override public boolean matches(Field field) {
+                        return field.getName().equals("ignite");
+                    }
+                });
+
+            field.setAccessible(true);
+
+            ignite = (Ignite)field.get(adapter);
+
+            if (ignite == null)
+                throw new IgniteException("Failed to initialize IgniteRepositoryFactory properly: Ignite instance is " +
+                    "not set in IgniteKeyValueAdapter");
+        }
+        catch (Exception e) {
+            throw new IgniteException("Failed to initialize IgniteRepositoryFactory properly.", e);
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override protected Class<?> getRepositoryBaseClass(RepositoryMetadata metadata) {
+        return SimpleIgniteRepository.class;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected RepositoryMetadata getRepositoryMetadata(Class<?> repoItf) {
+        Assert.notNull(repoItf, "Repository interface must be set.");
+        Assert.isAssignable(IgniteRepository.class, repoItf, "Repository must implement IgniteRepository interface.");
+
+        RepositoryConfig annotation = repoItf.getAnnotation(RepositoryConfig.class);
+
+        Assert.notNull(annotation, "Set a name of an Apache Ignite cache using @RepositoryConfig annotation to map " +
+            "this repository to the underlying cache.");
+
+        Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " +
+            "annotation to map this repository to the underlying cache.");
+
+        repoToCache.put(repoItf, annotation.cacheName());
+
+        return super.getRepositoryMetadata(repoItf);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected QueryLookupStrategy getQueryLookupStrategy(final QueryLookupStrategy.Key key,
+        EvaluationContextProvider evaluationCtxProvider) {
+
+        return new QueryLookupStrategy() {
+            @Override public RepositoryQuery resolveQuery(final Method mtd, final RepositoryMetadata metadata,
+                final ProjectionFactory factory, NamedQueries namedQueries) {
+
+                final Query annotation = mtd.getAnnotation(Query.class);
+
+                if (annotation != null) {
+                    String qryStr = annotation.value();
+
+                    if (key != Key.CREATE && StringUtils.hasText(qryStr))
+                        return new IgniteRepositoryQuery(metadata,
+                            new IgniteQuery(qryStr, isFieldQuery(qryStr), IgniteQueryGenerator.getOptions(mtd)),
+                            mtd, factory, ignite.getOrCreateCache(repoToCache.get(metadata.getRepositoryInterface())));
+                }
+
+                if (key == QueryLookupStrategy.Key.USE_DECLARED_QUERY)
+                    throw new IllegalStateException("To use QueryLookupStrategy.Key.USE_DECLARED_QUERY, pass " +
+                        "a query string via org.apache.ignite.springdata.repository.Query annotation.");
+
+                return new IgniteRepositoryQuery(metadata, IgniteQueryGenerator.generateSql(mtd, metadata), mtd,
+                    factory, ignite.getOrCreateCache(repoToCache.get(metadata.getRepositoryInterface())));
+            }
+        };
+    }
+
+    /**
+     * @param s
+     * @return
+     */
+    private boolean isFieldQuery(String s) {
+        return s.matches("^SELECT.*") && !s.matches("^SELECT\\s+(?:\\w+\\.)?+\\*.*");
+    }
+}
+
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/support/IgniteRepositoryFactoryBean.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/support/IgniteRepositoryFactoryBean.java b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/support/IgniteRepositoryFactoryBean.java
new file mode 100644
index 0000000..9d1c8c1
--- /dev/null
+++ b/modules/spring-data/src/main/java/org/apache/ignite/springdata/repository/support/IgniteRepositoryFactoryBean.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.springdata.repository.support;
+
+import java.io.Serializable;
+import org.apache.ignite.springdata.repository.IgniteRepository;
+import org.springframework.data.keyvalue.core.KeyValueOperations;
+import org.springframework.data.keyvalue.repository.support.KeyValueRepositoryFactory;
+import org.springframework.data.keyvalue.repository.support.KeyValueRepositoryFactoryBean;
+import org.springframework.data.repository.Repository;
+import org.springframework.data.repository.query.RepositoryQuery;
+import org.springframework.data.repository.query.parser.AbstractQueryCreator;
+
+/**
+ * Apache Ignite repository factory bean.
+ *
+ * @param <T> Repository type, {@link IgniteRepository}
+ * @param <S> Domain object class.
+ * @param <ID> Domain object key, super expects {@link Serializable}.
+ */
+public class IgniteRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extends Serializable>
+    extends KeyValueRepositoryFactoryBean<T, S, ID> {
+
+    /**
+     * Creates a new {@code IgniteRepositoryFactoryBean} for the given repository interface.
+     *
+     * @param repositoryInterface must not be {@literal null}.
+     */
+    public IgniteRepositoryFactoryBean(Class<? extends T> repositoryInterface) {
+        super(repositoryInterface);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected KeyValueRepositoryFactory createRepositoryFactory(KeyValueOperations operations,
+        Class<? extends AbstractQueryCreator<?, ?>> queryCreator,
+        Class<? extends RepositoryQuery> repositoryQueryType) {
+        return new IgniteRepositoryFactory(operations, queryCreator, repositoryQueryType);
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataSelfTest.java b/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataSelfTest.java
new file mode 100644
index 0000000..a097c29
--- /dev/null
+++ b/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataSelfTest.java
@@ -0,0 +1,286 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.springdata;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import javax.cache.Cache;
+import org.apache.ignite.springdata.misc.FirstRepository;
+import org.apache.ignite.springdata.misc.Person;
+import org.apache.ignite.springdata.misc.SecondRepository;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.springframework.context.annotation.AnnotationConfigApplicationContext;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Slice;
+import org.springframework.data.domain.Sort;
+
+/**
+ *
+ */
+public class IgniteSpringDataSelfTest extends GridCommonAbstractTest {
+    /** Repository. */
+    private static FirstRepository repo;
+
+    /** Repository 2. */
+    private static SecondRepository repo2;
+
+    /** Context. */
+    private static AnnotationConfigApplicationContext ctx;
+
+    @Override protected void beforeTestsStarted() throws Exception {
+        super.beforeTestsStarted();
+
+        ctx = new AnnotationConfigApplicationContext();
+
+        ctx.scan("org.apache.ignite.springdata");
+        ctx.refresh();
+
+        repo = ctx.getBean(FirstRepository.class);
+        repo2 = ctx.getBean(SecondRepository.class);
+
+        for (int i = 0; i < 1000; i++)
+            repo.save(i, new Person("person" + Integer.toHexString(i),
+                "lastName" + Integer.toHexString((i + 16) % 256)));
+    }
+
+    @Override protected void afterTestsStopped() throws Exception {
+        ctx.destroy();
+
+        super.afterTestsStopped();
+    }
+
+    /** */
+    public void testExplicitQuery() {
+        List<Person> persons = repo.simpleQuery("person4a");
+
+        assertFalse(persons.isEmpty());
+
+        for (Person person : persons)
+            assertEquals("person4a", person.getFirstName());
+    }
+
+    /** */
+    public void testEqualsPart() {
+        List<Person> persons = repo.findByFirstName("person4e");
+
+        assertFalse(persons.isEmpty());
+
+        for (Person person : persons)
+            assertEquals("person4e", person.getFirstName());
+    }
+
+    /** */
+    public void testContainingPart() {
+        List<Person> persons = repo.findByFirstNameContaining("person4");
+
+        assertFalse(persons.isEmpty());
+
+        for (Person person : persons)
+            assertTrue(person.getFirstName().startsWith("person4"));
+    }
+
+    /** */
+    public void testTopPart() {
+        Iterable<Person> top = repo.findTopByFirstNameContaining("person4");
+
+        Iterator<Person> iter = top.iterator();
+
+        Person person = iter.next();
+
+        assertFalse(iter.hasNext());
+
+        assertTrue(person.getFirstName().startsWith("person4"));
+    }
+
+    /** */
+    public void testLikeAndLimit() {
+        Iterable<Person> like = repo.findFirst10ByFirstNameLike("person");
+
+        int cnt = 0;
+
+        for (Person next : like) {
+            assertTrue(next.getFirstName().contains("person"));
+
+            cnt++;
+        }
+
+        assertEquals(10, cnt);
+    }
+
+    /** */
+    public void testCount() {
+        int cnt = repo.countByFirstNameLike("person");
+
+        assertEquals(1000, cnt);
+    }
+
+    /** */
+    public void testCount2() {
+        int cnt = repo.countByFirstNameLike("person4");
+
+        assertTrue(cnt < 1000);
+    }
+
+    /** */
+    public void testPageable() {
+        PageRequest pageable = new PageRequest(1, 5, Sort.Direction.DESC, "firstName");
+
+        HashSet<String> firstNames = new HashSet<>();
+
+        List<Person> pageable1 = repo.findByFirstNameRegex("^[a-z]+$", pageable);
+
+        assertEquals(5, pageable1.size());
+
+        for (Person person : pageable1) {
+            firstNames.add(person.getFirstName());
+            assertTrue(person.getFirstName().matches("^[a-z]+$"));
+        }
+
+        List<Person> pageable2 = repo.findByFirstNameRegex("^[a-z]+$", pageable.next());
+
+        assertEquals(5, pageable2.size());
+
+        for (Person person : pageable2) {
+            firstNames.add(person.getFirstName());
+            assertTrue(person.getFirstName().matches("^[a-z]+$"));
+        }
+
+        assertEquals(10, firstNames.size());
+    }
+
+    /** */
+    public void testAndAndOr() {
+        int cntAnd = repo.countByFirstNameLikeAndSecondNameLike("person1", "lastName1");
+
+        int cntOr = repo.countByFirstNameStartingWithOrSecondNameStartingWith("person1", "lastName1");
+
+        assertTrue(cntAnd <= cntOr);
+    }
+
+    /** */
+    public void testQueryWithSort() {
+        List<Person> persons = repo.queryWithSort("^[a-z]+$", new Sort(Sort.Direction.DESC, "secondName"));
+
+        Person previous = persons.get(0);
+
+        for (Person person : persons) {
+            assertTrue(person.getSecondName().compareTo(previous.getSecondName()) <= 0);
+
+            assertTrue(person.getFirstName().matches("^[a-z]+$"));
+
+            previous = person;
+        }
+    }
+
+    /** */
+    public void testQueryWithPaging() {
+        List<Person> persons = repo.queryWithPageable("^[a-z]+$", new PageRequest(1, 7, Sort.Direction.DESC, "secondName"));
+
+        assertEquals(7, persons.size());
+
+        Person previous = persons.get(0);
+
+        for (Person person : persons) {
+            assertTrue(person.getSecondName().compareTo(previous.getSecondName()) <= 0);
+
+            assertTrue(person.getFirstName().matches("^[a-z]+$"));
+
+            previous = person;
+        }
+    }
+
+    /** */
+    public void testQueryFields() {
+        List<String> persons = repo.selectField("^[a-z]+$", new PageRequest(1, 7, Sort.Direction.DESC, "secondName"));
+
+        assertEquals(7, persons.size());
+    }
+
+    /** */
+    public void testFindCacheEntries() {
+        List<Cache.Entry<Integer, Person>> cacheEntries = repo.findBySecondNameLike("stName1");
+
+        assertFalse(cacheEntries.isEmpty());
+
+        for (Cache.Entry<Integer, Person> entry : cacheEntries)
+            assertTrue(entry.getValue().getSecondName().contains("stName1"));
+    }
+
+    /** */
+    public void testFindOneCacheEntry() {
+        Cache.Entry<Integer, Person> cacheEntry = repo.findTopBySecondNameLike("tName18");
+
+        assertNotNull(cacheEntry);
+
+        assertTrue(cacheEntry.getValue().getSecondName().contains("tName18"));
+    }
+
+    /** */
+    public void testFindOneValue() {
+        Person person = repo.findTopBySecondNameStartingWith("lastName18");
+
+        assertNotNull(person);
+
+        assertTrue(person.getSecondName().startsWith("lastName18"));
+    }
+
+    /** */
+    public void testSelectSeveralFields() {
+        List<List> lists = repo.selectSeveralField("^[a-z]+$", new PageRequest(2, 6));
+
+        assertEquals(6, lists.size());
+
+        for (List list : lists) {
+            assertEquals(2, list.size());
+
+            assertTrue(list.get(0) instanceof Integer);
+        }
+    }
+
+    /** */
+    public void testCountQuery() {
+        int cnt = repo.countQuery(".*");
+
+        assertEquals(256, cnt);
+    }
+
+    /** */
+    public void testSliceOfCacheEntries() {
+        Slice<Cache.Entry<Integer, Person>> slice = repo2.findBySecondNameIsNot("lastName18", new PageRequest(3, 4));
+
+        assertEquals(4, slice.getSize());
+
+        for (Cache.Entry<Integer, Person> entry : slice)
+            assertFalse("lastName18".equals(entry.getValue().getSecondName()));
+    }
+
+    /** */
+    public void testSliceOfLists() {
+        Slice<List> lists = repo2.querySliceOfList("^[a-z]+$", new PageRequest(0, 3));
+
+        assertEquals(3, lists.getSize());
+
+        for (List list : lists) {
+            assertEquals(2, list.size());
+
+            assertTrue(list.get(0) instanceof Integer);
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataTestSuite.java b/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataTestSuite.java
new file mode 100644
index 0000000..fb8c2a4
--- /dev/null
+++ b/modules/spring-data/src/test/java/org/apache/ignite/springdata/IgniteSpringDataTestSuite.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.springdata;
+
+import junit.framework.TestSuite;
+
+/**
+ *
+ */
+public class IgniteSpringDataTestSuite extends TestSuite {
+    /**
+     * @return Test suite.
+     * @throws Exception Thrown in case of the failure.
+     */
+    public static TestSuite suite() throws Exception {
+        TestSuite suite = new TestSuite("Spring Data Test Suite");
+
+        suite.addTest(new IgniteSpringDataSelfTest());
+
+        return suite;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/ApplicationConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/ApplicationConfiguration.java b/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/ApplicationConfiguration.java
new file mode 100644
index 0000000..aa7a7ae
--- /dev/null
+++ b/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/ApplicationConfiguration.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.springdata.misc;
+
+import org.apache.ignite.Ignite;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.springdata.IgniteKeyValueAdapter;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.apache.ignite.springdata.repository.config.EnableIgniteRepositories;
+import org.springframework.data.keyvalue.core.KeyValueOperations;
+import org.springframework.data.keyvalue.core.KeyValueTemplate;
+
+/**
+ *
+ */
+@Configuration
+@EnableIgniteRepositories
+public class ApplicationConfiguration {
+    @Bean
+    public Ignite igniteInstance() {
+        IgniteConfiguration cfg = new IgniteConfiguration();
+
+        CacheConfiguration ccfg = new CacheConfiguration("cache");
+
+        ccfg.setIndexedTypes(Integer.class, Person.class);
+
+        cfg.setCacheConfiguration(ccfg);
+
+        return Ignition.start(cfg);
+    }
+
+    @Bean
+    public KeyValueOperations igniteKeyValueTemplate(Ignite igniteInstance) {
+        return new KeyValueTemplate(new IgniteKeyValueAdapter(igniteInstance));
+    }
+
+    @Bean
+    public IgniteKeyValueAdapter igniteKeyValueAdapter(Ignite igniteInstance) {
+        return new IgniteKeyValueAdapter(igniteInstance);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/FirstRepository.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/FirstRepository.java b/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/FirstRepository.java
new file mode 100644
index 0000000..315162d
--- /dev/null
+++ b/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/FirstRepository.java
@@ -0,0 +1,92 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.springdata.misc;
+
+import java.util.Collection;
+import java.util.List;
+import javax.cache.Cache;
+import org.apache.ignite.springdata.repository.Query;
+import org.apache.ignite.springdata.repository.config.RepositoryConfig;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
+import org.apache.ignite.springdata.repository.IgniteRepository;
+
+/**
+ *
+ */
+@RepositoryConfig(cacheName = "cache")
+public interface FirstRepository extends IgniteRepository<Person, Integer> {
+    /** */
+    public List<Person> findByFirstName(String val);
+
+    /** */
+    public List<Person> findByFirstNameContaining(String val);
+
+    /** */
+    public List<Person> findByFirstNameRegex(String val, Pageable pageable);
+
+    /** */
+    public Collection<Person> findTopByFirstNameContaining(String val);
+
+    /** */
+    public Iterable<Person> findFirst10ByFirstNameLike(String val);
+
+    /** */
+    public int countByFirstNameLike(String val);
+
+    /** */
+    public int countByFirstNameLikeAndSecondNameLike(String like1, String like2);
+
+    /** */
+    public int countByFirstNameStartingWithOrSecondNameStartingWith(String like1, String like2);
+
+    /** */
+    public List<Cache.Entry<Integer, Person>> findBySecondNameLike(String val);
+
+    /** */
+    public Cache.Entry<Integer, Person> findTopBySecondNameLike(String val);
+
+    /** */
+    public Person findTopBySecondNameStartingWith(String val);
+
+    /** */
+    @Query("firstName = ?")
+    public List<Person> simpleQuery(String val);
+
+    /** */
+    @Query("firstName REGEXP ?")
+    public List<Person> queryWithSort(String val, Sort sort);
+
+    /** */
+    @Query("SELECT * FROM Person WHERE firstName REGEXP ?")
+    public List<Person> queryWithPageable(String val, Pageable pageable);
+
+    /** */
+    @Query("SELECT secondName FROM Person WHERE firstName REGEXP ?")
+    public List<String> selectField(String val, Pageable pageable);
+
+    /** */
+    @Query("SELECT _key, secondName FROM Person WHERE firstName REGEXP ?")
+    public List<List> selectSeveralField(String val, Pageable pageable);
+
+    /** */
+    @Query("SELECT count(1) FROM (SELECT DISTINCT secondName FROM Person WHERE firstName REGEXP ?)")
+    public int countQuery(String val);
+}
+

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/Person.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/Person.java b/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/Person.java
new file mode 100644
index 0000000..502d86d
--- /dev/null
+++ b/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/Person.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.springdata.misc;
+
+import org.apache.ignite.cache.query.annotations.QuerySqlField;
+
+public class Person {
+    /** First name. */
+    @QuerySqlField(index = true)
+    private String firstName;
+
+    /** Second name. */
+    @QuerySqlField(index = true)
+    private String secondName;
+
+    /**
+     * @param firstName First name.
+     * @param secondName Second name.
+     */
+    public Person(String firstName, String secondName) {
+        this.firstName = firstName;
+        this.secondName = secondName;
+    }
+
+    /**
+     *
+     */
+    public String getFirstName() {
+        return firstName;
+    }
+
+    /**
+     * @param firstName First name.
+     */
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    /**
+     *
+     */
+    public String getSecondName() {
+        return secondName;
+    }
+
+    /**
+     * @param secondName Second name.
+     */
+    public void setSecondName(String secondName) {
+        this.secondName = secondName;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return "Person{" +
+            "firstName='" + firstName + '\'' +
+            ", secondName='" + secondName + '\'' +
+            '}';
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/SecondRepository.java
----------------------------------------------------------------------
diff --git a/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/SecondRepository.java b/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/SecondRepository.java
new file mode 100644
index 0000000..63b0b8f
--- /dev/null
+++ b/modules/spring-data/src/test/java/org/apache/ignite/springdata/misc/SecondRepository.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.springdata.misc;
+
+import java.util.List;
+import javax.cache.Cache;
+import org.apache.ignite.springdata.repository.IgniteRepository;
+import org.apache.ignite.springdata.repository.Query;
+import org.apache.ignite.springdata.repository.config.RepositoryConfig;
+import org.springframework.data.domain.AbstractPageRequest;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Slice;
+
+/**
+ *
+ */
+@RepositoryConfig(cacheName = "cache")
+public interface SecondRepository extends IgniteRepository<Person, Integer> {
+    /** */
+    public Slice<Cache.Entry<Integer, Person>> findBySecondNameIsNot(String val, PageRequest pageReq);
+
+    /** */
+    @Query("SELECT _key, secondName FROM Person WHERE firstName REGEXP ?")
+    public Slice<List> querySliceOfList(String val, AbstractPageRequest pageReq);
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/README.txt
----------------------------------------------------------------------
diff --git a/modules/web-console/README.txt b/modules/web-console/README.txt
index 286082c..77c3ec4 100644
--- a/modules/web-console/README.txt
+++ b/modules/web-console/README.txt
@@ -16,7 +16,7 @@ In order to simplify evaluation of Web Console demo mode was implemented.
     2) Click "Import from database". You should see modal with demo description.
     3) Click "Next" button. You should see list of available schemas.
     4) Click "Next" button. You should see list of available tables.
-    5) Click "Next" button. You should see import options.
+    5) Click "Next" button. You should see import option.
     6) Select some of them and click "Save".
 
  Demo for SQL.

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.tpl.pug b/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.tpl.pug
index 9b14fca..f1c0ae7 100644
--- a/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.tpl.pug
+++ b/modules/web-console/frontend/app/components/ui-grid-header/ui-grid-header.tpl.pug
@@ -20,7 +20,7 @@
             .ui-grid-header-canvas
                 .ui-grid-header-cell-wrapper(ng-style='colContainer.headerCellWrapperStyle()')
                     .ui-grid-header-cell-row(role='row')
-                        .ui-grid-header-span.ui-grid-header-cell.ui-grid-clearfix.ui-grid-category(ng-repeat='cat in grid.options.categories', ng-if='cat.visible && \
+                        .ui-grid-header-span.ui-grid-header-cell.ui-grid-clearfix.ui-grid-category(ng-repeat='cat in grid.option.categories', ng-if='cat.visible && \
                         (colContainer.renderedColumns | uiGridSubcategories: cat.name).length > 0')
                             div(ng-show='(colContainer.renderedColumns|uiGridSubcategories:cat.name).length > 1')
                                 .ui-grid-cell-contents {{ cat.name }}

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.pug b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.pug
index 4bee5e5..2eb222c 100644
--- a/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.pug
+++ b/modules/web-console/frontend/app/directives/ui-ace-pojos/ui-ace-pojos.pug
@@ -22,7 +22,7 @@ mixin check-tooltip(message)
         .col-xs-2.col-sm-2.col-md-2
             label POJO class:
         .col-xs-10.col-sm-10.col-md-10.summary-pojo-list
-            button.select-toggle.form-control(ng-model='ctrl.class' bs-select bs-options='item for item in ctrl.classes' data-container='')
+            button.select-toggle.form-control(ng-model='ctrl.class' bs-select bs-option='item for item in ctrl.classes' data-container='')
     .details-row.checkbox
         .col-xs-2.col-sm-2.col-md-2
         .col-xs-10.col-sm-10.col-md-10

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug
index fe7f912..61d3dd0 100644
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug
@@ -16,14 +16,14 @@
 
 mixin form-field-checkbox(label, model, name, disabled, required, tip)
     //- TODO: Need to use common tooltip.
-    mixin tooltip-checkbox(title, options)
+    mixin tooltip-checkbox(title, option)
         if title
             i.tipLabel.icon-help(
                 bs-tooltip=''
 
                 data-title=title
-                data-container=options && options.container || false
-                data-placement=options && options.placement || false
+                data-container=option && option.container || false
+                data-placement=option && option.placement || false
             )
 
     div.checkbox.col-xs-12.col-sm-12.col-md-12

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug
index 6da1255..f8597ca 100644
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug
@@ -14,7 +14,7 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
-mixin form-field-datalist(label, model, name, disabled, required, placeholder, options, tip)
+mixin form-field-datalist(label, model, name, disabled, required, placeholder, option, tip)
     -var errLbl = label.substring(0, label.length - 1)
 
     mixin form-field-input()
@@ -26,10 +26,10 @@ mixin form-field-datalist(label, model, name, disabled, required, placeholder, o
             data-ng-model=model
 
             data-ng-required=required && `${required}`
-            data-ng-disabled=disabled && `${disabled}` || `!${options}.length`
+            data-ng-disabled=disabled && `${disabled}` || `!${option}.length`
 
             bs-typeahead
-            bs-options=`item for item in ${options}`
+            bs-option=`item for item in ${option}`
             container='body'
             data-min-length='1'
             ignite-retain-selection

http://git-wip-us.apache.org/repos/asf/ignite/blob/362700c6/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug
index 2f13d69..23fca2e 100644
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug
@@ -14,21 +14,21 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 
-mixin ignite-form-field-dropdown(label, model, name, disabled, required, multiple, placeholder, placeholderEmpty, options, tip)
+mixin ignite-form-field-dropdown(label, model, name, disabled, required, multiple, placeholder, placeholderEmpty, option, tip)
     mixin form-field-input()
         button.select-toggle.form-control(
             id=`{{ ${name} }}Input`
             name=`{{ ${name} }}`
 
-            data-placeholder=placeholderEmpty ? `{{ ${options}.length > 0 ? '${placeholder}' : '${placeholderEmpty}' }}` : placeholder
+            data-placeholder=placeholderEmpty ? `{{ ${option}.length > 0 ? '${placeholder}' : '${placeholderEmpty}' }}` : placeholder
             
             data-ng-model=model
 
             data-ng-required=required && `${required}`
-            data-ng-disabled=disabled && `${disabled}` || `!${options}.length`
+            data-ng-disabled=disabled && `${disabled}` || `!${option}.length`
 
             bs-select
-            bs-options=`item.value as item.label for item in ${options}`
+            bs-option=`item.value as item.label for item in ${option}`
 
             data-multiple=multiple ? '1' : false
             data-container='body > .wrapper'


[16/50] [abbrv] ignite git commit: IGNITE-3582: CPP: Replaced passing by pointer with passing by reference

Posted by dm...@apache.org.
IGNITE-3582: CPP: Replaced passing by pointer with passing by reference


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

Branch: refs/heads/ignite-1192
Commit: 5d5ba5cf600f284512be54a023d49e3ec7533c76
Parents: 5469626
Author: Igor Sapego <ig...@gmail.com>
Authored: Tue Apr 4 13:45:49 2017 +0300
Committer: Igor Sapego <ig...@gmail.com>
Committed: Tue Apr 4 13:45:49 2017 +0300

----------------------------------------------------------------------
 .../include/ignite/binary/binary_containers.h   |  2 +-
 .../ignite/impl/binary/binary_reader_impl.h     |  6 +-
 .../src/binary_reader_writer_raw_test.cpp       | 12 ++--
 .../core-test/src/binary_reader_writer_test.cpp | 12 ++--
 .../platforms/cpp/core-test/src/cache_test.cpp  |  2 +-
 .../cpp/core-test/src/ignition_test.cpp         | 12 ++--
 .../platforms/cpp/core/include/ignite/ignite.h  | 18 +++---
 .../cpp/core/include/ignite/ignition.h          | 14 ++---
 modules/platforms/cpp/core/src/ignition.cpp     | 62 ++++++++++----------
 9 files changed, 70 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5d5ba5cf/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h
index 9938dd5..fb77b44 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h
@@ -596,7 +596,7 @@ namespace ignite
              *
              * @throw IgniteError if there is no element to read.
              */
-            void GetNext(K* key, V* val)
+            void GetNext(K& key, V& val)
             {
                 return impl->ReadElement<K, V>(id, key, val);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5d5ba5cf/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h
index 76f6fbf..8be9172 100644
--- a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h
+++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h
@@ -798,7 +798,7 @@ namespace ignite
                  * @param val Value.
                  */
                 template<typename K, typename V>
-                void ReadElement(const int32_t id, K* key, V* val)
+                void ReadElement(const int32_t id, K& key, V& val)
                 {
                     CheckSession(id);
 
@@ -808,8 +808,8 @@ namespace ignite
                         elemRead = 0;
                     }
 
-                    *key = ReadTopObject<K>();
-                    *val = ReadTopObject<V>();
+                    key = ReadTopObject<K>();
+                    val = ReadTopObject<V>();
                 }
 
                 /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/5d5ba5cf/modules/platforms/cpp/core-test/src/binary_reader_writer_raw_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/binary_reader_writer_raw_test.cpp b/modules/platforms/cpp/core-test/src/binary_reader_writer_raw_test.cpp
index 9e610e6..14d64b0 100644
--- a/modules/platforms/cpp/core-test/src/binary_reader_writer_raw_test.cpp
+++ b/modules/platforms/cpp/core-test/src/binary_reader_writer_raw_test.cpp
@@ -416,7 +416,7 @@ void CheckRawMapEmpty(MapType* mapType)
 
     int8_t key;
     BinaryInner val;
-    BOOST_CHECK_EXCEPTION(mapReader.GetNext(&key, &val), IgniteError, IsBinaryError);
+    BOOST_CHECK_EXCEPTION(mapReader.GetNext(key, val), IgniteError, IsBinaryError);
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
 }
@@ -473,21 +473,21 @@ void CheckRawMap(MapType* mapType)
 
     BOOST_REQUIRE(mapReader.HasNext());
 
-    mapReader.GetNext(&key, &val);
+    mapReader.GetNext(key, val);
     BOOST_REQUIRE(key == 1);
     BOOST_REQUIRE(val.GetValue() == writeVal1.GetValue());
 
-    mapReader.GetNext(&key, &val);
+    mapReader.GetNext(key, val);
     BOOST_REQUIRE(key == 2);
     BOOST_REQUIRE(val.GetValue() == writeVal2.GetValue());
 
-    mapReader.GetNext(&key, &val);
+    mapReader.GetNext(key, val);
     BOOST_REQUIRE(key == 3);
     BOOST_REQUIRE(val.GetValue() == writeVal3.GetValue());
 
     BOOST_REQUIRE(!mapReader.HasNext());
 
-    BOOST_CHECK_EXCEPTION(mapReader.GetNext(&key, &val), IgniteError, IsBinaryError);
+    BOOST_CHECK_EXCEPTION(mapReader.GetNext(key, val), IgniteError, IsBinaryError);
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
 }
@@ -1229,7 +1229,7 @@ BOOST_AUTO_TEST_CASE(TestMapNull)
 
     int8_t key;
     BinaryInner val;
-    BOOST_CHECK_EXCEPTION(mapReader.GetNext(&key, &val), IgniteError, IsBinaryError);
+    BOOST_CHECK_EXCEPTION(mapReader.GetNext(key, val), IgniteError, IsBinaryError);
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5d5ba5cf/modules/platforms/cpp/core-test/src/binary_reader_writer_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/binary_reader_writer_test.cpp b/modules/platforms/cpp/core-test/src/binary_reader_writer_test.cpp
index 8edc0ff..7802d15 100644
--- a/modules/platforms/cpp/core-test/src/binary_reader_writer_test.cpp
+++ b/modules/platforms/cpp/core-test/src/binary_reader_writer_test.cpp
@@ -542,7 +542,7 @@ void CheckMapEmpty(MapType* mapType)
 
     int8_t key;
     BinaryInner val;
-    BOOST_CHECK_EXCEPTION(mapReader.GetNext(&key, &val), IgniteError, IsBinaryError);
+    BOOST_CHECK_EXCEPTION(mapReader.GetNext(key, val), IgniteError, IsBinaryError);
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
 }
@@ -611,21 +611,21 @@ void CheckMap(MapType* mapType)
 
     BOOST_REQUIRE(mapReader.HasNext());
 
-    mapReader.GetNext(&key, &val);
+    mapReader.GetNext(key, val);
     BOOST_REQUIRE(key == 1);
     BOOST_REQUIRE(val.GetValue() == writeVal1.GetValue());
 
-    mapReader.GetNext(&key, &val);
+    mapReader.GetNext(key, val);
     BOOST_REQUIRE(key == 2);
     BOOST_REQUIRE(val.GetValue() == writeVal2.GetValue());
 
-    mapReader.GetNext(&key, &val);
+    mapReader.GetNext(key, val);
     BOOST_REQUIRE(key == 3);
     BOOST_REQUIRE(val.GetValue() == writeVal3.GetValue());
 
     BOOST_REQUIRE(!mapReader.HasNext());
 
-    BOOST_CHECK_EXCEPTION(mapReader.GetNext(&key, &val), IgniteError, IsBinaryError);
+    BOOST_CHECK_EXCEPTION(mapReader.GetNext(key, val), IgniteError, IsBinaryError);
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
 }
@@ -1576,7 +1576,7 @@ BOOST_AUTO_TEST_CASE(TestMapNull)
 
     int8_t key;
     BinaryInner val;
-    BOOST_CHECK_EXCEPTION(mapReader.GetNext(&key, &val), IgniteError, IsBinaryError);
+    BOOST_CHECK_EXCEPTION(mapReader.GetNext(key, val), IgniteError, IsBinaryError);
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5d5ba5cf/modules/platforms/cpp/core-test/src/cache_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/cache_test.cpp b/modules/platforms/cpp/core-test/src/cache_test.cpp
index 22ad96c..fef777a 100644
--- a/modules/platforms/cpp/core-test/src/cache_test.cpp
+++ b/modules/platforms/cpp/core-test/src/cache_test.cpp
@@ -623,7 +623,7 @@ BOOST_AUTO_TEST_CASE(TestCreateCache)
     // Attempt to create cache with existing name
     IgniteError err;
 
-    grid0.CreateCache<int, int>("dynamic_cache", &err);
+    grid0.CreateCache<int, int>("dynamic_cache", err);
 
     BOOST_REQUIRE(err.GetCode() != IgniteError::IGNITE_SUCCESS);
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5d5ba5cf/modules/platforms/cpp/core-test/src/ignition_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/ignition_test.cpp b/modules/platforms/cpp/core-test/src/ignition_test.cpp
index 52a51d0..5466a3a 100644
--- a/modules/platforms/cpp/core-test/src/ignition_test.cpp
+++ b/modules/platforms/cpp/core-test/src/ignition_test.cpp
@@ -39,14 +39,14 @@ BOOST_AUTO_TEST_CASE(TestIgnition)
     IgniteError err;
 
     // Start two Ignite instances.
-    Ignite grid1 = Ignition::Start(cfg, "ignitionTest-1", &err);
+    Ignite grid1 = Ignition::Start(cfg, "ignitionTest-1", err);
     
     if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
         BOOST_ERROR(err.GetText());
     
     BOOST_REQUIRE(strcmp(grid1.GetName(), "ignitionTest-1") == 0);
 
-    Ignite grid2 = Ignition::Start(cfg, "ignitionTest-2", &err);
+    Ignite grid2 = Ignition::Start(cfg, "ignitionTest-2", err);
 
     if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
         BOOST_ERROR(err.GetText());
@@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(TestIgnition)
     BOOST_REQUIRE(strcmp(grid2.GetName(), "ignitionTest-2") == 0);
 
     // Test get
-    Ignite grid0 = Ignition::Get("ignitionTest-1", &err);
+    Ignite grid0 = Ignition::Get("ignitionTest-1", err);
     
     if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
         BOOST_ERROR(err.GetText());
@@ -64,16 +64,16 @@ BOOST_AUTO_TEST_CASE(TestIgnition)
     // Stop one grid
     Ignition::Stop(grid1.GetName(), true);
     
-    Ignition::Get("ignitionTest-1", &err);
+    Ignition::Get("ignitionTest-1", err);
     BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_GENERIC);
     
-    Ignition::Get("ignitionTest-2", &err);
+    Ignition::Get("ignitionTest-2", err);
     BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_SUCCESS);
 
     // Stop all
     Ignition::StopAll(true);
     
-    Ignition::Get("ignitionTest-2", &err);
+    Ignition::Get("ignitionTest-2", err);
     BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_GENERIC);    
 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/5d5ba5cf/modules/platforms/cpp/core/include/ignite/ignite.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/ignite.h b/modules/platforms/cpp/core/include/ignite/ignite.h
index 140ee53..d96f81f 100644
--- a/modules/platforms/cpp/core/include/ignite/ignite.h
+++ b/modules/platforms/cpp/core/include/ignite/ignite.h
@@ -81,7 +81,7 @@ namespace ignite
         {
             IgniteError err;
 
-            cache::Cache<K, V> res = GetCache<K, V>(name, &err);
+            cache::Cache<K, V> res = GetCache<K, V>(name, err);
 
             IgniteError::ThrowIfNeeded(err);
 
@@ -98,9 +98,9 @@ namespace ignite
          * @return Cache.
          */
         template<typename K, typename V>
-        cache::Cache<K, V> GetCache(const char* name, IgniteError* err)
+        cache::Cache<K, V> GetCache(const char* name, IgniteError& err)
         {
-            impl::cache::CacheImpl* cacheImpl = impl.Get()->GetCache<K, V>(name, *err);
+            impl::cache::CacheImpl* cacheImpl = impl.Get()->GetCache<K, V>(name, err);
 
             return cache::Cache<K, V>(cacheImpl);
         }
@@ -118,7 +118,7 @@ namespace ignite
         {
             IgniteError err;
 
-            cache::Cache<K, V> res = GetOrCreateCache<K, V>(name, &err);
+            cache::Cache<K, V> res = GetOrCreateCache<K, V>(name, err);
 
             IgniteError::ThrowIfNeeded(err);
 
@@ -135,9 +135,9 @@ namespace ignite
          * @return Cache.
          */
         template<typename K, typename V>
-        cache::Cache<K, V> GetOrCreateCache(const char* name, IgniteError* err)
+        cache::Cache<K, V> GetOrCreateCache(const char* name, IgniteError& err)
         {
-            impl::cache::CacheImpl* cacheImpl = impl.Get()->GetOrCreateCache<K, V>(name, *err);
+            impl::cache::CacheImpl* cacheImpl = impl.Get()->GetOrCreateCache<K, V>(name, err);
 
             return cache::Cache<K, V>(cacheImpl);
         }
@@ -155,7 +155,7 @@ namespace ignite
         {
             IgniteError err;
 
-            cache::Cache<K, V> res = CreateCache<K, V>(name, &err);
+            cache::Cache<K, V> res = CreateCache<K, V>(name, err);
 
             IgniteError::ThrowIfNeeded(err);
 
@@ -172,9 +172,9 @@ namespace ignite
          * @return Cache.
          */
         template<typename K, typename V>
-        cache::Cache<K, V> CreateCache(const char* name, IgniteError* err)
+        cache::Cache<K, V> CreateCache(const char* name, IgniteError& err)
         {
-            impl::cache::CacheImpl* cacheImpl = impl.Get()->CreateCache<K, V>(name, *err);
+            impl::cache::CacheImpl* cacheImpl = impl.Get()->CreateCache<K, V>(name, err);
 
             return cache::Cache<K, V>(cacheImpl);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5d5ba5cf/modules/platforms/cpp/core/include/ignite/ignition.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/ignition.h b/modules/platforms/cpp/core/include/ignite/ignition.h
index 57fd51c..f368c6e 100644
--- a/modules/platforms/cpp/core/include/ignite/ignition.h
+++ b/modules/platforms/cpp/core/include/ignite/ignition.h
@@ -51,7 +51,7 @@ namespace ignite
          * @param err Error.
          * @return Ignite instance.
          */
-        static Ignite Start(const IgniteConfiguration& cfg, IgniteError* err);
+        static Ignite Start(const IgniteConfiguration& cfg, IgniteError& err);
 
         /**
          * Start Ignite instance with specific name.
@@ -70,7 +70,7 @@ namespace ignite
          * @param err Error.
          * @return Ignite instance.
          */
-        static Ignite Start(const IgniteConfiguration& cfg, const char* name, IgniteError* err);
+        static Ignite Start(const IgniteConfiguration& cfg, const char* name, IgniteError& err);
 
         /**
          * Get default Ignite instance.
@@ -85,7 +85,7 @@ namespace ignite
          * @param err Error.
          * @return Default Ignite instance.
          */
-        static Ignite Get(IgniteError* err);
+        static Ignite Get(IgniteError& err);
 
         /**
          * Get Ignite instance with the given name.
@@ -102,7 +102,7 @@ namespace ignite
          * @param err Error.
          * @return Ignite instance.
          */
-        static Ignite Get(const char* name, IgniteError* err);
+        static Ignite Get(const char* name, IgniteError& err);
 
         /**
          * Stop default Ignite instance.
@@ -119,7 +119,7 @@ namespace ignite
          * @param err Error.
          * @return True if Ignite instance was stopped by this call.
          */
-        static bool Stop(bool cancel, IgniteError* err);
+        static bool Stop(bool cancel, IgniteError& err);
 
         /**
          * Stop Ignite instance with the given name.
@@ -138,7 +138,7 @@ namespace ignite
          * @param err Error.
          * @return True if Ignite instance was stopped by this call.
          */
-        static bool Stop(const char* name, bool cancel, IgniteError* err);
+        static bool Stop(const char* name, bool cancel, IgniteError& err);
 
         /**
          * Stop all running Ignite instances.
@@ -153,7 +153,7 @@ namespace ignite
          * @param cancel Cancel flag.
          * @param err Error.
          */
-        static void StopAll(bool cancel, IgniteError* err);
+        static void StopAll(bool cancel, IgniteError& err);
     };
 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/5d5ba5cf/modules/platforms/cpp/core/src/ignition.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/ignition.cpp b/modules/platforms/cpp/core/src/ignition.cpp
index 6a00eab..e12a208 100644
--- a/modules/platforms/cpp/core/src/ignition.cpp
+++ b/modules/platforms/cpp/core/src/ignition.cpp
@@ -182,7 +182,7 @@ namespace ignite
         return Start(cfg, static_cast<const char*>(0));
     }
 
-    Ignite Ignition::Start(const IgniteConfiguration& cfg, IgniteError* err)
+    Ignite Ignition::Start(const IgniteConfiguration& cfg, IgniteError& err)
     {
         return Start(cfg, 0, err);
     }
@@ -191,14 +191,14 @@ namespace ignite
     {
         IgniteError err;
 
-        Ignite res = Start(cfg, name, &err);
+        Ignite res = Start(cfg, name, err);
 
         IgniteError::ThrowIfNeeded(err);
 
         return res;
     }
 
-    Ignite Ignition::Start(const IgniteConfiguration& cfg, const char* name, IgniteError* err)
+    Ignite Ignition::Start(const IgniteConfiguration& cfg, const char* name, IgniteError& err)
     {
         CsLockGuard guard(factoryLock);
 
@@ -209,7 +209,7 @@ namespace ignite
         {
             if (jvmLib.empty())
             {
-                *err = IgniteError(IgniteError::IGNITE_ERR_JVM_LIB_NOT_FOUND,
+                err = IgniteError(IgniteError::IGNITE_ERR_JVM_LIB_NOT_FOUND,
                     "JVM library is not found (did you set JAVA_HOME environment variable?)");
 
                 return Ignite();
@@ -217,7 +217,7 @@ namespace ignite
 
             if (!LoadJvmLibrary(jvmLib))
             {
-                *err = IgniteError(IgniteError::IGNITE_ERR_JVM_LIB_LOAD_FAILED, "Failed to load JVM library.");
+                err = IgniteError(IgniteError::IGNITE_ERR_JVM_LIB_LOAD_FAILED, "Failed to load JVM library.");
 
                 return Ignite();
             }
@@ -239,7 +239,7 @@ namespace ignite
 
         if (cp.empty())
         {
-            *err = IgniteError(IgniteError::IGNITE_ERR_JVM_NO_CLASSPATH,
+            err = IgniteError(IgniteError::IGNITE_ERR_JVM_NO_CLASSPATH,
                 "Java classpath is empty (did you set IGNITE_HOME environment variable?)");
 
             return Ignite();
@@ -275,7 +275,7 @@ namespace ignite
 
         if (!ctx.Get())
         {
-            IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, *err);
+            IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
             return Ignite();
         }
@@ -309,7 +309,7 @@ namespace ignite
 
         if (!javaRef)
         {
-            IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, *err);
+            IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
             return Ignite();
         }
@@ -333,7 +333,7 @@ namespace ignite
         return Get(static_cast<const char*>(0));
     }
 
-    Ignite Ignition::Get(IgniteError* err)
+    Ignite Ignition::Get(IgniteError& err)
     {
         return Get(0, err);
     }
@@ -342,14 +342,14 @@ namespace ignite
     {
         IgniteError err;
 
-        Ignite res = Get(name, &err);
+        Ignite res = Get(name, err);
 
         IgniteError::ThrowIfNeeded(err);
 
         return res;
     }
 
-    Ignite Ignition::Get(const char* name, IgniteError* err)
+    Ignite Ignition::Get(const char* name, IgniteError& err)
     {
         Ignite res;
 
@@ -364,16 +364,16 @@ namespace ignite
 
             SharedPointer<JniContext> ctx(JniContext::Create(0, 0, JniHandlers(), &jniErr));
 
-            IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, *err);
+            IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
-            if (err->GetCode() == IgniteError::IGNITE_SUCCESS)
+            if (err.GetCode() == IgniteError::IGNITE_SUCCESS)
             {
                 // 2. Get environment pointer.
                 long long ptr = ctx.Get()->IgnitionEnvironmentPointer(name0, &jniErr);
 
-                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, *err);
+                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
-                if (err->GetCode() == IgniteError::IGNITE_SUCCESS)
+                if (err.GetCode() == IgniteError::IGNITE_SUCCESS)
                 {
                     if (ptr != 0)
                     {
@@ -386,7 +386,7 @@ namespace ignite
                         // 4. Get fresh node reference.
                         jobject ref = ctx.Get()->IgnitionInstance(name0, &jniErr);
 
-                        if (err->GetCode() == IgniteError::IGNITE_SUCCESS) {
+                        if (err.GetCode() == IgniteError::IGNITE_SUCCESS) {
                             if (ref)
                             {
                                 IgniteImpl* impl = new IgniteImpl(*env, ref);
@@ -395,14 +395,14 @@ namespace ignite
                             }
                             else
                                 // Error: concurrent node stop.
-                                *err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
+                                err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
                                     "Failed to get Ignite instance because it was stopped concurrently.");
 
                         }
                     }
                     else
                         // Error: no node with the given name.
-                        *err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
+                        err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
                             "Failed to get Ignite instance because it is either not started yet or already stopped.");
                 }
             }
@@ -411,7 +411,7 @@ namespace ignite
         }
         else
             // Error: no node with the given name.
-            *err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
+            err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
                 "Failed to get Ignite instance because it is either not started yet or already stopped.");
 
         factoryLock.Leave();
@@ -424,7 +424,7 @@ namespace ignite
         return Stop(0, cancel);
     }
 
-    bool Ignition::Stop(bool cancel, IgniteError* err)
+    bool Ignition::Stop(bool cancel, IgniteError& err)
     {
         return Stop(0, cancel, err);
     }
@@ -433,14 +433,14 @@ namespace ignite
     {
         IgniteError err;
 
-        bool res = Stop(name, cancel, &err);
+        bool res = Stop(name, cancel, err);
 
         IgniteError::ThrowIfNeeded(err);
 
         return res;
     }
 
-    bool Ignition::Stop(const char* name, bool cancel, IgniteError* err)
+    bool Ignition::Stop(const char* name, bool cancel, IgniteError& err)
     {
         bool res = false;
 
@@ -452,9 +452,9 @@ namespace ignite
 
             SharedPointer<JniContext> ctx(JniContext::Create(0, 0, JniHandlers(), &jniErr));
 
-            IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, *err);
+            IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
-            if (err->GetCode() == IgniteError::IGNITE_SUCCESS)
+            if (err.GetCode() == IgniteError::IGNITE_SUCCESS)
             {
                 char* name0 = CopyChars(name);
 
@@ -462,9 +462,9 @@ namespace ignite
 
                 ReleaseChars(name0);
 
-                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, *err);
+                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
-                if (err->GetCode() == IgniteError::IGNITE_SUCCESS)
+                if (err.GetCode() == IgniteError::IGNITE_SUCCESS)
                     res = res0;
             }
         }
@@ -478,12 +478,12 @@ namespace ignite
     {
         IgniteError err;
 
-        StopAll(cancel, &err);
+        StopAll(cancel, err);
 
         IgniteError::ThrowIfNeeded(err);
     }
 
-    void Ignition::StopAll(bool cancel, IgniteError* err)
+    void Ignition::StopAll(bool cancel, IgniteError& err)
     {
         factoryLock.Enter();
 
@@ -493,13 +493,13 @@ namespace ignite
 
             SharedPointer<JniContext> ctx(JniContext::Create(0, 0, JniHandlers(), &jniErr));
 
-            IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, *err);
+            IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
-            if (err->GetCode() == IgniteError::IGNITE_SUCCESS)
+            if (err.GetCode() == IgniteError::IGNITE_SUCCESS)
             {
                 ctx.Get()->IgnitionStopAll(cancel, &jniErr);
 
-                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, *err);
+                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
             }
         }
 


[28/50] [abbrv] ignite git commit: IGNITE-4905 DML benchmarks ClassCastException fix - Fixes #1722.

Posted by dm...@apache.org.
IGNITE-4905 DML benchmarks ClassCastException fix - Fixes #1722.

Signed-off-by: Alexey Goncharuk <al...@gmail.com>


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

Branch: refs/heads/ignite-1192
Commit: 77740bf6fa72b1e669196b945165d59ecb8daeed
Parents: a6d518d
Author: Alexander Paschenko <al...@gmail.com>
Authored: Fri Apr 7 17:12:20 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Apr 7 17:12:20 2017 +0300

----------------------------------------------------------------------
 .../yardstick/cache/dml/IgniteSqlDeleteFilteredBenchmark.java   | 5 +++--
 .../yardstick/cache/dml/IgniteSqlUpdateFilteredBenchmark.java   | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/77740bf6/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlDeleteFilteredBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlDeleteFilteredBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlDeleteFilteredBenchmark.java
index 218e8dc..19c40e3 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlDeleteFilteredBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlDeleteFilteredBenchmark.java
@@ -20,6 +20,7 @@ package org.apache.ignite.yardstick.cache.dml;
 import java.util.Map;
 import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.yardstick.cache.IgniteCacheAbstractBenchmark;
@@ -39,7 +40,7 @@ public class IgniteSqlDeleteFilteredBenchmark extends IgniteCacheAbstractBenchma
     private AtomicInteger delCnt = new AtomicInteger();
 
     /** */
-    private AtomicInteger delItemsCnt = new AtomicInteger();
+    private AtomicLong delItemsCnt = new AtomicLong();
 
     /** {@inheritDoc} */
     @Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
@@ -55,7 +56,7 @@ public class IgniteSqlDeleteFilteredBenchmark extends IgniteCacheAbstractBenchma
 
             double maxSalary = salary + 1000;
 
-            int res = (Integer) cache().query(new SqlFieldsQuery("delete from Person where salary >= ? and salary <= ?")
+            Long res = (Long)cache().query(new SqlFieldsQuery("delete from Person where salary >= ? and salary <= ?")
                 .setArgs(salary, maxSalary)).getAll().get(0).get(0);
 
             delItemsCnt.getAndAdd(res);

http://git-wip-us.apache.org/repos/asf/ignite/blob/77740bf6/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlUpdateFilteredBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlUpdateFilteredBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlUpdateFilteredBenchmark.java
index 94a83df..c66f335 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlUpdateFilteredBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlUpdateFilteredBenchmark.java
@@ -20,6 +20,7 @@ package org.apache.ignite.yardstick.cache.dml;
 import java.util.Map;
 import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.yardstick.cache.IgniteCacheAbstractBenchmark;
@@ -39,7 +40,7 @@ public class IgniteSqlUpdateFilteredBenchmark extends IgniteCacheAbstractBenchma
     private AtomicInteger updCnt = new AtomicInteger();
 
     /** */
-    private AtomicInteger updItemsCnt = new AtomicInteger();
+    private AtomicLong updItemsCnt = new AtomicLong();
 
     /** {@inheritDoc} */
     @Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
@@ -55,7 +56,7 @@ public class IgniteSqlUpdateFilteredBenchmark extends IgniteCacheAbstractBenchma
 
             double maxSalary = salary + 1000;
 
-            int res = (Integer) cache().query(new SqlFieldsQuery("update Person set salary = (salary - ?1 + ?2) / 2 " +
+            Long res = (Long)cache().query(new SqlFieldsQuery("update Person set salary = (salary - ?1 + ?2) / 2 " +
                 "where salary >= ?1 and salary <= ?2").setArgs(salary, maxSalary)).getAll().get(0).get(0);
 
             updItemsCnt.getAndAdd(res);


[21/50] [abbrv] ignite git commit: IGNITE-4899 .NET: Review Dictionary usage in APIs

Posted by dm...@apache.org.
IGNITE-4899 .NET: Review Dictionary usage in APIs

This closes #1738


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

Branch: refs/heads/ignite-1192
Commit: 17d00a4fb09539af91a07b18d1d8660d21a84301
Parents: 740621a
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Thu Apr 6 09:03:52 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Thu Apr 6 09:03:52 2017 +0300

----------------------------------------------------------------------
 .../ExpiryCacheHolderTest.cs                    | 12 ++++-----
 .../Cache/CacheAbstractTest.cs                  | 18 ++++++-------
 .../Cache/CacheTestAsyncWrapper.cs              | 12 ++++-----
 .../Cache/Store/CacheStoreTest.cs               |  2 +-
 .../Compute/MixedClusterTest.cs                 |  2 +-
 .../dotnet/Apache.Ignite.Core/Cache/ICache.cs   | 16 +++++------
 .../Cache/ICacheEntryProcessorResult.cs         | 12 ++++++---
 .../Impl/Cache/CacheEntryProcessorResult.cs     | 27 ++++++++++++++-----
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  | 28 ++++++++++----------
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   | 17 +++++++-----
 .../Impl/DbCache.cs                             |  2 +-
 .../Datagrid/PutGetExample.cs                   | 13 ++++-----
 12 files changed, 93 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/17d00a4f/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/ExpiryCacheHolderTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/ExpiryCacheHolderTest.cs b/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/ExpiryCacheHolderTest.cs
index 64c9884..9d1a2b5 100644
--- a/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/ExpiryCacheHolderTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/ExpiryCacheHolderTest.cs
@@ -209,12 +209,12 @@ namespace Apache.Ignite.AspNet.Tests
                 throw new NotImplementedException();
             }
 
-            public IDictionary<int, int> GetAll(IEnumerable<int> keys)
+            public ICollection<ICacheEntry<int, int>> GetAll(IEnumerable<int> keys)
             {
                 throw new NotImplementedException();
             }
 
-            public Task<IDictionary<int, int>> GetAllAsync(IEnumerable<int> keys)
+            public Task<ICollection<ICacheEntry<int, int>>> GetAllAsync(IEnumerable<int> keys)
             {
                 throw new NotImplementedException();
             }
@@ -299,12 +299,12 @@ namespace Apache.Ignite.AspNet.Tests
                 throw new NotImplementedException();
             }
 
-            public void PutAll(IDictionary<int, int> vals)
+            public void PutAll(IEnumerable<KeyValuePair<int, int>> vals)
             {
                 throw new NotImplementedException();
             }
 
-            public Task PutAllAsync(IDictionary<int, int> vals)
+            public Task PutAllAsync(IEnumerable<KeyValuePair<int, int>> vals)
             {
                 throw new NotImplementedException();
             }
@@ -449,12 +449,12 @@ namespace Apache.Ignite.AspNet.Tests
                 throw new NotImplementedException();
             }
 
-            public IDictionary<int, ICacheEntryProcessorResult<TRes>> InvokeAll<TArg, TRes>(IEnumerable<int> keys, ICacheEntryProcessor<int, int, TArg, TRes> processor, TArg arg)
+            public ICollection<ICacheEntryProcessorResult<int, TRes>> InvokeAll<TArg, TRes>(IEnumerable<int> keys, ICacheEntryProcessor<int, int, TArg, TRes> processor, TArg arg)
             {
                 throw new NotImplementedException();
             }
 
-            public Task<IDictionary<int, ICacheEntryProcessorResult<TRes>>> InvokeAllAsync<TArg, TRes>(IEnumerable<int> keys, ICacheEntryProcessor<int, int, TArg, TRes> processor, TArg arg)
+            public Task<ICollection<ICacheEntryProcessorResult<int, TRes>>> InvokeAllAsync<TArg, TRes>(IEnumerable<int> keys, ICacheEntryProcessor<int, int, TArg, TRes> processor, TArg arg)
             {
                 throw new NotImplementedException();
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/17d00a4f/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
index ce0441d..316d0f9 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
@@ -565,7 +565,7 @@ namespace Apache.Ignite.Core.Tests.Cache
             cache.Put(4, 4);
             cache.Put(5, 5);
 
-            IDictionary<int, int> map = cache.GetAll(new List<int> { 0, 1, 2, 5 });
+            var map = cache.GetAll(new List<int> {0, 1, 2, 5}).ToDictionary(x => x.Key, x => x.Value);
 
             Assert.AreEqual(3, map.Count);
 
@@ -582,7 +582,7 @@ namespace Apache.Ignite.Core.Tests.Cache
             cache.Put(2, 2);
             cache.Put(3, 3);
 
-            var map = cache.GetAll(new List<int> { 0, 1, 2 });
+            var map = cache.GetAll(new List<int> {0, 1, 2}).ToDictionary(x => x.Key, x => x.Value);
 
             Assert.AreEqual(2, map.Count);
 
@@ -2469,7 +2469,7 @@ namespace Apache.Ignite.Core.Tests.Cache
             // Existing entries
             var res = cache.InvokeAll(entries.Keys, new T(), arg);
 
-            var results = res.OrderBy(x => x.Key).Select(x => x.Value.Result);
+            var results = res.OrderBy(x => x.Key).Select(x => x.Result);
             var expectedResults = entries.OrderBy(x => x.Key).Select(x => x.Value + arg);
             
             Assert.IsTrue(results.SequenceEqual(expectedResults));
@@ -2481,13 +2481,13 @@ namespace Apache.Ignite.Core.Tests.Cache
             // Remove entries
             res = cache.InvokeAll(entries.Keys, new T {Remove = true}, arg);
 
-            Assert.IsTrue(res.All(x => x.Value.Result == 0));
+            Assert.IsTrue(res.All(x => x.Result == 0));
             Assert.AreEqual(0, cache.GetAll(entries.Keys).Count);
 
             // Non-existing entries
             res = cache.InvokeAll(entries.Keys, new T {Exists = false}, arg);
 
-            Assert.IsTrue(res.All(x => x.Value.Result == arg));
+            Assert.IsTrue(res.All(x => x.Result == arg));
             Assert.IsTrue(cache.GetAll(entries.Keys).All(x => x.Value == arg)); 
 
             // Test exceptions
@@ -2510,9 +2510,9 @@ namespace Apache.Ignite.Core.Tests.Cache
             {
                 if (procRes.Key == errKey)
                     // ReSharper disable once AccessToForEachVariableInClosure
-                    AssertThrowsCacheEntryProcessorException(() => { var x = procRes.Value.Result; }, exceptionText);
+                    AssertThrowsCacheEntryProcessorException(() => { var x = procRes.Result; }, exceptionText);
                 else
-                    Assert.Greater(procRes.Value.Result, 0);
+                    Assert.Greater(procRes.Result, 0);
             }
         }
 
@@ -2709,9 +2709,9 @@ namespace Apache.Ignite.Core.Tests.Cache
             }
 
             // Check keepBinary for GetAll operation.
-            var allObjs1 = binCache.GetAll(keys);
+            var allObjs1 = binCache.GetAll(keys).ToDictionary(x => x.Key, x => x.Value);
 
-            var allObjs2 = binCache.GetAll(keys);
+            var allObjs2 = binCache.GetAll(keys).ToDictionary(x => x.Key, x => x.Value);
 
             for (int i = 0; i < cnt; i++)
             {

http://git-wip-us.apache.org/repos/asf/ignite/blob/17d00a4f/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs
index 14dfbca..c44a17b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs
@@ -199,13 +199,13 @@ namespace Apache.Ignite.Core.Tests.Cache
         }
 
         /** <inheritDoc /> */
-        public IDictionary<TK, TV> GetAll(IEnumerable<TK> keys)
+        public ICollection<ICacheEntry<TK, TV>> GetAll(IEnumerable<TK> keys)
         {
             return GetResult(_cache.GetAllAsync(keys));
         }
 
         /** <inheritDoc /> */
-        public Task<IDictionary<TK, TV>> GetAllAsync(IEnumerable<TK> keys)
+        public Task<ICollection<ICacheEntry<TK, TV>>> GetAllAsync(IEnumerable<TK> keys)
         {
             return _cache.GetAllAsync(keys);
         }
@@ -307,13 +307,13 @@ namespace Apache.Ignite.Core.Tests.Cache
         }
 
         /** <inheritDoc /> */
-        public void PutAll(IDictionary<TK, TV> vals)
+        public void PutAll(IEnumerable<KeyValuePair<TK, TV>> vals)
         {
             WaitResult(_cache.PutAllAsync(vals));
         }
 
         /** <inheritDoc /> */
-        public Task PutAllAsync(IDictionary<TK, TV> vals)
+        public Task PutAllAsync(IEnumerable<KeyValuePair<TK, TV>> vals)
         {
             return _cache.PutAllAsync(vals);
         }
@@ -487,14 +487,14 @@ namespace Apache.Ignite.Core.Tests.Cache
         }
 
         /** <inheritDoc /> */
-        public IDictionary<TK, ICacheEntryProcessorResult<TRes>> InvokeAll<TArg, TRes>(IEnumerable<TK> keys, 
+        public ICollection<ICacheEntryProcessorResult<TK, TRes>> InvokeAll<TArg, TRes>(IEnumerable<TK> keys, 
             ICacheEntryProcessor<TK, TV, TArg, TRes> processor, TArg arg)
         {
             return GetResult(_cache.InvokeAllAsync(keys, processor, arg));
         }
 
         /** <inheritDoc /> */
-        public Task<IDictionary<TK, ICacheEntryProcessorResult<TRes>>> InvokeAllAsync<TArg, TRes>(IEnumerable<TK> keys, ICacheEntryProcessor<TK, TV, TArg, TRes> processor, TArg arg)
+        public Task<ICollection<ICacheEntryProcessorResult<TK, TRes>>> InvokeAllAsync<TArg, TRes>(IEnumerable<TK> keys, ICacheEntryProcessor<TK, TV, TArg, TRes> processor, TArg arg)
         {
             return _cache.InvokeAllAsync(keys, processor, arg);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/17d00a4f/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
index 76241d2..f2c3f4d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
@@ -327,7 +327,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
             for (int i = 0; i < 10; i++)
                 keys.Add(i);
 
-            IDictionary<int, string> loaded = cache.GetAll(keys);
+            IDictionary<int, string> loaded = cache.GetAll(keys).ToDictionary(x => x.Key, x => x.Value);
 
             Assert.AreEqual(10, loaded.Count);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/17d00a4f/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/MixedClusterTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/MixedClusterTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/MixedClusterTest.cs
index 41817eb..eb5945d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/MixedClusterTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/MixedClusterTest.cs
@@ -104,7 +104,7 @@ namespace Apache.Ignite.Core.Tests.Compute
             {
                 try
                 {
-                    Assert.AreEqual(0, res.Value.Result);
+                    Assert.AreEqual(0, res.Result);
                 }
                 catch (CacheEntryProcessorException ex)
                 {

http://git-wip-us.apache.org/repos/asf/ignite/blob/17d00a4f/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICache.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICache.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICache.cs
index 77e47c7..5a4cdcf 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICache.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICache.cs
@@ -317,7 +317,7 @@ namespace Apache.Ignite.Core.Cache
         /// </summary>
         /// <param name="keys">Keys.</param>
         /// <returns>Map of key-value pairs.</returns>
-        IDictionary<TK, TV> GetAll(IEnumerable<TK> keys);
+        ICollection<ICacheEntry<TK, TV>> GetAll(IEnumerable<TK> keys);
 
         /// <summary>
         /// Retrieves values mapped to the specified keys from cache.
@@ -328,7 +328,7 @@ namespace Apache.Ignite.Core.Cache
         /// </summary>
         /// <param name="keys">Keys.</param>
         /// <returns>Map of key-value pairs.</returns>
-        Task<IDictionary<TK, TV>> GetAllAsync(IEnumerable<TK> keys);
+        Task<ICollection<ICacheEntry<TK, TV>>> GetAllAsync(IEnumerable<TK> keys);
 
         /// <summary>
         /// Associates the specified value with the specified key in the cache.
@@ -514,7 +514,7 @@ namespace Apache.Ignite.Core.Cache
         /// This method is transactional and will enlist the entry into ongoing transaction if there is one.
         /// </summary>
         /// <param name="vals">Key-value pairs to store in cache.</param>
-        void PutAll(IDictionary<TK, TV> vals);
+        void PutAll(IEnumerable<KeyValuePair<TK, TV>> vals);
 
         /// <summary>
         /// Stores given key-value pairs in cache.
@@ -522,7 +522,7 @@ namespace Apache.Ignite.Core.Cache
         /// This method is transactional and will enlist the entry into ongoing transaction if there is one.
         /// </summary>
         /// <param name="vals">Key-value pairs to store in cache.</param>
-        Task PutAllAsync(IDictionary<TK, TV> vals);
+        Task PutAllAsync(IEnumerable<KeyValuePair<TK, TV>> vals);
 
         /// <summary>
         /// Attempts to evict all entries associated with keys. Note, that entry will be evicted only
@@ -785,12 +785,12 @@ namespace Apache.Ignite.Core.Cache
         /// <param name="processor">The processor.</param>
         /// <param name="arg">The argument.</param>
         /// <returns>
-        /// Map of <see cref="ICacheEntryProcessorResult{R}" /> of the processing per key, if any,
+        /// Map of <see cref="ICacheEntryProcessorResult{K, R}" /> of the processing per key, if any,
         /// defined by the <see cref="ICacheEntryProcessor{K,V,A,R}"/> implementation.
         /// No mappings will be returned for processors that return a null value for a key.
         /// </returns>
         /// <exception cref="CacheEntryProcessorException">If an exception has occured during processing.</exception>
-        IDictionary<TK, ICacheEntryProcessorResult<TRes>> InvokeAll<TArg, TRes>(IEnumerable<TK> keys, 
+        ICollection<ICacheEntryProcessorResult<TK, TRes>> InvokeAll<TArg, TRes>(IEnumerable<TK> keys, 
             ICacheEntryProcessor<TK, TV, TArg, TRes> processor, TArg arg);
 
         /// <summary>
@@ -809,12 +809,12 @@ namespace Apache.Ignite.Core.Cache
         /// <param name="processor">The processor.</param>
         /// <param name="arg">The argument.</param>
         /// <returns>
-        /// Map of <see cref="ICacheEntryProcessorResult{R}" /> of the processing per key, if any,
+        /// Map of <see cref="ICacheEntryProcessorResult{K, R}" /> of the processing per key, if any,
         /// defined by the <see cref="ICacheEntryProcessor{K,V,A,R}"/> implementation.
         /// No mappings will be returned for processors that return a null value for a key.
         /// </returns>
         /// <exception cref="CacheEntryProcessorException">If an exception has occured during processing.</exception>
-        Task<IDictionary<TK, ICacheEntryProcessorResult<TRes>>> InvokeAllAsync<TArg, TRes>(IEnumerable<TK> keys, 
+        Task<ICollection<ICacheEntryProcessorResult<TK, TRes>>> InvokeAllAsync<TArg, TRes>(IEnumerable<TK> keys, 
             ICacheEntryProcessor<TK, TV, TArg, TRes> processor, TArg arg);
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/17d00a4f/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheEntryProcessorResult.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheEntryProcessorResult.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheEntryProcessorResult.cs
index 2d0f709..bf89c04 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheEntryProcessorResult.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheEntryProcessorResult.cs
@@ -18,13 +18,19 @@
 namespace Apache.Ignite.Core.Cache
 {
     /// <summary>
-    /// Represents a result of processing <see cref="ICacheEntry{K, V}"/> 
-    /// by <see cref="ICacheEntryProcessor{K, V, A, R}"/>.
+    /// Represents a result of processing <see cref="ICacheEntry{K, V}" />
+    /// by <see cref="ICacheEntryProcessor{K, V, A, R}" />.
     /// </summary>
+    /// <typeparam name="TK">Key type.</typeparam>
     /// <typeparam name="T">Processor result type.</typeparam>
-    public interface ICacheEntryProcessorResult<out T>
+    public interface ICacheEntryProcessorResult<out TK, out T>
     {
         /// <summary>
+        /// Gets the cache key.
+        /// </summary>
+        TK Key { get; }
+
+        /// <summary>
         /// Gets the result of processing an entry.
         /// <para />
         /// If an exception was thrown during the processing of an entry, 

http://git-wip-us.apache.org/repos/asf/ignite/blob/17d00a4f/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryProcessorResult.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryProcessorResult.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryProcessorResult.cs
index 9a0af4f..51c575d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryProcessorResult.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryProcessorResult.cs
@@ -21,11 +21,16 @@ namespace Apache.Ignite.Core.Impl.Cache
     using Apache.Ignite.Core.Cache;
 
     /// <summary>
-    /// Represents a result of <see cref="ICacheEntryProcessor{TK,TV,TA,TR}"/> invocation.
+    /// Represents a result of <see cref="ICacheEntryProcessor{TK,TV,TA,TR}" /> invocation.
     /// </summary>
+    /// <typeparam name="TK">Key type.</typeparam>
     /// <typeparam name="T">Result type.</typeparam>
-    internal class CacheEntryProcessorResult<T> : ICacheEntryProcessorResult<T>
+    /// <seealso cref="Apache.Ignite.Core.Cache.ICacheEntryProcessorResult{TK, T}" />
+    internal class CacheEntryProcessorResult<TK, T> : ICacheEntryProcessorResult<TK, T>
     {
+        // Key
+        private readonly TK _key;
+
         // Result
         private readonly T _res;
 
@@ -33,24 +38,34 @@ namespace Apache.Ignite.Core.Impl.Cache
         private readonly Exception _err;
 
         /// <summary>
-        /// Initializes a new instance of the <see cref="CacheEntryProcessorResult{T}"/> class.
+        /// Initializes a new instance of the <see cref="CacheEntryProcessorResult{TK, T}" /> class.
         /// </summary>
+        /// <param name="key">The key.</param>
         /// <param name="result">The result.</param>
-        public CacheEntryProcessorResult(T result)
+        public CacheEntryProcessorResult(TK key, T result)
         {
+            _key = key;
             _res = result;
         }
 
         /// <summary>
-        /// Initializes a new instance of the <see cref="CacheEntryProcessorResult{T}"/> class.
+        /// Initializes a new instance of the <see cref="CacheEntryProcessorResult{TK, T}" /> class.
         /// </summary>
+        /// <param name="key">The key.</param>
         /// <param name="error">The error.</param>
-        public CacheEntryProcessorResult(Exception error)
+        public CacheEntryProcessorResult(TK key, Exception error)
         {
+            _key = key;
             _err = error;
         }
 
         /** <inheritdoc /> */
+        public TK Key
+        {
+            get { return _key; }
+        }
+
+        /** <inheritdoc /> */
         public T Result
         {
             get

http://git-wip-us.apache.org/repos/asf/ignite/blob/17d00a4f/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
index 2523cf7..516f91c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
@@ -406,7 +406,7 @@ namespace Apache.Ignite.Core.Impl.Cache
         }
 
         /** <inheritDoc /> */
-        public IDictionary<TK, TV> GetAll(IEnumerable<TK> keys)
+        public ICollection<ICacheEntry<TK, TV>> GetAll(IEnumerable<TK> keys)
         {
             IgniteArgumentCheck.NotNull(keys, "keys");
 
@@ -417,7 +417,7 @@ namespace Apache.Ignite.Core.Impl.Cache
         }
 
         /** <inheritDoc /> */
-        public Task<IDictionary<TK, TV>> GetAllAsync(IEnumerable<TK> keys)
+        public Task<ICollection<ICacheEntry<TK, TV>>> GetAllAsync(IEnumerable<TK> keys)
         {
             IgniteArgumentCheck.NotNull(keys, "keys");
 
@@ -618,7 +618,7 @@ namespace Apache.Ignite.Core.Impl.Cache
         }
 
         /** <inheritdoc /> */
-        public void PutAll(IDictionary<TK, TV> vals)
+        public void PutAll(IEnumerable<KeyValuePair<TK, TV>> vals)
         {
             IgniteArgumentCheck.NotNull(vals, "vals");
 
@@ -628,7 +628,7 @@ namespace Apache.Ignite.Core.Impl.Cache
         }
 
         /** <inheritDoc /> */
-        public Task PutAllAsync(IDictionary<TK, TV> vals)
+        public Task PutAllAsync(IEnumerable<KeyValuePair<TK, TV>> vals)
         {
             IgniteArgumentCheck.NotNull(vals, "vals");
 
@@ -878,7 +878,7 @@ namespace Apache.Ignite.Core.Impl.Cache
         }
 
         /** <inheritdoc /> */
-        public IDictionary<TK, ICacheEntryProcessorResult<TRes>> InvokeAll<TArg, TRes>(IEnumerable<TK> keys,
+        public ICollection<ICacheEntryProcessorResult<TK, TRes>> InvokeAll<TArg, TRes>(IEnumerable<TK> keys,
             ICacheEntryProcessor<TK, TV, TArg, TRes> processor, TArg arg)
         {
             IgniteArgumentCheck.NotNull(keys, "keys");
@@ -899,7 +899,7 @@ namespace Apache.Ignite.Core.Impl.Cache
         }
 
         /** <inheritDoc /> */
-        public Task<IDictionary<TK, ICacheEntryProcessorResult<TRes>>> InvokeAllAsync<TArg, TRes>(IEnumerable<TK> keys,
+        public Task<ICollection<ICacheEntryProcessorResult<TK, TRes>>> InvokeAllAsync<TArg, TRes>(IEnumerable<TK> keys,
             ICacheEntryProcessor<TK, TV, TArg, TRes> processor, TArg arg)
         {
             IgniteArgumentCheck.NotNull(keys, "keys");
@@ -1170,14 +1170,14 @@ namespace Apache.Ignite.Core.Impl.Cache
         /// <typeparam name="T">The type of the result.</typeparam>
         /// <param name="reader">Stream.</param>
         /// <returns>Results of InvokeAll operation.</returns>
-        private IDictionary<TK, ICacheEntryProcessorResult<T>> ReadInvokeAllResults<T>(BinaryReader reader)
+        private ICollection<ICacheEntryProcessorResult<TK, T>> ReadInvokeAllResults<T>(BinaryReader reader)
         {
             var count = reader.ReadInt();
 
             if (count == -1)
                 return null;
 
-            var results = new Dictionary<TK, ICacheEntryProcessorResult<T>>(count);
+            var results = new List<ICacheEntryProcessorResult<TK, T>>(count);
 
             for (var i = 0; i < count; i++)
             {
@@ -1185,9 +1185,9 @@ namespace Apache.Ignite.Core.Impl.Cache
 
                 var hasError = reader.ReadBoolean();
 
-                results[key] = hasError
-                    ? new CacheEntryProcessorResult<T>(ReadException(reader))
-                    : new CacheEntryProcessorResult<T>(reader.ReadObject<T>());
+                results.Add(hasError
+                    ? new CacheEntryProcessorResult<TK, T>(key, ReadException(reader))
+                    : new CacheEntryProcessorResult<TK, T>(key, reader.ReadObject<T>()));
             }
 
             return results;
@@ -1227,7 +1227,7 @@ namespace Apache.Ignite.Core.Impl.Cache
         /// </summary>
         /// <param name="reader">Reader.</param>
         /// <returns>Dictionary.</returns>
-        private static IDictionary<TK, TV> ReadGetAllDictionary(BinaryReader reader)
+        private static ICollection<ICacheEntry<TK, TV>> ReadGetAllDictionary(BinaryReader reader)
         {
             if (reader == null)
                 return null;
@@ -1238,14 +1238,14 @@ namespace Apache.Ignite.Core.Impl.Cache
             {
                 int size = stream.ReadInt();
 
-                IDictionary<TK, TV> res = new Dictionary<TK, TV>(size);
+                var res = new List<ICacheEntry<TK, TV>>(size);
 
                 for (int i = 0; i < size; i++)
                 {
                     TK key = reader.ReadObject<TK>();
                     TV val = reader.ReadObject<TV>();
 
-                    res[key] = val;
+                    res.Add(new CacheEntry<TK, TV>(key, val));
                 }
 
                 return res;

http://git-wip-us.apache.org/repos/asf/ignite/blob/17d00a4f/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs
index 621bfa5..8dd8eaf 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/PlatformTarget.cs
@@ -215,19 +215,22 @@ namespace Apache.Ignite.Core.Impl
         /// </summary>
         /// <param name="writer">Writer.</param>
         /// <param name="vals">Values.</param>
-        /// <returns>The same writer.</returns>
-        protected static BinaryWriter WriteDictionary<T1, T2>(BinaryWriter writer, 
-            IDictionary<T1, T2> vals)
+        protected static void WriteDictionary<T1, T2>(BinaryWriter writer, IEnumerable<KeyValuePair<T1, T2>> vals)
         {
-            writer.WriteInt(vals.Count);
+            var pos = writer.Stream.Position;
+            writer.WriteInt(0);  // Reserve count.
+
+            int cnt = 0;
 
-            foreach (KeyValuePair<T1, T2> pair in vals)
+            foreach (var pair in vals)
             {
                 writer.Write(pair.Key);
                 writer.Write(pair.Value);
+
+                cnt++;
             }
 
-            return writer;
+            writer.Stream.WriteInt(pos, cnt);
         }
 
         /// <summary>
@@ -237,7 +240,7 @@ namespace Apache.Ignite.Core.Impl
         /// <param name="item">Item.</param>
         /// <param name="writeItem">Write action to perform on item when it is not null.</param>
         /// <returns>The same writer for chaining.</returns>
-        protected static BinaryWriter WriteNullable<T>(BinaryWriter writer, T item,
+        private static BinaryWriter WriteNullable<T>(BinaryWriter writer, T item,
             Func<BinaryWriter, T, BinaryWriter> writeItem) where T : class
         {
             if (item == null)

http://git-wip-us.apache.org/repos/asf/ignite/blob/17d00a4f/modules/platforms/dotnet/Apache.Ignite.EntityFramework/Impl/DbCache.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.EntityFramework/Impl/DbCache.cs b/modules/platforms/dotnet/Apache.Ignite.EntityFramework/Impl/DbCache.cs
index a7ac2c9..d62bdd0 100644
--- a/modules/platforms/dotnet/Apache.Ignite.EntityFramework/Impl/DbCache.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.EntityFramework/Impl/DbCache.cs
@@ -252,7 +252,7 @@ namespace Apache.Ignite.EntityFramework.Impl
         private IDictionary<string, long> GetEntitySetVersions(ICollection<EntitySetBase> sets)
         {
             // LINQ Select allocates less that a new List<> will do.
-            var versions = _metaCache.GetAll(sets.Select(x => x.Name));
+            var versions = _metaCache.GetAll(sets.Select(x => x.Name)).ToDictionary(x => x.Key, x => x.Value);
 
             // Some versions may be missing, fill up with 0.
             foreach (var set in sets)

http://git-wip-us.apache.org/repos/asf/ignite/blob/17d00a4f/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
index 10a75fa..d07c58d 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
@@ -21,6 +21,7 @@ namespace Apache.Ignite.Examples.Datagrid
     using System.Collections.Generic;
     using Apache.Ignite.Core;
     using Apache.Ignite.Core.Binary;
+    using Apache.Ignite.Core.Cache;
     using Apache.Ignite.ExamplesDll.Binary;
 
     /// <summary>
@@ -159,13 +160,13 @@ namespace Apache.Ignite.Examples.Datagrid
             cache.PutAll(map);
 
             // Get recently created organizations as a strongly-typed fully de-serialized instances.
-            IDictionary<int, Organization> mapFromCache = cache.GetAll(new List<int> { 1, 2 });
+            ICollection<ICacheEntry<int, Organization>> mapFromCache = cache.GetAll(new List<int> { 1, 2 });
 
             Console.WriteLine();
             Console.WriteLine(">>> Retrieved organization instances from cache:");
 
-            foreach (Organization org in mapFromCache.Values)
-                Console.WriteLine(">>>     " + org);
+            foreach (ICacheEntry<int, Organization> org in mapFromCache)
+                Console.WriteLine(">>>     " + org.Value);
         }
 
         /// <summary>
@@ -200,13 +201,13 @@ namespace Apache.Ignite.Examples.Datagrid
             var binaryCache = cache.WithKeepBinary<int, IBinaryObject>();
 
             // Get recently created organizations as binary objects.
-            IDictionary<int, IBinaryObject> binaryMap = binaryCache.GetAll(new List<int> { 1, 2 });
+            ICollection<ICacheEntry<int, IBinaryObject>> binaryMap = binaryCache.GetAll(new List<int> { 1, 2 });
 
             Console.WriteLine();
             Console.WriteLine(">>> Retrieved organization names from binary objects:");
 
-            foreach (IBinaryObject poratbleOrg in binaryMap.Values)
-                Console.WriteLine(">>>     " + poratbleOrg.GetField<string>("name"));
+            foreach (var pair in binaryMap)
+                Console.WriteLine(">>>     " + pair.Value.GetField<string>("name"));
         }
     }
 }


[45/50] [abbrv] ignite git commit: ignite-4571 - reviewed contribution

Posted by dm...@apache.org.
ignite-4571 - reviewed contribution


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

Branch: refs/heads/ignite-1192
Commit: b99c1980dfe250b3f24a94eb4b6cb948bb314ab5
Parents: 5c48260
Author: Konstantin Dudkov <kd...@ya.ru>
Authored: Mon Apr 10 18:29:33 2017 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Apr 10 18:29:33 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAtomicFuture.java |  2 +-
 .../processors/cache/GridCacheMvccManager.java  | 84 ++++++++++++++++----
 .../cache/GridDeferredAckMessageSender.java     | 11 ++-
 .../GridDhtAtomicAbstractUpdateFuture.java      |  4 +-
 .../GridNearAtomicAbstractUpdateFuture.java     |  2 +-
 .../GridNearAtomicSingleUpdateFuture.java       | 21 ++---
 .../dht/atomic/GridNearAtomicUpdateFuture.java  | 23 +++---
 .../cache/transactions/IgniteTxManager.java     |  2 +-
 8 files changed, 102 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
index 8df229e..87ae29c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
@@ -27,7 +27,7 @@ public interface GridCacheAtomicFuture<R> extends GridCacheFuture<R> {
     /**
      * @return Future ID.
      */
-    public Long id();
+    public long id();
 
     /**
      * Gets future that will be completed when it is safe when update is finished on the given version of topology.

http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
index dff2c88..712d136 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
@@ -81,6 +81,9 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
     /** Maxim number of removed locks. */
     private static final int MAX_REMOVED_LOCKS = 10240;
 
+    /** Maxim number of atomic IDs for thread. Must be power of two! */
+    protected static final int THREAD_RESERVE_SIZE = 0x4000;
+
     /** */
     private static final int MAX_NESTED_LSNR_CALLS = getInteger(IGNITE_MAX_NESTED_LISTENER_CALLS, 5);
 
@@ -106,9 +109,6 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
     @GridToStringExclude
     private final ConcurrentMap<GridCacheVersion, Collection<GridCacheMvccFuture<?>>> mvccFuts = newMap();
 
-    /** */
-    private final AtomicLong atomicFutId = new AtomicLong(U.currentTimeMillis());
-
     /** Pending atomic futures. */
     private final ConcurrentHashMap8<Long, GridCacheAtomicFuture<?>> atomicFuts = new ConcurrentHashMap8<>();
 
@@ -138,6 +138,16 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
     /** */
     private volatile boolean stopping;
 
+    /** Global atomic id counter. */
+    protected final AtomicLong globalAtomicCnt = new AtomicLong();
+
+    /** Per thread atomic id counter. */
+    private final ThreadLocal<LongWrapper> threadAtomicCnt = new ThreadLocal<LongWrapper>() {
+        @Override protected LongWrapper initialValue() {
+            return new LongWrapper(globalAtomicCnt.getAndAdd(THREAD_RESERVE_SIZE));
+        }
+    };
+
     /** Lock callback. */
     @GridToStringExclude
     private final GridCacheMvccCallback cb = new GridCacheMvccCallback() {
@@ -256,9 +266,9 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
                 cacheFut.onNodeLeft(discoEvt.eventNode().id());
 
                 if (cacheFut.isCancelled() || cacheFut.isDone()) {
-                    Long futId = cacheFut.id();
+                    long futId = cacheFut.id();
 
-                    if (futId != null)
+                    if (futId > 0)
                         atomicFuts.remove(futId, cacheFut);
                 }
             }
@@ -426,18 +436,11 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
     }
 
     /**
-     * @return ID for atomic cache update future.
-     */
-    public long atomicFutureId() {
-        return atomicFutId.incrementAndGet();
-    }
-
-    /**
      * @param futId Future ID.
      * @param fut Future.
      * @return {@code False} if future was forcibly completed with error.
      */
-    public boolean addAtomicFuture(Long futId, GridCacheAtomicFuture<?> fut) {
+    public boolean addAtomicFuture(long futId, GridCacheAtomicFuture<?> fut) {
         IgniteInternalFuture<?> old = atomicFuts.put(futId, fut);
 
         assert old == null : "Old future is not null [futId=" + futId + ", fut=" + fut + ", old=" + old + ']';
@@ -472,7 +475,7 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
      * @param futId Future ID.
      * @return Future.
      */
-    @Nullable public IgniteInternalFuture<?> atomicFuture(Long futId) {
+    @Nullable public IgniteInternalFuture<?> atomicFuture(long futId) {
         return atomicFuts.get(futId);
     }
 
@@ -480,7 +483,7 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
      * @param futId Future ID.
      * @return Removed future.
      */
-    @Nullable public IgniteInternalFuture<?> removeAtomicFuture(Long futId) {
+    @Nullable public IgniteInternalFuture<?> removeAtomicFuture(long futId) {
         return atomicFuts.remove(futId);
     }
 
@@ -1174,6 +1177,20 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
     }
 
     /**
+     * @return Next future ID for atomic futures.
+     */
+    public long nextAtomicId() {
+        LongWrapper cnt = threadAtomicCnt.get();
+
+        long res = cnt.getAndIncrement();
+
+        if ((cnt.get() & (THREAD_RESERVE_SIZE - 1)) == 0)
+            cnt.set(globalAtomicCnt.getAndAdd(THREAD_RESERVE_SIZE));
+
+        return res;
+    }
+
+    /**
      *
      */
     private class FinishLockFuture extends GridFutureAdapter<Object> {
@@ -1382,4 +1399,41 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
             return S.toString(DataStreamerFuture.class, this, super.toString());
         }
     }
+
+    /** Long wrapper. */
+    private static class LongWrapper {
+        /** */
+        private long val;
+
+        /**
+         * @param val Value.
+         */
+        public LongWrapper(long val) {
+            this.val = val + 1;
+
+            if (this.val == 0)
+                this.val = 1;
+        }
+
+        /**
+         * @param val Value to set.
+         */
+        public void set(long val) {
+            this.val = val;
+        }
+
+        /**
+         * @return Current value.
+         */
+        public long get() {
+            return val;
+        }
+
+        /**
+         * @return Current value (and stores incremented value).
+         */
+        public long getAndIncrement() {
+            return val++;
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java
index 5265ec9..89aa725 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java
@@ -21,7 +21,6 @@ import java.util.UUID;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
-import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.closure.GridClosureProcessor;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObject;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
@@ -33,7 +32,7 @@ import org.jsr166.ConcurrentLinkedDeque8;
 /**
  *
  */
-public abstract class GridDeferredAckMessageSender {
+public abstract class GridDeferredAckMessageSender<T> {
     /** Deferred message buffers. */
     private ConcurrentMap<UUID, DeferredAckMessageBuffer> deferredAckMsgBuffers = new ConcurrentHashMap8<>();
 
@@ -67,7 +66,7 @@ public abstract class GridDeferredAckMessageSender {
      * @param nodeId Node ID.
      * @param vers Versions to send.
      */
-    public abstract void finish(UUID nodeId, ConcurrentLinkedDeque8<GridCacheVersion> vers);
+    public abstract void finish(UUID nodeId, ConcurrentLinkedDeque8<T> vers);
 
     /**
      *
@@ -81,7 +80,7 @@ public abstract class GridDeferredAckMessageSender {
      * @param nodeId Node ID to send message to.
      * @param ver Version to ack.
      */
-    public void sendDeferredAckMessage(UUID nodeId, GridCacheVersion ver) {
+    public void sendDeferredAckMessage(UUID nodeId, T ver) {
         while (true) {
             DeferredAckMessageBuffer buf = deferredAckMsgBuffers.get(nodeId);
 
@@ -117,7 +116,7 @@ public abstract class GridDeferredAckMessageSender {
         private AtomicBoolean guard = new AtomicBoolean(false);
 
         /** Versions. */
-        private ConcurrentLinkedDeque8<GridCacheVersion> vers = new ConcurrentLinkedDeque8<>();
+        private ConcurrentLinkedDeque8<T> vers = new ConcurrentLinkedDeque8<>();
 
         /** Node ID. */
         private final UUID nodeId;
@@ -173,7 +172,7 @@ public abstract class GridDeferredAckMessageSender {
          * @param ver Version to send.
          * @return {@code True} if request was handled, {@code false} if this buffer is filled and cannot be used.
          */
-        public boolean add(GridCacheVersion ver) {
+        public boolean add(T ver) {
             readLock().lock();
 
             boolean snd = false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
index 5ff5aa4..0940acb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
@@ -110,7 +110,7 @@ public abstract class GridDhtAtomicAbstractUpdateFuture extends GridFutureAdapte
         this.updateReq = updateReq;
         this.writeVer = writeVer;
 
-        futId = cctx.mvcc().atomicFutureId();
+        futId = cctx.mvcc().nextAtomicId();
 
         if (log == null) {
             msgLog = cctx.shared().atomicMessageLogger();
@@ -295,7 +295,7 @@ public abstract class GridDhtAtomicAbstractUpdateFuture extends GridFutureAdapte
     }
 
     /** {@inheritDoc} */
-    @Override public final Long id() {
+    @Override public final long id() {
         return futId;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
index 39abb73..a2adb05 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
@@ -138,7 +138,7 @@ public abstract class GridNearAtomicAbstractUpdateFuture extends GridFutureAdapt
 
     /** Future ID. */
     @GridToStringInclude
-    protected Long futId;
+    protected long futId;
 
     /** Operation result. */
     protected GridCacheReturn opRes;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
index c2372d1..e4ba457 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
@@ -125,7 +125,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
     }
 
     /** {@inheritDoc} */
-    @Override public Long id() {
+    @Override public long id() {
         synchronized (mux) {
             return futId;
         }
@@ -216,7 +216,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
         AffinityTopologyVersion remapTopVer0;
 
         synchronized (mux) {
-            if (futId == null || futId != res.futureId())
+            if (futId == 0 || futId != res.futureId())
                 return;
 
             assert reqState != null;
@@ -258,7 +258,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
         CachePartialUpdateCheckedException err0 = null;
 
         synchronized (mux) {
-            if (futId == null || futId != res.futureId())
+            if (futId == 0 || futId != res.futureId())
                 return;
 
             req = reqState.processPrimaryResponse(nodeId, res);
@@ -331,7 +331,8 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
      * @return Non-null topology version if update should be remapped.
      */
     private AffinityTopologyVersion onAllReceived() {
-        assert futId != null;
+        assert Thread.holdsLock(mux);
+        assert futId > 0;
 
         AffinityTopologyVersion remapTopVer0 = null;
 
@@ -362,7 +363,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
             cctx.mvcc().removeAtomicFuture(futId);
 
             reqState = null;
-            futId = null;
+            futId = 0;
             topVer = AffinityTopologyVersion.ZERO;
 
             remapTopVer = null;
@@ -479,7 +480,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
 
     /** {@inheritDoc} */
     @Override protected void map(AffinityTopologyVersion topVer) {
-        long futId = cctx.mvcc().atomicFutureId();
+        long futId = cctx.mvcc().nextAtomicId();
 
         Exception err = null;
         PrimaryRequestState reqState0 = null;
@@ -488,7 +489,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
             reqState0 = mapSingleUpdate(topVer, futId);
 
             synchronized (mux) {
-                assert this.futId == null : this;
+                assert this.futId == 0 : this;
                 assert this.topVer == AffinityTopologyVersion.ZERO : this;
 
                 this.topVer = topVer;
@@ -529,7 +530,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
     /**
      * @param futId Future ID.
      */
-    private void checkDhtNodes(Long futId) {
+    private void checkDhtNodes(long futId) {
         GridCacheReturn opRes0 = null;
         CachePartialUpdateCheckedException err0 = null;
         AffinityTopologyVersion remapTopVer0 = null;
@@ -537,7 +538,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
         GridNearAtomicCheckUpdateRequest checkReq = null;
 
         synchronized (mux) {
-            if (this.futId == null || !this.futId.equals(futId))
+            if (this.futId == 0 || this.futId != futId)
                 return;
 
             assert reqState != null;
@@ -570,7 +571,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
         synchronized (mux) {
             id0 = futId;
 
-            futId = null;
+            futId = 0;
         }
 
         return id0;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index a44ccf9..84deefc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -150,7 +150,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
     }
 
     /** {@inheritDoc} */
-    @Override public Long id() {
+    @Override public long id() {
         synchronized (mux) {
             return futId;
         }
@@ -167,7 +167,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
         List<GridNearAtomicCheckUpdateRequest> checkReqs = null;
 
         synchronized (mux) {
-            if (futId == null)
+            if (futId == 0)
                 return false;
 
             if (singleReq != null) {
@@ -300,7 +300,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
         AffinityTopologyVersion remapTopVer0;
 
         synchronized (mux) {
-            if (futId == null || futId != res.futureId())
+            if (futId == 0 || futId != res.futureId())
                 return;
 
             PrimaryRequestState reqState;
@@ -373,7 +373,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
         boolean rcvAll;
 
         synchronized (mux) {
-            if (futId == null || futId != res.futureId())
+            if (futId == 0 || futId != res.futureId())
                 return;
 
             if (singleReq != null) {
@@ -534,7 +534,8 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
      * @return Non null topology version if update should be remapped.
      */
     @Nullable private AffinityTopologyVersion onAllReceived() {
-        assert futId != null;
+        assert Thread.holdsLock(mux);
+        assert futId > 0;
 
         AffinityTopologyVersion remapTopVer0 = null;
 
@@ -577,7 +578,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
         if (remapTopVer0 != null) {
             cctx.mvcc().removeAtomicFuture(futId);
 
-            futId = null;
+            futId = 0;
             topVer = AffinityTopologyVersion.ZERO;
 
             remapTopVer = null;
@@ -767,7 +768,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
             return;
         }
 
-        Long futId = cctx.mvcc().atomicFutureId();
+        long futId = cctx.mvcc().nextAtomicId();
 
         Exception err = null;
         PrimaryRequestState singleReq0 = null;
@@ -801,7 +802,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
             }
 
             synchronized (mux) {
-                assert this.futId == null : this;
+                assert this.futId == 0 : this;
                 assert this.topVer == AffinityTopologyVersion.ZERO : this;
 
                 this.topVer = topVer;
@@ -856,7 +857,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
             checkDhtNodes(futId);
     }
 
-    private void checkDhtNodes(Long futId) {
+    private void checkDhtNodes(long futId) {
         GridCacheReturn opRes0 = null;
         CachePartialUpdateCheckedException err0 = null;
         AffinityTopologyVersion remapTopVer0 = null;
@@ -866,7 +867,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
         boolean rcvAll = false;
 
         synchronized (mux) {
-            if (this.futId == null || !this.futId.equals(futId))
+            if (this.futId == 0 || this.futId != futId)
                 return;
 
             if (singleReq != null) {
@@ -940,7 +941,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
         synchronized (mux) {
             id0 = futId;
 
-            futId = null;
+            futId = 0;
         }
 
         return id0;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
index d1334ef..6b383a4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
@@ -211,7 +211,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
 
         txHnd = new IgniteTxHandler(cctx);
 
-        deferredAckMsgSnd = new GridDeferredAckMessageSender(cctx.time(), cctx.kernalContext().closure()) {
+        deferredAckMsgSnd = new GridDeferredAckMessageSender<GridCacheVersion>(cctx.time(), cctx.kernalContext().closure()) {
             @Override public int getTimeout() {
                 return DEFERRED_ONE_PHASE_COMMIT_ACK_REQUEST_TIMEOUT;
             }


[03/50] [abbrv] ignite git commit: IGNITE-4813: Add MRJobConfig.TASK_ATTEMPT_ID value to job config. This closes #1610.

Posted by dm...@apache.org.
IGNITE-4813: Add MRJobConfig.TASK_ATTEMPT_ID value to job config. This closes #1610.


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

Branch: refs/heads/ignite-1192
Commit: 32faeb944402872b1f1e6e4e791ac9249e846b0f
Parents: f726dc4
Author: Ivan Veselovskiy <iv...@gridgain.com>
Authored: Mon Apr 3 11:25:48 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Mon Apr 3 11:25:48 2017 +0300

----------------------------------------------------------------------
 .../internal/processors/hadoop/impl/v2/HadoopV2Context.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/32faeb94/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Context.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Context.java b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Context.java
index b8ecf3e..f4d624a 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Context.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/v2/HadoopV2Context.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.hadoop.impl.v2;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.mapreduce.Counter;
 import org.apache.hadoop.mapreduce.InputSplit;
+import org.apache.hadoop.mapreduce.MRJobConfig;
 import org.apache.hadoop.mapreduce.MapContext;
 import org.apache.hadoop.mapreduce.OutputCommitter;
 import org.apache.hadoop.mapreduce.RecordReader;
@@ -31,7 +32,6 @@ import org.apache.hadoop.mapreduce.task.JobContextImpl;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.processors.hadoop.HadoopFileBlock;
 import org.apache.ignite.hadoop.HadoopInputSplit;
-import org.apache.ignite.internal.processors.hadoop.HadoopMapperAwareTaskOutput;
 import org.apache.ignite.internal.processors.hadoop.HadoopTaskCancelledException;
 import org.apache.ignite.internal.processors.hadoop.HadoopTaskContext;
 import org.apache.ignite.internal.processors.hadoop.HadoopTaskInput;
@@ -80,8 +80,9 @@ public class HadoopV2Context extends JobContextImpl implements MapContext, Reduc
 
         taskAttemptID = ctx.attemptId();
 
-        conf.set("mapreduce.job.id", taskAttemptID.getJobID().toString());
-        conf.set("mapreduce.task.id", taskAttemptID.getTaskID().toString());
+        conf.set(MRJobConfig.ID, taskAttemptID.getJobID().toString());
+        conf.set(MRJobConfig.TASK_ID, taskAttemptID.getTaskID().toString());
+        conf.set(MRJobConfig.TASK_ATTEMPT_ID, taskAttemptID.toString());
 
         output = ctx.output();
         input = ctx.input();


[27/50] [abbrv] ignite git commit: IGNITE-3522: Renamed "streamBufferSize" property of FileSystemConfiguration to "bufferSize".

Posted by dm...@apache.org.
IGNITE-3522: Renamed "streamBufferSize" property of FileSystemConfiguration to "bufferSize".


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

Branch: refs/heads/ignite-1192
Commit: a6d518d40b946c23918423e15fd332dc185783b6
Parents: 0ccb856
Author: devozerov <vo...@gridgain.com>
Authored: Thu Apr 6 14:07:46 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Thu Apr 6 14:07:46 2017 +0300

----------------------------------------------------------------------
 .../ignite/configuration/FileSystemConfiguration.java     |  6 +++---
 .../apache/ignite/internal/processors/igfs/IgfsImpl.java  | 10 +++++-----
 .../internal/visor/node/VisorIgfsConfiguration.java       |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a6d518d4/modules/core/src/main/java/org/apache/ignite/configuration/FileSystemConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/FileSystemConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/FileSystemConfiguration.java
index 75e9f7d..e1aaa711 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/FileSystemConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/FileSystemConfiguration.java
@@ -204,7 +204,7 @@ public class FileSystemConfiguration {
          * Must preserve alphabetical order!
          */
         blockSize = cfg.getBlockSize();
-        bufSize = cfg.getStreamBufferSize();
+        bufSize = cfg.getBufferSize();
         colocateMeta = cfg.isColocateMetadata();
         dataCacheCfg = cfg.getDataCacheConfiguration();
         dfltMode = cfg.getDefaultMode();
@@ -411,7 +411,7 @@ public class FileSystemConfiguration {
      *
      * @return Read/write buffers size (bytes).
      */
-    public int getStreamBufferSize() {
+    public int getBufferSize() {
         return bufSize;
     }
 
@@ -421,7 +421,7 @@ public class FileSystemConfiguration {
      * @param bufSize Read/write buffers size for stream operations (bytes) or {@code 0} to reset default value.
      * @return {@code this} for chaining.
      */
-    public FileSystemConfiguration setStreamBufferSize(int bufSize) {
+    public FileSystemConfiguration setBufferSize(int bufSize) {
         A.ensure(bufSize >= 0, "bufSize >= 0");
 
         this.bufSize = bufSize == 0 ? DFLT_BUF_SIZE : bufSize;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a6d518d4/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
index 6ffa202..a946c71 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
@@ -931,7 +931,7 @@ public final class IgfsImpl implements IgfsEx {
 
     /** {@inheritDoc} */
     @Override public IgfsInputStream open(IgfsPath path) {
-        return open(path, cfg.getStreamBufferSize(), cfg.getSequentialReadsBeforePrefetch());
+        return open(path, cfg.getBufferSize(), cfg.getSequentialReadsBeforePrefetch());
     }
 
     /** {@inheritDoc} */
@@ -951,7 +951,7 @@ public final class IgfsImpl implements IgfsEx {
                 if (log.isDebugEnabled())
                     log.debug("Open file for reading [path=" + path + ", bufSize=" + bufSize + ']');
 
-                int bufSize0 = bufSize == 0 ? cfg.getStreamBufferSize() : bufSize;
+                int bufSize0 = bufSize == 0 ? cfg.getBufferSize() : bufSize;
 
                 IgfsMode mode = resolveMode(path);
 
@@ -1034,7 +1034,7 @@ public final class IgfsImpl implements IgfsEx {
 
     /** {@inheritDoc} */
     @Override public IgfsOutputStream create(IgfsPath path, boolean overwrite) {
-        return create0(path, cfg.getStreamBufferSize(), overwrite, null, 0, null, true);
+        return create0(path, cfg.getBufferSize(), overwrite, null, 0, null, true);
     }
 
     /** {@inheritDoc} */
@@ -1141,7 +1141,7 @@ public final class IgfsImpl implements IgfsEx {
 
     /** {@inheritDoc} */
     @Override public IgfsOutputStream append(IgfsPath path, boolean create) {
-        return append(path, cfg.getStreamBufferSize(), create, null);
+        return append(path, cfg.getBufferSize(), create, null);
     }
 
     /** {@inheritDoc} */
@@ -1808,7 +1808,7 @@ public final class IgfsImpl implements IgfsEx {
      * @return Real buffer size.
      */
     private int bufferSize(int bufSize) {
-        return bufSize == 0 ? cfg.getStreamBufferSize() : bufSize;
+        return bufSize == 0 ? cfg.getBufferSize() : bufSize;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/a6d518d4/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java
index 7f8e3b0..723d2a7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java
@@ -134,7 +134,7 @@ public class VisorIgfsConfiguration implements Serializable, LessNamingBean {
         cfg.dataCacheName = igfs.getDataCacheConfiguration().getName();
         cfg.blockSize = igfs.getBlockSize();
         cfg.prefetchBlocks = igfs.getPrefetchBlocks();
-        cfg.streamBufSize = igfs.getStreamBufferSize();
+        cfg.streamBufSize = igfs.getBufferSize();
         cfg.perNodeBatchSize = igfs.getPerNodeBatchSize();
         cfg.perNodeParallelBatchCnt = igfs.getPerNodeParallelBatchCount();
 


[04/50] [abbrv] ignite git commit: Merge with 1.8.5

Posted by dm...@apache.org.
Merge with 1.8.5


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

Branch: refs/heads/ignite-1192
Commit: df2504c8551a00ecc95973eff588cc2cbb6ce725
Parents: e9bc038
Author: dkarachentsev <dk...@gridgain.com>
Authored: Mon Apr 3 11:26:14 2017 +0300
Committer: dkarachentsev <dk...@gridgain.com>
Committed: Mon Apr 3 11:26:14 2017 +0300

----------------------------------------------------------------------
 .../ignite/internal/managers/communication/GridIoPolicy.java       | 2 +-
 .../org/apache/ignite/internal/processors/query/QueryUtils.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/df2504c8/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoPolicy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoPolicy.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoPolicy.java
index 0fca817..e848633 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoPolicy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoPolicy.java
@@ -53,7 +53,7 @@ public class GridIoPolicy {
     public static final byte QUERY_POOL = 10;
 
     /** Pool for service proxy executions. */
-    public static final byte SERVICE_POOL = 9;
+    public static final byte SERVICE_POOL = 11;
 
     /**
      * Defines the range of reserved pools that are not available for plugins.

http://git-wip-us.apache.org/repos/asf/ignite/blob/df2504c8/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
index 20570ab..19a752a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java
@@ -875,7 +875,7 @@ public class QueryUtils {
      * @return {@code True} if will be deserialized.
      */
     private static boolean mustDeserializeBinary(GridKernalContext ctx, Class cls) {
-        if (cls != null && ctx.config().getMarshaller() instanceof BinaryMarshaller) {
+        if (cls != null && cls != Object.class && ctx.config().getMarshaller() instanceof BinaryMarshaller) {
             CacheObjectBinaryProcessorImpl proc0 = (CacheObjectBinaryProcessorImpl)ctx.cacheObjects();
 
             return proc0.binaryContext().mustDeserialize(cls);


[10/50] [abbrv] ignite git commit: IGNITE-4902 .NET: Fix StartFromApplicationConfiguration() in ASP.NET

Posted by dm...@apache.org.
IGNITE-4902 .NET: Fix StartFromApplicationConfiguration() in ASP.NET


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

Branch: refs/heads/ignite-1192
Commit: ece49284638f012c39c1dbf49147edf7650fb13f
Parents: 9bb48ee
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Mon Apr 3 16:08:03 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Mon Apr 3 16:08:03 2017 +0300

----------------------------------------------------------------------
 .../IgniteConfigurationSectionTest.cs           |  7 ++++---
 .../dotnet/Apache.Ignite.Core/Ignition.cs       | 22 +++++++++-----------
 .../Impl/Common/IgniteHome.cs                   | 21 ++++++++++++-------
 3 files changed, 28 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ece49284/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSectionTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSectionTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSectionTest.cs
index fc43f46..b507cff 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSectionTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSectionTest.cs
@@ -34,7 +34,8 @@ namespace Apache.Ignite.Core.Tests
         [Test]
         public void TestRead()
         {
-            var section = (IgniteConfigurationSection) ConfigurationManager.GetSection("igniteConfiguration");
+            var section = (IgniteConfigurationSection) ConfigurationManager.GetSection(
+                Ignition.ConfigurationSectionName);
 
             Assert.AreEqual("myGrid1", section.IgniteConfiguration.IgniteInstanceName);
             Assert.AreEqual("cacheName", section.IgniteConfiguration.CacheConfiguration.Single().Name);
@@ -48,7 +49,7 @@ namespace Apache.Ignite.Core.Tests
         {
             Environment.SetEnvironmentVariable(Classpath.EnvIgniteNativeTestClasspath, "true");
 
-            using (var ignite = Ignition.StartFromApplicationConfiguration("igniteConfiguration"))
+            using (var ignite = Ignition.StartFromApplicationConfiguration(Ignition.ConfigurationSectionName))
             {
                 Assert.AreEqual("myGrid1", ignite.Name);
                 Assert.IsNotNull(ignite.GetCache<int, int>("cacheName"));
@@ -62,7 +63,7 @@ namespace Apache.Ignite.Core.Tests
 
             using (var ignite = Ignition.StartFromApplicationConfiguration())
             {
-                Assert.IsTrue(ignite.Name.StartsWith("myGrid"));
+                Assert.AreEqual("myGrid1", ignite.Name);
             }
 
             using (var ignite = Ignition.StartFromApplicationConfiguration(

http://git-wip-us.apache.org/repos/asf/ignite/blob/ece49284/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
index f590794..13e3f61 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
@@ -53,6 +53,11 @@ namespace Apache.Ignite.Core
     /// </summary>
     public static class Ignition
     {
+        /// <summary>
+        /// Default configuration section name.
+        /// </summary>
+        public const string ConfigurationSectionName = "igniteConfiguration";
+
         /** */
         private static readonly object SyncRoot = new object();
 
@@ -118,22 +123,15 @@ namespace Apache.Ignite.Core
         }
 
         /// <summary>
-        /// Reads <see cref="IgniteConfiguration"/> from first <see cref="IgniteConfigurationSection"/> in the 
-        /// application configuration and starts Ignite.
+        /// Reads <see cref="IgniteConfiguration"/> from application configuration 
+        /// <see cref="IgniteConfigurationSection"/> with <see cref="ConfigurationSectionName"/>
+        /// name and starts Ignite.
         /// </summary>
         /// <returns>Started Ignite.</returns>
         public static IIgnite StartFromApplicationConfiguration()
         {
-            var cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
-
-            var section = cfg.Sections.OfType<IgniteConfigurationSection>().FirstOrDefault();
-
-            if (section == null)
-                throw new ConfigurationErrorsException(
-                    string.Format("Could not find {0} in current application configuration",
-                        typeof(IgniteConfigurationSection).Name));
-
-            return Start(section.IgniteConfiguration);
+            // ReSharper disable once IntroduceOptionalParameters.Global
+            return StartFromApplicationConfiguration(ConfigurationSectionName);
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/ece49284/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteHome.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteHome.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteHome.cs
index 08f6d84..0290095 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteHome.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteHome.cs
@@ -108,13 +108,20 @@ namespace Apache.Ignite.Core.Impl.Common
         /// <returns>Value indicating whether specified dir looks like a Ignite home.</returns>
         private static bool IsIgniteHome(DirectoryInfo dir)
         {
-            return dir.Exists &&
-                   (dir.EnumerateDirectories().Count(x => x.Name == "examples" || x.Name == "bin") == 2 &&
-                    dir.EnumerateDirectories().Count(x => x.Name == "modules" || x.Name == "platforms") == 1)
-                   || // NuGet home
-                   (dir.EnumerateDirectories().Any(x => x.Name == "Libs") &&
-                    (dir.EnumerateFiles("Apache.Ignite.Core.dll").Any() ||
-                     dir.EnumerateFiles("Apache.Ignite.*.nupkg").Any()));
+            try
+            {
+                return dir.Exists &&
+                       (dir.EnumerateDirectories().Count(x => x.Name == "examples" || x.Name == "bin") == 2 &&
+                        dir.EnumerateDirectories().Count(x => x.Name == "modules" || x.Name == "platforms") == 1)
+                       || // NuGet home
+                       (dir.EnumerateDirectories().Any(x => x.Name == "Libs") &&
+                        (dir.EnumerateFiles("Apache.Ignite.Core.dll").Any() ||
+                         dir.EnumerateFiles("Apache.Ignite.*.nupkg").Any()));
+            }
+            catch (IOException)
+            {
+                return false;
+            }
         }
     }
 }


[23/50] [abbrv] ignite git commit: IGNITE-4817 .NET: Fixed LINQ Contains when subquery comes from a variable

Posted by dm...@apache.org.
IGNITE-4817 .NET: Fixed LINQ Contains when subquery comes from a variable

This closes #1745


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

Branch: refs/heads/ignite-1192
Commit: 7c80c477d38c59cd64045c5eb9f048d367a7978d
Parents: 21d3475
Author: Sergey Stronchinskiy <gu...@gmail.com>
Authored: Thu Apr 6 10:31:19 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Thu Apr 6 10:31:19 2017 +0300

----------------------------------------------------------------------
 .../Cache/Query/CacheLinqTest.cs                | 36 ++++++++--
 .../Impl/CacheQueryExpressionVisitor.cs         | 14 +++-
 .../Apache.Ignite.Linq/Impl/CacheQueryParser.cs | 25 ++++++-
 .../Apache.Ignite.Linq/Impl/MethodVisitor.cs    | 72 ++++++++++++++++----
 4 files changed, 125 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7c80c477/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheLinqTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheLinqTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheLinqTest.cs
index 856fb49..dfd644d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheLinqTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheLinqTest.cs
@@ -276,12 +276,21 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
 
             CheckFunc(x => x.Trim(), strings);
             CheckFunc(x => x.Trim('P'), strings);
+            var toTrim = new[] {'P'};
+            CheckFunc(x => x.Trim(toTrim), strings);
+            CheckFunc(x => x.Trim(new List<char> {'P'}.ToArray()), strings);
             CheckFunc(x => x.Trim('3'), strings);
             CheckFunc(x => x.TrimStart('P'), strings);
+            CheckFunc(x => x.TrimStart(toTrim), strings);
             CheckFunc(x => x.TrimStart('3'), strings);
             Assert.Throws<NotSupportedException>(() => CheckFunc(x => x.TrimStart('P', 'e'), strings));
             CheckFunc(x => x.TrimEnd('P'), strings);
+            CheckFunc(x => x.TrimEnd(toTrim), strings);
             CheckFunc(x => x.TrimEnd('3'), strings);
+            var toTrimFails = new[] {'P', 'c'};
+            Assert.Throws<NotSupportedException>(() => CheckFunc(x => x.Trim(toTrimFails), strings));
+            Assert.Throws<NotSupportedException>(() => CheckFunc(x => x.TrimStart(toTrimFails), strings));
+            Assert.Throws<NotSupportedException>(() => CheckFunc(x => x.TrimEnd(toTrimFails), strings));
 
             CheckFunc(x => Regex.Replace(x, @"son.\d", "kele!"), strings);
             CheckFunc(x => x.Replace("son", ""), strings);
@@ -726,7 +735,8 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
                 .ThenBy(x => x.Value.Age)
                 .ToArray();
 
-            Assert.AreEqual(Enumerable.Range(0, PersonCount).Reverse().ToArray(), persons.Select(x => x.Key).ToArray());
+            Assert.AreEqual(Enumerable.Range(0, PersonCount).Reverse().ToArray(), 
+                persons.Select(x => x.Key).ToArray());
 
             var personsByOrg = GetPersonCache().AsCacheQueryable()
                 .Join(GetOrgCache().AsCacheQueryable(), p => p.Value.OrganizationId, o => o.Value.Id,
@@ -816,6 +826,22 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
             var ex = Assert.Throws<NotSupportedException>(() =>
                 CompiledQuery.Compile((int[] k) => cache.Where(x => k.Contains(x.Key))));
             Assert.AreEqual("'Contains' clause coming from compiled query parameter is not supported.", ex.Message);
+
+            // check subquery from another cache put in separate variable
+            var orgIds = orgCache
+                .Where(o => o.Value.Name == "Org_1")
+                .Select(o => o.Key);
+
+            var subQueryFromVar = cache
+                .Where(x => orgIds.Contains(x.Value.OrganizationId))
+                .ToArray();
+
+            var subQueryInline = cache
+                .Where(x => orgCache.Where(o => o.Value.Name == "Org_1")
+                    .Select(o => o.Key).Contains(x.Value.OrganizationId))
+                .ToArray();
+
+            Assert.AreEqual(subQueryInline.Length, subQueryFromVar.Length);
         }
 
         /// <summary>
@@ -1047,7 +1073,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
             var qry6 = CompiledQuery.Compile((int minAge) => persons
                 .Select(x => x.Value)
                 .Where(x => x.Age >= minAge)
-                .Select(x => new {x.Name, x.Age})
+                .Select(x => new { x.Name, x.Age })
                 .OrderBy(x => x.Name));
 
             var res = qry6(PersonCount - 3).GetAll();
@@ -1116,7 +1142,8 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
 
             // 8 arg
             var qry8 = CompiledQuery.Compile((int a, int b, int c, int d, int e, int f, int g, int h) =>
-                cache.Select(x => x.Key).Where(k => k > a && k > b && k > c && k < d && k < e && k < f && k < g && k < h));
+                cache.Select(x => x.Key)
+                    .Where(k => k > a && k > b && k > c && k < d && k < e && k < f && k < g && k < h));
             Assert.AreEqual(new[] {3, 4}, qry8(0, 1, 2, 5, 6, 7, 8, 9).ToArray());
         }
 
@@ -1432,7 +1459,8 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
         /// <summary>
         /// Checks that function used in Where Clause maps to SQL function properly
         /// </summary>
-        private static void CheckWhereFunc<TKey, TEntry>(IQueryable<ICacheEntry<TKey,TEntry>> query, Expression<Func<ICacheEntry<TKey, TEntry>,bool>> whereExpression)
+        private static void CheckWhereFunc<TKey, TEntry>(IQueryable<ICacheEntry<TKey,TEntry>> query, 
+            Expression<Func<ICacheEntry<TKey, TEntry>,bool>> whereExpression)
         {
             // Calculate result locally, using real method invocation
             var expected = query

http://git-wip-us.apache.org/repos/asf/ignite/blob/7c80c477/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryExpressionVisitor.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryExpressionVisitor.cs b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryExpressionVisitor.cs
index 94e59fa..99712e3 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryExpressionVisitor.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryExpressionVisitor.cs
@@ -93,26 +93,34 @@ namespace Apache.Ignite.Linq.Impl
         [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
         protected override Expression VisitUnary(UnaryExpression expression)
         {
-            ResultBuilder.Append("(");
+            var closeBracket = false;
 
             switch (expression.NodeType)
             {
                 case ExpressionType.Negate:
+                    ResultBuilder.Append("(");
                     ResultBuilder.Append("-");
+                    closeBracket = true;
                     break;
+
                 case ExpressionType.Not:
+                    ResultBuilder.Append("(");
                     ResultBuilder.Append("not ");
+                    closeBracket = true;
                     break;
+
                 case ExpressionType.Convert:
                     // Ignore, let the db do the conversion
                     break;
+
                 default:
                     return base.VisitUnary(expression);
             }
 
             Visit(expression.Operand);
 
-            ResultBuilder.Append(")");
+            if(closeBracket)
+                ResultBuilder.Append(")");
 
             return expression;
         }
@@ -418,7 +426,7 @@ namespace Apache.Ignite.Linq.Impl
         /// <summary>
         /// Appends the parameter.
         /// </summary>
-        private void AppendParameter(object value)
+        public void AppendParameter(object value)
         {
             ResultBuilder.Append("?");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/7c80c477/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryParser.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryParser.cs b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryParser.cs
index cee90f4..794ef2e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryParser.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryParser.cs
@@ -19,6 +19,7 @@ namespace Apache.Ignite.Linq.Impl
 {
     using System.Threading;
     using Remotion.Linq.Parsing.ExpressionVisitors.Transformation;
+    using Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation;
     using Remotion.Linq.Parsing.Structure;
     using Remotion.Linq.Parsing.Structure.ExpressionTreeProcessors;
 
@@ -46,11 +47,33 @@ namespace Apache.Ignite.Linq.Impl
         {
             var transformerRegistry = ExpressionTransformerRegistry.CreateDefault();
 
-            var proc = new TransformingExpressionTreeProcessor(transformerRegistry);
+            var proc = CreateCompoundProcessor(transformerRegistry);
 
             var parser = new ExpressionTreeParser(ExpressionTreeParser.CreateDefaultNodeTypeProvider(), proc);
 
             return new QueryParser(parser);
         }
+
+        /// <summary>
+        /// Creates CompoundExpressionTreeProcessor.
+        /// </summary>
+        private static CompoundExpressionTreeProcessor CreateCompoundProcessor(
+            IExpressionTranformationProvider tranformationProvider)
+        {
+            return new CompoundExpressionTreeProcessor(
+                new IExpressionTreeProcessor[]
+                {
+                    new PartialEvaluatingExpressionTreeProcessor(new NullEvaluatableExpressionFilter()),
+                    new TransformingExpressionTreeProcessor(tranformationProvider)
+                });
+        }
+
+        /// <summary>
+        /// Empty implementation of IEvaluatableExpressionFilter.
+        /// </summary>
+        private sealed class NullEvaluatableExpressionFilter : EvaluatableExpressionFilterBase
+        {
+            // No-op.
+        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/7c80c477/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/MethodVisitor.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/MethodVisitor.cs b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/MethodVisitor.cs
index e83c448..578c5da 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/MethodVisitor.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/MethodVisitor.cs
@@ -62,9 +62,9 @@ namespace Apache.Ignite.Linq.Impl
             GetStringMethod("Substring", new[] {typeof (int)}, GetFunc("substring", 0, 1)),
             GetStringMethod("Substring", new[] {typeof (int), typeof (int)}, GetFunc("substring", 0, 1)),
             GetStringMethod("Trim", "trim"),
-            GetStringMethod("Trim", "trim", typeof(char[])),
-            GetStringMethod("TrimStart", "ltrim", typeof(char[])),
-            GetStringMethod("TrimEnd", "rtrim", typeof(char[])),
+            GetParameterizedTrimMethod("Trim", "trim"),
+            GetParameterizedTrimMethod("TrimStart", "ltrim"),
+            GetParameterizedTrimMethod("TrimEnd", "rtrim"),
             GetStringMethod("Replace", "replace", typeof(string), typeof(string)),
 
             GetMethod(typeof (Regex), "Replace", new[] {typeof (string), typeof (string), typeof (string)}, 
@@ -176,25 +176,59 @@ namespace Apache.Ignite.Linq.Impl
                 if (isInstanceMethod || (i > 0))
                     visitor.ResultBuilder.Append(", ");
 
-                if (arg.NodeType == ExpressionType.NewArrayInit)
+                visitor.Visit(arg);
+
+                AppendAdjustment(visitor, adjust, i + 1);
+            }
+
+            visitor.ResultBuilder.Append(suffix).Append(")");
+
+            AppendAdjustment(visitor, adjust, 0);
+        }
+
+        /// <summary>
+        /// Visits the instance function for Trim specific handling.
+        /// </summary>
+        private static void VisitParameterizedTrimFunc(MethodCallExpression expression,
+            CacheQueryExpressionVisitor visitor, string func)
+        {
+            visitor.ResultBuilder.Append(func).Append("(");
+
+            visitor.Visit(expression.Object);
+
+            var arg = expression.Arguments[0];
+
+            if (arg != null)
+            {
+                visitor.ResultBuilder.Append(", ");
+
+                if (arg.NodeType == ExpressionType.Constant)
                 {
-                    // Only trim methods use params[], only one param is supported
-                    var args = ((NewArrayExpression) arg).Expressions;
+                    var constant = (ConstantExpression) arg;
+                    var args = constant.Value as IEnumerable<char>;
+
+                    if (args == null)
+                    {
+                        throw new NotSupportedException("String.Trim function only supports IEnumerable<char>");
+                    }
+
+                    var enumeratedArgs = args.ToArray();
 
-                    if (args.Count != 1)
-                        throw new NotSupportedException("Method call only supports a single parameter: "+ expression);
+                    if (enumeratedArgs.Length != 1)
+                    {
+                        throw new NotSupportedException("String.Trim function only supports a single argument: " +
+                                                        expression);
+                    }
 
-                    visitor.Visit(args[0]);
+                    visitor.AppendParameter(enumeratedArgs[0]);
                 }
                 else
+                {
                     visitor.Visit(arg);
-
-                AppendAdjustment(visitor, adjust, i + 1);
+                }
             }
 
-            visitor.ResultBuilder.Append(suffix).Append(")");
-
-            AppendAdjustment(visitor, adjust, 0);
+            visitor.ResultBuilder.Append(")");
         }
 
         /// <summary>
@@ -261,6 +295,16 @@ namespace Apache.Ignite.Linq.Impl
         }
 
         /// <summary>
+        /// Gets string parameterized Trim(TrimStart, TrimEnd) method.
+        /// </summary>
+        private static KeyValuePair<MethodInfo, VisitMethodDelegate> GetParameterizedTrimMethod(string name,
+            string sqlName)
+        {
+            return GetMethod(typeof(string), name, new[] {typeof(char[])}, 
+                (e, v) => VisitParameterizedTrimFunc(e, v, sqlName));
+        }
+
+        /// <summary>
         /// Gets the math method.
         /// </summary>
         private static KeyValuePair<MethodInfo, VisitMethodDelegate> GetMathMethod(string name, string sqlName,


[14/50] [abbrv] ignite git commit: Fixed typo.

Posted by dm...@apache.org.
Fixed typo.


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

Branch: refs/heads/ignite-1192
Commit: 3b84f34e5354b2d02ba839439f9091ed9feafa89
Parents: 7696dd2
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Tue Apr 4 16:06:01 2017 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Tue Apr 4 16:06:01 2017 +0700

----------------------------------------------------------------------
 .../frontend/app/modules/states/configuration/clusters/general.pug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3b84f34e/modules/web-console/frontend/app/modules/states/configuration/clusters/general.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/states/configuration/clusters/general.pug b/modules/web-console/frontend/app/modules/states/configuration/clusters/general.pug
index be56a6c..dfc49d6 100644
--- a/modules/web-console/frontend/app/modules/states/configuration/clusters/general.pug
+++ b/modules/web-console/frontend/app/modules/states/configuration/clusters/general.pug
@@ -49,7 +49,7 @@ include /app/helpers/jade/mixins
                             <li>AWS S3 - AWS S3 based IP finder that automatically discover cluster nodes on Amazon EC2 cloud</li>\
                             <li>Apache jclouds - Apache jclouds multi cloud toolkit based IP finder for cloud platforms with unstable IP addresses</li>\
                             <li>Google cloud storage - Google Cloud Storage based IP finder that automatically discover cluster nodes on Google Compute Engine cluster</li>\
-                            <li>JDBC - JDBC based IP finder that use database to store node IP addres</li>\
+                            <li>JDBC - JDBC based IP finder that use database to store node IP address</li>\
                             <li>Shared filesystem - Shared filesystem based IP finder that use file to store node IP address</li>\
                             <li>Apache ZooKeeper - Apache ZooKeeper based IP finder when you use ZooKeeper to coordinate your distributed environment</li>\
                         </ul>')


[36/50] [abbrv] ignite git commit: IGNITE-4349 Discontinue the schema-import utility.

Posted by dm...@apache.org.
IGNITE-4349 Discontinue the schema-import utility.


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

Branch: refs/heads/ignite-1192
Commit: f6ee9c0fb5f5d116c79c840a13010ce51e5cf512
Parents: 4e80ddf
Author: Alexey Kuznetsov <ak...@gridgain.com>
Authored: Sat Apr 8 18:18:34 2017 +0700
Committer: Alexey Kuznetsov <ak...@gridgain.com>
Committed: Sat Apr 8 18:18:34 2017 +0700

----------------------------------------------------------------------
 DEVNOTES.txt                                    |    3 -
 assembly/dependencies-fabric-lgpl.xml           |    3 -
 assembly/dependencies-fabric.xml                |    3 -
 assembly/dependencies-schema-import.xml         |   57 -
 assembly/release-base.xml                       |    2 -
 assembly/release-fabric-base.xml                |    9 -
 assembly/release-schema-import.xml              |   50 -
 bin/ignite-schema-import.bat                    |  110 -
 bin/ignite-schema-import.sh                     |   87 -
 examples/README-LGPL.txt                        |    4 +-
 examples/README.txt                             |    2 -
 examples/pom-standalone-lgpl.xml                |    1 -
 examples/pom-standalone.xml                     |    1 -
 examples/pom.xml                                |    1 -
 examples/schema-import/README.txt               |   38 -
 examples/schema-import/bin/db-init.sql          |   28 -
 examples/schema-import/bin/h2-server.bat        |   80 -
 examples/schema-import/bin/h2-server.sh         |   66 -
 .../schema-import/bin/schema-import.properties  |   28 -
 examples/schema-import/pom-standalone.xml       |   90 -
 examples/schema-import/pom.xml                  |  101 -
 .../org/apache/ignite/schema/CacheConfig.java   |   36 -
 .../java/org/apache/ignite/schema/Demo.java     |  134 --
 .../java/org/apache/ignite/schema/DemoNode.java |   38 -
 .../ignite/schema/H2DataSourceFactory.java      |   35 -
 .../java/org/apache/ignite/schema/Person.java   |   44 -
 .../org/apache/ignite/schema/PersonKey.java     |   37 -
 .../test/config/store/jdbc/ignite-jdbc-type.xml |    2 +-
 .../cache/store/jdbc/model/Organization.java    |    2 -
 .../cache/store/jdbc/model/OrganizationKey.java |    2 -
 .../ignite/cache/store/jdbc/model/Person.java   |    2 -
 .../store/jdbc/model/PersonComplexKey.java      |    4 +-
 .../cache/store/jdbc/model/PersonKey.java       |    2 -
 modules/schema-import-db/README.txt             |    4 -
 modules/schema-import-db/pom.xml                |   55 -
 .../apache/ignite/schema/parser/DbColumn.java   |   88 -
 .../ignite/schema/parser/DbMetadataReader.java  |  147 --
 .../apache/ignite/schema/parser/DbTable.java    |   82 -
 .../parser/dialect/DB2MetadataDialect.java      |   33 -
 .../parser/dialect/DatabaseMetadataDialect.java |  102 -
 .../parser/dialect/JdbcMetadataDialect.java     |  199 --
 .../parser/dialect/MySQLMetadataDialect.java    |   82 -
 .../parser/dialect/OracleMetadataDialect.java   |  360 ---
 modules/schema-import/README.txt                |  216 --
 modules/schema-import/pom.xml                   |  119 -
 .../main/java/media/data_connection_48x48.png   |  Bin 4443 -> 0 bytes
 .../src/main/java/media/error_48x48.png         |  Bin 4349 -> 0 bytes
 .../src/main/java/media/ignite_128x128.png      |  Bin 4917 -> 0 bytes
 .../src/main/java/media/ignite_16x16.png        |  Bin 608 -> 0 bytes
 .../src/main/java/media/ignite_24x24.png        |  Bin 930 -> 0 bytes
 .../src/main/java/media/ignite_32x32.png        |  Bin 1203 -> 0 bytes
 .../src/main/java/media/ignite_48x48.png        |  Bin 1868 -> 0 bytes
 .../src/main/java/media/ignite_64x64.png        |  Bin 2453 -> 0 bytes
 .../src/main/java/media/information_48x48.png   |  Bin 4102 -> 0 bytes
 .../src/main/java/media/question_48x48.png      |  Bin 3857 -> 0 bytes
 .../src/main/java/media/sign_warning_48x48.png  |  Bin 2988 -> 0 bytes
 .../schema-import/src/main/java/media/style.css |  134 --
 .../src/main/java/media/text_tree_48x48.png     |  Bin 2567 -> 0 bytes
 .../ignite/schema/generator/CodeGenerator.java  |  831 -------
 .../ignite/schema/generator/GeneratorUtils.java |   70 -
 .../ignite/schema/generator/XmlGenerator.java   |  446 ----
 .../ignite/schema/model/PojoDescriptor.java     |  497 ----
 .../apache/ignite/schema/model/PojoField.java   |  461 ----
 .../ignite/schema/model/SchemaDescriptor.java   |   62 -
 .../schema/parser/DatabaseMetadataParser.java   |  115 -
 .../ignite/schema/ui/ConfirmCallable.java       |   83 -
 .../org/apache/ignite/schema/ui/Controls.java   |  697 ------
 .../org/apache/ignite/schema/ui/GridPaneEx.java |  180 --
 .../org/apache/ignite/schema/ui/MessageBox.java |  274 ---
 .../apache/ignite/schema/ui/ModalDialog.java    |   50 -
 .../ignite/schema/ui/SchemaImportApp.java       | 2115 ------------------
 .../ignite/schema/ui/TextColumnValidator.java   |   32 -
 .../schema/test/AbstractSchemaImportTest.java   |  181 --
 .../test/generator/CodeGeneratorTest.java       |   81 -
 .../schema/test/generator/XmlGeneratorTest.java |   42 -
 .../ignite/schema/test/model/CacheConfig.txt    |  409 ----
 .../apache/ignite/schema/test/model/Objects.txt |  531 -----
 .../ignite/schema/test/model/ObjectsKey.txt     |   96 -
 .../ignite/schema/test/model/Primitives.txt     |  535 -----
 .../ignite/schema/test/model/PrimitivesKey.txt  |   96 -
 .../org/apache/ignite/schema/test/model/Tst.txt |  535 -----
 .../apache/ignite/schema/test/model/TstKey.txt  |   96 -
 .../schema/test/model/ignite-type-metadata.xml  |  666 ------
 .../test/parser/DbMetadataParserTest.java       |  134 --
 .../testsuites/IgniteSchemaImportTestSuite.java |   42 -
 modules/web-console/web-agent/pom.xml           |   12 -
 .../ignite/console/agent/db/DbColumn.java       |   88 +
 .../console/agent/db/DbMetadataReader.java      |  142 ++
 .../apache/ignite/console/agent/db/DbTable.java |   82 +
 .../agent/db/dialect/DB2MetadataDialect.java    |   33 +
 .../db/dialect/DatabaseMetadataDialect.java     |  102 +
 .../agent/db/dialect/JdbcMetadataDialect.java   |  199 ++
 .../agent/db/dialect/MySQLMetadataDialect.java  |   82 +
 .../agent/db/dialect/OracleMetadataDialect.java |  359 +++
 .../agent/handlers/DatabaseListener.java        |   20 +-
 pom.xml                                         |  121 -
 96 files changed, 1103 insertions(+), 12217 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/DEVNOTES.txt b/DEVNOTES.txt
index 79bedfd..d3c162e 100644
--- a/DEVNOTES.txt
+++ b/DEVNOTES.txt
@@ -25,9 +25,6 @@ With Apache Ignite.NET:
 
 Look for apache-ignite-fabric-<version>-bin.zip in ./target/bin directory.
 
-NOTE: JDK version should be 1.7.0-* or >= 1.8.0-u40.
-      Schema Import module use JavaFX, under OpenJDK may be compiled and run only on OpenJDK 8 with installed OpenJFX.
-
 Ignite Hadoop Accelerator Maven Build Instructions
 ============================================
 mvn clean package -DskipTests -Dignite.edition=hadoop [-Dhadoop.version=X.X.X] [-Dspark.version=x.y.z]

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/assembly/dependencies-fabric-lgpl.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-fabric-lgpl.xml b/assembly/dependencies-fabric-lgpl.xml
index 6d547c4..4cff146 100644
--- a/assembly/dependencies-fabric-lgpl.xml
+++ b/assembly/dependencies-fabric-lgpl.xml
@@ -120,14 +120,11 @@
                 <exclude>org.apache.ignite:ignite-extdata-uri</exclude>
                 <exclude>org.apache.ignite:ignite-extdata-uri-dep</exclude>
                 <exclude>org.apache.ignite:ignite-examples</exclude>
-                <exclude>org.apache.ignite:ignite-schema-import-demo</exclude>
                 <exclude>org.apache.ignite:ignite-indexing</exclude>
                 <exclude>org.apache.ignite:ignite-visor-console</exclude>
                 <exclude>org.apache.ignite:ignite-visor-console_2.10</exclude>
                 <exclude>org.apache.ignite:ignite-visor-plugins</exclude>
                 <exclude>org.apache.ignite:ignite-hadoop</exclude>
-                <exclude>org.apache.ignite:ignite-schema-import</exclude>
-                <exclude>org.apache.ignite:ignite-schema-import-db</exclude>
                 <exclude>org.apache.ignite:ignite-codegen</exclude>
                 <exclude>org.apache.ignite:ignite-apache-license-gen</exclude>
                 <exclude>org.apache.ignite:ignite-appserver-test</exclude>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/assembly/dependencies-fabric.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-fabric.xml b/assembly/dependencies-fabric.xml
index d4000d6..840216f 100644
--- a/assembly/dependencies-fabric.xml
+++ b/assembly/dependencies-fabric.xml
@@ -120,14 +120,11 @@
                 <exclude>org.apache.ignite:ignite-extdata-uri</exclude>
                 <exclude>org.apache.ignite:ignite-extdata-uri-dep</exclude>
                 <exclude>org.apache.ignite:ignite-examples</exclude>
-                <exclude>org.apache.ignite:ignite-schema-import-demo</exclude>
                 <exclude>org.apache.ignite:ignite-indexing</exclude>
                 <exclude>org.apache.ignite:ignite-visor-console</exclude>
                 <exclude>org.apache.ignite:ignite-visor-console_2.10</exclude>
                 <exclude>org.apache.ignite:ignite-visor-plugins</exclude>
                 <exclude>org.apache.ignite:ignite-hadoop</exclude>
-                <exclude>org.apache.ignite:ignite-schema-import</exclude>
-                <exclude>org.apache.ignite:ignite-schema-import-db</exclude>
                 <exclude>org.apache.ignite:ignite-codegen</exclude>
                 <exclude>org.apache.ignite:ignite-apache-license-gen</exclude>
                 <exclude>org.apache.ignite:ignite-hibernate</exclude>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/assembly/dependencies-schema-import.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-schema-import.xml b/assembly/dependencies-schema-import.xml
deleted file mode 100644
index d7aa3ae..0000000
--- a/assembly/dependencies-schema-import.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
-          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>dependencies-schema-import</id>
-
-    <formats>
-        <format>dir</format>
-    </formats>
-
-    <includeBaseDirectory>false</includeBaseDirectory>
-
-    <moduleSets>
-        <moduleSet>
-            <includes>
-                <include>org.apache.ignite:ignite-schema-import</include>
-                <include>org.apache.ignite:ignite-schema-import-db</include>
-            </includes>
-            <sources>
-                <includeModuleDirectory>false</includeModuleDirectory>
-                <fileSets>
-                    <fileSet>
-                        <directory>target</directory>
-                        <outputDirectory>/schema-import</outputDirectory>
-                        <includes>
-                            <include>*.jar</include>
-                        </includes>
-                        <excludes>
-                            <exclude>*-tests.jar</exclude>
-                            <exclude>*-javadoc.jar</exclude>
-                            <exclude>*-sources.jar</exclude>
-                        </excludes>
-                    </fileSet>
-                </fileSets>
-            </sources>
-        </moduleSet>
-    </moduleSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/assembly/release-base.xml
----------------------------------------------------------------------
diff --git a/assembly/release-base.xml b/assembly/release-base.xml
index 6870284..bc3d473 100644
--- a/assembly/release-base.xml
+++ b/assembly/release-base.xml
@@ -63,7 +63,6 @@
                 <exclude>igniterouter.bat</exclude>
                 <exclude>**/build-classpath.bat</exclude>
                 <exclude>ignitevisorcmd.bat</exclude>
-                <exclude>ignite-schema-import.bat</exclude>
             </excludes>
         </fileSet>
 
@@ -80,7 +79,6 @@
                 <exclude>**/build-classpath.sh</exclude>
                 <exclude>**/service.sh</exclude>
                 <exclude>ignitevisorcmd.sh</exclude>
-                <exclude>ignite-schema-import.sh</exclude>
             </excludes>
         </fileSet>
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/assembly/release-fabric-base.xml
----------------------------------------------------------------------
diff --git a/assembly/release-fabric-base.xml b/assembly/release-fabric-base.xml
index 7a25594..c3bad39 100644
--- a/assembly/release-fabric-base.xml
+++ b/assembly/release-fabric-base.xml
@@ -61,12 +61,6 @@
         </file>
 
         <file>
-            <source>examples/schema-import/pom-standalone.xml</source>
-            <outputDirectory>/examples/schema-import</outputDirectory>
-            <destName>pom.xml</destName>
-        </file>
-
-        <file>
             <source>config/dotnet/default-dotnet.xml</source>
             <outputDirectory>/config/dotnet</outputDirectory>
         </file>
@@ -221,9 +215,6 @@
                 <include>rest/**</include>
                 <include>memcached/**</include>
                 <include>redis/**</include>
-                <include>schema-import/src/**</include>
-                <include>schema-import/bin/**</include>
-                <include>schema-import/README.txt</include>
             </includes>
         </fileSet>
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/assembly/release-schema-import.xml
----------------------------------------------------------------------
diff --git a/assembly/release-schema-import.xml b/assembly/release-schema-import.xml
deleted file mode 100644
index 38457b9..0000000
--- a/assembly/release-schema-import.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
-          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>release-schema-import</id>
-
-    <includeBaseDirectory>false</includeBaseDirectory>
-
-    <formats>
-        <format>dir</format>
-    </formats>
-
-    <fileSets>
-        <fileSet>
-            <directory>bin</directory>
-            <outputDirectory>/</outputDirectory>
-            <includes>
-                <include>**/ignite-schema-import.bat</include>
-            </includes>
-        </fileSet>
-
-        <fileSet>
-            <directory>bin</directory>
-            <outputDirectory>/</outputDirectory>
-            <fileMode>0755</fileMode>
-            <includes>
-                <include>**/ignite-schema-import.sh</include>
-            </includes>
-        </fileSet>
-    </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/bin/ignite-schema-import.bat
----------------------------------------------------------------------
diff --git a/bin/ignite-schema-import.bat b/bin/ignite-schema-import.bat
deleted file mode 100644
index a4ec86b..0000000
--- a/bin/ignite-schema-import.bat
+++ /dev/null
@@ -1,110 +0,0 @@
-::
-:: Licensed to the Apache Software Foundation (ASF) under one or more
-:: contributor license agreements.  See the NOTICE file distributed with
-:: this work for additional information regarding copyright ownership.
-:: The ASF licenses this file to You under the Apache License, Version 2.0
-:: (the "License"); you may not use this file except in compliance with
-:: the License.  You may obtain a copy of the License at
-::
-::      http://www.apache.org/licenses/LICENSE-2.0
-::
-:: Unless required by applicable law or agreed to in writing, software
-:: distributed under the License is distributed on an "AS IS" BASIS,
-:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-:: See the License for the specific language governing permissions and
-:: limitations under the License.
-::
-
-::
-:: Starts Ignite Schema Import Utility.
-::
-
-@echo off
-
-if "%OS%" == "Windows_NT"  setlocal
-
-:: Check JAVA_HOME.
-if not "%JAVA_HOME%" == "" goto checkJdk
-    echo %0, ERROR: JAVA_HOME environment variable is not found.
-    echo %0, ERROR: Please create JAVA_HOME variable pointing to location of JDK 1.7 or JDK 1.8.
-    echo %0, ERROR: You can also download latest JDK at: http://java.sun.com/getjava
-goto error_finish
-
-:checkJdk
-:: Check that JDK is where it should be.
-if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
-    echo %0, ERROR: The JDK is not found in %JAVA_HOME%.
-    echo %0, ERROR: Please modify your script so that JAVA_HOME would point to valid location of JDK.
-goto error_finish
-
-:checkJdkVersion
-"%JAVA_HOME%\bin\java.exe" -version 2>&1 | findstr "1\.[78]\." > nul
-if %ERRORLEVEL% equ 0 goto checkIgniteHome1
-    echo %0, ERROR: The version of JAVA installed in %JAVA_HOME% is incorrect.
-    echo %0, ERROR: Please install JDK 1.7 or 1.8.
-    echo %0, ERROR: You can also download latest JDK at: http://java.sun.com/getjava
-goto error_finish
-
-:: Check IGNITE_HOME.
-:checkIgniteHome1
-if not "%IGNITE_HOME%" == "" goto checkIgniteHome2
-    pushd "%~dp0"/..
-    set IGNITE_HOME=%CD%
-    popd
-
-:checkIgniteHome2
-:: Strip double quotes from IGNITE_HOME
-set IGNITE_HOME=%IGNITE_HOME:"=%
-
-:: remove all trailing slashes from IGNITE_HOME.
-if %IGNITE_HOME:~-1,1% == \ goto removeTrailingSlash
-if %IGNITE_HOME:~-1,1% == / goto removeTrailingSlash
-goto checkIgniteHome3
-
-:removeTrailingSlash
-set IGNITE_HOME=%IGNITE_HOME:~0,-1%
-goto checkIgniteHome2
-
-:checkIgniteHome3
-if exist "%IGNITE_HOME%\config" goto checkIgniteHome4
-    echo %0, ERROR: Ignite installation folder is not found or IGNITE_HOME environment variable is not valid.
-    echo Please create IGNITE_HOME environment variable pointing to location of
-    echo Ignite installation folder.
-    goto error_finish
-
-:checkIgniteHome4
-
-::
-:: Set SCRIPTS_HOME - base path to scripts.
-::
-set SCRIPTS_HOME=%IGNITE_HOME%\bin
-
-:: Remove trailing spaces
-for /l %%a in (1,1,31) do if /i "%SCRIPTS_HOME:~-1%" == " " set SCRIPTS_HOME=%SCRIPTS_HOME:~0,-1%
-
-if /i "%SCRIPTS_HOME%\" == "%~dp0" goto run
-    echo %0, WARN: IGNITE_HOME environment variable may be pointing to wrong folder: %IGNITE_HOME%
-
-:run
-
-::
-:: Set IGNITE_LIBS
-::
-call "%SCRIPTS_HOME%\include\setenv.bat"
-call "%SCRIPTS_HOME%\include\build-classpath.bat" &:: Will be removed in the binary release.
-set CP=%JAVA_HOME%\jre\lib\jfxrt.jar;%IGNITE_HOME%\bin\include\schema-import\*;%IGNITE_LIBS%
-
-::
-:: Set program name.
-::
-set PROG_NAME=ignite-schema-import.bat
-if "%OS%" == "Windows_NT" set PROG_NAME=%~nx0%
-
-::
-:: Starts Ignite Schema Import Utility.
-::
-"%JAVA_HOME%\bin\java.exe" %JVM_OPTS% -cp "%CP%" org.apache.ignite.schema.ui.SchemaImportApp %*
-
-:error_finish
-
-goto :eof

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/bin/ignite-schema-import.sh
----------------------------------------------------------------------
diff --git a/bin/ignite-schema-import.sh b/bin/ignite-schema-import.sh
deleted file mode 100755
index 1029882..0000000
--- a/bin/ignite-schema-import.sh
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#
-# Starts Ignite Schema Import Utility.
-#
-
-# Remember command line parameters
-ARGS=$@
-
-#
-# Import common functions.
-#
-if [ "${IGNITE_HOME}" = "" ];
-    then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
-    else IGNITE_HOME_TMP=${IGNITE_HOME};
-fi
-
-#
-# Set SCRIPTS_HOME - base path to scripts.
-#
-SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
-
-source "${SCRIPTS_HOME}"/include/functions.sh
-
-#
-# Discover path to Java executable and check it's version.
-#
-checkJava
-
-#
-# Discover IGNITE_HOME environment variable.
-#
-setIgniteHome
-
-#
-# Parse command line parameters.
-#
-. "${SCRIPTS_HOME}"/include/parseargs.sh
-
-#
-# Set IGNITE_LIBS.
-#
-. "${SCRIPTS_HOME}"/include/setenv.sh
-. "${SCRIPTS_HOME}"/include/build-classpath.sh # Will be removed in the binary release.
-CP="${JAVA_HOME}/jre/lib/jfxrt.jar${SEP}${IGNITE_HOME}/bin/include/schema-import/*${SEP}${IGNITE_LIBS}"
-
-#
-# JVM options. See http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
-#
-# ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
-#
-JVM_OPTS="-Xms256m -Xmx1g -XX:MaxPermSize=128M ${JVM_OPTS}"
-
-# Mac OS specific support to display correct name in the dock.
-osname=`uname`
-
-if [ "${DOCK_OPTS}" == "" ]; then
-    DOCK_OPTS="-Xdock:name=Ignite Schema Import Utility"
-fi
-
-#
-# Starts Ignite Schema Import Utility.
-#
-case $osname in
-    Darwin*)
-        "$JAVA" ${JVM_OPTS} "${DOCK_OPTS}" -cp "${CP}" org.apache.ignite.schema.ui.SchemaImportApp ${ARGS}
-        ;;
-   *)
-        "$JAVA" ${JVM_OPTS} -cp "${CP}" org.apache.ignite.schema.ui.SchemaImportApp ${ARGS}
-        ;;
-esac

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/README-LGPL.txt
----------------------------------------------------------------------
diff --git a/examples/README-LGPL.txt b/examples/README-LGPL.txt
index 0f95971..f8ca0d8 100644
--- a/examples/README-LGPL.txt
+++ b/examples/README-LGPL.txt
@@ -11,8 +11,6 @@ The examples folder contains he following subfolders:
 - `config` - contains Ignite configuration files needed for examples.
 - `memcached` - contains PHP script demonstrating how Ignite Cache can be accessed using Memcached client.
 - `rest` - contains PHP script demonstrating how Ignite Cache can be accessed via HTTP API.
-- `schema-import` - contains demo project for Apache Ignite Schema Import Utility. Refer to enclosed
-  README.txt file for more information on how to build and run the demo.
 - `src/main/java` - contains Java examples for different Ignite modules and features.
 - `src/main/java8` - contains additional set of Java examples utilizing Java 8 lambdas. These examples
   are excluded by default, enable `java8` Maven profile to include them (JDK8 is required).
@@ -30,4 +28,4 @@ class loading: `examples/config/example-ignite.xml`. To run a remote node in IDE
 Java7 vs Java8
 ===============
 Some examples (not all) which can benefit from Java8 Lambda support were re-written with Java8 lambdas.
-For full set of examples, look at both Java7 and Java8 packages.
\ No newline at end of file
+For full set of examples, look at both Java7 and Java8 packages.

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/README.txt
----------------------------------------------------------------------
diff --git a/examples/README.txt b/examples/README.txt
index 26970d6..a17c9c8 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -11,8 +11,6 @@ The examples folder contains he following subfolders:
 - `config` - contains Ignite configuration files needed for examples.
 - `memcached` - contains PHP script demonstrating how Ignite Cache can be accessed using Memcached client.
 - `rest` - contains PHP script demonstrating how Ignite Cache can be accessed via HTTP API.
-- `schema-import` - contains demo project for Apache Ignite Schema Import Utility. Refer to enclosed
-  README.txt file for more information on how to build and run the demo.
 - `src/main/java` - contains Java examples for different Ignite modules and features.
 - `src/main/java8` - contains additional set of Java examples utilizing Java 8 lambdas. These examples
   are excluded by default, enable `java8` Maven profile to include them (JDK8 is required).

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/pom-standalone-lgpl.xml
----------------------------------------------------------------------
diff --git a/examples/pom-standalone-lgpl.xml b/examples/pom-standalone-lgpl.xml
index f664514..16fe125 100644
--- a/examples/pom-standalone-lgpl.xml
+++ b/examples/pom-standalone-lgpl.xml
@@ -221,7 +221,6 @@
                         </goals>
                         <configuration>
                             <sources>
-                                <source>schema-import/src/main/java</source>
                                 <source>${lgpl.folder}</source>
                                 <source>${java8.folder}</source>
                                 <source>${spark.folder}</source>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/pom-standalone.xml
----------------------------------------------------------------------
diff --git a/examples/pom-standalone.xml b/examples/pom-standalone.xml
index 029ca77..fe6ab21 100644
--- a/examples/pom-standalone.xml
+++ b/examples/pom-standalone.xml
@@ -222,7 +222,6 @@
                         </goals>
                         <configuration>
                             <sources>
-                                <source>schema-import/src/main/java</source>
                                 <source>${lgpl.folder}</source>
                                 <source>${java8.folder}</source>
                                 <source>${spark.folder}</source>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index e7fd67d..2bbcc8a 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -282,7 +282,6 @@
                         </goals>
                         <configuration>
                             <sources>
-                                <source>schema-import/src/main/java</source>
                                 <source>${lgpl.folder}</source>
                                 <source>${java8.folder}</source>
                                 <source>${spark.folder}</source>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/schema-import/README.txt
----------------------------------------------------------------------
diff --git a/examples/schema-import/README.txt b/examples/schema-import/README.txt
deleted file mode 100644
index ff2d517..0000000
--- a/examples/schema-import/README.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-Apache Ignite Schema Import Utility
-===================================
-
-Ignite ships with CacheJdbcPojoStore, which is out-of-the-box JDBC
-implementation of the IgniteCacheStore interface, and automatically
-handles all the write-through and read-through logic.
-
-Ignite also ships with its own database schema mapping wizard which provides automatic
-support for integrating with persistence stores. This utility automatically connects to
-the underlying database and generates all the required XML OR-mapping configuration
-and Java domain model POJOs.
-
-Schema Import Utility Demo
-==========================
-1. Start H2 database: "examples/schema-import/bin/h2-server.sh"
-   H2 server will start and H2 Console will be opened in your default browser.
-
-2. Connect to H2 database with following settings:
-
-   a. Select "Generic H2 (Server)" settings.
-
-   b. IMPORTANT: enter JDBC URL "jdbc:h2:tcp://localhost/~/schema-import/demo"
-
-   c. Click "Connect".
-
-3. Paste content of "examples/schema-import/bin/db-init.sql" into H2 Console and execute.
-
-4. Start Schema Import utility: "IGNITE_HOME/bin/ignite-schema-import.sh examples/schema-import/bin/schema-import.properties"
-   Schema Utility will start with predefined settings for this demo.
-   Click "Next", "Generate" and answer "Yes" to all override warnings.
-
-5. Import "examples/schema-import/pom.xml" in your Java IDE.
-
-6. Run "Demo.java" example.
-
-For more information on how to get started with Apache Ignite Schema Import Utility please visit:
-
-    http://apacheignite.readme.io/docs/automatic-persistence

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/schema-import/bin/db-init.sql
----------------------------------------------------------------------
diff --git a/examples/schema-import/bin/db-init.sql b/examples/schema-import/bin/db-init.sql
deleted file mode 100644
index 8a91a6a..0000000
--- a/examples/schema-import/bin/db-init.sql
+++ /dev/null
@@ -1,28 +0,0 @@
---
---  Licensed to the Apache Software Foundation (ASF) under one or more
---  contributor license agreements.  See the NOTICE file distributed with
---  this work for additional information regarding copyright ownership.
---  The ASF licenses this file to You under the Apache License, Version 2.0
---  (the "License"); you may not use this file except in compliance with
---  the License.  You may obtain a copy of the License at
---
---       http://www.apache.org/licenses/LICENSE-2.0
---
---  Unless required by applicable law or agreed to in writing, software
---  distributed under the License is distributed on an "AS IS" BASIS,
---  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
---  See the License for the specific language governing permissions and
---  limitations under the License.
---
-
--- Script of database initialization for Schema Import Demo.
-drop table PERSON;
-
-create table PERSON(id integer not null PRIMARY KEY, first_name varchar(50), last_name varchar(50), salary double not null);
-
-insert into PERSON(id, first_name, last_name, salary) values(1, 'Johannes', 'Kepler', 1000);
-insert into PERSON(id, first_name, last_name, salary) values(2, 'Galileo', 'Galilei', 2000);
-insert into PERSON(id, first_name, last_name, salary) values(3, 'Henry', 'More', 3000);
-insert into PERSON(id, first_name, last_name, salary) values(4, 'Polish', 'Brethren', 4000);
-insert into PERSON(id, first_name, last_name, salary) values(5, 'Robert', 'Boyle', 5000);
-insert into PERSON(id, first_name, last_name, salary) values(6, 'Isaac', 'Newton', 6000);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/schema-import/bin/h2-server.bat
----------------------------------------------------------------------
diff --git a/examples/schema-import/bin/h2-server.bat b/examples/schema-import/bin/h2-server.bat
deleted file mode 100644
index d445231..0000000
--- a/examples/schema-import/bin/h2-server.bat
+++ /dev/null
@@ -1,80 +0,0 @@
-::
-:: Licensed to the Apache Software Foundation (ASF) under one or more
-:: contributor license agreements.  See the NOTICE file distributed with
-:: this work for additional information regarding copyright ownership.
-:: The ASF licenses this file to You under the Apache License, Version 2.0
-:: (the "License"); you may not use this file except in compliance with
-:: the License.  You may obtain a copy of the License at
-::
-::      http://www.apache.org/licenses/LICENSE-2.0
-::
-:: Unless required by applicable law or agreed to in writing, software
-:: distributed under the License is distributed on an "AS IS" BASIS,
-:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-:: See the License for the specific language governing permissions and
-:: limitations under the License.
-::
-
-::
-:: Starts H2 database server and console for Ignite Schema Import demo.
-::
-
-@echo off
-
-if "%OS%" == "Windows_NT"  setlocal
-
-:: Check JAVA_HOME.
-if not "%JAVA_HOME%" == "" goto checkJdk
-    echo %0, ERROR: JAVA_HOME environment variable is not found.
-    echo %0, ERROR: Please create JAVA_HOME variable pointing to location of JDK 1.7 or JDK 1.8.
-    echo %0, ERROR: You can also download latest JDK at: http://java.sun.com/getjava
-goto error_finish
-
-:checkJdk
-:: Check that JDK is where it should be.
-if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
-    echo %0, ERROR: The JDK is not found in %JAVA_HOME%.
-    echo %0, ERROR: Please modify your script so that JAVA_HOME would point to valid location of JDK.
-goto error_finish
-
-:checkJdkVersion
-"%JAVA_HOME%\bin\java.exe" -version 2>&1 | findstr "1\.[78]\." > nul
-if %ERRORLEVEL% equ 0 goto checkIgniteHome1
-    echo %0, ERROR: The version of JAVA installed in %JAVA_HOME% is incorrect.
-    echo %0, ERROR: Please install JDK 1.7 or 1.8.
-    echo %0, ERROR: You can also download latest JDK at: http://java.sun.com/getjava
-goto error_finish
-
-:: Check IGNITE_HOME.
-:checkIgniteHome1
-if not "%IGNITE_HOME%" == "" goto checkIgniteHome2
-    pushd "%~dp0"/../../..
-    set IGNITE_HOME=%CD%
-    popd
-
-:checkIgniteHome2
-:: Strip double quotes from IGNITE_HOME
-set IGNITE_HOME=%IGNITE_HOME:"=%
-
-:: remove all trailing slashes from IGNITE_HOME.
-if %IGNITE_HOME:~-1,1% == \ goto removeTrailingSlash
-if %IGNITE_HOME:~-1,1% == / goto removeTrailingSlash
-goto checkIgniteHome3
-
-:removeTrailingSlash
-set IGNITE_HOME=%IGNITE_HOME:~0,-1%
-goto checkIgniteHome2
-
-:checkIgniteHome3
-if exist "%IGNITE_HOME%\config" goto run
-    echo %0, ERROR: Ignite installation folder is not found or IGNITE_HOME environment variable is not valid.
-    echo Please create IGNITE_HOME environment variable pointing to location of
-    echo Ignite installation folder.
-    goto error_finish
-
-:run
-
-:: Starts H2 server and console.
-"%JAVA_HOME%\bin\java.exe" -cp "%IGNITE_HOME%\libs\ignite-indexing\h2-1.4.191.jar" org.h2.tools.Console %*
-
-:error_finish
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/schema-import/bin/h2-server.sh
----------------------------------------------------------------------
diff --git a/examples/schema-import/bin/h2-server.sh b/examples/schema-import/bin/h2-server.sh
deleted file mode 100755
index 512a1d9..0000000
--- a/examples/schema-import/bin/h2-server.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#
-# Starts H2 database server and console for Ignite Schema Import demo.
-#
-
-# Remember command line parameters
-ARGS=$@
-
-#
-# Import common functions.
-#
-if [ "${IGNITE_HOME}" = "" ];
-    then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")/../.."; "pwd")")";
-    else IGNITE_HOME_TMP=${IGNITE_HOME};
-fi
-
-#
-# Set SCRIPTS_HOME - base path to scripts.
-#
-SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
-
-source "${SCRIPTS_HOME}"/include/functions.sh
-
-#
-# Discover path to Java executable and check it's version.
-#
-checkJava
-
-#
-# Discover IGNITE_HOME environment variable.
-#
-setIgniteHome
-
-# Mac OS specific support to display correct name in the dock.
-osname=`uname`
-
-if [ "${DOCK_OPTS}" == "" ]; then
-    DOCK_OPTS="-Dapple.awt.UIElement="true""
-fi
-
-# Starts H2 server and console.
-case $osname in
-    Darwin*)
-        "${JAVA}" "${DOCK_OPTS}" -cp "${IGNITE_HOME}/libs/ignite-indexing/h2-1.4.191.jar" org.h2.tools.Console ${ARGS}
-        ;;
-   *)
-        "${JAVA}" -cp "${IGNITE_HOME}/libs/ignite-indexing/h2-1.4.191.jar" org.h2.tools.Console ${ARGS}
-        ;;
-esac

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/schema-import/bin/schema-import.properties
----------------------------------------------------------------------
diff --git a/examples/schema-import/bin/schema-import.properties b/examples/schema-import/bin/schema-import.properties
deleted file mode 100644
index 99ebab8..0000000
--- a/examples/schema-import/bin/schema-import.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#
-#  Predefined properties for Ignite Schema Import Demo
-#
-jdbc.db.preset=0
-jdbc.driver.jar=libs/ignite-indexing/h2-1.4.191.jar
-jdbc.driver.class=org.h2.Driver
-jdbc.url=jdbc:h2:tcp://localhost/~/schema-import/demo
-jdbc.user=sa
-out.folder=examples/schema-import/src/main/java
-pojo.package=org.apache.ignite.schema
-pojo.constructor=true

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/schema-import/pom-standalone.xml
----------------------------------------------------------------------
diff --git a/examples/schema-import/pom-standalone.xml b/examples/schema-import/pom-standalone.xml
deleted file mode 100644
index e443728..0000000
--- a/examples/schema-import/pom-standalone.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~  Licensed to the Apache Software Foundation (ASF) under one or more
-  ~  contributor license agreements.  See the NOTICE file distributed with
-  ~  this work for additional information regarding copyright ownership.
-  ~  The ASF licenses this file to You under the Apache License, Version 2.0
-  ~  (the "License"); you may not use this file except in compliance with
-  ~  the License.  You may obtain a copy of the License at
-  ~
-  ~       http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~  Unless required by applicable law or agreed to in writing, software
-  ~  distributed under the License is distributed on an "AS IS" BASIS,
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  See the License for the specific language governing permissions and
-  ~  limitations under the License.
-  -->
-
-<!--
-    POM file.
--->
-<project
-    xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
-    <groupId>org.apache.ignite</groupId>
-    <artifactId>ignite-schema-import-demo</artifactId>
-    <version>to_be_replaced_by_ignite_version</version>
-
-    <dependencies>
-        <dependency>
-            <groupId>javax.cache</groupId>
-            <artifactId>cache-api</artifactId>
-            <version>1.0.0</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-core</artifactId>
-            <version>to_be_replaced_by_ignite_version</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-spring</artifactId>
-            <version>to_be_replaced_by_ignite_version</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-log4j</artifactId>
-            <version>to_be_replaced_by_ignite_version</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-indexing</artifactId>
-            <version>to_be_replaced_by_ignite_version</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <excludes>
-                    <exclude>**/*.java</exclude>
-                </excludes>
-            </resource>
-        </resources>
-
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.1</version>
-                <configuration>
-                    <source>1.7</source>
-                    <target>1.7</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/examples/schema-import/pom.xml b/examples/schema-import/pom.xml
deleted file mode 100644
index 0838512..0000000
--- a/examples/schema-import/pom.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-
-<!--
-    POM file.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.ignite</groupId>
-        <artifactId>ignite-parent</artifactId>
-        <version>1</version>
-        <relativePath>../../parent</relativePath>
-    </parent>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
-    <artifactId>ignite-schema-import-demo</artifactId>
-    <version>2.0.0-SNAPSHOT</version>
-
-    <dependencies>
-        <dependency>
-            <groupId>javax.cache</groupId>
-            <artifactId>cache-api</artifactId>
-            <version>${javax.cache.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-spring</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-log4j</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-indexing</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <excludes>
-                    <exclude>**/*.java</exclude>
-                </excludes>
-            </resource>
-        </resources>
-
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.1</version>
-                <configuration>
-                    <source>1.7</source>
-                    <target>1.7</target>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/schema-import/src/main/java/org/apache/ignite/schema/CacheConfig.java
----------------------------------------------------------------------
diff --git a/examples/schema-import/src/main/java/org/apache/ignite/schema/CacheConfig.java b/examples/schema-import/src/main/java/org/apache/ignite/schema/CacheConfig.java
deleted file mode 100644
index c5801cc..0000000
--- a/examples/schema-import/src/main/java/org/apache/ignite/schema/CacheConfig.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema;
-
-import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- * CacheConfig stub. Will be generated by Ignite Schema Import Utility.
- */
-public class CacheConfig {
-    /**
-     * Configure cache.
-     *
-     * @param name Cache name.
-     * @param storeFactory Cache store factory.
-     */
-    public static <K, V> CacheConfiguration<K, V> cache(String name, CacheJdbcPojoStoreFactory<K, V> storeFactory) {
-        throw new IllegalStateException("Please run Ignite Schema Import Utility as described in README.txt");
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/schema-import/src/main/java/org/apache/ignite/schema/Demo.java
----------------------------------------------------------------------
diff --git a/examples/schema-import/src/main/java/org/apache/ignite/schema/Demo.java b/examples/schema-import/src/main/java/org/apache/ignite/schema/Demo.java
deleted file mode 100644
index fa52a1d..0000000
--- a/examples/schema-import/src/main/java/org/apache/ignite/schema/Demo.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema;
-
-import javax.cache.Cache;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore;
-import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.transactions.Transaction;
-
-/**
- * This demo demonstrates the use of cache with {@link CacheJdbcPojoStore}
- * together with automatic Ignite schema-import utility.
- * <p>
- * This Demo can work stand-alone. You can also choose to start
- * several {@link DemoNode} instances as well to form a cluster.
- */
-public class Demo {
-    /**
-     * Executes demo.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
-    public static void main(String[] args) throws IgniteException {
-        System.out.println(">>> Start demo...");
-
-        // Start Ignite node.
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            CacheJdbcPojoStoreFactory<PersonKey, Person> pojoStoreFactory = new CacheJdbcPojoStoreFactory<>();
-
-            pojoStoreFactory.setDataSourceFactory(new H2DataSourceFactory());
-
-            // Configure cache store.
-            CacheConfiguration<PersonKey, Person> cfg = CacheConfig.cache("PersonCache", pojoStoreFactory);
-
-            try (IgniteCache<PersonKey, Person> cache = ignite.getOrCreateCache(cfg)) {
-                // Preload cache from database.
-                preload(cache);
-
-                // Read-through from database
-                // and store in cache.
-                readThrough(cache);
-
-                // Perform transaction and
-                // write-through to database.
-                transaction(ignite, cache);
-            }
-        }
-    }
-
-    /**
-     * Demonstrates cache preload from database.
-     */
-    private static void preload(IgniteCache<PersonKey, Person> cache) {
-        System.out.println();
-        System.out.println(">>> Loading entries from database.");
-
-        // Preload all person keys that are less than or equal to 3.
-        cache.loadCache(null, PersonKey.class.getName(), "select * from PERSON where ID <= 3");
-
-        for (Cache.Entry<PersonKey, Person> person : cache)
-            System.out.println(">>> Loaded Person: " + person);
-    }
-
-    /**
-     * Demonstrates cache read through from database.
-     */
-    private static void readThrough(IgniteCache<PersonKey, Person> cache) {
-        PersonKey key = new PersonKey(4);
-
-        System.out.println();
-        System.out.println(">>> Read-through person from database for ID: " + key.getId());
-
-        // Check that person with ID=4 is not in cache.
-        Person p = cache.localPeek(key);
-
-        assert p == null;
-
-        // Read-through form database.
-        p = cache.get(new PersonKey(4));
-
-        System.out.println(">>> Loaded person from database: " + p);
-    }
-
-    /**
-     * Demonstrates cache transaction joining database transaction.
-     */
-    private static void transaction(Ignite ignite, IgniteCache<PersonKey, Person> cache) {
-        PersonKey key = new PersonKey(5);
-
-        System.out.println();
-        System.out.println(">>> Update salary and write-through to database for person with ID: " + key.getId());
-
-        try (Transaction tx = ignite.transactions().txStart()) {
-            // Read-through from database.
-            Person p = cache.get(key);
-
-            System.out.println(">>> Loaded person from database: " + p);
-
-            double salary = p.getSalary();
-
-            // Raise salary by 20%.
-            p.setSalary(salary * 1.2);
-
-            // Write-through to database
-            // and store in cache.
-            cache.put(key, p);
-
-            tx.commit();
-        }
-
-        System.out.println(">>> Updated person: " + cache.get(key));
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/schema-import/src/main/java/org/apache/ignite/schema/DemoNode.java
----------------------------------------------------------------------
diff --git a/examples/schema-import/src/main/java/org/apache/ignite/schema/DemoNode.java b/examples/schema-import/src/main/java/org/apache/ignite/schema/DemoNode.java
deleted file mode 100644
index 0f8c192..0000000
--- a/examples/schema-import/src/main/java/org/apache/ignite/schema/DemoNode.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema;
-
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-
-/**
- * Starts demo node. You can start as many demo nodes as you like for the demo.
- */
-public class DemoNode {
-    /**
-     * Starts demo node.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
-    public static void main(String[] args) throws IgniteException {
-        System.out.println(">>> Start demo node...");
-
-        Ignition.start("examples/config/example-ignite.xml");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/schema-import/src/main/java/org/apache/ignite/schema/H2DataSourceFactory.java
----------------------------------------------------------------------
diff --git a/examples/schema-import/src/main/java/org/apache/ignite/schema/H2DataSourceFactory.java b/examples/schema-import/src/main/java/org/apache/ignite/schema/H2DataSourceFactory.java
deleted file mode 100644
index 6a4ea0a..0000000
--- a/examples/schema-import/src/main/java/org/apache/ignite/schema/H2DataSourceFactory.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema;
-
-import javax.cache.configuration.Factory;
-import javax.sql.DataSource;
-import org.h2.jdbcx.JdbcConnectionPool;
-
-/**
- * Datasource to use for store tests.
- */
-public class H2DataSourceFactory implements Factory<DataSource> {
-    /** DB connection URL. */
-    private static final String DFLT_CONN_URL = "jdbc:h2:tcp://localhost/~/schema-import/demo";
-
-    /** {@inheritDoc} */
-    @Override public DataSource create() {
-        return JdbcConnectionPool.create(DFLT_CONN_URL, "sa", "");
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/schema-import/src/main/java/org/apache/ignite/schema/Person.java
----------------------------------------------------------------------
diff --git a/examples/schema-import/src/main/java/org/apache/ignite/schema/Person.java b/examples/schema-import/src/main/java/org/apache/ignite/schema/Person.java
deleted file mode 100644
index 799c876..0000000
--- a/examples/schema-import/src/main/java/org/apache/ignite/schema/Person.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema;
-
-/**
- * Person stub.  Will be generated by Ignite Schema Import Utility.
- */
-public class Person {
-    /**
-     * Empty constructor.
-     */
-    public Person() {
-        throw new IllegalStateException("Please run Ignite Schema Import Utility as described in README.txt");
-    }
-
-    /**
-     * @return Salary.
-     */
-    public double getSalary() {
-        throw new IllegalStateException("Please run Ignite Schema Import Utility as described in README.txt");
-    }
-
-    /**
-     * @param salary Salary.
-     */
-    public void setSalary(double salary) {
-        throw new IllegalStateException("Please run Ignite Schema Import Utility as described in README.txt");
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/examples/schema-import/src/main/java/org/apache/ignite/schema/PersonKey.java
----------------------------------------------------------------------
diff --git a/examples/schema-import/src/main/java/org/apache/ignite/schema/PersonKey.java b/examples/schema-import/src/main/java/org/apache/ignite/schema/PersonKey.java
deleted file mode 100644
index dd241ad..0000000
--- a/examples/schema-import/src/main/java/org/apache/ignite/schema/PersonKey.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema;
-
-/**
- * PersonKey definition.
- */
-public class PersonKey {
-    /**
-     * Full constructor.
-     */
-    public PersonKey(int id) {
-        throw new IllegalStateException("Please run Ignite Schema Import Utility as described in README.txt");
-    }
-
-    /**
-     * @return Person ID.
-     */
-    public int getId() {
-        throw new IllegalStateException("Please run Ignite Schema Import Utility as described in README.txt");
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/core/src/test/config/store/jdbc/ignite-jdbc-type.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/store/jdbc/ignite-jdbc-type.xml b/modules/core/src/test/config/store/jdbc/ignite-jdbc-type.xml
index 4df4f04..6b75041 100644
--- a/modules/core/src/test/config/store/jdbc/ignite-jdbc-type.xml
+++ b/modules/core/src/test/config/store/jdbc/ignite-jdbc-type.xml
@@ -18,7 +18,7 @@
 -->
 
 <!--
-    XML generated by Apache Ignite Schema Import utility: 02/03/2015
+    JdbcType beans.
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:util="http://www.springframework.org/schema/util"

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/Organization.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/Organization.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/Organization.java
index 1ba3002..69470eb 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/Organization.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/Organization.java
@@ -21,8 +21,6 @@ import java.io.Serializable;
 
 /**
  * Organization definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 02/03/2015.
  */
 public class Organization implements Serializable {
     /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/OrganizationKey.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/OrganizationKey.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/OrganizationKey.java
index 7d3a37a..271daea 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/OrganizationKey.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/OrganizationKey.java
@@ -21,8 +21,6 @@ import java.io.Serializable;
 
 /**
  * OrganizationKey definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 02/03/2015.
  */
 public class OrganizationKey implements Serializable {
     /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/Person.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/Person.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/Person.java
index 89258b4..07270b1 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/Person.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/Person.java
@@ -22,8 +22,6 @@ import java.sql.Date;
 
 /**
  * Person definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 02/03/2015.
  */
 public class Person implements Serializable {
     /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/PersonComplexKey.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/PersonComplexKey.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/PersonComplexKey.java
index c213e66..554831c 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/PersonComplexKey.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/PersonComplexKey.java
@@ -21,8 +21,6 @@ import java.io.Serializable;
 
 /**
  * PersonComplexKey definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 02/03/2015.
  */
 public class PersonComplexKey implements Serializable {
     /** */
@@ -143,4 +141,4 @@ public class PersonComplexKey implements Serializable {
             ", cityId=" + cityId +
             "]";
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/PersonKey.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/PersonKey.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/PersonKey.java
index a46c830..01737ed 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/PersonKey.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/model/PersonKey.java
@@ -21,8 +21,6 @@ import java.io.Serializable;
 
 /**
  * PersonKey definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 02/03/2015.
  */
 public class PersonKey implements Serializable {
     /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import-db/README.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import-db/README.txt b/modules/schema-import-db/README.txt
deleted file mode 100644
index 556e1c6..0000000
--- a/modules/schema-import-db/README.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Apache Ignite Schema Import DB Module
-------------------------------------------
-
-Utility classes to extract database metadata.

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import-db/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import-db/pom.xml b/modules/schema-import-db/pom.xml
deleted file mode 100644
index ea28ee1..0000000
--- a/modules/schema-import-db/pom.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!--
-    POM file.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.ignite</groupId>
-        <artifactId>ignite-parent</artifactId>
-        <version>1</version>
-        <relativePath>../../parent</relativePath>
-    </parent>
-
-    <artifactId>ignite-schema-import-db</artifactId>
-    <version>2.0.0-SNAPSHOT</version>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/DbColumn.java
----------------------------------------------------------------------
diff --git a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/DbColumn.java b/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/DbColumn.java
deleted file mode 100644
index 10fd50f..0000000
--- a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/DbColumn.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.parser;
-
-/**
- * Database table column.
- */
-public class DbColumn {
-    /** Column name. */
-    private final String name;
-
-    /** Column JDBC type. */
-    private final int type;
-
-    /** Is this column belongs to primary key. */
-    private final boolean key;
-
-    /** Is {@code NULL} allowed for column in database. */
-    private final boolean nullable;
-
-    /** Whether column unsigned. */
-    private final boolean unsigned;
-
-    /**
-     * @param name Column name.
-     * @param type Column JDBC type.
-     * @param key {@code true} if this column belongs to primary key.
-     * @param nullable {@code true} if {@code NULL } allowed for column in database.
-     * @param unsigned {@code true} if column is unsigned.
-     */
-    public DbColumn(String name, int type, boolean key, boolean nullable, boolean unsigned) {
-        this.name = name;
-        this.type = type;
-        this.key = key;
-        this.nullable = nullable;
-        this.unsigned = unsigned;
-    }
-
-    /**
-     * @return Column name.
-     */
-    public String name() {
-        return name;
-    }
-
-    /**
-     * @return Column JDBC type.
-     */
-    public int type() {
-        return type;
-    }
-
-    /**
-     * @return {@code true} if this column belongs to primary key.
-     */
-    public boolean key() {
-        return key;
-    }
-
-    /**
-     * @return {@code true} if {@code NULL } allowed for column in database.
-     */
-    public boolean nullable() {
-        return nullable;
-    }
-
-    /**
-     * @return {@code true} if column is unsigned.
-     */
-    public boolean unsigned() {
-        return unsigned;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/DbMetadataReader.java
----------------------------------------------------------------------
diff --git a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/DbMetadataReader.java b/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/DbMetadataReader.java
deleted file mode 100644
index 5b45f33..0000000
--- a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/DbMetadataReader.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.parser;
-
-import org.apache.ignite.schema.parser.dialect.*;
-
-import java.io.*;
-import java.net.*;
-import java.sql.*;
-import java.util.*;
-import java.util.logging.*;
-
-/**
- * Singleton to extract database metadata.
- */
-public class DbMetadataReader {
-    /** Logger. */
-    private static final Logger log = Logger.getLogger(DbMetadataReader.class.getName());
-
-    /** */
-    private static final DbMetadataReader INSTANCE = new DbMetadataReader();
-
-    /** */
-    private final Map<String, Driver> drivers = new HashMap<>();
-
-    /**
-     * Default constructor.
-     */
-    private DbMetadataReader() {
-        // No-op.
-    }
-
-    /**
-     * @return Instance.
-     */
-    public static DbMetadataReader getInstance() {
-        return INSTANCE;
-    }
-
-    /**
-     * Get specified dialect object for selected database.
-     *
-     * @param conn Connection to database.
-     * @return Specific dialect object.
-     */
-    private DatabaseMetadataDialect dialect(Connection conn) {
-        try {
-            String dbProductName = conn.getMetaData().getDatabaseProductName();
-
-            if ("Oracle".equals(dbProductName))
-                return new OracleMetadataDialect();
-            else if (dbProductName.startsWith("DB2/"))
-                return new DB2MetadataDialect();
-            else if (dbProductName.equals("MySQL"))
-                return new MySQLMetadataDialect();
-            else
-                return new JdbcMetadataDialect();
-        }
-        catch (SQLException e) {
-            log.log(Level.SEVERE, "Failed to resolve dialect (JdbcMetaDataDialect will be used.", e);
-
-            return new JdbcMetadataDialect();
-        }
-    }
-
-    /**
-     * Get list of schemas from database.
-     *
-     * @param conn Connection to database.
-     * @return List of schema names.
-     * @throws SQLException If schemas loading failed.
-     */
-    public Collection<String> schemas(Connection conn) throws SQLException  {
-        return dialect(conn).schemas(conn);
-    }
-
-    /**
-     * Extract DB metadata.
-     *
-     * @param conn Connection.
-     * @param schemas List of database schemas to process. In case of empty list all schemas will be processed.
-     * @param tblsOnly Tables only flag.
-     */
-    public Collection<DbTable> metadata(Connection conn, List<String> schemas, boolean tblsOnly) throws SQLException {
-        return dialect(conn).tables(conn, schemas, tblsOnly);
-    }
-
-    /**
-     * Connect to database.
-     *
-     * @param jdbcDrvJarPath Path to JDBC driver.
-     * @param jdbcDrvCls JDBC class name.
-     * @param jdbcUrl JDBC connection URL.
-     * @param jdbcInfo Connection properties.
-     * @return Connection to database.
-     * @throws SQLException if connection failed.
-     */
-    public Connection connect(String jdbcDrvJarPath, String jdbcDrvCls, String jdbcUrl, Properties jdbcInfo)
-        throws SQLException {
-        Driver drv = drivers.get(jdbcDrvCls);
-
-        if (drv == null) {
-            if (jdbcDrvJarPath.isEmpty())
-                throw new IllegalStateException("Driver jar file name is not specified.");
-
-            File drvJar = new File(jdbcDrvJarPath);
-
-            if (!drvJar.exists())
-                throw new IllegalStateException("Driver jar file is not found.");
-
-            try {
-                URL u = new URL("jar:" + drvJar.toURI() + "!/");
-
-                URLClassLoader ucl = URLClassLoader.newInstance(new URL[] {u});
-
-                drv = (Driver)Class.forName(jdbcDrvCls, true, ucl).newInstance();
-
-                drivers.put(jdbcDrvCls, drv);
-            }
-            catch (Exception e) {
-                throw new IllegalStateException(e);
-            }
-        }
-
-        Connection conn = drv.connect(jdbcUrl, jdbcInfo);
-
-        if (conn == null)
-            throw new IllegalStateException("Connection was not established (JDBC driver returned null value).");
-
-        return conn;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/DbTable.java
----------------------------------------------------------------------
diff --git a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/DbTable.java b/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/DbTable.java
deleted file mode 100644
index 39f6f7b..0000000
--- a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/DbTable.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.parser;
-
-import org.apache.ignite.cache.QueryIndex;
-
-import java.util.Collection;
-
-/**
- * Database table.
- */
-public class DbTable {
-    /** Schema name. */
-    private final String schema;
-
-    /** Table name. */
-    private final String tbl;
-
-    /** Columns. */
-    private final Collection<DbColumn> cols;
-
-    /** Indexes. */
-    private final Collection<QueryIndex> idxs;
-
-    /**
-     * Default columns.
-     *
-     * @param schema Schema name.
-     * @param tbl Table name.
-     * @param cols Columns.
-     * @param idxs Indexes;
-     */
-    public DbTable(String schema, String tbl, Collection<DbColumn> cols, Collection<QueryIndex> idxs) {
-        this.schema = schema;
-        this.tbl = tbl;
-        this.cols = cols;
-        this.idxs = idxs;
-    }
-
-    /**
-     * @return Schema name.
-     */
-    public String schema() {
-        return schema;
-    }
-
-    /**
-     * @return Table name.
-     */
-    public String table() {
-        return tbl;
-    }
-
-    /**
-     * @return Columns.
-     */
-    public Collection<DbColumn> columns() {
-        return cols;
-    }
-
-    /**
-     * @return Indexes.
-     */
-    public Collection<QueryIndex> indexes() {
-        return idxs;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/DB2MetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/DB2MetadataDialect.java b/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/DB2MetadataDialect.java
deleted file mode 100644
index d277e4b..0000000
--- a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/DB2MetadataDialect.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.parser.dialect;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * DB2 specific metadata dialect.
- */
-public class DB2MetadataDialect extends JdbcMetadataDialect {
-    /** {@inheritDoc} */
-    @Override public Set<String> systemSchemas() {
-        return new HashSet<>(Arrays.asList("SYSIBM", "SYSCAT", "SYSSTAT", "SYSTOOLS", "SYSFUN", "SYSIBMADM",
-            "SYSIBMINTERNAL", "SYSIBMTS", "SYSPROC", "SYSPUBLIC"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/DatabaseMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/DatabaseMetadataDialect.java b/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/DatabaseMetadataDialect.java
deleted file mode 100644
index 56ee59b..0000000
--- a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/DatabaseMetadataDialect.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.parser.dialect;
-
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.SQLException;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.ignite.cache.QueryIndex;
-import org.apache.ignite.cache.QueryIndexType;
-import org.apache.ignite.schema.parser.DbColumn;
-import org.apache.ignite.schema.parser.DbTable;
-
-/**
- * Base class for database metadata dialect.
- */
-public abstract class DatabaseMetadataDialect {
-    /**
-     * Gets schemas from database.
-     *
-     * @param conn Database connection.
-     * @return Collection of schema descriptors.
-     * @throws SQLException If failed to get schemas.
-     */
-    public abstract Collection<String> schemas(Connection conn) throws SQLException;
-
-    /**
-     * Gets tables from database.
-     *
-     * @param conn Database connection.
-     * @param schemas Collection of schema names to load.
-     * @param tblsOnly If {@code true} then gets only tables otherwise gets tables and views.
-     * @return Collection of table descriptors.
-     * @throws SQLException If failed to get tables.
-     */
-    public abstract Collection<DbTable> tables(Connection conn, List<String> schemas, boolean tblsOnly)
-        throws SQLException;
-
-    /**
-     * @return Collection of database system schemas.
-     */
-    public Set<String> systemSchemas() {
-        return Collections.singleton("INFORMATION_SCHEMA");
-    }
-
-    /**
-     * @return Collection of unsigned type names.
-     * @throws SQLException If failed to get unsigned type names.
-     */
-    public Set<String> unsignedTypes(DatabaseMetaData dbMeta) throws SQLException {
-        return Collections.emptySet();
-    }
-
-    /**
-     * Create table descriptor.
-     *
-     * @param schema Schema name.
-     * @param tbl Table name.
-     * @param cols Table columns.
-     * @param idxs Table indexes.
-     * @return New {@code DbTable} instance.
-     */
-    protected DbTable table(String schema, String tbl, Collection<DbColumn> cols, Collection<QueryIndex>idxs) {
-        return new DbTable(schema, tbl, cols, idxs);
-    }
-
-    /**
-     * Create index descriptor.
-     *
-     * @param idxName Index name.
-     * @return New initialized {@code QueryIndex} instance.
-     */
-    protected QueryIndex index(String idxName) {
-        QueryIndex idx = new QueryIndex();
-
-        idx.setName(idxName);
-        idx.setIndexType(QueryIndexType.SORTED);
-        idx.setFields(new LinkedHashMap<String, Boolean>());
-
-        return idx;
-    }
-}


[29/50] [abbrv] ignite git commit: IGNITE-4876 - Tests should wait for topology change on all nodes

Posted by dm...@apache.org.
IGNITE-4876 - Tests should wait for topology change on all nodes


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

Branch: refs/heads/ignite-1192
Commit: 4e80ddfe25d21f316de287bf5dade4ef0a0d17cc
Parents: 77740bf
Author: Konstantin Dudkov <kd...@ya.ru>
Authored: Fri Apr 7 17:17:04 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Apr 7 17:17:04 2017 +0300

----------------------------------------------------------------------
 .../testframework/junits/GridAbstractTest.java  | 53 +++++++++++++++++++-
 1 file changed, 51 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4e80ddfe/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
index ddcf91f..1bb4540 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
@@ -57,16 +57,20 @@ import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.events.EventType;
+import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.IgniteInterruptedCheckedException;
 import org.apache.ignite.internal.IgniteKernal;
 import org.apache.ignite.internal.IgnitionEx;
 import org.apache.ignite.internal.binary.BinaryEnumCache;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.resource.GridSpringResourceContext;
 import org.apache.ignite.internal.util.GridClassLoaderCache;
 import org.apache.ignite.internal.util.GridTestClockTimer;
 import org.apache.ignite.internal.util.GridUnsafe;
+import org.apache.ignite.internal.util.lang.GridAbsPredicate;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.G;
 import org.apache.ignite.internal.util.typedef.internal.LT;
@@ -138,6 +142,9 @@ public abstract class GridAbstractTest extends TestCase {
     private static final long DFLT_TEST_TIMEOUT = 5 * 60 * 1000;
 
     /** */
+    private static final int DFLT_TOP_WAIT_TIMEOUT = 2000;
+
+    /** */
     private static final transient Map<Class<?>, TestCounters> tests = new ConcurrentHashMap<>();
 
     /** */
@@ -953,6 +960,16 @@ public abstract class GridAbstractTest extends TestCase {
      */
     @SuppressWarnings({"deprecation"})
     protected void stopGrid(@Nullable String igniteInstanceName, boolean cancel) {
+        stopGrid(igniteInstanceName, cancel, true);
+    }
+
+    /**
+     * @param igniteInstanceName Ignite instance name.
+     * @param cancel Cancel flag.
+     * @param awaitTop Await topology change flag.
+     */
+    @SuppressWarnings({"deprecation"})
+    protected void stopGrid(@Nullable String igniteInstanceName, boolean cancel, boolean awaitTop) {
         try {
             Ignite ignite = grid(igniteInstanceName);
 
@@ -965,6 +982,9 @@ public abstract class GridAbstractTest extends TestCase {
                 G.stop(igniteInstanceName, cancel);
             else
                 IgniteProcessProxy.stop(igniteInstanceName, cancel);
+
+            if (awaitTop)
+                awaitTopologyChange();
         }
         catch (IllegalStateException ignored) {
             // Ignore error if grid already stopped.
@@ -999,10 +1019,10 @@ public abstract class GridAbstractTest extends TestCase {
             }
 
             for (Ignite g : clients)
-                stopGrid(g.name(), cancel);
+                stopGrid(g.name(), cancel, false);
 
             for (Ignite g : srvs)
-                stopGrid(g.name(), cancel);
+                stopGrid(g.name(), cancel, false);
 
             assert G.allGrids().isEmpty();
         }
@@ -1996,6 +2016,35 @@ public abstract class GridAbstractTest extends TestCase {
 
     /**
      *
+     * @throws IgniteInterruptedCheckedException
+     */
+    public void awaitTopologyChange() throws IgniteInterruptedCheckedException {
+        for (Ignite g : G.allGrids()) {
+            final GridKernalContext ctx = ((IgniteKernal)g).context();
+
+            if (ctx.isStopping())
+                continue;
+
+            AffinityTopologyVersion topVer = ctx.discovery().topologyVersionEx();
+            AffinityTopologyVersion exchVer = ctx.cache().context().exchange().readyAffinityVersion();
+
+            if (! topVer.equals(exchVer)) {
+                info("topology version mismatch: node "  + g.name() + " " + exchVer + ", " + topVer);
+
+                GridTestUtils.waitForCondition(new GridAbsPredicate() {
+                    @Override public boolean apply() {
+                        AffinityTopologyVersion topVer = ctx.discovery().topologyVersionEx();
+                        AffinityTopologyVersion exchVer = ctx.cache().context().exchange().readyAffinityVersion();
+
+                        return exchVer.equals(topVer);
+                    }
+                }, DFLT_TOP_WAIT_TIMEOUT);
+            }
+        }
+    }
+
+    /**
+     *
      */
     private static interface WriteReplaceOwner {
         /**


[20/50] [abbrv] ignite git commit: IGNITE 4913 added ver parameter in property files

Posted by dm...@apache.org.
IGNITE 4913 added ver parameter in property files


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

Branch: refs/heads/ignite-1192
Commit: 740621afb55131a5c86b6128f8a6eb6897dfe12f
Parents: 1811ede
Author: oleg-ostanin <oo...@gridgain.com>
Authored: Wed Apr 5 13:41:59 2017 +0300
Committer: oleg-ostanin <oo...@gridgain.com>
Committed: Wed Apr 5 13:41:59 2017 +0300

----------------------------------------------------------------------
 .../config/benchmark-atomic.properties          | 21 ++++++++------
 .../config/benchmark-cache-load.properties      |  7 +++--
 .../config/benchmark-compute.properties         | 13 +++++----
 .../config/benchmark-failover.properties        |  4 +--
 .../config/benchmark-put-indexed-val.properties |  9 ++++--
 .../yardstick/config/benchmark-query.properties | 19 +++++++------
 .../config/benchmark-remote-sample.properties   |  5 +++-
 .../config/benchmark-sample.properties          |  5 +++-
 .../config/benchmark-sql-dml.properties         | 19 +++++++------
 .../yardstick/config/benchmark-store.properties | 30 ++++++++++----------
 .../yardstick/config/benchmark-tx.properties    | 19 +++++++------
 .../test-max-int-values-offheap.properties      |  5 +++-
 .../test-max-int-values-onheap.properties       |  5 +++-
 .../config/test-max-int-values-swap.properties  |  5 +++-
 14 files changed, 101 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/740621af/modules/yardstick/config/benchmark-atomic.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-atomic.properties b/modules/yardstick/config/benchmark-atomic.properties
index 967a603..f296041 100644
--- a/modules/yardstick/config/benchmark-atomic.properties
+++ b/modules/yardstick/config/benchmark-atomic.properties
@@ -31,6 +31,9 @@ JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 # -XX:+UseConcMarkSweepGC \
 # "
 
+#Ignite version
+ver="RELEASE-"
+
 # List of default probes.
 # Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
 BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
@@ -71,13 +74,13 @@ sm=PRIMARY_SYNC
 # Run configuration.
 # Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetBenchmark -sn IgniteNode -ds atomic-get-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetOffHeapBenchmark -sn IgniteNode -ds atomic-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetOffHeapValuesBenchmark -sn IgniteNode -ds atomic-get-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetBenchmark -sn IgniteNode -ds atomic-put-get-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapBenchmark -sn IgniteNode -ds atomic-put-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapValuesBenchmark -sn IgniteNode -ds atomic-put-get-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutBenchmark -sn IgniteNode -ds atomic-put-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapBenchmark -sn IgniteNode -ds atomic-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapValuesBenchmark -sn IgniteNode -ds atomic-put-offheap-val-${b}-backup\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetBenchmark -sn IgniteNode -ds ${ver}atomic-get-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-get-offheap-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-get-offheap-val-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-val-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutBenchmark -sn IgniteNode -ds ${ver}atomic-put-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-val-${b}-backup\
 "

http://git-wip-us.apache.org/repos/asf/ignite/blob/740621af/modules/yardstick/config/benchmark-cache-load.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-cache-load.properties b/modules/yardstick/config/benchmark-cache-load.properties
index 9c1ab09..c055694 100644
--- a/modules/yardstick/config/benchmark-cache-load.properties
+++ b/modules/yardstick/config/benchmark-cache-load.properties
@@ -29,6 +29,10 @@ JVM_OPTS=${JVM_OPTS}" \
 -XX:+UseParNewGC \
 -XX:+UseConcMarkSweepGC \
 "
+
+#Ignite version
+ver="RELEASE-"
+
 # List of default probes.
 # Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
 BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
@@ -51,7 +55,6 @@ DRIVER_HOSTS=localhost
 # Number of nodes, used to wait for the specified number of nodes to start.
 nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo ${DRIVER_HOSTS} | tr ',' '\n' | wc -l`))
 
-
 # Backups count.
 b=1
 
@@ -82,5 +85,5 @@ ops="PUT PUT_ALL GET GET_ALL INVOKE INVOKE_ALL REMOVE REMOVE_ALL PUT_IF_ABSENT R
 # Run configuration.
 # Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-cache-load-config.xml -r ${r} -pa ${pa} -bs ${bs} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteCacheRandomOperationBenchmark -sn IgniteNode -ds cache-random-benchmark-${b}-backup -nn ${nodesNum} \
+-cfg ${SCRIPT_DIR}/../config/ignite-cache-load-config.xml -r ${r} -pa ${pa} -bs ${bs} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteCacheRandomOperationBenchmark -sn IgniteNode -ds ${ver}cache-random-benchmark-${b}-backup -nn ${nodesNum} \
 -ltqf ${SCRIPT_DIR}/../config/queries.sql -ltops ${ops}"

http://git-wip-us.apache.org/repos/asf/ignite/blob/740621af/modules/yardstick/config/benchmark-compute.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-compute.properties b/modules/yardstick/config/benchmark-compute.properties
index df35c54..30d411a 100644
--- a/modules/yardstick/config/benchmark-compute.properties
+++ b/modules/yardstick/config/benchmark-compute.properties
@@ -31,6 +31,9 @@ JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 # -XX:+UseConcMarkSweepGC \
 # "
 
+#Ignite version
+ver="RELEASE-"
+
 # List of default probes.
 # Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
 BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
@@ -74,9 +77,9 @@ j=10
 # Run configuration.
 # Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteAffinityCallBenchmark -sn IgniteNode -ds affcall-compute-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteApplyBenchmark -sn IgniteNode -ds apply-compute-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteBroadcastBenchmark -sn IgniteNode -ds broad-compute-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteExecuteBenchmark -sn IgniteNode -ds exec-compute-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteRunBenchmark -sn IgniteNode -ds run-compute-${b}-backup\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteAffinityCallBenchmark -sn IgniteNode -ds ${ver}affcall-compute-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteApplyBenchmark -sn IgniteNode -ds ${ver}apply-compute-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteBroadcastBenchmark -sn IgniteNode -ds ${ver}broad-compute-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteExecuteBenchmark -sn IgniteNode -ds ${ver}exec-compute-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteRunBenchmark -sn IgniteNode -ds ${ver}run-compute-${b}-backup\
 "

http://git-wip-us.apache.org/repos/asf/ignite/blob/740621af/modules/yardstick/config/benchmark-failover.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-failover.properties b/modules/yardstick/config/benchmark-failover.properties
index a85d165..a1b9d8f 100644
--- a/modules/yardstick/config/benchmark-failover.properties
+++ b/modules/yardstick/config/benchmark-failover.properties
@@ -98,6 +98,6 @@ t=128
 
 # Run configuration which contains all benchmarks.
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-failover-localhost-config.xml -nn ${nodesNum} -b 1 -w ${w} -d ${d} -rd ${rd} -rs ${rs} -r ${r} -t ${t} --client -sm PRIMARY_SYNC -dn ${dn} -sn IgniteFailoverNode -ds failover-1b,\
--cfg ${SCRIPT_DIR}/../config/ignite-failover-localhost-config.xml -nn ${nodesNum} -b 2 -w ${w} -d ${d} -rd ${rd} -rs ${rs} -r ${r} -t ${t} --client -sm PRIMARY_SYNC -dn ${dn} -sn IgniteFailoverNode -ds failover-2b,\
+-cfg ${SCRIPT_DIR}/../config/ignite-failover-localhost-config.xml -nn ${nodesNum} -b 1 -w ${w} -d ${d} -rd ${rd} -rs ${rs} -r ${r} -t ${t} --client -sm PRIMARY_SYNC -dn ${dn} -sn IgniteFailoverNode -ds ${ver}failover-1b,\
+-cfg ${SCRIPT_DIR}/../config/ignite-failover-localhost-config.xml -nn ${nodesNum} -b 2 -w ${w} -d ${d} -rd ${rd} -rs ${rs} -r ${r} -t ${t} --client -sm PRIMARY_SYNC -dn ${dn} -sn IgniteFailoverNode -ds ${ver}failover-2b,\
 "

http://git-wip-us.apache.org/repos/asf/ignite/blob/740621af/modules/yardstick/config/benchmark-put-indexed-val.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-put-indexed-val.properties b/modules/yardstick/config/benchmark-put-indexed-val.properties
index 152d72f..a2bc956 100644
--- a/modules/yardstick/config/benchmark-put-indexed-val.properties
+++ b/modules/yardstick/config/benchmark-put-indexed-val.properties
@@ -31,6 +31,9 @@ JVM_OPTS=${JVM_OPTS}" \
 -XX:+UseConcMarkSweepGC \
 "
 
+#Ignite version
+ver="RELEASE-"
+
 # List of default probes.
 # Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
 BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
@@ -71,7 +74,7 @@ sm=PRIMARY_SYNC
 # Run configuration.
 # Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutIndexedValue1Benchmark -sn IgniteNode -ds atomic-put-indexed-val-1,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutIndexedValue2Benchmark -sn IgniteNode -ds atomic-put-indexed-val-2,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutIndexedValue8Benchmark -sn IgniteNode -ds atomic-put-indexed-val-8\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutIndexedValue1Benchmark -sn IgniteNode -ds ${ver}atomic-put-indexed-val-1,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutIndexedValue2Benchmark -sn IgniteNode -ds ${ver}atomic-put-indexed-val-2,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutIndexedValue8Benchmark -sn IgniteNode -ds ${ver}atomic-put-indexed-val-8\
 "

http://git-wip-us.apache.org/repos/asf/ignite/blob/740621af/modules/yardstick/config/benchmark-query.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-query.properties b/modules/yardstick/config/benchmark-query.properties
index 9192512..c364cfd 100644
--- a/modules/yardstick/config/benchmark-query.properties
+++ b/modules/yardstick/config/benchmark-query.properties
@@ -31,6 +31,9 @@ JVM_OPTS=${JVM_OPTS}" \
 -XX:+UseConcMarkSweepGC \
 "
 
+#Ignite version
+ver="RELEASE-"
+
 # List of default probes.
 # Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
 BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
@@ -71,12 +74,12 @@ sm=PRIMARY_SYNC
 # Run configuration.
 # Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryBenchmark -sn IgniteNode -ds sql-query-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryOffHeapBenchmark -sn IgniteNode -ds sql-query-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryJoinBenchmark -sn IgniteNode -ds sql-query-join-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds sql-query-join-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryPutBenchmark -sn IgniteNode -ds sql-query-put-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds sql-query-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -jdbc jdbc:ignite://127.0.0.1/query -t ${t} -sm ${sm} -dn IgniteJdbcSqlQueryBenchmark -sn IgniteNode -ds sql-query-jdbc-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -jdbc jdbc:ignite:cfg://cache=query@config/ignite-jdbc-config.xml -t ${t} -sm ${sm} -dn IgniteJdbcSqlQueryBenchmark -sn IgniteNode -ds sql-query-jdbc-${b}-backup\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryBenchmark -sn IgniteNode -ds ${ver}sql-query-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-offheap-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryJoinBenchmark -sn IgniteNode -ds ${ver}sql-query-join-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-join-offheap-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryPutBenchmark -sn IgniteNode -ds ${ver}sql-query-put-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-put-offheap-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -jdbc jdbc:ignite://127.0.0.1/query -t ${t} -sm ${sm} -dn IgniteJdbcSqlQueryBenchmark -sn IgniteNode -ds ${ver}sql-query-jdbc-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -jdbc jdbc:ignite:cfg://cache=query@config/ignite-jdbc-config.xml -t ${t} -sm ${sm} -dn IgniteJdbcSqlQueryBenchmark -sn IgniteNode -ds ${ver}sql-query-jdbc-${b}-backup\
 "

http://git-wip-us.apache.org/repos/asf/ignite/blob/740621af/modules/yardstick/config/benchmark-remote-sample.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-remote-sample.properties b/modules/yardstick/config/benchmark-remote-sample.properties
index 7e97f43..e9754fe 100644
--- a/modules/yardstick/config/benchmark-remote-sample.properties
+++ b/modules/yardstick/config/benchmark-remote-sample.properties
@@ -31,6 +31,9 @@ JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 # -XX:+UseConcMarkSweepGC \
 # "
 
+#Ignite version
+ver="RELEASE-"
+
 # List of default probes.
 # Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
 BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
@@ -74,5 +77,5 @@ sm=PRIMARY_SYNC
 # Run configuration.
 # Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-remote-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutBenchmark -sn IgniteNode -ds atomic-put-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-remote-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutBenchmark -sn IgniteNode -ds ${ver}atomic-put-${b}-backup,\
 "
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/740621af/modules/yardstick/config/benchmark-sample.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-sample.properties b/modules/yardstick/config/benchmark-sample.properties
index 81e9a1b..b235e9a 100644
--- a/modules/yardstick/config/benchmark-sample.properties
+++ b/modules/yardstick/config/benchmark-sample.properties
@@ -31,6 +31,9 @@ JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 # -XX:+UseConcMarkSweepGC \
 # "
 
+#Ignite version
+ver="RELEASE-"
+
 # List of default probes.
 # Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
 BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
@@ -74,5 +77,5 @@ j=10
 # Run configuration.
 # Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutBenchmark -sn IgniteNode -ds atomic-put-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutBenchmark -sn IgniteNode -ds ${ver}atomic-put-${b}-backup,\
 "

http://git-wip-us.apache.org/repos/asf/ignite/blob/740621af/modules/yardstick/config/benchmark-sql-dml.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-sql-dml.properties b/modules/yardstick/config/benchmark-sql-dml.properties
index faa62c9..3bb4107 100644
--- a/modules/yardstick/config/benchmark-sql-dml.properties
+++ b/modules/yardstick/config/benchmark-sql-dml.properties
@@ -31,6 +31,9 @@ JVM_OPTS=${JVM_OPTS}" \
 -XX:+UseConcMarkSweepGC \
 "
 
+#Ignite version
+ver="RELEASE-"
+
 # List of default probes.
 # Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
 BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
@@ -77,12 +80,12 @@ j=10
 #
 
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 2 -dn IgniteSqlMergeAllBenchmark -sn IgniteNode -ds sql-merge-all-bs-2-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 6 -dn IgniteSqlMergeAllBenchmark -sn IgniteNode -ds sql-merge-all-bs-6-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -dn IgniteSqlMergeAllBenchmark -sn IgniteNode -ds sql-merge-all-bs-10-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlMergeBenchmark -sn IgniteNode -ds sql-merge-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlMergeQueryBenchmark -sn IgniteNode -ds sql-merge-query-${b}-backup\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlMergeIndexedValue1Benchmark -sn IgniteNode -ds sql-merge-indexed1-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlMergeIndexedValue2Benchmark -sn IgniteNode -ds sql-merge-indexed2-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlMergeIndexedValue8Benchmark -sn IgniteNode -ds sql-merge-indexed8-${b}-backup\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 2 -dn IgniteSqlMergeAllBenchmark -sn IgniteNode -ds ${ver}sql-merge-all-bs-2-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 6 -dn IgniteSqlMergeAllBenchmark -sn IgniteNode -ds ${ver}sql-merge-all-bs-6-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 10 -dn IgniteSqlMergeAllBenchmark -sn IgniteNode -ds ${ver}sql-merge-all-bs-10-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlMergeBenchmark -sn IgniteNode -ds ${ver}sql-merge-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlMergeQueryBenchmark -sn IgniteNode -ds ${ver}sql-merge-query-${b}-backup\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlMergeIndexedValue1Benchmark -sn IgniteNode -ds ${ver}sql-merge-indexed1-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlMergeIndexedValue2Benchmark -sn IgniteNode -ds ${ver}sql-merge-indexed2-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlMergeIndexedValue8Benchmark -sn IgniteNode -ds ${ver}sql-merge-indexed8-${b}-backup\
 "

http://git-wip-us.apache.org/repos/asf/ignite/blob/740621af/modules/yardstick/config/benchmark-store.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-store.properties b/modules/yardstick/config/benchmark-store.properties
index 2f89d0e..3146c24 100644
--- a/modules/yardstick/config/benchmark-store.properties
+++ b/modules/yardstick/config/benchmark-store.properties
@@ -83,19 +83,19 @@ j=10
 
 # Run configuration which contains all benchmarks.
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -ds atomic-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -cs -ds atomic-store-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -cs -wb -ds atomic-writeBehind-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -ds tx-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -cs -ds tx-store-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -ds atomic-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -cs -ds atomic-store-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -cs -wb -ds atomic-writeBehind-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -ds tx-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -cs -ds tx-store-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -ds atomic-put-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -cs -ds atomic-store-put-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -cs -wb -ds atomic-writeBehind-put-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -ds tx-put-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -cs -ds tx-store-put-get\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -ds ${ver}atomic-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -cs -ds ${ver}atomic-store-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -cs -wb -ds ${ver}atomic-writeBehind-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -ds ${ver}tx-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -cs -ds ${ver}tx-store-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -ds ${ver}atomic-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -cs -ds ${ver}atomic-store-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -cs -wb -ds ${ver}atomic-writeBehind-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -ds ${ver}tx-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -cs -ds ${ver}tx-store-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -ds ${ver}atomic-put-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -cs -ds ${ver}atomic-store-put-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -cs -wb -ds ${ver}atomic-writeBehind-put-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -ds ${ver}tx-put-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -cs -ds ${ver}tx-store-put-get\
 "

http://git-wip-us.apache.org/repos/asf/ignite/blob/740621af/modules/yardstick/config/benchmark-tx.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-tx.properties b/modules/yardstick/config/benchmark-tx.properties
index cc48c53..8a75bf5 100644
--- a/modules/yardstick/config/benchmark-tx.properties
+++ b/modules/yardstick/config/benchmark-tx.properties
@@ -31,6 +31,9 @@ JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
 # -XX:+UseConcMarkSweepGC \
 # "
 
+#Ignite version
+ver="RELEASE-"
+
 # List of default probes, comma separated.
 # Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
 BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
@@ -71,12 +74,12 @@ sm=PRIMARY_SYNC
 # Run configuration.
 # Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxBenchmark -sn IgniteNode -ds tx-put-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetAndPutTxBenchmark -sn IgniteNode -ds tx-getAndPut-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteInvokeTxBenchmark -sn IgniteNode -ds tx-invoke-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapBenchmark -sn IgniteNode -ds tx-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapValuesBenchmark -sn IgniteNode -ds tx-put-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds tx-put-get-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetTxOffHeapBenchmark -sn IgniteNode -ds tx-put-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetTxOffHeapValuesBenchmark -sn IgniteNode -ds tx-put-get-offheap-val-${b}-backup\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxBenchmark -sn IgniteNode -ds ${ver}tx-put-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetAndPutTxBenchmark -sn IgniteNode -ds ${ver}tx-getAndPut-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteInvokeTxBenchmark -sn IgniteNode -ds ${ver}tx-invoke-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-val-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds ${ver}tx-put-get-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetTxOffHeapBenchmark -sn IgniteNode -ds ${ver}tx-put-get-offheap-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetTxOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}tx-put-get-offheap-val-${b}-backup\
 "

http://git-wip-us.apache.org/repos/asf/ignite/blob/740621af/modules/yardstick/config/test-max-int-values-offheap.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/test-max-int-values-offheap.properties b/modules/yardstick/config/test-max-int-values-offheap.properties
index 838986d..4a42538 100644
--- a/modules/yardstick/config/test-max-int-values-offheap.properties
+++ b/modules/yardstick/config/test-max-int-values-offheap.properties
@@ -31,6 +31,9 @@ JVM_OPTS=${JVM_OPTS}" \
 -XX:+UseConcMarkSweepGC \
 "
 
+#Ignite version
+ver="RELEASE-"
+
 # List of default probes.
 # Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
 # BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
@@ -56,7 +59,7 @@ nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo ${DRIVER_HOSTS}
 # Run configuration.
 # Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-int-max-values-offheap-config.xml -nn ${nodesNum} -b 0 -w 0 -d 9999999 -t 1 -sm PRIMARY_SYNC -dn IntMaxValueEntriesTest -sn IgniteNode -ds int-max-values-offheap\
+-cfg ${SCRIPT_DIR}/../config/ignite-int-max-values-offheap-config.xml -nn ${nodesNum} -b 0 -w 0 -d 9999999 -t 1 -sm PRIMARY_SYNC -dn IntMaxValueEntriesTest -sn IgniteNode -ds ${ver}int-max-values-offheap\
 "
 
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/740621af/modules/yardstick/config/test-max-int-values-onheap.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/test-max-int-values-onheap.properties b/modules/yardstick/config/test-max-int-values-onheap.properties
index c83f469..4346b54 100644
--- a/modules/yardstick/config/test-max-int-values-onheap.properties
+++ b/modules/yardstick/config/test-max-int-values-onheap.properties
@@ -31,6 +31,9 @@ JVM_OPTS=${JVM_OPTS}" \
 -XX:+UseConcMarkSweepGC \
 "
 
+#Ignite version
+ver="RELEASE-"
+
 # List of default probes.
 # Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
 # BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
@@ -56,7 +59,7 @@ nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo ${DRIVER_HOSTS}
 # Run configuration.
 # Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-int-max-values-onheap-config.xml -nn ${nodesNum} -b 0 -w 0 -d 9999999 -t 1 -sm PRIMARY_SYNC -dn IntMaxValueEntriesTest -sn IgniteNode -ds int-max-values-onheap\
+-cfg ${SCRIPT_DIR}/../config/ignite-int-max-values-onheap-config.xml -nn ${nodesNum} -b 0 -w 0 -d 9999999 -t 1 -sm PRIMARY_SYNC -dn IntMaxValueEntriesTest -sn IgniteNode -ds ${ver}int-max-values-onheap\
 "
 
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/740621af/modules/yardstick/config/test-max-int-values-swap.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/test-max-int-values-swap.properties b/modules/yardstick/config/test-max-int-values-swap.properties
index c462ada..be0aed4 100644
--- a/modules/yardstick/config/test-max-int-values-swap.properties
+++ b/modules/yardstick/config/test-max-int-values-swap.properties
@@ -31,6 +31,9 @@ JVM_OPTS=${JVM_OPTS}" \
 -XX:+UseConcMarkSweepGC \
 "
 
+#Ignite version
+ver="RELEASE-"
+
 # List of default probes.
 # Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
 # BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
@@ -56,6 +59,6 @@ nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo ${DRIVER_HOSTS}
 # Run configuration.
 # Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-int-max-values-swap-config.xml -nn ${nodesNum} -b 0 -w 0 -d 9999999 -t 1 -sm PRIMARY_SYNC -dn IntMaxValueEntriesTest -sn IgniteNode -ds int-max-values-swap\
+-cfg ${SCRIPT_DIR}/../config/ignite-int-max-values-swap-config.xml -nn ${nodesNum} -b 0 -w 0 -d 9999999 -t 1 -sm PRIMARY_SYNC -dn IntMaxValueEntriesTest -sn IgniteNode -ds ${ver}int-max-values-swap\
 "
 


[46/50] [abbrv] ignite git commit: IGNITE-4847: Upgrade log4j2 to version 2.8.1

Posted by dm...@apache.org.
IGNITE-4847: Upgrade log4j2 to version 2.8.1


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

Branch: refs/heads/ignite-1192
Commit: edfa353eba7c87c802df9e32678cb253549949b3
Parents: b99c198
Author: Michael Griggs <en...@gmail.com>
Authored: Mon Apr 10 12:39:49 2017 -0700
Committer: Denis Magda <dm...@gridgain.com>
Committed: Mon Apr 10 12:39:49 2017 -0700

----------------------------------------------------------------------
 modules/log4j2/pom.xml                          |  4 ++--
 .../ignite/logger/log4j2/Log4J2Logger.java      | 23 +++++++++++++++-----
 2 files changed, 20 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/edfa353e/modules/log4j2/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j2/pom.xml b/modules/log4j2/pom.xml
index 5b0e989..5c6e7c4 100644
--- a/modules/log4j2/pom.xml
+++ b/modules/log4j2/pom.xml
@@ -52,13 +52,13 @@
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>
             <artifactId>log4j-api</artifactId>
-            <version>2.3</version>
+            <version>2.8.1</version>
         </dependency>
 
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>
             <artifactId>log4j-core</artifactId>
-            <version>2.3</version>
+            <version>2.8.1</version>
         </dependency>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/edfa353e/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
----------------------------------------------------------------------
diff --git a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java b/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
index ffe8e1b..dff3179 100644
--- a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
+++ b/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
@@ -353,18 +353,31 @@ public class Log4J2Logger implements IgniteLogger, LoggerNodeIdAware {
 
         Configuration cfg = ctx.getConfiguration();
 
-        PatternLayout layout = PatternLayout.createLayout("[%d{ABSOLUTE}][%-5p][%t][%c{1}] %m%n", null, null,
-            Charset.defaultCharset(), false, false, null, null);
+        PatternLayout.Builder builder = PatternLayout.newBuilder();
+
+        builder
+            .withPattern("%d{ABSOLUTE}][%-5p][%t][%c{1}] %m%n")
+            .withCharset(Charset.defaultCharset())
+            .withAlwaysWriteExceptions(false)
+            .withNoConsoleNoAnsi(false);
+
+        PatternLayout layout = builder.build();
+
+        ConsoleAppender.Builder consoleAppenderBuilder = ConsoleAppender.newBuilder();
+
+        consoleAppenderBuilder
+            .withName(CONSOLE_APPENDER)
+            .withLayout(layout);
+
+        ConsoleAppender consoleApp = consoleAppenderBuilder.build();
 
-        final Appender consoleApp = ConsoleAppender.createAppender(layout, null, null, CONSOLE_APPENDER, null, null);
         consoleApp.start();
 
         AppenderRef ref = AppenderRef.createAppenderRef(CONSOLE_APPENDER, Level.TRACE, null);
 
         AppenderRef[] refs = {ref};
 
-        LoggerConfig logCfg = LoggerConfig.createLogger("false", Level.INFO, LogManager.ROOT_LOGGER_NAME, "",
-            refs, null, null, null);
+        LoggerConfig logCfg = LoggerConfig.createLogger(false, Level.INFO, LogManager.ROOT_LOGGER_NAME, "", refs, null, null, null);
 
         logCfg.addAppender(consoleApp, null, null);
         cfg.addAppender(consoleApp);


[09/50] [abbrv] ignite git commit: Fix for CPP

Posted by dm...@apache.org.
Fix for CPP


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

Branch: refs/heads/ignite-1192
Commit: 9bb48ee0f53afb60f147f733747ec4d402f9a4f0
Parents: f223d3e
Author: Igor Sapego <is...@gridgain.com>
Authored: Mon Apr 3 14:53:16 2017 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Mon Apr 3 14:53:46 2017 +0300

----------------------------------------------------------------------
 modules/platforms/cpp/core/src/impl/ignite_environment.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9bb48ee0/modules/platforms/cpp/core/src/impl/ignite_environment.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/ignite_environment.cpp b/modules/platforms/cpp/core/src/impl/ignite_environment.cpp
index 4e2a1f2..8457bbb 100644
--- a/modules/platforms/cpp/core/src/impl/ignite_environment.cpp
+++ b/modules/platforms/cpp/core/src/impl/ignite_environment.cpp
@@ -356,7 +356,7 @@ namespace ignite
             InteropOutputStream outStream(mem.Get());
             BinaryWriterImpl writer(&outStream, GetTypeManager());
 
-            BinaryObjectImpl binFilter = BinaryObjectImpl::FromMemory(*mem.Get(), inStream.Position());
+            BinaryObjectImpl binFilter = BinaryObjectImpl::FromMemory(*mem.Get(), inStream.Position(), metaMgr);
 
             int32_t filterId = binFilter.GetTypeId();
 


[25/50] [abbrv] ignite git commit: IGNITE-4906 .NET: Fixed hanging examples tests

Posted by dm...@apache.org.
IGNITE-4906 .NET: Fixed hanging examples tests


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

Branch: refs/heads/ignite-1192
Commit: b4653012be2b251a6afa895c1273a833ca8918d6
Parents: 037bca6
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Thu Apr 6 11:53:24 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Thu Apr 6 11:53:24 2017 +0300

----------------------------------------------------------------------
 .../Binary/BinaryDynamicRegistrationTest.cs     | 50 ++++++++++++++++++--
 .../Examples/ExamplesTest.cs                    | 22 +++++++--
 .../examples/Apache.Ignite.Examples/App.config  |  4 +-
 .../Datagrid/MultiTieredCacheExample.cs         |  4 +-
 .../Misc/ClientReconnectExample.cs              | 38 ++++++++++-----
 5 files changed, 94 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b4653012/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryDynamicRegistrationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryDynamicRegistrationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryDynamicRegistrationTest.cs
index 10e6e0b..dc5e7df 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryDynamicRegistrationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryDynamicRegistrationTest.cs
@@ -230,11 +230,19 @@ namespace Apache.Ignite.Core.Tests.Binary
         {
             using (var ignite1 = Ignition.Start(TestUtils.GetTestConfiguration()))
             {
-                using (var ignite2 = Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration())
+                var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
                 {
                     IgniteInstanceName = "grid2",
                     ClientMode = clientMode
-                }))
+                };
+
+                using (var ignite2 = Ignition.Start(cfg))
+                {
+                    Test(ignite1, ignite2);
+                }
+
+                // Test twice to verify double registration.
+                using (var ignite2 = Ignition.Start(cfg))
                 {
                     Test(ignite1, ignite2);
                 }
@@ -242,6 +250,40 @@ namespace Apache.Ignite.Core.Tests.Binary
         }
 
         /// <summary>
+        /// Tests the situation where newly joined node attempts registration of a known type.
+        /// </summary>
+        [Test]
+        public void TestTwoGridsStartStop([Values(false, true)] bool clientMode)
+        {
+            using (Ignition.Start(TestUtils.GetTestConfiguration()))
+            {
+                var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
+                {
+                    IgniteInstanceName = "grid2",
+                    ClientMode = clientMode
+                };
+
+                using (var ignite2 = Ignition.Start(cfg))
+                {
+                    var cache = ignite2.CreateCache<int, Foo>("foos");
+
+                    cache[1] = new Foo();
+                }
+
+                using (var ignite2 = Ignition.Start(cfg))
+                {
+                    var cache = ignite2.GetCache<int, Foo>("foos");
+
+                    // ignite2 does not know that Foo class is registered in cluster, and attempts to register.
+                    cache[2] = new Foo();
+
+                    Assert.AreEqual(0, cache[1].Int);
+                    Assert.AreEqual(0, cache[2].Int);
+                }
+            }
+        }
+
+        /// <summary>
         /// Tests interop scenario: Java and .NET exchange an object with the same type id, 
         /// but marshaller cache contains different entries for different platforms for the same id.
         /// </summary>
@@ -283,12 +325,12 @@ namespace Apache.Ignite.Core.Tests.Binary
             const string cacheName = "cache";
 
             // Put on one grid.
-            var cache1 = ignite1.CreateCache<int, object>(cacheName);
+            var cache1 = ignite1.GetOrCreateCache<int, object>(cacheName);
             cache1[1] = new Foo {Int = 1, Str = "1"};
             cache1[2] = ignite1.GetBinary().GetBuilder(typeof (Bar)).SetField("Int", 5).SetField("Str", "s").Build();
 
             // Get on another grid.
-            var cache2 = ignite2.GetCache<int, Foo>(cacheName);
+            var cache2 = ignite2.GetOrCreateCache<int, Foo>(cacheName);
             var foo = cache2[1];
 
             Assert.AreEqual(1, foo.Int);

http://git-wip-us.apache.org/repos/asf/ignite/blob/b4653012/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
index 56a17a3..e041fd7 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
@@ -43,11 +43,15 @@ namespace Apache.Ignite.Core.Tests.Examples
         /** */
         private static readonly string[] NoDllExamples = { "BinaryModeExample", "NearCacheExample" };
 
+        /** Config file path. */
+        private string _configPath;
+
         /** */
         private IDisposable _changedConfig;
 
         /** */
         private bool _remoteNodeStarted;
+
         /// <summary>
         /// Tests the example in a single node mode.
         /// </summary>
@@ -121,12 +125,12 @@ namespace Apache.Ignite.Core.Tests.Examples
             Ignition.ClientMode = false;
 
             using (var ignite = Ignition.StartFromApplicationConfiguration(
-                "igniteConfiguration", PathUtil.ExamplesAppConfigPath))
+                "igniteConfiguration", _configPath))
             {
                 var args = new List<string>
                 {
-                    "-configFileName=" + PathUtil.ExamplesAppConfigPath,
-                    " -assembly=" + typeof(AverageSalaryJob).Assembly.Location
+                    "-configFileName=" + _configPath,
+                    "-assembly=" + typeof(AverageSalaryJob).Assembly.Location
                 };
 
                 var proc = new IgniteProcess(args.ToArray());
@@ -163,7 +167,15 @@ namespace Apache.Ignite.Core.Tests.Examples
 
             Directory.SetCurrentDirectory(PathUtil.IgniteHome);
 
-            _changedConfig = TestAppConfig.Change(PathUtil.ExamplesAppConfigPath);
+            // Copy file to a temp location and replace multicast IP finder with static.
+            _configPath = Path.GetTempFileName();
+            
+            var configText = File.ReadAllText(PathUtil.ExamplesAppConfigPath)
+                .Replace("TcpDiscoveryMulticastIpFinder", "TcpDiscoveryStaticIpFinder");
+
+            File.WriteAllText(_configPath, configText);
+
+            _changedConfig = TestAppConfig.Change(_configPath);
         }
 
         /// <summary>
@@ -177,6 +189,8 @@ namespace Apache.Ignite.Core.Tests.Examples
             Ignition.StopAll(true);
 
             IgniteProcess.KillAll();
+
+            File.Delete(_configPath);
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b4653012/modules/platforms/dotnet/examples/Apache.Ignite.Examples/App.config
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/App.config b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/App.config
index e3bc79d..ffec1ec 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/App.config
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/App.config
@@ -26,13 +26,13 @@
         <gcServer enabled="true" />
     </runtime>
 
-    <igniteConfiguration xmlns="http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection">
+    <igniteConfiguration xmlns="http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection" localhost="127.0.0.1">
         <atomicConfiguration atomicSequenceReserveSize="10" />
 
         <discoverySpi type="TcpDiscoverySpi">
             <ipFinder type="TcpDiscoveryMulticastIpFinder">
                 <endpoints>
-                    <string>127.0.0.1:47500</string>
+                    <string>127.0.0.1:47500..47502</string>
                 </endpoints>
             </ipFinder>
         </discoverySpi>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b4653012/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
index 629ed89..f905d86 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
@@ -26,7 +26,7 @@ namespace Apache.Ignite.Examples.Datagrid
     using Apache.Ignite.Core.Cache.Configuration;
     using Apache.Ignite.Core.Cache.Eviction;
     using Apache.Ignite.Core.Discovery.Tcp;
-    using Apache.Ignite.Core.Discovery.Tcp.Multicast;
+    using Apache.Ignite.Core.Discovery.Tcp.Static;
     using Apache.Ignite.Core.SwapSpace.File;
 
     /// <summary>
@@ -64,7 +64,7 @@ namespace Apache.Ignite.Examples.Datagrid
             {
                 DiscoverySpi = new TcpDiscoverySpi
                 {
-                    IpFinder = new TcpDiscoveryMulticastIpFinder
+                    IpFinder = new TcpDiscoveryStaticIpFinder
                     {
                         Endpoints = new[] { "127.0.0.1:47500" }
                     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/b4653012/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs
index fca0f9f..f6e1b4d 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs
@@ -50,9 +50,15 @@ namespace Apache.Ignite.Examples.Misc
             var evt = new ManualResetEvent(false);
             ThreadPool.QueueUserWorkItem(_ => RunServer(evt));
 
-            Ignition.ClientMode = true;
+            // Wait a moment for server to begin startup.
+            Thread.Sleep(200);
 
-            using (var ignite = Ignition.StartFromApplicationConfiguration())
+            var cfg = new IgniteConfiguration(GetIgniteConfiguration())
+            {
+                ClientMode = true
+            };
+
+            using (var ignite = Ignition.Start(cfg))
             {
                 Console.WriteLine(">>> Client node connected to the cluster.");
 
@@ -110,20 +116,11 @@ namespace Apache.Ignite.Examples.Misc
         /// <param name="evt"></param>
         private static void RunServer(WaitHandle evt)
         {
-            var cfg = new IgniteConfiguration
+            var cfg = new IgniteConfiguration(GetIgniteConfiguration())
             {
                 // Nodes within a single process are distinguished by GridName property.
                 IgniteInstanceName = "serverNode",
 
-                // Discovery settings are the same as in app.config.
-                DiscoverySpi = new TcpDiscoverySpi
-                {
-                    IpFinder = new TcpDiscoveryStaticIpFinder
-                    {
-                        Endpoints = new[] {"127.0.0.1:47500"}
-                    }
-                },
-
                 CacheConfiguration = new[] {new CacheConfiguration(CacheName)},
 
                 IncludedEventTypes = new[] {EventType.NodeJoined}
@@ -155,5 +152,22 @@ namespace Apache.Ignite.Examples.Misc
                 evt.WaitOne();
             }
         }
+
+        /// <summary>
+        /// Gets the base Ignite configuration.
+        /// </summary>
+        private static IgniteConfiguration GetIgniteConfiguration()
+        {
+            return new IgniteConfiguration
+            {
+                DiscoverySpi = new TcpDiscoverySpi
+                {
+                    IpFinder = new TcpDiscoveryStaticIpFinder
+                    {
+                        Endpoints = new[] { "127.0.0.1:47500" }
+                    }
+                }
+            };
+        }
     }
 }


[30/50] [abbrv] ignite git commit: IGNITE-4349 Discontinue the schema-import utility.

Posted by dm...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/OracleMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/OracleMetadataDialect.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/OracleMetadataDialect.java
new file mode 100644
index 0000000..1722948
--- /dev/null
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/db/dialect/OracleMetadataDialect.java
@@ -0,0 +1,359 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.console.agent.db.dialect;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.ignite.cache.QueryIndex;
+import org.apache.ignite.console.agent.db.DbColumn;
+import org.apache.ignite.console.agent.db.DbTable;
+
+import static java.sql.Types.BIGINT;
+import static java.sql.Types.BLOB;
+import static java.sql.Types.BOOLEAN;
+import static java.sql.Types.CHAR;
+import static java.sql.Types.CLOB;
+import static java.sql.Types.DATE;
+import static java.sql.Types.DOUBLE;
+import static java.sql.Types.FLOAT;
+import static java.sql.Types.INTEGER;
+import static java.sql.Types.LONGVARBINARY;
+import static java.sql.Types.LONGVARCHAR;
+import static java.sql.Types.NUMERIC;
+import static java.sql.Types.OTHER;
+import static java.sql.Types.SMALLINT;
+import static java.sql.Types.SQLXML;
+import static java.sql.Types.TIMESTAMP;
+import static java.sql.Types.TINYINT;
+import static java.sql.Types.VARCHAR;
+
+/**
+ * Oracle specific metadata dialect.
+ */
+public class OracleMetadataDialect extends DatabaseMetadataDialect {
+    /** SQL to get columns metadata. */
+    private static final String SQL_COLUMNS = "SELECT a.owner, a.table_name, a.column_name, a.nullable," +
+        " a.data_type, a.data_precision, a.data_scale " +
+        "FROM all_tab_columns a %s " +
+        " %s " +
+        " ORDER BY a.owner, a.table_name, a.column_id";
+
+    /** SQL to get list of PRIMARY KEYS columns. */
+    private static final String SQL_PRIMARY_KEYS = "SELECT b.column_name" +
+        " FROM all_constraints a" +
+        "  INNER JOIN all_cons_columns b ON a.owner = b.owner AND a.constraint_name = b.constraint_name" +
+        " WHERE a.owner = ? and a.table_name = ? AND a.constraint_type = 'P'";
+
+    /** SQL to get indexes metadata. */
+    private static final String SQL_INDEXES = "SELECT i.index_name, u.column_expression, i.column_name, i.descend" +
+        " FROM all_ind_columns i" +
+        " LEFT JOIN user_ind_expressions u on u.index_name = i.index_name and i.table_name = u.table_name" +
+        " WHERE i.index_owner = ? and i.table_name = ?" +
+        " ORDER BY i.index_name, i.column_position";
+
+    /** Owner index. */
+    private static final int OWNER_IDX = 1;
+
+    /** Table name index. */
+    private static final int TBL_NAME_IDX = 2;
+
+    /** Column name index. */
+    private static final int COL_NAME_IDX = 3;
+
+    /** Nullable index. */
+    private static final int NULLABLE_IDX = 4;
+
+    /** Data type index. */
+    private static final int DATA_TYPE_IDX = 5;
+
+    /** Numeric precision index. */
+    private static final int DATA_PRECISION_IDX = 6;
+
+    /** Numeric scale index. */
+    private static final int DATA_SCALE_IDX = 7;
+
+    /** Index name index. */
+    private static final int IDX_NAME_IDX = 1;
+
+    /** Index name index. */
+    private static final int IDX_EXPR_IDX = 2;
+
+    /** Index column name index. */
+    private static final int IDX_COL_NAME_IDX = 3;
+
+    /** Index column sort order index. */
+    private static final int IDX_COL_DESCEND_IDX = 4;
+
+    /** {@inheritDoc} */
+    @Override public Set<String> systemSchemas() {
+        return new HashSet<>(Arrays.asList("ANONYMOUS", "CTXSYS", "DBSNMP", "EXFSYS", "LBACSYS", "MDSYS", "MGMT_VIEW",
+            "OLAPSYS", "OWBSYS", "ORDPLUGINS", "ORDSYS", "OUTLN", "SI_INFORMTN_SCHEMA", "SYS", "SYSMAN", "SYSTEM",
+            "TSMSYS", "WK_TEST", "WKSYS", "WKPROXY", "WMSYS", "XDB",
+
+            "APEX_040000", "APEX_PUBLIC_USER", "DIP", "FLOWS_30000", "FLOWS_FILES", "MDDATA", "ORACLE_OCM",
+            "SPATIAL_CSW_ADMIN_USR", "SPATIAL_WFS_ADMIN_USR", "XS$NULL",
+
+            "BI", "HR", "OE", "PM", "IX", "SH"));
+    }
+
+    /** {@inheritDoc} */
+    @Override public Collection<String> schemas(Connection conn) throws SQLException {
+        Collection<String> schemas = new ArrayList<>();
+
+        ResultSet rs = conn.getMetaData().getSchemas();
+
+        Set<String> sysSchemas = systemSchemas();
+
+        while(rs.next()) {
+            String schema = rs.getString(1);
+
+            if (!sysSchemas.contains(schema) && !schema.startsWith("FLOWS_"))
+                schemas.add(schema);
+        }
+
+        return schemas;
+    }
+
+    /**
+     * @param rs Result set with column type metadata from Oracle database.
+     * @return JDBC type.
+     * @throws SQLException If failed to decode type.
+     */
+    private int decodeType(ResultSet rs) throws SQLException {
+        String type = rs.getString(DATA_TYPE_IDX);
+
+        if (type.startsWith("TIMESTAMP"))
+            return TIMESTAMP;
+        else {
+            switch (type) {
+                case "CHAR":
+                case "NCHAR":
+                    return CHAR;
+
+                case "VARCHAR2":
+                case "NVARCHAR2":
+                    return VARCHAR;
+
+                case "LONG":
+                    return LONGVARCHAR;
+
+                case "LONG RAW":
+                    return LONGVARBINARY;
+
+                case "FLOAT":
+                    return FLOAT;
+
+                case "NUMBER":
+                    int precision = rs.getInt(DATA_PRECISION_IDX);
+                    int scale = rs.getInt(DATA_SCALE_IDX);
+
+                    if (scale > 0) {
+                        if (scale < 4 && precision < 19)
+                            return FLOAT;
+
+                        if (scale > 4 || precision > 19)
+                            return DOUBLE;
+
+                        return NUMERIC;
+                    }
+                    else {
+                        if (precision < 1)
+                            return INTEGER;
+
+                        if (precision < 2)
+                            return BOOLEAN;
+
+                        if (precision < 4)
+                            return TINYINT;
+
+                        if (precision < 6)
+                            return SMALLINT;
+
+                        if (precision < 11)
+                            return INTEGER;
+
+                        if (precision < 20)
+                            return BIGINT;
+
+                        return NUMERIC;
+                    }
+
+                case "DATE":
+                    return DATE;
+
+                case "BFILE":
+                case "BLOB":
+                    return BLOB;
+
+                case "CLOB":
+                case "NCLOB":
+                    return CLOB;
+
+                case "XMLTYPE":
+                    return SQLXML;
+            }
+        }
+
+        return OTHER;
+    }
+
+    /**
+     * Retrieve primary key columns.
+     *
+     * @param stmt Prepared SQL statement to execute.
+     * @param owner DB owner.
+     * @param tbl Table name.
+     * @return Primary key columns.
+     * @throws SQLException If failed to retrieve primary key columns.
+     */
+    private Set<String> primaryKeys(PreparedStatement stmt, String owner, String tbl) throws SQLException {
+        Set<String> pkCols = new HashSet<>();
+
+        stmt.setString(1, owner);
+        stmt.setString(2, tbl);
+
+        try (ResultSet pkRs = stmt.executeQuery()) {
+            while(pkRs.next())
+                pkCols.add(pkRs.getString(1));
+        }
+
+        return pkCols;
+    }
+
+    /**
+     * Retrieve index columns.
+     *
+     * @param stmt Prepared SQL statement to execute.
+     * @param owner DB owner.
+     * @param tbl Table name.
+     * @return Indexes.
+     * @throws SQLException If failed to retrieve indexes columns.
+     */
+    private Collection<QueryIndex> indexes(PreparedStatement stmt, String owner, String tbl) throws SQLException {
+        Map<String, QueryIndex> idxs = new LinkedHashMap<>();
+
+        stmt.setString(1, owner);
+        stmt.setString(2, tbl);
+
+        try (ResultSet idxsRs = stmt.executeQuery()) {
+            while (idxsRs.next()) {
+                String idxName = idxsRs.getString(IDX_NAME_IDX);
+
+                QueryIndex idx = idxs.get(idxName);
+
+                if (idx == null) {
+                    idx = index(idxName);
+
+                    idxs.put(idxName, idx);
+                }
+
+                String expr = idxsRs.getString(IDX_EXPR_IDX);
+
+                String col = expr == null ? idxsRs.getString(IDX_COL_NAME_IDX) : expr.replaceAll("\"", "");
+
+                idx.getFields().put(col, !"DESC".equals(idxsRs.getString(IDX_COL_DESCEND_IDX)));
+            }
+        }
+
+        return idxs.values();
+    }
+
+    /** {@inheritDoc} */
+    @Override public Collection<DbTable> tables(Connection conn, List<String> schemas, boolean tblsOnly)
+        throws SQLException {
+        Collection<DbTable> tbls = new ArrayList<>();
+
+        PreparedStatement pkStmt = conn.prepareStatement(SQL_PRIMARY_KEYS);
+
+        PreparedStatement idxStmt = conn.prepareStatement(SQL_INDEXES);
+
+        if (schemas.isEmpty())
+            schemas.add(null);
+
+        Set<String> sysSchemas = systemSchemas();
+
+        try (Statement colsStmt = conn.createStatement()) {
+            for (String schema: schemas) {
+                if (systemSchemas().contains(schema) || (schema != null && schema.startsWith("FLOWS_")))
+                    continue;
+
+                Collection<DbColumn> cols = new ArrayList<>();
+
+                Set<String> pkCols = Collections.emptySet();
+                Collection<QueryIndex> idxs = Collections.emptyList();
+
+                String sql = String.format(SQL_COLUMNS,
+                        tblsOnly ? "INNER JOIN all_tables b on a.table_name = b.table_name and a.owner = b.owner" : "",
+                        schema != null ? String.format(" WHERE a.owner = '%s' ", schema) : "");
+
+                try (ResultSet colsRs = colsStmt.executeQuery(sql)) {
+                    String prevSchema = "";
+                    String prevTbl = "";
+
+                    boolean first = true;
+
+                    while (colsRs.next()) {
+                        String owner = colsRs.getString(OWNER_IDX);
+                        String tbl = colsRs.getString(TBL_NAME_IDX);
+
+                        if (sysSchemas.contains(owner) || (schema != null && schema.startsWith("FLOWS_")))
+                            continue;
+
+                        boolean changed = !owner.equals(prevSchema) || !tbl.equals(prevTbl);
+
+                        if (changed) {
+                            if (first)
+                                first = false;
+                            else
+                                tbls.add(table(prevSchema, prevTbl, cols, idxs));
+
+                            prevSchema = owner;
+                            prevTbl = tbl;
+                            cols = new ArrayList<>();
+                            pkCols = primaryKeys(pkStmt, owner, tbl);
+                            idxs = indexes(idxStmt, owner, tbl);
+                        }
+
+                        String colName = colsRs.getString(COL_NAME_IDX);
+
+                        cols.add(new DbColumn(colName, decodeType(colsRs), pkCols.contains(colName),
+                            !"N".equals(colsRs.getString(NULLABLE_IDX)), false));
+                    }
+
+                    if (!cols.isEmpty())
+                        tbls.add(table(prevSchema, prevTbl, cols, idxs));
+                }
+            }
+        }
+
+        return tbls;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/DatabaseListener.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/DatabaseListener.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/DatabaseListener.java
index 4577228..a0e9f8f 100644
--- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/DatabaseListener.java
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/handlers/DatabaseListener.java
@@ -34,8 +34,8 @@ import java.util.Map;
 import java.util.Properties;
 import org.apache.ignite.console.agent.AgentConfiguration;
 import org.apache.ignite.console.demo.AgentMetadataDemo;
-import org.apache.ignite.schema.parser.DbMetadataReader;
-import org.apache.ignite.schema.parser.DbTable;
+import org.apache.ignite.console.agent.db.DbMetadataReader;
+import org.apache.ignite.console.agent.db.DbTable;
 import org.apache.log4j.Logger;
 
 import static org.apache.ignite.console.agent.AgentUtils.resolvePath;
@@ -51,6 +51,9 @@ public class DatabaseListener {
     private final File driversFolder;
 
     /** */
+    private final DbMetadataReader dbMetaReader;
+
+    /** */
     private final AbstractListener schemasLsnr = new AbstractListener() {
         @Override public Object execute(Map<String, Object> args) throws Exception {
             String driverPath = null;
@@ -79,6 +82,7 @@ public class DatabaseListener {
         }
     };
 
+    /** */
     private final AbstractListener metadataLsnr = new AbstractListener() {
         @SuppressWarnings("unchecked")
         @Override public Object execute(Map<String, Object> args) throws Exception {
@@ -118,6 +122,7 @@ public class DatabaseListener {
         }
     };
 
+    /** */
     private final AbstractListener availableDriversLsnr = new AbstractListener() {
         @Override public Object execute(Map<String, Object> args) throws Exception {
             if (driversFolder == null) {
@@ -176,6 +181,7 @@ public class DatabaseListener {
      */
     public DatabaseListener(AgentConfiguration cfg) {
         driversFolder = resolvePath(cfg.driversFolder() == null ? "jdbc-drivers" : cfg.driversFolder());
+        dbMetaReader = new DbMetadataReader();
     }
 
     /**
@@ -184,7 +190,7 @@ public class DatabaseListener {
      * @param jdbcUrl JDBC URL.
      * @param jdbcInfo Properties to connect to database.
      * @return Connection to database.
-     * @throws SQLException
+     * @throws SQLException If failed to connect.
      */
     private Connection connect(String jdbcDriverJarPath, String jdbcDriverCls, String jdbcUrl,
         Properties jdbcInfo) throws SQLException {
@@ -194,7 +200,7 @@ public class DatabaseListener {
         if (!new File(jdbcDriverJarPath).isAbsolute() && driversFolder != null)
             jdbcDriverJarPath = new File(driversFolder, jdbcDriverJarPath).getPath();
 
-        return DbMetadataReader.getInstance().connect(jdbcDriverJarPath, jdbcDriverCls, jdbcUrl, jdbcInfo);
+        return dbMetaReader.connect(jdbcDriverJarPath, jdbcDriverCls, jdbcUrl, jdbcInfo);
     }
 
     /**
@@ -203,7 +209,7 @@ public class DatabaseListener {
      * @param jdbcUrl JDBC URL.
      * @param jdbcInfo Properties to connect to database.
      * @return Collection of schema names.
-     * @throws SQLException
+     * @throws SQLException If failed to load schemas.
      */
     protected Collection<String> schemas(String jdbcDriverJarPath, String jdbcDriverCls, String jdbcUrl,
         Properties jdbcInfo) throws SQLException {
@@ -212,7 +218,7 @@ public class DatabaseListener {
                 ", drvCls=" + jdbcDriverCls + ", jdbcUrl=" + jdbcUrl + "]");
 
         try (Connection conn = connect(jdbcDriverJarPath, jdbcDriverCls, jdbcUrl, jdbcInfo)) {
-            Collection<String> schemas = DbMetadataReader.getInstance().schemas(conn);
+            Collection<String> schemas = dbMetaReader.schemas(conn);
 
             if (log.isDebugEnabled())
                 log.debug("Finished collection of schemas [jdbcUrl=" + jdbcUrl + ", count=" + schemas.size() + "]");
@@ -261,7 +267,7 @@ public class DatabaseListener {
                 ", drvCls=" + jdbcDriverCls + ", jdbcUrl=" + jdbcUrl + "]");
 
         try (Connection conn = connect(jdbcDriverJarPath, jdbcDriverCls, jdbcUrl, jdbcInfo)) {
-            Collection<DbTable> metadata = DbMetadataReader.getInstance().metadata(conn, schemas, tblsOnly);
+            Collection<DbTable> metadata = dbMetaReader.metadata(conn, schemas, tblsOnly);
 
             if (log.isDebugEnabled())
                 log.debug("Finished collection of metadata [jdbcUrl=" + jdbcUrl + ", count=" + metadata.size() + "]");

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 04226b9..41338dd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -340,11 +340,6 @@
                                             <substitution expression="${project.version}" />
                                         </replaceregexp>
 
-                                        <replaceregexp file="${basedir}/target/release-package/examples/schema-import/pom.xml" byline="true">
-                                            <regexp pattern="to_be_replaced_by_ignite_version" />
-                                            <substitution expression="${project.version}" />
-                                        </replaceregexp>
-
                                         <chmod dir="${basedir}/target/release-package" perm="755" includes="**/*.sh" />
 
                                         <!--
@@ -605,7 +600,6 @@
             <id>examples</id>
             <modules>
                 <module>examples</module>
-                <module>examples/schema-import</module>
             </modules>
         </profile>
 
@@ -788,125 +782,10 @@
         </profile>
 
         <profile>
-            <id>java8-schema-import</id>
-            <activation>
-                <file>
-                    <exists>${java.home}/lib/ext/jfxrt.jar</exists>
-                </file>
-            </activation>
-            <modules>
-                <module>modules/schema-import</module>
-                <module>modules/schema-import-db</module>
-            </modules>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-assembly-plugin</artifactId>
-                        <version>2.4</version>
-                        <inherited>false</inherited>
-
-                        <executions>
-                            <execution>
-                                <id>dependencies-schema-import</id>
-                                <phase>prepare-package</phase>
-                                <goals>
-                                    <goal>single</goal>
-                                </goals>
-                                <configuration>
-                                    <descriptors>
-                                        <descriptor>assembly/dependencies-schema-import.xml</descriptor>
-                                    </descriptors>
-                                    <outputDirectory>target/release-package/bin</outputDirectory>
-                                    <finalName>include</finalName>
-                                    <appendAssemblyId>false</appendAssemblyId>
-                                </configuration>
-                            </execution>
-
-                            <execution>
-                                <id>schema-import-scripts</id>
-                                <phase>prepare-package</phase>
-                                <goals>
-                                    <goal>single</goal>
-                                </goals>
-                                <configuration>
-                                    <descriptors>
-                                        <descriptor>assembly/release-schema-import.xml</descriptor>
-                                    </descriptors>
-                                    <outputDirectory>target/release-package</outputDirectory>
-                                    <finalName>bin</finalName>
-                                    <appendAssemblyId>false</appendAssemblyId>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-
-        <profile>
-            <id>schema-import</id>
-            <activation>
-                <file>
-                    <exists>${java.home}/lib/jfxrt.jar</exists>
-                </file>
-            </activation>
-            <modules>
-                <module>modules/schema-import</module>
-                <module>modules/schema-import-db</module>
-            </modules>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-assembly-plugin</artifactId>
-                        <version>2.4</version>
-                        <inherited>false</inherited>
-
-                        <executions>
-                            <execution>
-                                <id>dependencies-schema-import</id>
-                                <phase>prepare-package</phase>
-                                <goals>
-                                    <goal>single</goal>
-                                </goals>
-                                <configuration>
-                                    <descriptors>
-                                        <descriptor>assembly/dependencies-schema-import.xml</descriptor>
-                                    </descriptors>
-                                    <outputDirectory>target/release-package/bin</outputDirectory>
-                                    <finalName>include</finalName>
-                                    <appendAssemblyId>false</appendAssemblyId>
-                                </configuration>
-                            </execution>
-
-                            <execution>
-                                <id>schema-import-scripts</id>
-                                <phase>prepare-package</phase>
-                                <goals>
-                                    <goal>single</goal>
-                                </goals>
-                                <configuration>
-                                    <descriptors>
-                                        <descriptor>assembly/release-schema-import.xml</descriptor>
-                                    </descriptors>
-                                    <outputDirectory>target/release-package</outputDirectory>
-                                    <finalName>bin</finalName>
-                                    <appendAssemblyId>false</appendAssemblyId>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-
-        <profile>
             <id>web-console</id>
             <modules>
                 <module>modules/web-console</module>
                 <module>modules/web-console/web-agent</module>
-                <module>modules/schema-import-db</module>
             </modules>
         </profile>
 


[11/50] [abbrv] ignite git commit: IGNITE-3585: CPP: Container-based methods now accept iterators

Posted by dm...@apache.org.
IGNITE-3585: CPP: Container-based methods now accept iterators


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

Branch: refs/heads/ignite-1192
Commit: d34a4d06dcab2b23cfc07544102f75f1b9d47d10
Parents: ece4928
Author: Igor Sapego <is...@gridgain.com>
Authored: Mon Apr 3 16:15:58 2017 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Mon Apr 3 16:39:01 2017 +0300

----------------------------------------------------------------------
 .../include/ignite/impl/binary/binary_utils.h   |  13 +-
 .../cpp/core-test/include/ignite/test_utils.h   |  11 +
 .../cpp/core-test/src/cache_query_test.cpp      | 225 ++++++++++++++-----
 .../platforms/cpp/core-test/src/cache_test.cpp  | 204 +++++++++++++++++
 .../cpp/core-test/src/cluster_test.cpp          |   4 +-
 .../cpp/core/include/ignite/cache/cache.h       | 161 +++++++++++++
 .../cpp/core/include/ignite/cache/cache_entry.h |  15 ++
 .../include/ignite/cache/query/query_cursor.h   |  28 ++-
 .../ignite/impl/cache/query/query_impl.h        |   7 +
 .../cpp/core/include/ignite/impl/helpers.h      |  57 +++++
 .../cpp/core/include/ignite/impl/operations.h   | 136 ++++++++++-
 .../platforms/cpp/core/project/vs/core.vcxproj  |   1 +
 .../cpp/core/project/vs/core.vcxproj.filters    |   3 +
 .../core/src/impl/cache/query/query_impl.cpp    |  39 +++-
 14 files changed, 830 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d34a4d06/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h
index 6cd90b0..268c2d8 100644
--- a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h
+++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h
@@ -20,14 +20,15 @@
 
 #include <stdint.h>
 
-#include "ignite/common/utils.h"
+#include <ignite/common/utils.h>
 
-#include "ignite/guid.h"
-#include "ignite/date.h"
-#include "ignite/timestamp.h"
-#include "ignite/time.h"
+#include <ignite/guid.h>
+#include <ignite/date.h>
+#include <ignite/timestamp.h>
+#include <ignite/time.h>
 
-#include "ignite/binary/binary_type.h"
+#include <ignite/binary/binary_type.h>
+#include <ignite/impl/binary/binary_writer_impl.h>
 
 namespace ignite
 {

http://git-wip-us.apache.org/repos/asf/ignite/blob/d34a4d06/modules/platforms/cpp/core-test/include/ignite/test_utils.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/include/ignite/test_utils.h b/modules/platforms/cpp/core-test/include/ignite/test_utils.h
index 2336626..67fda95 100644
--- a/modules/platforms/cpp/core-test/include/ignite/test_utils.h
+++ b/modules/platforms/cpp/core-test/include/ignite/test_utils.h
@@ -58,6 +58,17 @@ namespace ignite_test
      * @return New node.
      */
     ignite::Ignite StartNode(const char* cfgFile, const char* name);
+
+    /**
+     * Check if the error is generic.
+     *
+     * @param err Error.
+     * @return True if the error is generic.
+     */
+    inline bool IsGenericError(const ignite::IgniteError& err)
+    {
+        return err.GetCode() == ignite::IgniteError::IGNITE_ERR_GENERIC;
+    }
 }
 
 #endif // _IGNITE_CORE_TEST_TEST_UTILS
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/d34a4d06/modules/platforms/cpp/core-test/src/cache_query_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/cache_query_test.cpp b/modules/platforms/cpp/core-test/src/cache_query_test.cpp
index abb374a..871f66a 100644
--- a/modules/platforms/cpp/core-test/src/cache_query_test.cpp
+++ b/modules/platforms/cpp/core-test/src/cache_query_test.cpp
@@ -20,6 +20,7 @@
 #endif
 
 #include <sstream>
+#include <iterator>
 
 #include <boost/test/unit_test.hpp>
 
@@ -321,16 +322,7 @@ int CountRecords(Cursor& cur)
 template<typename Cursor>
 void CheckHasNextFail(Cursor& cur)
 {
-    try
-    {
-        cur.HasNext();
-
-        BOOST_FAIL("Must fail.");
-    }
-    catch (IgniteError& err)
-    {
-        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_GENERIC);
-    }
+    BOOST_CHECK_EXCEPTION(cur.HasNext(), IgniteError, ignite_test::IsGenericError);
 }
 
 /**
@@ -341,16 +333,7 @@ void CheckHasNextFail(Cursor& cur)
 template<typename Cursor>
 void CheckGetNextFail(Cursor& cur)
 {
-    try
-    {
-        cur.GetNext();
-
-        BOOST_FAIL("Must fail.");
-    }
-    catch (IgniteError& err)
-    {
-        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_GENERIC);
-    }
+    BOOST_CHECK_EXCEPTION(cur.GetNext(), IgniteError, ignite_test::IsGenericError);
 }
 
 /**
@@ -360,18 +343,21 @@ void CheckGetNextFail(Cursor& cur)
  */
 void CheckGetAllFail(QueryCursor<int, QueryPerson>& cur)
 {
-    try 
-    {
-        std::vector<CacheEntry<int, QueryPerson> > res;
+    std::vector<CacheEntry<int, QueryPerson> > res;
 
-        cur.GetAll(res);
+    BOOST_CHECK_EXCEPTION(cur.GetAll(res), IgniteError, ignite_test::IsGenericError);
+}
 
-        BOOST_FAIL("Must fail.");
-    }
-    catch (IgniteError& err)
-    {
-        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_GENERIC);
-    }
+/**
+ * Ensure that iter version of GetAll() fails.
+ *
+ * @param cur Cursor.
+ */
+void CheckGetAllFailIter(QueryCursor<int, QueryPerson>& cur)
+{
+    std::vector<CacheEntry<int, QueryPerson> > res;
+
+    BOOST_CHECK_EXCEPTION(cur.GetAll(std::back_inserter(res)), IgniteError, ignite_test::IsGenericError);
 }
 
 /**
@@ -417,12 +403,29 @@ void CheckEmptyGetAll(QueryCursor<int, QueryPerson>& cur)
 }
 
 /**
+ * Check empty result through iter version of GetAll().
+ *
+ * @param cur Cursor.
+ */
+void CheckEmptyGetAllIter(QueryCursor<int, QueryPerson>& cur)
+{
+    std::vector<CacheEntry<int, QueryPerson> > res;
+
+    cur.GetAll(std::back_inserter(res));
+
+    BOOST_REQUIRE(res.size() == 0);
+
+    CheckHasNextFail(cur);
+    CheckGetNextFail(cur);
+}
+
+/**
  * Check single result through iteration.
  *
  * @param cur Cursor.
- * @param key1 Key.
- * @param name1 Name.
- * @param age1 Age.
+ * @param key Key.
+ * @param name Name.
+ * @param age Age.
  */
 void CheckSingle(QueryCursor<int, QueryPerson>& cur, int key, const std::string& name, int age)
 {
@@ -472,9 +475,9 @@ void CheckSingle(QueryFieldsCursor& cur, int key, const std::string& name, int a
  * Check single result through GetAll().
  *
  * @param cur Cursor.
- * @param key1 Key.
- * @param name1 Name.
- * @param age1 Age.
+ * @param key Key.
+ * @param name Name.
+ * @param age Age.
  */
 void CheckSingleGetAll(QueryCursor<int, QueryPerson>& cur, int key, const std::string& name, int age)
 {
@@ -486,11 +489,40 @@ void CheckSingleGetAll(QueryCursor<int, QueryPerson>& cur, int key, const std::s
     CheckGetNextFail(cur);
     CheckGetAllFail(cur);
 
-    BOOST_REQUIRE(res.size() == 1);
+    BOOST_CHECK_EQUAL(res.size(), 1);
 
-    BOOST_REQUIRE(res[0].GetKey() == 1);    
-    BOOST_REQUIRE(res[0].GetValue().GetName().compare(name) == 0);
-    BOOST_REQUIRE(res[0].GetValue().GetAge() == age);
+    BOOST_CHECK_EQUAL(res[0].GetKey(), key);
+    BOOST_CHECK_EQUAL(res[0].GetValue().GetName(), name);
+    BOOST_CHECK_EQUAL(res[0].GetValue().GetAge(), age);
+
+    CheckHasNextFail(cur);
+    CheckGetNextFail(cur);
+    CheckGetAllFail(cur);
+}
+
+/**
+ * Check single result through iter version of GetAll().
+ *
+ * @param cur Cursor.
+ * @param key Key.
+ * @param name Name.
+ * @param age Age.
+ */
+void CheckSingleGetAllIter(QueryCursor<int, QueryPerson>& cur, int key, const std::string& name, int age)
+{
+    std::vector<CacheEntry<int, QueryPerson> > res;
+
+    cur.GetAll(std::back_inserter(res));
+
+    CheckHasNextFail(cur);
+    CheckGetNextFail(cur);
+    CheckGetAllFail(cur);
+
+    BOOST_CHECK_EQUAL(res.size(), 1);
+
+    BOOST_CHECK_EQUAL(res[0].GetKey(), key);
+    BOOST_CHECK_EQUAL(res[0].GetValue().GetName(), name);
+    BOOST_CHECK_EQUAL(res[0].GetValue().GetAge(), age);
 
     CheckHasNextFail(cur);
     CheckGetNextFail(cur);
@@ -523,18 +555,18 @@ void CheckMultiple(QueryCursor<int, QueryPerson>& cur, int key1, const std::stri
 
         if (entry.GetKey() == key1)
         {
-            BOOST_REQUIRE(entry.GetValue().GetName().compare(name1) == 0);
-            BOOST_REQUIRE(entry.GetValue().GetAge() == age1);            
+            BOOST_CHECK_EQUAL(entry.GetValue().GetName(), name1);
+            BOOST_CHECK_EQUAL(entry.GetValue().GetAge(), age1);
         }
         else if (entry.GetKey() == key2)
         {
-            BOOST_REQUIRE(entry.GetValue().GetName().compare(name2) == 0);
-            BOOST_REQUIRE(entry.GetValue().GetAge() == age2);            
+            BOOST_CHECK_EQUAL(entry.GetValue().GetName(), name2);
+            BOOST_CHECK_EQUAL(entry.GetValue().GetAge(), age2);
         }
         else
             BOOST_FAIL("Unexpected entry.");
     }
-    
+
     BOOST_REQUIRE(!cur.HasNext());
 
     CheckGetNextFail(cur);
@@ -563,7 +595,7 @@ void CheckMultipleGetAll(QueryCursor<int, QueryPerson>& cur, int key1, const std
     CheckGetNextFail(cur);
     CheckGetAllFail(cur);
 
-    BOOST_REQUIRE(res.size() == 2);
+    BOOST_REQUIRE_EQUAL(res.size(), 2);
 
     for (int i = 0; i < 2; i++)
     {
@@ -571,13 +603,56 @@ void CheckMultipleGetAll(QueryCursor<int, QueryPerson>& cur, int key1, const std
 
         if (entry.GetKey() == key1)
         {
-            BOOST_REQUIRE(entry.GetValue().GetName().compare(name1) == 0);
-            BOOST_REQUIRE(entry.GetValue().GetAge() == age1);            
+            BOOST_CHECK_EQUAL(entry.GetValue().GetName(), name1);
+            BOOST_CHECK_EQUAL(entry.GetValue().GetAge(), age1);
         }
         else if (entry.GetKey() == key2)
         {
-            BOOST_REQUIRE(entry.GetValue().GetName().compare(name2) == 0);
-            BOOST_REQUIRE(entry.GetValue().GetAge() == age2);
+            BOOST_CHECK_EQUAL(entry.GetValue().GetName(), name2);
+            BOOST_CHECK_EQUAL(entry.GetValue().GetAge(), age2);
+        }
+        else
+            BOOST_FAIL("Unexpected entry.");
+    }
+}
+
+/**
+ * Check multiple results through iter verion of GetAll().
+ *
+ * @param cur Cursor.
+ * @param key1 Key 1.
+ * @param name1 Name 1.
+ * @param age1 Age 1.
+ * @param key2 Key 2.
+ * @param name2 Name 2.
+ * @param age2 Age 2.
+ */
+void CheckMultipleGetAllIter(QueryCursor<int, QueryPerson>& cur, int key1, const std::string& name1,
+    int age1, int key2, const std::string& name2, int age2)
+{
+    std::vector<CacheEntry<int, QueryPerson> > res;
+
+    cur.GetAll(std::back_inserter(res));
+
+    CheckHasNextFail(cur);
+    CheckGetNextFail(cur);
+    CheckGetAllFail(cur);
+
+    BOOST_REQUIRE_EQUAL(res.size(), 2);
+
+    for (int i = 0; i < 2; i++)
+    {
+        CacheEntry<int, QueryPerson> entry = res[i];
+
+        if (entry.GetKey() == key1)
+        {
+            BOOST_CHECK_EQUAL(entry.GetValue().GetName(), name1);
+            BOOST_CHECK_EQUAL(entry.GetValue().GetAge(), age1);
+        }
+        else if (entry.GetKey() == key2)
+        {
+            BOOST_CHECK_EQUAL(entry.GetValue().GetName(), name2);
+            BOOST_CHECK_EQUAL(entry.GetValue().GetAge(), age2);
         }
         else
             BOOST_FAIL("Unexpected entry.");
@@ -708,6 +783,9 @@ BOOST_AUTO_TEST_CASE(TestSqlQuery)
     cursor = cache.Query(qry);
     CheckEmptyGetAll(cursor);
 
+    cursor = cache.Query(qry);
+    CheckEmptyGetAllIter(cursor);
+
     // Test simple query.
     cache.Put(1, QueryPerson("A1", 10, MakeDateGmt(1990, 03, 18),
         MakeTimestampGmt(2016, 02, 10, 17, 39, 34, 579304685)));
@@ -721,6 +799,9 @@ BOOST_AUTO_TEST_CASE(TestSqlQuery)
     cursor = cache.Query(qry);
     CheckSingleGetAll(cursor, 1, "A1", 10);
 
+    cursor = cache.Query(qry);
+    CheckSingleGetAllIter(cursor, 1, "A1", 10);
+
     // Test simple distributed joins query.
     BOOST_CHECK(!qry.IsDistributedJoins());
     qry.SetDistributedJoins(true);
@@ -732,6 +813,9 @@ BOOST_AUTO_TEST_CASE(TestSqlQuery)
     cursor = cache.Query(qry);
     CheckSingleGetAll(cursor, 1, "A1", 10);
 
+    cursor = cache.Query(qry);
+    CheckSingleGetAllIter(cursor, 1, "A1", 10);
+
     qry.SetDistributedJoins(false);
 
     // Test simple local query.
@@ -745,6 +829,9 @@ BOOST_AUTO_TEST_CASE(TestSqlQuery)
     cursor = cache.Query(qry);
     CheckSingleGetAll(cursor, 1, "A1", 10);
 
+    cursor = cache.Query(qry);
+    CheckSingleGetAllIter(cursor, 1, "A1", 10);
+
     // Test query with arguments.
     qry.SetSql("age < ? AND name = ?");
     qry.AddArgument<int>(20);
@@ -756,6 +843,9 @@ BOOST_AUTO_TEST_CASE(TestSqlQuery)
     cursor = cache.Query(qry);
     CheckSingleGetAll(cursor, 1, "A1", 10);
 
+    cursor = cache.Query(qry);
+    CheckSingleGetAllIter(cursor, 1, "A1", 10);
+
     // Test query returning multiple entries.
     qry = SqlQuery("QueryPerson", "age < 30");
 
@@ -764,6 +854,9 @@ BOOST_AUTO_TEST_CASE(TestSqlQuery)
 
     cursor = cache.Query(qry);
     CheckMultipleGetAll(cursor, 1, "A1", 10, 2, "A2", 20);
+
+    cursor = cache.Query(qry);
+    CheckMultipleGetAllIter(cursor, 1, "A1", 10, 2, "A2", 20);
 }
 
 /**
@@ -831,6 +924,9 @@ BOOST_AUTO_TEST_CASE(TestTextQuery)
     cursor = cache.Query(qry);
     CheckEmptyGetAll(cursor);
 
+    cursor = cache.Query(qry);
+    CheckEmptyGetAllIter(cursor);
+
     // Test simple query.
     cache.Put(1, QueryPerson("A1", 10, MakeDateGmt(1990, 03, 18),
         MakeTimestampGmt(2016, 02, 10, 17, 39, 34, 579304685)));
@@ -844,6 +940,9 @@ BOOST_AUTO_TEST_CASE(TestTextQuery)
     cursor = cache.Query(qry);
     CheckSingleGetAll(cursor, 1, "A1", 10);
 
+    cursor = cache.Query(qry);
+    CheckSingleGetAllIter(cursor, 1, "A1", 10);
+
     // Test simple local query.
     qry.SetLocal(true);
 
@@ -853,6 +952,9 @@ BOOST_AUTO_TEST_CASE(TestTextQuery)
     cursor = cache.Query(qry);
     CheckSingleGetAll(cursor, 1, "A1", 10);
 
+    cursor = cache.Query(qry);
+    CheckSingleGetAllIter(cursor, 1, "A1", 10);
+
     // Test query returning multiple entries.
     qry = TextQuery("QueryPerson", "A*");
 
@@ -861,6 +963,9 @@ BOOST_AUTO_TEST_CASE(TestTextQuery)
 
     cursor = cache.Query(qry);
     CheckMultipleGetAll(cursor, 1, "A1", 10, 2, "A2", 20);
+
+    cursor = cache.Query(qry);
+    CheckMultipleGetAllIter(cursor, 1, "A1", 10, 2, "A2", 20);
 }
 
 /**
@@ -880,6 +985,9 @@ BOOST_AUTO_TEST_CASE(TestScanQuery)
     cursor = cache.Query(qry);
     CheckEmptyGetAll(cursor);
 
+    cursor = cache.Query(qry);
+    CheckEmptyGetAllIter(cursor);
+
     // Test simple query.
     cache.Put(1, QueryPerson("A1", 10, MakeDateGmt(1990, 03, 18),
         MakeTimestampGmt(2016, 02, 10, 17, 39, 34, 579304685)));
@@ -890,6 +998,9 @@ BOOST_AUTO_TEST_CASE(TestScanQuery)
     cursor = cache.Query(qry);
     CheckSingleGetAll(cursor, 1, "A1", 10);
 
+    cursor = cache.Query(qry);
+    CheckSingleGetAllIter(cursor, 1, "A1", 10);
+
     // Test query returning multiple entries.
     cache.Put(2, QueryPerson("A2", 20, MakeDateGmt(1989, 10, 26),
         MakeTimestampGmt(2016, 02, 10, 17, 39, 35, 678403201)));
@@ -899,6 +1010,9 @@ BOOST_AUTO_TEST_CASE(TestScanQuery)
 
     cursor = cache.Query(qry);
     CheckMultipleGetAll(cursor, 1, "A1", 10, 2, "A2", 20);
+
+    cursor = cache.Query(qry);
+    CheckMultipleGetAllIter(cursor, 1, "A1", 10, 2, "A2", 20);
 }
 
 /**
@@ -1692,16 +1806,7 @@ BOOST_AUTO_TEST_CASE(TestFieldsQueryPageSingle)
  */
 BOOST_AUTO_TEST_CASE(TestFieldsQueryPageZero)
 {
-    try
-    {
-        CheckFieldsQueryPages(0, 100, 0);
-
-        BOOST_FAIL("Exception expected.");
-    }
-    catch (IgniteError&)
-    {
-        // Expected.
-    }
+    BOOST_CHECK_THROW(CheckFieldsQueryPages(0, 100, 0), IgniteError);
 }
 
 BOOST_AUTO_TEST_SUITE_END()

http://git-wip-us.apache.org/repos/asf/ignite/blob/d34a4d06/modules/platforms/cpp/core-test/src/cache_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/cache_test.cpp b/modules/platforms/cpp/core-test/src/cache_test.cpp
index d57b757..22ad96c 100644
--- a/modules/platforms/cpp/core-test/src/cache_test.cpp
+++ b/modules/platforms/cpp/core-test/src/cache_test.cpp
@@ -146,6 +146,50 @@ BOOST_AUTO_TEST_CASE(TestRemoveAllKeys)
     BOOST_REQUIRE(1 == size);
 }
 
+BOOST_AUTO_TEST_CASE(TestRemoveAllKeysIterVector)
+{
+    cache::Cache<int, int> cache = Cache();
+
+    int size = cache.Size(cache::IGNITE_PEEK_MODE_ALL);
+
+    BOOST_REQUIRE(0 == size);
+
+    cache.Put(1, 1);
+    cache.Put(2, 2);
+    cache.Put(3, 3);
+
+    int keys[] = { 1, 2, 4, 5 };
+
+    std::vector<int> keySet(keys, keys + 4);
+
+    cache.RemoveAll(keySet.begin(), keySet.end());
+
+    size = cache.Size(cache::IGNITE_PEEK_MODE_PRIMARY);
+
+    BOOST_REQUIRE(1 == size);
+}
+
+BOOST_AUTO_TEST_CASE(TestRemoveAllKeysIterArray)
+{
+    cache::Cache<int, int> cache = Cache();
+
+    int size = cache.Size(cache::IGNITE_PEEK_MODE_ALL);
+
+    BOOST_REQUIRE(0 == size);
+
+    cache.Put(1, 1);
+    cache.Put(2, 2);
+    cache.Put(3, 3);
+
+    int keys[] = { 1, 2, 4, 5 };
+
+    cache.RemoveAll(keys, keys + 4);
+
+    size = cache.Size(cache::IGNITE_PEEK_MODE_PRIMARY);
+
+    BOOST_REQUIRE(1 == size);
+}
+
 BOOST_AUTO_TEST_CASE(TestPut)
 {
     cache::Cache<int, int> cache = Cache();
@@ -170,6 +214,36 @@ BOOST_AUTO_TEST_CASE(TestPutAll)
         BOOST_REQUIRE(i + 1 == cache.Get(i));
 }
 
+BOOST_AUTO_TEST_CASE(TestPutAllIterMap)
+{
+    std::map<int, int> map;
+
+    for (int i = 0; i < 100; i++)
+        map[i] = i + 1;
+    
+    cache::Cache<int, int> cache = Cache();
+
+    cache.PutAll(map.begin(), map.end());
+
+    for (int i = 0; i < 100; i++)
+        BOOST_REQUIRE(i + 1 == cache.Get(i));
+}
+
+BOOST_AUTO_TEST_CASE(TestPutAllIterVector)
+{
+    std::vector< cache::CacheEntry<int, int> > entries;
+
+    for (int i = 0; i < 100; i++)
+        entries.push_back(cache::CacheEntry<int, int>(i, i + 1));
+
+    cache::Cache<int, int> cache = Cache();
+
+    cache.PutAll(entries.begin(), entries.end());
+
+    for (int i = 0; i < 100; i++)
+        BOOST_REQUIRE(i + 1 == cache.Get(i));
+}
+
 BOOST_AUTO_TEST_CASE(TestPutIfAbsent)
 {
     cache::Cache<int, int> cache = Cache();
@@ -208,6 +282,40 @@ BOOST_AUTO_TEST_CASE(TestGetAll)
         BOOST_REQUIRE(i + 1 == map[i + 1]);
 }
 
+BOOST_AUTO_TEST_CASE(TestGetAllIterMap)
+{
+    cache::Cache<int, int> cache = Cache();
+
+    int keys[] = { 1, 2, 3, 4, 5 };
+
+    for (int i = 0; i < 5; ++i)
+        cache.Put(keys[i], i + 1);
+
+    std::map<int, int> map;
+
+    cache.GetAll(keys, keys + 5, std::inserter(map, map.begin()));
+
+    for (int i = 0; i < 5; ++i)
+        BOOST_REQUIRE(i + 1 == map[keys[i]]);
+}
+
+BOOST_AUTO_TEST_CASE(TestGetAllIterArray)
+{
+    cache::Cache<int, int> cache = Cache();
+
+    int keys[] = { 1, 2, 3, 4, 5 };
+
+    cache::CacheEntry<int, int> res[5];
+
+    for (int i = 0; i < 5; ++i)
+        cache.Put(keys[i], i + 1);
+
+    cache.GetAll(keys, keys + 5, res);
+
+    for (int i = 0; i < 5; ++i)
+        BOOST_REQUIRE(res[i].GetKey() == res[i].GetValue());
+}
+
 BOOST_AUTO_TEST_CASE(TestGetAndPut)
 {
     cache::Cache<int, int> cache = Cache();
@@ -284,6 +392,24 @@ BOOST_AUTO_TEST_CASE(TestContainsKeys)
     BOOST_REQUIRE(false == cache.ContainsKeys(keySet));
 }
 
+BOOST_AUTO_TEST_CASE(TestContainsKeysIter)
+{
+    cache::Cache<int, int> cache = Cache();
+
+    int keys[] = { 1, 2 };
+
+    BOOST_REQUIRE(false == cache.ContainsKeys(keys, keys + 2));
+
+    cache.Put(1, 1);
+    cache.Put(2, 2);
+
+    BOOST_REQUIRE(true == cache.ContainsKeys(keys, keys + 2));
+
+    cache.Remove(1);
+
+    BOOST_REQUIRE(false == cache.ContainsKeys(keys, keys + 2));
+}
+
 BOOST_AUTO_TEST_CASE(TestIsEmpty)
 {
     cache::Cache<int, int> cache = Cache();
@@ -358,6 +484,44 @@ BOOST_AUTO_TEST_CASE(TestLocalClearAll)
     BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
 }
 
+BOOST_AUTO_TEST_CASE(TestLocalClearAllIterList)
+{
+    cache::Cache<int, int> cache = Cache();
+
+    cache.Put(0, 3);
+    cache.Put(1, 3);
+
+    int keys[] = { 0, 1 };
+
+    std::list<int> keySet(keys, keys + 2);
+
+    BOOST_REQUIRE(3 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(3 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+
+    cache.LocalClearAll(keySet.begin(), keySet.end());
+
+    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+}
+
+BOOST_AUTO_TEST_CASE(TestLocalClearAllIterArray)
+{
+    cache::Cache<int, int> cache = Cache();
+
+    cache.Put(0, 3);
+    cache.Put(1, 3);
+
+    int keys[] = { 0, 1 };
+
+    BOOST_REQUIRE(3 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(3 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+
+    cache.LocalClearAll(keys, keys + 2);
+
+    BOOST_REQUIRE(0 == cache.LocalPeek(0, cache::IGNITE_PEEK_MODE_PRIMARY));
+    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_PRIMARY));
+}
+
 BOOST_AUTO_TEST_CASE(TestSizes)
 {
     cache::Cache<int, int> cache = Cache();
@@ -393,6 +557,46 @@ BOOST_AUTO_TEST_CASE(TestLocalEvict)
     BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
 }
 
+BOOST_AUTO_TEST_CASE(TestLocalEvictIterSet)
+{
+    cache::Cache<int, int> cache = Cache();
+
+    cache.Put(1, 5);
+
+    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+
+    int keys[] = { 0, 1 };
+
+    std::set<int> keySet(keys, keys + 2);
+
+    cache.LocalEvict(keySet.begin(), keySet.end());
+
+    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+
+    BOOST_REQUIRE(5 == cache.Get(1));
+
+    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+}
+
+BOOST_AUTO_TEST_CASE(TestLocalEvictIterArray)
+{
+    cache::Cache<int, int> cache = Cache();
+
+    cache.Put(1, 5);
+
+    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+
+    int keys[] = { 0, 1 };
+
+    cache.LocalEvict(keys, keys + 2);
+
+    BOOST_REQUIRE(0 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+
+    BOOST_REQUIRE(5 == cache.Get(1));
+
+    BOOST_REQUIRE(5 == cache.LocalPeek(1, cache::IGNITE_PEEK_MODE_ONHEAP));
+}
+
 BOOST_AUTO_TEST_CASE(TestBinary)
 {
     cache::Cache<int, Person> cache = grid0.GetCache<int, Person>("partitioned");

http://git-wip-us.apache.org/repos/asf/ignite/blob/d34a4d06/modules/platforms/cpp/core-test/src/cluster_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/cluster_test.cpp b/modules/platforms/cpp/core-test/src/cluster_test.cpp
index 7b206d2..c681ca2 100644
--- a/modules/platforms/cpp/core-test/src/cluster_test.cpp
+++ b/modules/platforms/cpp/core-test/src/cluster_test.cpp
@@ -34,7 +34,7 @@ using namespace boost::unit_test;
  */
 struct ClusterTestSuiteFixture
 {
-    Ignite grid;
+    Ignite node;
 
     /*
      * Constructor.
@@ -52,8 +52,6 @@ struct ClusterTestSuiteFixture
     {
         Ignition::StopAll(true);
     }
-
-    Ignite node;
 };
 
 BOOST_FIXTURE_TEST_SUITE(ClusterTestSuite, ClusterTestSuiteFixture)

http://git-wip-us.apache.org/repos/asf/ignite/blob/d34a4d06/modules/platforms/cpp/core/include/ignite/cache/cache.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/cache.h b/modules/platforms/cpp/core/include/ignite/cache/cache.h
index 00d1c81..33fffc8 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/cache.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/cache.h
@@ -185,6 +185,29 @@ namespace ignite
              *
              * This method should only be used on the valid instance.
              *
+             * @param begin Iterator pointing to the beggining of the key sequence.
+             * @param end Iterator pointing to the end of the key sequence.
+             * @return True if cache contains mapping for all these keys.
+             */
+            template<typename InputIter>
+            bool ContainsKeys(InputIter begin, InputIter end)
+            {
+                IgniteError err;
+
+                impl::InIterOperation<K, V, InputIter> op(begin, end);
+
+                bool res = impl.Get()->ContainsKeys(op, err);
+
+                IgniteError::ThrowIfNeeded(err);
+
+                return res;
+            }
+
+            /**
+             * Check if cache contains mapping for these keys.
+             *
+             * This method should only be used on the valid instance.
+             *
              * @param keys Keys.
              * @param err Error.
              * @return True if cache contains mapping for all these keys.
@@ -337,6 +360,32 @@ namespace ignite
             }
 
             /**
+             * Retrieves values mapped to the specified keys from cache.
+             * If some value is not present in cache, then it will be looked up from swap storage. If
+             * it's not present in swap, or if swap is disabled, and if read-through is allowed, value
+             * will be loaded from persistent store.
+             * This method is transactional and will enlist the entry into ongoing transaction if there is one.
+             *
+             * This method should only be used on the valid instance.
+             *
+             * @param begin Iterator pointing to the beggining of the key sequence.
+             * @param end Iterator pointing to the end of the key sequence.
+             * @param dst Output iterator. Should dereference to std::pair or CacheEntry.
+             */
+            template<typename InIter, typename OutIter>
+            void GetAll(InIter begin, InIter end, OutIter dst)
+            {
+                IgniteError err;
+
+                impl::InIterOperation<K, V, InIter> inOp(begin, end);
+                impl::OutMapIterOperation<K, V, OutIter> outOp(dst);
+
+                impl.Get()->GetAll(inOp, outOp, err);
+
+                IgniteError::ThrowIfNeeded(err);
+            }
+
+            /**
              * Associates the specified value with the specified key in the cache.
              * If the cache previously contained a mapping for the key,
              * the old value is replaced by the specified value.
@@ -409,6 +458,28 @@ namespace ignite
             }
 
             /**
+             * Stores given key-value pairs in cache.
+             * If write-through is enabled, the stored values will be persisted to store.
+             * This method is transactional and will enlist the entry into ongoing transaction if there is one.
+             *
+             * This method should only be used on the valid instance.
+             *
+             * @param begin Iterator pointing to the beggining of the key-value pair sequence.
+             * @param end Iterator pointing to the end of the key-value pair sequence.
+             */
+            template<typename Iter>
+            void PutAll(Iter begin, Iter end)
+            {
+                IgniteError err;
+
+                impl::InIterOperation<K, V, Iter> op(begin, end);
+
+                impl.Get()->PutAll(op, err);
+
+                IgniteError::ThrowIfNeeded(err);
+            }
+
+            /**
              * Associates the specified value with the specified key in this cache,
              * returning an existing value if one existed.
              *
@@ -761,6 +832,29 @@ namespace ignite
             }
 
             /**
+             * Attempts to evict all entries associated with keys.
+             *
+             * @note Entry will be evicted only if it's not used (not
+             * participating in any locks or transactions).
+             *
+             * This method should only be used on the valid instance.
+             *
+             * @param begin Iterator pointing to the beggining of the key sequence.
+             * @param end Iterator pointing to the end of the key sequence.
+             */
+            template<typename Iter>
+            void LocalEvict(Iter begin, Iter end)
+            {
+                IgniteError err;
+
+                impl::InIterOperation<K, V, Iter> op(begin, end);
+
+                impl.Get()->LocalEvict(op, err);
+
+                IgniteError::ThrowIfNeeded(err);
+            }
+
+            /**
              * Clear cache.
              *
              * This method should only be used on the valid instance.
@@ -853,6 +947,27 @@ namespace ignite
             }
 
             /**
+             * Clear entries from the cache and swap storage, without notifying listeners or CacheWriters.
+             * Entry is cleared only if it is not currently locked, and is not participating in a transaction.
+             *
+             * This method should only be used on the valid instance.
+             *
+             * @param begin Iterator pointing to the beggining of the key sequence.
+             * @param end Iterator pointing to the end of the key sequence.
+             */
+            template<typename Iter>
+            void ClearAll(Iter begin, Iter end)
+            {
+                IgniteError err;
+
+                impl::InIterOperation<K, V, Iter> op(begin, end);
+
+                impl.Get()->ClearAll(op, err);
+
+                IgniteError::ThrowIfNeeded(err);
+            }
+
+            /**
              * Clear entry from the cache and swap storage, without notifying listeners or CacheWriters.
              * Entry is cleared only if it is not currently locked, and is not participating in a transaction.
              *
@@ -931,6 +1046,30 @@ namespace ignite
             }
 
             /**
+             * Clear entries from the cache and swap storage, without notifying listeners or CacheWriters.
+             * Entry is cleared only if it is not currently locked, and is not participating in a transaction.
+             *
+             * @note This operation is local as it merely clears entries from local cache, it does not
+             * remove entries from remote caches.
+             *
+             * This method should only be used on the valid instance.
+             *
+             * @param begin Iterator pointing to the beggining of the key sequence.
+             * @param end Iterator pointing to the end of the key sequence.
+             */
+            template<typename Iter>
+            void LocalClearAll(Iter begin, Iter end)
+            {
+                IgniteError err;
+
+                impl::InIterOperation<K, V, Iter> op(begin, end);
+
+                impl.Get()->LocalClearAll(op, err);
+
+                IgniteError::ThrowIfNeeded(err);
+            }
+
+            /**
              * Removes given key mapping from cache. If cache previously contained value for the given key,
              * then this value is returned. In case of PARTITIONED or REPLICATED caches, the value will be
              * loaded from the primary node, which in its turn may load the value from the disk-based swap
@@ -1056,6 +1195,28 @@ namespace ignite
             }
 
             /**
+             * Removes given key mappings from cache.
+             * If write-through is enabled, the value will be removed from store.
+             * This method is transactional and will enlist the entry into ongoing transaction if there is one.
+             *
+             * This method should only be used on the valid instance.
+             *
+             * @param begin Iterator pointing to the beggining of the key sequence.
+             * @param end Iterator pointing to the end of the key sequence.
+             */
+            template<typename Iter>
+            void RemoveAll(Iter begin, Iter end)
+            {
+                IgniteError err;
+
+                impl::InIterOperation<K, V, Iter> op(begin, end);
+
+                impl.Get()->RemoveAll(op, err);
+
+                IgniteError::ThrowIfNeeded(err);
+            }
+
+            /**
              * Removes all mappings from cache.
              * If write-through is enabled, the value will be removed from store.
              * This method is transactional and will enlist the entry into ongoing transaction if there is one.

http://git-wip-us.apache.org/repos/asf/ignite/blob/d34a4d06/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h b/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h
index aea5182..c88f918 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h
@@ -23,6 +23,7 @@
 #ifndef _IGNITE_CACHE_CACHE_ENTRY
 #define _IGNITE_CACHE_CACHE_ENTRY
 
+#include <utility>
 #include <ignite/common/common.h>
 
 namespace ignite
@@ -80,6 +81,20 @@ namespace ignite
             }
 
             /**
+             * Constructor.
+             *
+             * @param p Pair.
+             */
+            CacheEntry(const std::pair<K, V>& p) :
+                key(p.first),
+                val(p.second),
+                hasValue(true)
+            {
+                // No-op.
+            }
+
+
+            /**
              * Destructor.
              */
             virtual ~CacheEntry()

http://git-wip-us.apache.org/repos/asf/ignite/blob/d34a4d06/modules/platforms/cpp/core/include/ignite/cache/query/query_cursor.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/query/query_cursor.h b/modules/platforms/cpp/core/include/ignite/cache/query/query_cursor.h
index 61fd7ec..3f7ccce 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/query/query_cursor.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/query/query_cursor.h
@@ -186,7 +186,7 @@ namespace ignite
                  *
                  * This method should only be used on the valid instance.
                  *
-                 * @param Vector where query entries will be stored.
+                 * @param res Vector where query entries will be stored.
                  *
                  * @throw IgniteError class instance in case of failure.
                  */
@@ -205,7 +205,7 @@ namespace ignite
                  *
                  * This method should only be used on the valid instance.
                  * 
-                 * @param Vector where query entries will be stored.
+                 * @param res Vector where query entries will be stored.
                  * @param err Used to set operation result.
                  */
                 void GetAll(std::vector<CacheEntry<K, V> >& res, IgniteError& err)
@@ -223,6 +223,30 @@ namespace ignite
                 }
 
                 /**
+                 * Get all entries.
+                 *
+                 * This method should only be used on the valid instance.
+                 * 
+                 * @param iter Output iterator.
+                 */
+                template<typename OutIter>
+                void GetAll(OutIter iter)
+                {
+                    impl::cache::query::QueryCursorImpl* impl0 = impl.Get();
+
+                    if (impl0) {
+                        impl::OutQueryGetAllOperationIter<K, V, OutIter> outOp(iter);
+
+                        impl0->GetAll(outOp);
+                    }
+                    else
+                    {
+                        throw IgniteError(IgniteError::IGNITE_ERR_GENERIC,
+                            "Instance is not usable (did you check for error?).");
+                    }
+                }
+
+                /**
                  * Check if the instance is valid.
                  *
                  * Invalid instance can be returned if some of the previous

http://git-wip-us.apache.org/repos/asf/ignite/blob/d34a4d06/modules/platforms/cpp/core/include/ignite/impl/cache/query/query_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/cache/query/query_impl.h b/modules/platforms/cpp/core/include/ignite/impl/cache/query/query_impl.h
index 4083c7c..7306805 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/cache/query/query_impl.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/cache/query/query_impl.h
@@ -85,6 +85,13 @@ namespace ignite
                      */
                     void GetAll(OutputOperation& op, IgniteError& err);
 
+                    /**
+                     * Get all cursor entries.
+                     *
+                     * @param op Operation.
+                     */
+                    void GetAll(OutputOperation& op);
+
                 private:
                     /** Environment. */
                     ignite::common::concurrent::SharedPointer<impl::IgniteEnvironment> env;

http://git-wip-us.apache.org/repos/asf/ignite/blob/d34a4d06/modules/platforms/cpp/core/include/ignite/impl/helpers.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/helpers.h b/modules/platforms/cpp/core/include/ignite/impl/helpers.h
new file mode 100644
index 0000000..bc9eb39
--- /dev/null
+++ b/modules/platforms/cpp/core/include/ignite/impl/helpers.h
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _IGNITE_IMPL_HELPERS
+#define _IGNITE_IMPL_HELPERS
+
+#include <map>
+
+#include <ignite/cache/cache_entry.h>
+#include <ignite/impl/binary/binary_writer_impl.h>
+
+namespace ignite
+{
+    namespace impl
+    {
+        /**
+         * Class-helper to properly write values of different type.
+         */
+        template<typename K, typename V>
+        struct ContainerEntryWriteHelper
+        {
+            template<typename E>
+            static void Write(binary::BinaryWriterImpl& writer, const E& val)
+            {
+                writer.WriteTopObject(val);
+            }
+
+            static void Write(binary::BinaryWriterImpl& writer, const typename std::map<K, V>::value_type& val)
+            {
+                writer.WriteTopObject(val.first);
+                writer.WriteTopObject(val.second);
+            }
+
+            static void Write(binary::BinaryWriterImpl& writer, const ignite::cache::CacheEntry<K, V>& val)
+            {
+                writer.WriteTopObject(val.GetKey());
+                writer.WriteTopObject(val.GetValue());
+            }
+        };
+    }
+}
+
+#endif //_IGNITE_IMPL_HELPERS

http://git-wip-us.apache.org/repos/asf/ignite/blob/d34a4d06/modules/platforms/cpp/core/include/ignite/impl/operations.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/operations.h b/modules/platforms/cpp/core/include/ignite/impl/operations.h
index fff8a86..1645fb56 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/operations.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/operations.h
@@ -28,6 +28,7 @@
 #include "ignite/impl/binary/binary_reader_impl.h"
 #include "ignite/impl/binary/binary_writer_impl.h"
 #include "ignite/impl/binary/binary_utils.h"
+#include "ignite/impl/helpers.h"
 #include "ignite/binary/binary.h"
 
 namespace ignite
@@ -253,6 +254,50 @@ namespace ignite
         };
 
         /**
+         * Input iterator operation.
+         */
+        template<typename K, typename V, typename Iter>
+        class InIterOperation : public InputOperation
+        {
+        public:
+            /**
+             * Constructor.
+             *
+             * @param begin Iterator pointing to the beggining of the sequence.
+             * @param end Iterator pointing to the end of the key sequence.
+             */
+            InIterOperation(Iter begin, Iter end) :
+                begin(begin),
+                end(end)
+            {
+                // No-op.
+            }
+
+            virtual void ProcessInput(ignite::impl::binary::BinaryWriterImpl& writer)
+            {
+                interop::InteropOutputStream& stream = *writer.GetStream();
+                int32_t sizePos = stream.Reserve(4);
+
+                int32_t size = 0;
+                for (Iter it = begin; it != end; ++it)
+                {
+                    ContainerEntryWriteHelper<K, V>::Write(writer, *it);
+                    ++size;
+                }
+
+                stream.WriteInt32(sizePos, size);
+            }
+        private:
+            /** Sequence begining. */
+            Iter begin;
+
+            /** Sequence end. */
+            Iter end;
+
+            IGNITE_NO_COPY_ASSIGNMENT(InIterOperation)
+        };
+
+        /**
          * Output operation.
          */
         class OutputOperation
@@ -496,7 +541,7 @@ namespace ignite
                         val0[t1] = t2;
                     }
 
-                    val = val0;
+                    std::swap(val, val0);
                 }
             }
 
@@ -508,7 +553,7 @@ namespace ignite
             /**
              * Get value.
              *
-             * @param Value.
+             * @return Value.
              */
             std::map<T1, T2> GetResult()
             {
@@ -540,6 +585,8 @@ namespace ignite
             {
                 int32_t cnt = reader.ReadInt32();
 
+                res.reserve(res.size() + cnt);
+
                 for (int i = 0; i < cnt; i++) 
                 {
                     K key = reader.ReadTopObject<K>();
@@ -560,6 +607,91 @@ namespace ignite
             
             IGNITE_NO_COPY_ASSIGNMENT(OutQueryGetAllOperation)
         };
+
+        /**
+         * Output query GET ALL operation.
+         */
+        template<typename K, typename V, typename Iter, typename Pair = ignite::cache::CacheEntry<K,V> >
+        class OutQueryGetAllOperationIter : public OutputOperation
+        {
+        public:
+            /**
+             * Constructor.
+             */
+            OutQueryGetAllOperationIter(Iter iter) : iter(iter)
+            {
+                // No-op.
+            }
+
+            virtual void ProcessOutput(binary::BinaryReaderImpl& reader)
+            {
+                int32_t cnt = reader.ReadInt32();
+
+                for (int32_t i = 0; i < cnt; i++)
+                {
+                    K key = reader.ReadTopObject<K>();
+                    V val = reader.ReadTopObject<V>();
+
+                    *iter = Pair(key, val);
+                    ++iter;
+                }
+            }
+
+            virtual void SetNull()
+            {
+                // No-op.
+            }
+
+        private:
+            /** Out iter. */
+            Iter iter;
+            
+            IGNITE_NO_COPY_ASSIGNMENT(OutQueryGetAllOperationIter)
+        };
+
+        /**
+         * Output iter operation.
+         */
+        template<typename K, typename V, typename Iter>
+        class OutMapIterOperation :public OutputOperation
+        {
+        public:
+            /**
+             * Constructor.
+             */
+            OutMapIterOperation(Iter iter) : iter(iter)
+            {
+                // No-op.
+            }
+
+            virtual void ProcessOutput(binary::BinaryReaderImpl& reader)
+            {
+                bool exists = reader.GetStream()->ReadBool();
+
+                if (exists)
+                {
+                    int32_t cnt = reader.GetStream()->ReadInt32();
+
+                    for (int32_t i = 0; i < cnt; i++) {
+                        K key = reader.ReadTopObject<K>();
+                        V val = reader.ReadTopObject<V>();
+
+                        *iter = std::pair<K, V>(key, val);
+                        ++iter;
+                    }
+                }
+            }
+
+            virtual void SetNull()
+            {
+                // No-op.
+            }
+        private:
+            /** Out iter. */
+            Iter iter;
+
+            IGNITE_NO_COPY_ASSIGNMENT(OutMapIterOperation)
+        };
     }
 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/d34a4d06/modules/platforms/cpp/core/project/vs/core.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/project/vs/core.vcxproj b/modules/platforms/cpp/core/project/vs/core.vcxproj
index b5a95bd..5cd49f3 100644
--- a/modules/platforms/cpp/core/project/vs/core.vcxproj
+++ b/modules/platforms/cpp/core/project/vs/core.vcxproj
@@ -225,6 +225,7 @@
     <ClInclude Include="..\..\include\ignite\impl\cache\query\query_fields_row_impl.h" />
     <ClInclude Include="..\..\include\ignite\impl\cache\query\query_impl.h" />
     <ClInclude Include="..\..\include\ignite\impl\cluster\cluster_group_impl.h" />
+    <ClInclude Include="..\..\include\ignite\impl\helpers.h" />
     <ClInclude Include="..\..\include\ignite\impl\ignite_environment.h" />
     <ClInclude Include="..\..\include\ignite\impl\ignite_impl.h" />
     <ClInclude Include="..\..\include\ignite\impl\handle_registry.h" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/d34a4d06/modules/platforms/cpp/core/project/vs/core.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/project/vs/core.vcxproj.filters b/modules/platforms/cpp/core/project/vs/core.vcxproj.filters
index 3b17d53..98099a9 100644
--- a/modules/platforms/cpp/core/project/vs/core.vcxproj.filters
+++ b/modules/platforms/cpp/core/project/vs/core.vcxproj.filters
@@ -207,6 +207,9 @@
     <ClInclude Include="..\..\include\ignite\impl\bindings.h">
       <Filter>Code\impl</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\include\ignite\impl\helpers.h">
+      <Filter>Code\impl</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <Filter Include="Code">

http://git-wip-us.apache.org/repos/asf/ignite/blob/d34a4d06/modules/platforms/cpp/core/src/impl/cache/query/query_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/cache/query/query_impl.cpp b/modules/platforms/cpp/core/src/impl/cache/query/query_impl.cpp
index 018bd99..a7bf0e4 100644
--- a/modules/platforms/cpp/core/src/impl/cache/query/query_impl.cpp
+++ b/modules/platforms/cpp/core/src/impl/cache/query/query_impl.cpp
@@ -186,12 +186,49 @@ namespace ignite
 
                         InteropInputStream in(inMem.Get());
 
-                        binary::BinaryReaderImpl reader(&in);
+                        BinaryReaderImpl reader(&in);
 
                         op.ProcessOutput(reader);
                     }
                 }
 
+                void QueryCursorImpl::GetAll(OutputOperation& op)
+                {
+                    // Check whether any of iterator methods were called.
+                    if (iterCalled)
+                    {
+                        throw IgniteError(IgniteError::IGNITE_ERR_GENERIC,
+                            "Cannot use GetAll() method because an iteration method was called.");
+                    }
+
+                    // Check whether GetAll was called before.
+                    if (getAllCalled)
+                    {
+                        throw IgniteError(IgniteError::IGNITE_ERR_GENERIC,
+                            "Cannot use GetNext() method because GetAll() was called.");
+                    }
+
+                    // Get data.
+                    JniErrorInfo jniErr;
+
+                    SharedPointer<InteropMemory> inMem = env.Get()->AllocateMemory();
+
+                    env.Get()->Context()->TargetOutStream(javaRef, OP_GET_ALL, inMem.Get()->PointerLong(), &jniErr);
+
+                    IgniteError err;
+                    IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+
+                    IgniteError::ThrowIfNeeded(err);
+
+                    getAllCalled = true;
+
+                    InteropInputStream in(inMem.Get());
+
+                    BinaryReaderImpl reader(&in);
+
+                    op.ProcessOutput(reader);
+                }
+
                 bool QueryCursorImpl::CreateIteratorIfNeeded(IgniteError& err)
                 {
                     if (iterCalled)


[35/50] [abbrv] ignite git commit: IGNITE-4349 Discontinue the schema-import utility.

Posted by dm...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/JdbcMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/JdbcMetadataDialect.java b/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/JdbcMetadataDialect.java
deleted file mode 100644
index 07361ba..0000000
--- a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/JdbcMetadataDialect.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.parser.dialect;
-
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.ignite.cache.QueryIndex;
-import org.apache.ignite.schema.parser.DbColumn;
-import org.apache.ignite.schema.parser.DbTable;
-
-/**
- * Metadata dialect that uses standard JDBC for reading metadata.
- */
-public class JdbcMetadataDialect extends DatabaseMetadataDialect {
-    /** */
-    private static final String[] TABLES_ONLY = {"TABLE"};
-
-    /** */
-    private static final String[] TABLES_AND_VIEWS = {"TABLE", "VIEW"};
-
-    /** Schema catalog index. */
-    private static final int TBL_CATALOG_IDX = 1;
-
-    /** Schema name index. */
-    private static final int TBL_SCHEMA_IDX = 2;
-
-    /** Table name index. */
-    private static final int TBL_NAME_IDX = 3;
-
-    /** Primary key column name index. */
-    private static final int PK_COL_NAME_IDX = 4;
-
-    /** Column name index. */
-    private static final int COL_NAME_IDX = 4;
-
-    /** Column data type index. */
-    private static final int COL_DATA_TYPE_IDX = 5;
-
-    /** Column type name index. */
-    private static final int COL_TYPE_NAME_IDX = 6;
-
-    /** Column nullable index. */
-    private static final int COL_NULLABLE_IDX = 11;
-
-    /** Index name index. */
-    private static final int IDX_NAME_IDX = 6;
-
-    /** Index column name index. */
-    private static final int IDX_COL_NAME_IDX = 9;
-
-    /** Index column descend index. */
-    private static final int IDX_ASC_OR_DESC_IDX = 10;
-
-    /** {@inheritDoc} */
-    @Override public Collection<String> schemas(Connection conn) throws SQLException {
-        Collection<String> schemas = new ArrayList<>();
-
-        ResultSet rs = conn.getMetaData().getSchemas();
-
-        Set<String> sys = systemSchemas();
-
-        while(rs.next()) {
-            String schema = rs.getString(1);
-
-            // Skip system schemas.
-            if (sys.contains(schema))
-                continue;
-
-            schemas.add(schema);
-        }
-
-        return schemas;
-    }
-
-    /**
-     * @return If {@code true} use catalogs for table division.
-     */
-    protected boolean useCatalog() {
-        return false;
-    }
-
-    /**
-     * @return If {@code true} use schemas for table division.
-     */
-    protected boolean useSchema() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Collection<DbTable> tables(Connection conn, List<String> schemas, boolean tblsOnly)
-        throws SQLException {
-        DatabaseMetaData dbMeta = conn.getMetaData();
-
-        Set<String> sys = systemSchemas();
-
-        Collection<String> unsignedTypes = unsignedTypes(dbMeta);
-
-        if (schemas.isEmpty())
-            schemas.add(null);
-
-        Collection<DbTable> tbls = new ArrayList<>();
-
-        for (String toSchema: schemas) {
-            try (ResultSet tblsRs = dbMeta.getTables(useCatalog() ? toSchema : null, useSchema() ? toSchema : null, "%",
-                    tblsOnly ? TABLES_ONLY : TABLES_AND_VIEWS)) {
-                while (tblsRs.next()) {
-                    String tblCatalog = tblsRs.getString(TBL_CATALOG_IDX);
-                    String tblSchema = tblsRs.getString(TBL_SCHEMA_IDX);
-                    String tblName = tblsRs.getString(TBL_NAME_IDX);
-
-                    // In case of MySql we should use catalog.
-                    String schema = tblSchema != null ? tblSchema : tblCatalog;
-
-                    // Skip system schemas.
-                    if (sys.contains(schema))
-                        continue;
-
-                    Collection<String> pkCols = new HashSet<>();
-
-                    try (ResultSet pkRs = dbMeta.getPrimaryKeys(tblCatalog, tblSchema, tblName)) {
-                        while (pkRs.next())
-                            pkCols.add(pkRs.getString(PK_COL_NAME_IDX));
-                    }
-
-                    Collection<DbColumn> cols = new ArrayList<>();
-
-                    try (ResultSet colsRs = dbMeta.getColumns(tblCatalog, tblSchema, tblName, null)) {
-                        while (colsRs.next()) {
-                            String colName = colsRs.getString(COL_NAME_IDX);
-
-                            cols.add(new DbColumn(
-                                colName,
-                                colsRs.getInt(COL_DATA_TYPE_IDX),
-                                pkCols.contains(colName),
-                                colsRs.getInt(COL_NULLABLE_IDX) == DatabaseMetaData.columnNullable,
-                                unsignedTypes.contains(colsRs.getString(COL_TYPE_NAME_IDX))));
-                        }
-                    }
-
-                    Map<String, QueryIndex> idxs = new LinkedHashMap<>();
-
-                    try (ResultSet idxRs = dbMeta.getIndexInfo(tblCatalog, tblSchema, tblName, false, true)) {
-                        while (idxRs.next()) {
-                            String idxName = idxRs.getString(IDX_NAME_IDX);
-
-                            String colName = idxRs.getString(IDX_COL_NAME_IDX);
-
-                            if (idxName == null || colName == null)
-                                continue;
-
-                            QueryIndex idx = idxs.get(idxName);
-
-                            if (idx == null) {
-                                idx = index(idxName);
-
-                                idxs.put(idxName, idx);
-                            }
-
-                            String askOrDesc = idxRs.getString(IDX_ASC_OR_DESC_IDX);
-
-                            Boolean asc = askOrDesc == null || "A".equals(askOrDesc);
-
-                            idx.getFields().put(colName, asc);
-                        }
-                    }
-
-                    tbls.add(table(schema, tblName, cols, idxs.values()));
-                }
-            }
-        }
-
-        return tbls;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/MySQLMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/MySQLMetadataDialect.java b/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/MySQLMetadataDialect.java
deleted file mode 100644
index 7bd6f31..0000000
--- a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/MySQLMetadataDialect.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.parser.dialect;
-
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * MySQL specific metadata dialect.
- */
-public class MySQLMetadataDialect extends JdbcMetadataDialect {
-    /** Type name index. */
-    private static final int TYPE_NAME_IDX = 1;
-
-    /** {@inheritDoc} */
-    @Override public Collection<String> schemas(Connection conn) throws SQLException {
-        Collection<String> schemas = new ArrayList<>();
-
-        ResultSet rs = conn.getMetaData().getCatalogs();
-
-        Set<String> sys = systemSchemas();
-
-        while(rs.next()) {
-            String schema = rs.getString(1);
-
-            // Skip system schemas.
-            if (sys.contains(schema))
-                continue;
-
-            schemas.add(schema);
-        }
-
-        return schemas;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean useCatalog() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean useSchema() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Set<String> unsignedTypes(DatabaseMetaData dbMeta) throws SQLException {
-        Set<String> unsignedTypes = new HashSet<>();
-
-        try (ResultSet typeRs = dbMeta.getTypeInfo()) {
-            while (typeRs.next()) {
-                String typeName = typeRs.getString(TYPE_NAME_IDX);
-
-                if (typeName.contains("UNSIGNED"))
-                    unsignedTypes.add(typeName);
-            }
-        }
-
-        return unsignedTypes;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java b/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
deleted file mode 100644
index 47fb05c..0000000
--- a/modules/schema-import-db/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.parser.dialect;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.ignite.cache.QueryIndex;
-import org.apache.ignite.cache.QueryIndexType;
-import org.apache.ignite.schema.parser.DbColumn;
-import org.apache.ignite.schema.parser.DbTable;
-
-import static java.sql.Types.BIGINT;
-import static java.sql.Types.BLOB;
-import static java.sql.Types.BOOLEAN;
-import static java.sql.Types.CHAR;
-import static java.sql.Types.CLOB;
-import static java.sql.Types.DATE;
-import static java.sql.Types.DOUBLE;
-import static java.sql.Types.FLOAT;
-import static java.sql.Types.INTEGER;
-import static java.sql.Types.LONGVARBINARY;
-import static java.sql.Types.LONGVARCHAR;
-import static java.sql.Types.NUMERIC;
-import static java.sql.Types.OTHER;
-import static java.sql.Types.SMALLINT;
-import static java.sql.Types.SQLXML;
-import static java.sql.Types.TIMESTAMP;
-import static java.sql.Types.TINYINT;
-import static java.sql.Types.VARCHAR;
-
-/**
- * Oracle specific metadata dialect.
- */
-public class OracleMetadataDialect extends DatabaseMetadataDialect {
-    /** SQL to get columns metadata. */
-    private static final String SQL_COLUMNS = "SELECT a.owner, a.table_name, a.column_name, a.nullable," +
-        " a.data_type, a.data_precision, a.data_scale " +
-        "FROM all_tab_columns a %s " +
-        " %s " +
-        " ORDER BY a.owner, a.table_name, a.column_id";
-
-    /** SQL to get list of PRIMARY KEYS columns. */
-    private static final String SQL_PRIMARY_KEYS = "SELECT b.column_name" +
-        " FROM all_constraints a" +
-        "  INNER JOIN all_cons_columns b ON a.owner = b.owner AND a.constraint_name = b.constraint_name" +
-        " WHERE a.owner = ? and a.table_name = ? AND a.constraint_type = 'P'";
-
-    /** SQL to get indexes metadata. */
-    private static final String SQL_INDEXES = "SELECT i.index_name, u.column_expression, i.column_name, i.descend" +
-        " FROM all_ind_columns i" +
-        " LEFT JOIN user_ind_expressions u on u.index_name = i.index_name and i.table_name = u.table_name" +
-        " WHERE i.index_owner = ? and i.table_name = ?" +
-        " ORDER BY i.index_name, i.column_position";
-
-    /** Owner index. */
-    private static final int OWNER_IDX = 1;
-
-    /** Table name index. */
-    private static final int TBL_NAME_IDX = 2;
-
-    /** Column name index. */
-    private static final int COL_NAME_IDX = 3;
-
-    /** Nullable index. */
-    private static final int NULLABLE_IDX = 4;
-
-    /** Data type index. */
-    private static final int DATA_TYPE_IDX = 5;
-
-    /** Numeric precision index. */
-    private static final int DATA_PRECISION_IDX = 6;
-
-    /** Numeric scale index. */
-    private static final int DATA_SCALE_IDX = 7;
-
-    /** Index name index. */
-    private static final int IDX_NAME_IDX = 1;
-
-    /** Index name index. */
-    private static final int IDX_EXPR_IDX = 2;
-
-    /** Index column name index. */
-    private static final int IDX_COL_NAME_IDX = 3;
-
-    /** Index column sort order index. */
-    private static final int IDX_COL_DESCEND_IDX = 4;
-
-    /** {@inheritDoc} */
-    @Override public Set<String> systemSchemas() {
-        return new HashSet<>(Arrays.asList("ANONYMOUS", "CTXSYS", "DBSNMP", "EXFSYS", "LBACSYS", "MDSYS", "MGMT_VIEW",
-            "OLAPSYS", "OWBSYS", "ORDPLUGINS", "ORDSYS", "OUTLN", "SI_INFORMTN_SCHEMA", "SYS", "SYSMAN", "SYSTEM",
-            "TSMSYS", "WK_TEST", "WKSYS", "WKPROXY", "WMSYS", "XDB",
-
-            "APEX_040000", "APEX_PUBLIC_USER", "DIP", "FLOWS_30000", "FLOWS_FILES", "MDDATA", "ORACLE_OCM",
-            "SPATIAL_CSW_ADMIN_USR", "SPATIAL_WFS_ADMIN_USR", "XS$NULL",
-
-            "BI", "HR", "OE", "PM", "IX", "SH"));
-    }
-
-    /** {@inheritDoc} */
-    @Override public Collection<String> schemas(Connection conn) throws SQLException {
-        Collection<String> schemas = new ArrayList<>();
-
-        ResultSet rs = conn.getMetaData().getSchemas();
-
-        Set<String> sysSchemas = systemSchemas();
-
-        while(rs.next()) {
-            String schema = rs.getString(1);
-
-            if (!sysSchemas.contains(schema) && !schema.startsWith("FLOWS_"))
-                schemas.add(schema);
-        }
-
-        return schemas;
-    }
-
-    /**
-     * @param rs Result set with column type metadata from Oracle database.
-     * @return JDBC type.
-     * @throws SQLException If failed to decode type.
-     */
-    private int decodeType(ResultSet rs) throws SQLException {
-        String type = rs.getString(DATA_TYPE_IDX);
-
-        if (type.startsWith("TIMESTAMP"))
-            return TIMESTAMP;
-        else {
-            switch (type) {
-                case "CHAR":
-                case "NCHAR":
-                    return CHAR;
-
-                case "VARCHAR2":
-                case "NVARCHAR2":
-                    return VARCHAR;
-
-                case "LONG":
-                    return LONGVARCHAR;
-
-                case "LONG RAW":
-                    return LONGVARBINARY;
-
-                case "FLOAT":
-                    return FLOAT;
-
-                case "NUMBER":
-                    int precision = rs.getInt(DATA_PRECISION_IDX);
-                    int scale = rs.getInt(DATA_SCALE_IDX);
-
-                    if (scale > 0) {
-                        if (scale < 4 && precision < 19)
-                            return FLOAT;
-
-                        if (scale > 4 || precision > 19)
-                            return DOUBLE;
-
-                        return NUMERIC;
-                    }
-                    else {
-                        if (precision < 1)
-                            return INTEGER;
-
-                        if (precision < 2)
-                            return BOOLEAN;
-
-                        if (precision < 4)
-                            return TINYINT;
-
-                        if (precision < 6)
-                            return SMALLINT;
-
-                        if (precision < 11)
-                            return INTEGER;
-
-                        if (precision < 20)
-                            return BIGINT;
-
-                        return NUMERIC;
-                    }
-
-                case "DATE":
-                    return DATE;
-
-                case "BFILE":
-                case "BLOB":
-                    return BLOB;
-
-                case "CLOB":
-                case "NCLOB":
-                    return CLOB;
-
-                case "XMLTYPE":
-                    return SQLXML;
-            }
-        }
-
-        return OTHER;
-    }
-
-    /**
-     * Retrieve primary key columns.
-     *
-     * @param stmt Prepared SQL statement to execute.
-     * @param owner DB owner.
-     * @param tbl Table name.
-     * @return Primary key columns.
-     * @throws SQLException If failed to retrieve primary key columns.
-     */
-    private Set<String> primaryKeys(PreparedStatement stmt, String owner, String tbl) throws SQLException {
-        Set<String> pkCols = new HashSet<>();
-
-        stmt.setString(1, owner);
-        stmt.setString(2, tbl);
-
-        try (ResultSet pkRs = stmt.executeQuery()) {
-            while(pkRs.next())
-                pkCols.add(pkRs.getString(1));
-        }
-
-        return pkCols;
-    }
-
-    /**
-     * Retrieve index columns.
-     *
-     * @param stmt Prepared SQL statement to execute.
-     * @param owner DB owner.
-     * @param tbl Table name.
-     * @return Indexes.
-     * @throws SQLException If failed to retrieve indexes columns.
-     */
-    private Collection<QueryIndex> indexes(PreparedStatement stmt, String owner, String tbl) throws SQLException {
-        Map<String, QueryIndex> idxs = new LinkedHashMap<>();
-
-        stmt.setString(1, owner);
-        stmt.setString(2, tbl);
-
-        try (ResultSet idxsRs = stmt.executeQuery()) {
-            while (idxsRs.next()) {
-                String idxName = idxsRs.getString(IDX_NAME_IDX);
-
-                QueryIndex idx = idxs.get(idxName);
-
-                if (idx == null) {
-                    idx = index(idxName);
-
-                    idxs.put(idxName, idx);
-                }
-
-                String expr = idxsRs.getString(IDX_EXPR_IDX);
-
-                String col = expr == null ? idxsRs.getString(IDX_COL_NAME_IDX) : expr.replaceAll("\"", "");
-
-                idx.getFields().put(col, !"DESC".equals(idxsRs.getString(IDX_COL_DESCEND_IDX)));
-            }
-        }
-
-        return idxs.values();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Collection<DbTable> tables(Connection conn, List<String> schemas, boolean tblsOnly)
-        throws SQLException {
-        Collection<DbTable> tbls = new ArrayList<>();
-
-        PreparedStatement pkStmt = conn.prepareStatement(SQL_PRIMARY_KEYS);
-
-        PreparedStatement idxStmt = conn.prepareStatement(SQL_INDEXES);
-
-        if (schemas.isEmpty())
-            schemas.add(null);
-
-        Set<String> sysSchemas = systemSchemas();
-
-        try (Statement colsStmt = conn.createStatement()) {
-            for (String schema: schemas) {
-                if (systemSchemas().contains(schema) || (schema != null && schema.startsWith("FLOWS_")))
-                    continue;
-
-                Collection<DbColumn> cols = new ArrayList<>();
-
-                Set<String> pkCols = Collections.emptySet();
-                Collection<QueryIndex> idxs = Collections.emptyList();
-
-                String sql = String.format(SQL_COLUMNS,
-                        tblsOnly ? "INNER JOIN all_tables b on a.table_name = b.table_name and a.owner = b.owner" : "",
-                        schema != null ? String.format(" WHERE a.owner = '%s' ", schema) : "");
-
-                try (ResultSet colsRs = colsStmt.executeQuery(sql)) {
-                    String prevSchema = "";
-                    String prevTbl = "";
-
-                    boolean first = true;
-
-                    while (colsRs.next()) {
-                        String owner = colsRs.getString(OWNER_IDX);
-                        String tbl = colsRs.getString(TBL_NAME_IDX);
-
-                        if (sysSchemas.contains(owner) || (schema != null && schema.startsWith("FLOWS_")))
-                            continue;
-
-                        boolean changed = !owner.equals(prevSchema) || !tbl.equals(prevTbl);
-
-                        if (changed) {
-                            if (first)
-                                first = false;
-                            else
-                                tbls.add(table(prevSchema, prevTbl, cols, idxs));
-
-                            prevSchema = owner;
-                            prevTbl = tbl;
-                            cols = new ArrayList<>();
-                            pkCols = primaryKeys(pkStmt, owner, tbl);
-                            idxs = indexes(idxStmt, owner, tbl);
-                        }
-
-                        String colName = colsRs.getString(COL_NAME_IDX);
-
-                        cols.add(new DbColumn(colName, decodeType(colsRs), pkCols.contains(colName),
-                            !"N".equals(colsRs.getString(NULLABLE_IDX)), false));
-                    }
-
-                    if (!cols.isEmpty())
-                        tbls.add(table(prevSchema, prevTbl, cols, idxs));
-                }
-            }
-        }
-
-        return tbls;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/README.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/README.txt b/modules/schema-import/README.txt
deleted file mode 100644
index ba185b6..0000000
--- a/modules/schema-import/README.txt
+++ /dev/null
@@ -1,216 +0,0 @@
-Apache Ignite Schema Import Module
-------------------------------------------
-
-Ignite ships with its own database schema mapping wizard which provides automatic support for integrating with
-persistence stores. This utility automatically connects to the underlying database and generates all the required
-XML OR-mapping configuration and Java domain model POJOs.
-
-To start the wizard for generating database schema mapping, execute bin/ignite-schema-import.sh script:
-
-For connection with RDBMS system from utility you need to provide: connection url and jdbc driver.
-Note that JDBC drivers are not supplied with the utility and should be provided separately.
-
-Moving from disk-based architectures to in-memory architectures
-------------------------------------------
-
-Use Schema Import Utility for generation of type mapping and domain model in Java.
-
-For example you may use the following script for create sample type 'Person' in your RDBMS system:
-
-create table PERSON(id integer not null PRIMARY KEY, first_name varchar(50), last_name varchar(50), salary double);
-
-insert into PERSON(id, first_name, last_name, salary) values(1, 'Johannes', 'Kepler', 1000);
-insert into PERSON(id, first_name, last_name, salary) values(2, 'Galileo', 'Galilei', 1200);
-insert into PERSON(id, first_name, last_name, salary) values(3, 'Henry', 'More', 1150);
-insert into PERSON(id, first_name, last_name, salary) values(4, 'Polish', 'Brethren', 2000);
-insert into PERSON(id, first_name, last_name, salary) values(5, 'Robert', 'Boyle', 2500);
-insert into PERSON(id, first_name, last_name, salary) values(6, 'Isaac', 'Newton', 1300);
-
-The Ignite Schema Import utility generates the following artifacts:
- # Java POJO key and value classes (enter "org.apache.ignite.schema" package name before generation).
- # XML QueryEntities configuration.
- # Java configuration snippet (alternative to XML).
-
-After you exit from the wizard, you should:
- # Copy generated POJO java classes to you project source folder.
- # Copy XML declaration of QueryEntitres to your Ignite XML configuration file under appropriate
-  CacheConfiguration root.
- # Setup your Ignite XML configuration file DataSource to your RDBMS system for CacheJdbcPojoStore.
- # Or paste Java snippet with cache configuration into your Ignite initialization logic.
- # You need place compiled domain model classes, jdbc driver (used for connect to you RDBMS system) in Ignite node
-  classpath, for example place in 'libs' folder.
-
-Example of spring configuration:
-
-<!-- Sample data source. -->
-<bean id="myDataSource" class="org.h2.jdbcx.JdbcDataSource"/>
-
-<bean class="org.apache.ignite.configuration.IgniteConfiguration">
-    ...
-    <!-- Cache configuration. -->
-    <property name="cacheConfiguration">
-        <list>
-            <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                ...
-
-                <!-- Cache store. -->
-                <property name="cacheStoreFactory">
-                    <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory">
-                        <property name="dataSourceBean" value="myDataSource"/>
-                        <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore">
-                            <property name="dataSourceBean" value="myDataSource" />
-                            <property name="types">
-                                <list>
-                                    <bean class="org.apache.ignite.cache.store.jdbc.JdbcType">
-                                        <property name="cacheName" value="myCache" />
-                                        <property name="databaseSchema" value="MY_DB_SCHEMA" />
-                                        <property name="databaseTable" value="PERSON" />
-                                        <property name="keyType" value="java.lang.Integer" />
-                                        <property name="keyFields">
-                                            <list>
-                                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                                    <property name="databaseFieldType" >
-                                                        <util:constant static-field="java.sql.Types.INTEGER"/>
-                                                    </property>
-                                                    <property name="databaseFieldName" value="ID" />
-                                                    <property name="javaFieldType" value="java.lang.Integer" />
-                                                    <property name="javaFieldName" value="id" />
-                                                </bean>
-                                            </list>
-                                        </property>
-                                        <property name="valueType" value="my.company.Person" />
-                                        <property name="valueFields">
-                                            <list>
-                                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                                    <property name="databaseFieldType" >
-                                                        <util:constant static-field="java.sql.Types.VARCHAR"/>
-                                                    </property>
-                                                    <property name="databaseFieldName" value="first_name" />
-                                                    <property name="javaFieldType" value="java.lang.String" />
-                                                    <property name="javaFieldName" value="firstName" />
-                                                </bean>
-                                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                                    <property name="databaseFieldType" >
-                                                        <util:constant static-field="java.sql.Types.VARCHAR"/>
-                                                    </property>
-                                                    <property name="databaseFieldName" value="last_name" />
-                                                    <property name="javaFieldType" value="java.lang.String" />
-                                                    <property name="javaFieldName" value="lastName" />
-                                                </bean>
-                                                <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField">
-                                                    <property name="databaseFieldType" >
-                                                        <util:constant static-field="java.sql.Types.DOUBLE"/>
-                                                    </property>
-                                                    <property name="databaseFieldName" value="salary" />
-                                                    <property name="javaFieldType" value="java.lang.Double" />
-                                                    <property name="javaFieldName" value="salary" />
-                                                </bean>
-                                            </list>
-                                        </property>
-                                    </bean>
-                                </list>
-                            </property>
-                        </bean>
-                    </bean>
-                </property>
-                ...
-            </bean>
-        </list>
-    </property>
-    ...
-</bean>
-
-Example of java code configuration:
-
-IgniteConfiguration cfg = new IgniteConfiguration();
-...
-CacheConfiguration ccfg = new CacheConfiguration<>();
-
-// Create store factory.
-CacheJdbcPojoStoreFactory storeFactory = new CacheJdbcPojoStoreFactory();
-storeFactory.setDataSourceBean("myDataSource");
-
-// Configure cache types.
-Collection<JdbcType> jdbcTypes = new ArrayList<>();
-
-// PERSON type mapping.
-JdbcType jdbcType = new JdbcType();
-
-jdbcType.setCacheName(CACHE_NAME);
-
-jdbcType.setDatabaseSchema("MY_DB_SCHEMA");
-jdbcType.setDatabaseTable("PERSON");
-
-jdbcType.setKeyType("java.lang.Integer");
-jdbcType.setValueType("my.company.Person");
-
-// Key fields for PERSONS.
-jdbcType.setKeyFields(F.asArray(new JdbcType(Types.INTEGER, "ID", Integer.class, "id")));
-
-// Value fields for PERSONS.
-jdbcType.setValueFields(F.asArray(
-    new JdbcType(Types.INTEGER, "ID", int.class, "id"),
-    new JdbcType(Types.VARCHAR, "first_name", String.class, "firstName"),
-    new JdbcType(Types.VARCHAR, "last_name", String.class, "lastName"),
-    new JdbcType(Types.DOUBLE, "salary", Double.class, "salary")
-));
-
-storeFactory.setTypes(jdbcTypes.toArray(new JdbcType[]));
-
-// Configure cache to use store.
-ccfg.setReadThrough(true);
-ccfg.setWriteThrough(true);
-ccfg.setCacheStoreFactory(storeFactory);
-
-cfg.setCacheConfiguration(ccfg);
-
-...
-
-// Start Ignite node.
-Ignition.start(cfg);
-
-Now you can load all data from database to cache:
-    IgniteCache<Long, Person> cache = ignite.jcache(CACHE_NAME);
-    cache.loadCache(null);
-
-Or you can load data from database to cache with custom SQL:
-    cache.loadCache(null, "java.lang.Long", "select * from PERSON where id = 2")
-
-Also if you put data into cache it will be inserted / updated in underlying database.
-
-
-Performance optimization.
-------------------------------------------
-
-1. Use DataSource with connection pool.
-2. Enable write-behind feature by default write-behind is disabled.
-   Note, write-behind should not be used with TRANSACTIONAL caches.
-
-Example of spring configuration:
-
-<bean class="org.apache.ignite.configuration.IgniteConfiguration">
-    ...
-    <!-- Cache configuration. -->
-    <property name="cacheConfiguration">
-        <list>
-            <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                ...
-                <!-- Sets flag indicating whether write-behind is enabled.. -->
-                <property name="writeBehindEnabled" value="true/>
-                ...
-            </bean>
-        </list>
-    </property>
-    ...
-</bean>
-
-Example of java code configuration:
-
-IgniteConfiguration cfg = new IgniteConfiguration();
-...
-CacheConfiguration ccfg = new CacheConfiguration<>();
-...
-ccfg.setWriteBehindEnabled(true);
-...
-// Start Ignite node.
-Ignition.start(cfg);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/pom.xml b/modules/schema-import/pom.xml
deleted file mode 100644
index 5380dcc..0000000
--- a/modules/schema-import/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!--
-    POM file.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.ignite</groupId>
-        <artifactId>ignite-parent</artifactId>
-        <version>1</version>
-        <relativePath>../../parent</relativePath>
-    </parent>
-
-    <artifactId>ignite-schema-import</artifactId>
-    <version>2.0.0-SNAPSHOT</version>
-    <url>http://ignite.apache.org</url>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-schema-import-db</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.h2database</groupId>
-            <artifactId>h2</artifactId>
-            <version>${h2.version}</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <excludes>
-                    <exclude>**/*.java</exclude>
-                </excludes>
-            </resource>
-        </resources>
-
-        <testResources>
-            <testResource>
-                <directory>src/test/java</directory>
-                <excludes>
-                    <exclude>**/*.java</exclude>
-                </excludes>
-            </testResource>
-        </testResources>
-
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <archive>
-                        <manifest>
-                            <mainClass>org.apache.ignite.schema.ui.SchemaImportApp</mainClass>
-                        </manifest>
-                    </archive>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <profiles>
-        <profile>
-            <id>schema-import</id>
-            <activation>
-                <file>
-                    <exists>${java.home}/lib/jfxrt.jar</exists>
-                </file>
-            </activation>
-            <dependencies>
-                <dependency>
-                    <groupId>javafx</groupId>
-                    <artifactId>jfxrt</artifactId>
-                    <version>${java.version}</version>
-                    <scope>system</scope>
-                    <systemPath>${java.home}/lib/jfxrt.jar</systemPath>
-                </dependency>
-            </dependencies>
-        </profile>
-    </profiles>
-</project>

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/media/data_connection_48x48.png
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/media/data_connection_48x48.png b/modules/schema-import/src/main/java/media/data_connection_48x48.png
deleted file mode 100644
index 475f219..0000000
Binary files a/modules/schema-import/src/main/java/media/data_connection_48x48.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/media/error_48x48.png
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/media/error_48x48.png b/modules/schema-import/src/main/java/media/error_48x48.png
deleted file mode 100644
index e341b8a..0000000
Binary files a/modules/schema-import/src/main/java/media/error_48x48.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/media/ignite_128x128.png
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/media/ignite_128x128.png b/modules/schema-import/src/main/java/media/ignite_128x128.png
deleted file mode 100644
index d99a83c..0000000
Binary files a/modules/schema-import/src/main/java/media/ignite_128x128.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/media/ignite_16x16.png
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/media/ignite_16x16.png b/modules/schema-import/src/main/java/media/ignite_16x16.png
deleted file mode 100644
index 3e07d33..0000000
Binary files a/modules/schema-import/src/main/java/media/ignite_16x16.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/media/ignite_24x24.png
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/media/ignite_24x24.png b/modules/schema-import/src/main/java/media/ignite_24x24.png
deleted file mode 100644
index 8da5c97..0000000
Binary files a/modules/schema-import/src/main/java/media/ignite_24x24.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/media/ignite_32x32.png
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/media/ignite_32x32.png b/modules/schema-import/src/main/java/media/ignite_32x32.png
deleted file mode 100644
index c6c6819..0000000
Binary files a/modules/schema-import/src/main/java/media/ignite_32x32.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/media/ignite_48x48.png
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/media/ignite_48x48.png b/modules/schema-import/src/main/java/media/ignite_48x48.png
deleted file mode 100644
index 5b684cc..0000000
Binary files a/modules/schema-import/src/main/java/media/ignite_48x48.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/media/ignite_64x64.png
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/media/ignite_64x64.png b/modules/schema-import/src/main/java/media/ignite_64x64.png
deleted file mode 100644
index c1d348b..0000000
Binary files a/modules/schema-import/src/main/java/media/ignite_64x64.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/media/information_48x48.png
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/media/information_48x48.png b/modules/schema-import/src/main/java/media/information_48x48.png
deleted file mode 100644
index 8712a1b..0000000
Binary files a/modules/schema-import/src/main/java/media/information_48x48.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/media/question_48x48.png
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/media/question_48x48.png b/modules/schema-import/src/main/java/media/question_48x48.png
deleted file mode 100644
index 84683f9..0000000
Binary files a/modules/schema-import/src/main/java/media/question_48x48.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/media/sign_warning_48x48.png
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/media/sign_warning_48x48.png b/modules/schema-import/src/main/java/media/sign_warning_48x48.png
deleted file mode 100644
index 5e7cccd..0000000
Binary files a/modules/schema-import/src/main/java/media/sign_warning_48x48.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/media/style.css
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/media/style.css b/modules/schema-import/src/main/java/media/style.css
deleted file mode 100644
index 6eee5f9..0000000
--- a/modules/schema-import/src/main/java/media/style.css
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-.root {
-    -fx-background-color: eeeeee;
-}
-
-.button {
-    -fx-font-size: 14;
-    -fx-focus-color: gray;
-}
-
-.label {
-    -fx-font-size: 14;
-}
-
-.check-box {
-    -fx-font-size: 14;
-    -fx-focus-color: gray;
-}
-
-.combo-box-base  {
-    -fx-font-size: 14;
-    -fx-focus-color: gray;
-}
-
-.combo-box-popup .list-view {
-    -fx-font-size : 14;
-}
-
-.text-area {
-    -fx-font-size: 14;
-    -fx-background-color: transparent, transparent, transparent;
-}
-
-.text-area .scroll-pane {
-    -fx-background-color: transparent;
-}
-
-.text-area .scroll-pane .viewport{
-    -fx-background-color: transparent;
-}
-
-.text-area .scroll-pane .content{
-    -fx-background-color: transparent;
-}
-
-.text-area .scroll-bar:vertical:disabled {
-    -fx-opacity: 0;
-}
-
-.text-field {
-    -fx-font-size: 14;
-    -fx-background-color: -fx-text-box-border, -fx-control-inner-background, -fx-control-inner-background;
-}
-
-.text-field:focused {
-    -fx-background-color: -fx-text-box-border, -fx-control-inner-background, -fx-control-inner-background;
-}
-
-.table-view {
-    -fx-focus-color: gray;
-    -fx-font-size: 14;
-}
-
-.table-view .table-row-cell:selected {
-    -fx-background-color: -fx-table-cell-border-color, -fx-cell-hover-color;
-    -fx-background-insets: 0, 0 0 1 0;
-}
-
-.table-view:focused .table-row-cell:selected {
-     -fx-background-color: -fx-focus-color, -fx-cell-focus-inner-border, -fx-selection-bar;
-}
-
-.table-row-cell:empty {
-    -fx-background-color: white;
-}
-
-.table-row-cell:empty .table-cell {
-    -fx-border-width: 0px;
-}
-
-.tooltip {
-    -fx-font-size: 14;
-    -fx-background-radius: 0 0 0 0;
-}
-
-.page-corner {
-    -fx-shape: " ";
-}
-
-.progress-indicator {
-    -fx-progress-color: gray
-}
-
-.split-pane {
-    -fx-background-color: -fx-box-border, eeeeee;
-}
-
-.titled-pane {
-    -fx-font-size: 14;
-}
-
-.titled-pane:focused {
-    -fx-text-fill: -fx-text-base-color;
-}
-
-.titled-pane:focused > .title {
-    -fx-color: eeeeee;
-}
-
-.titled-pane:focused > .title > .arrow-button .arrow {
-    -fx-background-color: black;
-}
-
-#banner {
-   -fx-font-size: 20px;
-   -fx-font-weight: bold;
-   -fx-background-color: white
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/media/text_tree_48x48.png
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/media/text_tree_48x48.png b/modules/schema-import/src/main/java/media/text_tree_48x48.png
deleted file mode 100644
index 6ca9e65..0000000
Binary files a/modules/schema-import/src/main/java/media/text_tree_48x48.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
deleted file mode 100644
index 5cdc6c6..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
+++ /dev/null
@@ -1,831 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.generator;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Writer;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-import org.apache.ignite.cache.QueryIndex;
-import org.apache.ignite.internal.util.typedef.T2;
-import org.apache.ignite.schema.model.PojoDescriptor;
-import org.apache.ignite.schema.model.PojoField;
-import org.apache.ignite.schema.ui.ConfirmCallable;
-import org.apache.ignite.schema.ui.MessageBox;
-
-import static org.apache.ignite.schema.ui.MessageBox.Result.CANCEL;
-import static org.apache.ignite.schema.ui.MessageBox.Result.NO;
-import static org.apache.ignite.schema.ui.MessageBox.Result.NO_TO_ALL;
-
-/**
- * Code generator of POJOs for key and value classes and configuration snippet.
- */
-public class CodeGenerator {
-    /** */
-    private static final String TAB = "    ";
-    /** */
-    private static final String TAB2 = TAB + TAB;
-    /** */
-    private static final String TAB3 = TAB + TAB + TAB;
-
-    /** Java key words. */
-    private static final Set<String> JAVA_KEYWORDS = new HashSet<>(Arrays.asList(
-        "abstract",     "assert",        "boolean",      "break",           "byte",
-        "case",         "catch",         "char",         "class",           "const",
-        "continue",     "default",       "do",           "double",          "else",
-        "enum",         "extends",       "false",        "final",           "finally",
-        "float",        "for",           "goto",         "if",              "implements",
-        "import",       "instanceof",    "int",          "interface",       "long",
-        "native",       "new",           "null",         "package",         "private",
-        "protected",    "public",        "return",       "short",           "static",
-        "strictfp",     "super",         "switch",       "synchronized",    "this",
-        "throw",        "throws",        "transient",    "true",            "try",
-        "void",         "volatile",      "while"
-    ));
-
-    /** java.lang.* */
-    private static final String JAVA_LANG_PKG = "java.lang.";
-
-    /** java.util.* */
-    private static final String JAVA_UTIL_PKG = "java.util.";
-
-    /** Regexp to validate java identifier. */
-    private static final Pattern VALID_JAVA_IDENTIFIER =
-        Pattern.compile("\\p{javaJavaIdentifierStart}\\p{javaJavaIdentifierPart}*");
-
-    /**
-     * Checks if string is a valid java identifier.
-     *
-     * @param identifier String to check.
-     * @param split If {@code true} then identifier will be split by dots.
-     * @param msg Identifier type.
-     * @param type Checked type.
-     * @throws IllegalStateException If passed string is not valid java identifier.
-     */
-    private static void checkValidJavaIdentifier(String identifier, boolean split, String msg, String type)
-        throws IllegalStateException {
-        if (identifier.isEmpty())
-            throw new IllegalStateException(msg + " could not be empty!");
-
-        String[] parts = split ? identifier.split("\\.") : new String[] {identifier};
-
-        if (parts.length == 0)
-            throw new IllegalStateException(msg + " could not has empty parts!");
-
-        for (String part : parts) {
-            if (part.isEmpty())
-                throw new IllegalStateException(msg + " could not has empty parts!");
-
-            if (JAVA_KEYWORDS.contains(part))
-                throw new IllegalStateException(msg + " could not contains reserved keyword:" +
-                    " [type = " + type + ", identifier=" + identifier + ", keyword=" + part + "]");
-
-            if (!VALID_JAVA_IDENTIFIER.matcher(part).matches())
-                throw new IllegalStateException("Invalid " + msg.toLowerCase() + " name: " +
-                    " [type = " + type + ", identifier=" + identifier + ", illegal part=" + part + "]");
-        }
-    }
-
-    /**
-     * Add line to source code without indent.
-     *
-     * @param src Source code.
-     * @param line Code line.
-     */
-    private static void add0(Collection<String> src, String line) {
-        src.add(line);
-    }
-
-    /**
-     * Add line to source code with one indent.
-     *
-     * @param src Source code.
-     * @param line Code line.
-     */
-    private static void add1(Collection<String> src, String line) {
-        src.add(TAB + line);
-    }
-
-    /**
-     * Add line to source code with two indents.
-     *
-     * @param src Source code.
-     * @param line Code line.
-     */
-    private static void add2(Collection<String> src, String line) {
-        src.add(TAB2 + line);
-    }
-
-    /**
-     * Add line to source code with two indents.
-     *
-     * @param src Source code.
-     * @param fmt Code line with format placeholders.
-     * @param args Format arguments.
-     */
-    private static void add2Fmt(Collection<String> src, String fmt, Object... args) {
-        add2(src, String.format(fmt, args));
-    }
-
-    /**
-     * Add line to source code with three indents.
-     *
-     * @param src Source code.
-     * @param line Code line.
-     */
-    private static void add3(Collection<String> src, String line) {
-        src.add(TAB3 + line);
-    }
-
-    /**
-     * @param str Source string.
-     * @return String with first letters in upper case.
-     */
-    private static String capitalizeFirst(String str) {
-        return Character.toUpperCase(str.charAt(0)) + str.substring(1);
-    }
-
-    /**
-     * @param type Full type name.
-     * @return Field java type name.
-     */
-    private static String javaTypeName(String type) {
-        return type.startsWith("java.lang.") ? type.substring(10) : type;
-    }
-
-    /**
-     * @param field POJO field descriptor.
-     * @return Field java type name.
-     */
-    private static String javaTypeName(PojoField field) {
-        return javaTypeName(field.javaTypeName());
-    }
-
-    /**
-     * Generate class header.
-     *
-     * @param src Source code.
-     * @param pkg Package name.
-     * @param desc Class description.
-     * @param cls Class declaration.
-     * @param imports Optional imports.
-     */
-    private static void header(Collection<String> src, String pkg, String desc, String cls, String... imports) {
-        // License.
-        add0(src, "/*");
-        add0(src, " * Licensed to the Apache Software Foundation (ASF) under one or more");
-        add0(src, " * contributor license agreements.  See the NOTICE file distributed with");
-        add0(src, " * this work for additional information regarding copyright ownership.");
-        add0(src, " * The ASF licenses this file to You under the Apache License, Version 2.0");
-        add0(src, " * (the \"License\"); you may not use this file except in compliance with");
-        add0(src, " * the License.  You may obtain a copy of the License at");
-        add0(src, " *");
-        add0(src, " *      http://www.apache.org/licenses/LICENSE-2.0");
-        add0(src, " *");
-        add0(src, " * Unless required by applicable law or agreed to in writing, software");
-        add0(src, " * distributed under the License is distributed on an \"AS IS\" BASIS,");
-        add0(src, " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
-        add0(src, " * See the License for the specific language governing permissions and");
-        add0(src, " * limitations under the License.");
-        add0(src, " */");
-        add0(src, "");
-
-        // Package.
-        add0(src, "package " + pkg + ";");
-        add0(src, "");
-
-        // Imports.
-        if (imports != null && imports.length > 0) {
-            for (String imp : imports)
-                add0(src, imp.isEmpty() ? "" : "import " + imp + ";");
-
-            add0(src, "");
-        }
-
-        // Class.
-        add0(src, "/**");
-        add0(src, " * " + desc + " definition.");
-        add0(src, " *");
-        add0(src, " * Code generated by Apache Ignite Schema Import utility: "
-            + new SimpleDateFormat("MM/dd/yyyy").format(new Date()) + ".");
-        add0(src, " */");
-        add0(src, "public class " + cls + " {");
-    }
-
-    /**
-     * Write source code to file.
-     *
-     * @param src Source code.
-     * @param out Target file.
-     * @throws IOException If failed to write source code to file.
-     */
-    private static void write(Collection<String> src, File out) throws IOException {
-        // Write generated code to file.
-        try (Writer writer = new BufferedWriter(new FileWriter(out))) {
-            for (String line : src)
-                writer.write(line + '\n');
-        }
-    }
-
-    /**
-     * Ensure that all folders for packages exist.
-     *
-     * @param pkg Packages.
-     * @throws IOException If failed to ensure.
-     */
-    private static void ensurePackages(File pkg) throws IOException {
-        if (!pkg.exists() && !pkg.mkdirs())
-            throw new IOException("Failed to create folders for package: " + pkg);
-    }
-
-    /**
-     * Generate java class code.
-     *
-     * @param pojo POJO descriptor.
-     * @param key {@code true} if key class should be generated.
-     * @param pkg Package name.
-     * @param pkgFolder Folder where to save generated class.
-     * @param constructor {@code true} if empty and full constructors should be generated.
-     * @param includeKeys {@code true} if key fields should be included into value class.
-     * @param askOverwrite Callback to ask user to confirm file overwrite.
-     * @throws IOException If failed to write generated code into file.
-     */
-    private static void generateCode(PojoDescriptor pojo, boolean key, String pkg, File pkgFolder,
-        boolean constructor, boolean includeKeys, ConfirmCallable askOverwrite) throws IOException {
-        String type = key ? pojo.keyClassName() : pojo.valueClassName();
-
-        checkValidJavaIdentifier(pkg, true, "Package", type);
-
-        checkValidJavaIdentifier(type, false, "Type", type);
-
-        ensurePackages(pkgFolder);
-
-        File out = new File(pkgFolder, type + ".java");
-
-        if (out.exists()) {
-            MessageBox.Result choice = askOverwrite.confirm(out.getName());
-
-            if (CANCEL == choice)
-                throw new IllegalStateException("POJO generation was canceled!");
-
-            if (NO == choice || NO_TO_ALL == choice)
-                return;
-        }
-
-        Collection<String> src = new ArrayList<>(256);
-
-        header(src, pkg, type, type + " implements Serializable", "java.io.*");
-
-        add1(src, "/** */");
-        add1(src, "private static final long serialVersionUID = 0L;");
-        add0(src, "");
-
-        Collection<PojoField> fields = key ? pojo.keyFields() : pojo.valueFields(includeKeys);
-
-        // Generate fields declaration.
-        for (PojoField field : fields) {
-            String fldName = field.javaName();
-
-            checkValidJavaIdentifier(fldName, false, "Field", type);
-
-            add1(src, "/** Value for " + fldName + ". */");
-
-            if (key && field.affinityKey())
-                add1(src, "@AffinityKeyMapped");
-
-            add1(src, "private " + javaTypeName(field) + " " + fldName + ";");
-            add0(src, "");
-        }
-
-        // Generate constructors.
-        if (constructor) {
-            add1(src, "/**");
-            add1(src, " * Empty constructor.");
-            add1(src, " */");
-            add1(src, "public " + type + "() {");
-            add2(src, "// No-op.");
-            add1(src, "}");
-
-            add0(src, "");
-
-            add1(src, "/**");
-            add1(src, " * Full constructor.");
-            add1(src, " */");
-            add1(src, "public " + type + "(");
-
-            Iterator<PojoField> it = fields.iterator();
-
-            while (it.hasNext()) {
-                PojoField field = it.next();
-
-                add2(src, javaTypeName(field) + " " + field.javaName() + (it.hasNext() ? "," : ""));
-            }
-            add1(src, ") {");
-
-            for (PojoField field : fields)
-                add2Fmt(src, "this.%1$s = %1$s;", field.javaName());
-
-            add1(src, "}");
-            add0(src, "");
-        }
-
-        // Generate getters and setters methods.
-        for (PojoField field : fields) {
-            String fldName = field.javaName();
-
-            String fldType = javaTypeName(field);
-
-            String mtdName = capitalizeFirst(fldName);
-
-            add1(src, "/**");
-            add1(src, " * Gets " + fldName + ".");
-            add1(src, " *");
-            add1(src, " * @return Value for " + fldName + ".");
-            add1(src, " */");
-            add1(src, "public " + fldType + " get" + mtdName + "() {");
-            add2(src, "return " + fldName + ";");
-            add1(src, "}");
-            add0(src, "");
-
-            add1(src, "/**");
-            add1(src, " * Sets " + fldName + ".");
-            add1(src, " *");
-            add1(src, " * @param " + fldName + " New value for " + fldName + ".");
-            add1(src, " */");
-            add1(src, "public void set" + mtdName + "(" + fldType + " " + fldName + ") {");
-            add2(src, "this." + fldName + " = " + fldName + ";");
-            add1(src, "}");
-            add0(src, "");
-        }
-
-        // Generate equals() method.
-        add1(src, "/** {@inheritDoc} */");
-        add1(src, "@Override public boolean equals(Object o) {");
-        add2(src, "if (this == o)");
-        add3(src, "return true;");
-        add0(src, "");
-
-        add2(src, "if (!(o instanceof " + type + "))");
-        add3(src, "return false;");
-        add0(src, "");
-
-        add2Fmt(src, "%1$s that = (%1$s)o;", type);
-
-        for (PojoField field : fields) {
-            add0(src, "");
-
-            String javaName = field.javaName();
-
-            if (field.primitive()) {
-                switch (field.javaTypeName()) {
-                    case "float":
-                        add2Fmt(src, "if (Float.compare(%1$s, that.%1$s) != 0)", javaName);
-                        break;
-
-                    case "double":
-                        add2Fmt(src, "if (Double.compare(%1$s, that.%1$s) != 0)", javaName);
-                        break;
-
-                    default:
-                        add2Fmt(src, "if (%1$s != that.%1$s)", javaName);
-                }
-            }
-            else
-                add2Fmt(src, "if (%1$s != null ? !%1$s.equals(that.%1$s) : that.%1$s != null)", javaName);
-
-            add3(src, "return false;");
-        }
-
-        add0(src, "");
-        add2(src, "return true;");
-        add1(src, "}");
-        add0(src, "");
-
-        // Generate hashCode() method.
-        add1(src, "/** {@inheritDoc} */");
-        add1(src, "@Override public int hashCode() {");
-
-        List<String> hash = new ArrayList<>(fields.size() * 2);
-
-        boolean first = true;
-        boolean tempVar = false;
-
-        for (PojoField field : fields) {
-            String javaName = field.javaName();
-
-            if (!first)
-                add0(hash, "");
-
-            if (field.primitive()) {
-                switch (field.javaTypeName()) {
-                    case "boolean":
-                        add2Fmt(hash, first ? "int res = %s ? 1 : 0;" : "res = 31 * res + (%s ? 1 : 0);", javaName);
-                        break;
-
-                    case "byte":
-                    case "short":
-                        add2Fmt(hash, first ? "int res = (int)%s;" : "res = 31 * res + (int)%s;", javaName);
-                        break;
-
-                    case "int":
-                        add2Fmt(hash, first ? "int res = %s;" : "res = 31 * res + %s;", javaName);
-                        break;
-
-                    case "long":
-                        add2Fmt(hash, first
-                            ? "int res = (int)(%1$s ^ (%1$s >>> 32));"
-                            : "res = 31 * res + (int)(%1$s ^ (%1$s >>> 32));", javaName);
-                        break;
-
-                    case "float":
-                        add2Fmt(hash, first
-                            ? "int res = %1$s != +0.0f ? Float.floatToIntBits(%1$s) : 0;"
-                            : "res = 31 * res + (%1$s != +0.0f ? Float.floatToIntBits(%1$s) : 0);", javaName);
-                        break;
-
-                    case "double":
-                        add2Fmt(hash, (tempVar ? "ig_hash_temp" : "long ig_hash_temp") +
-                            " = Double.doubleToLongBits(%s);", javaName);
-
-                        add0(hash, "");
-
-                        add2Fmt(hash, first
-                            ? "int res = (int)(ig_hash_temp ^ (ig_hash_temp >>> 32));"
-                            : "res = 31 * res + (int)(ig_hash_temp ^ (ig_hash_temp >>> 32));", javaName);
-
-                        tempVar = true;
-                        break;
-                }
-            }
-            else
-                add2Fmt(hash, first ? "int res = %1$s != null ? %1$s.hashCode() : 0;"
-                    : "res = 31 * res + (%1$s != null ? %1$s.hashCode() : 0);", javaName);
-
-            first = false;
-        }
-
-        for (String line : hash)
-            add0(src, line);
-
-        add0(src, "");
-        add2(src, "return res;");
-        add1(src, "}");
-        add0(src, "");
-
-        // Generate toString() method.
-        add1(src, "/** {@inheritDoc} */");
-        add1(src, "@Override public String toString() {");
-
-        Iterator<PojoField> it = fields.iterator();
-
-        add2Fmt(src, "return \"%1$s [%2$s=\" + %2$s +", type, it.next().javaName());
-
-        while (it.hasNext())
-            add3(src, String.format("\", %1$s=\" + %1$s +", it.next().javaName()));
-
-        add3(src, "\"]\";");
-        add1(src, "}");
-
-        add0(src, "}");
-        add0(src, "");
-
-        // Write generated code to file.
-        write(src, out);
-    }
-
-    /**
-     * Generate source code for type by its metadata.
-     *
-     * @param pojo POJO descriptor.
-     * @param outFolder Output folder.
-     * @param pkg Types package.
-     * @param constructor {@code true} if empty and full constructors should be generated.
-     * @param includeKeys {@code true} if key fields should be included into value class.
-     * @param askOverwrite Callback to ask user to confirm file overwrite.
-     * @throws IOException If failed to write generated code into file.
-     */
-    public static void pojos(PojoDescriptor pojo, String outFolder, String pkg, boolean constructor,
-        boolean includeKeys, ConfirmCallable askOverwrite) throws IOException {
-        File pkgFolder = new File(outFolder, pkg.replace('.', File.separatorChar));
-
-        generateCode(pojo, true, pkg, pkgFolder, constructor, false, askOverwrite);
-
-        generateCode(pojo, false, pkg, pkgFolder, constructor, includeKeys, askOverwrite);
-    }
-
-    /**
-     * Add type fields.
-     *
-     * @param src Source code lines.
-     * @param owner Fields owner collection.
-     * @param fields Fields metadata.
-     */
-    private static void addFields(Collection<String> src, String owner, Collection<PojoField> fields) {
-        for (PojoField field : fields) {
-            String javaTypeName = field.javaTypeName();
-
-            if (javaTypeName.startsWith(JAVA_LANG_PKG))
-                javaTypeName = javaTypeName.substring(JAVA_LANG_PKG.length());
-            else if (javaTypeName.startsWith(JAVA_UTIL_PKG))
-                javaTypeName = javaTypeName.substring(JAVA_UTIL_PKG.length());
-
-            add2(src, owner + ".add(new JdbcTypeField(Types." + field.dbTypeName() + ", \"" + field.dbName() + "\", " +
-                javaTypeName + ".class, \"" + field.javaName() + "\"));");
-        }
-    }
-
-    /**
-     * Generate java snippet for cache configuration with JDBC store and types metadata.
-     *
-     * @param pojos POJO descriptors.
-     * @param pkg Types package.
-     * @param includeKeys {@code true} if key fields should be included into value class.
-     * @param generateAliases {@code true} if aliases should be generated for query fields.
-     * @param outFolder Output folder.
-     * @param askOverwrite Callback to ask user to confirm file overwrite.
-     * @throws IOException If generation failed.
-     */
-    public static void snippet(Collection<PojoDescriptor> pojos, String pkg, boolean includeKeys,
-        boolean generateAliases, String outFolder, ConfirmCallable askOverwrite) throws IOException {
-        File pkgFolder = new File(outFolder, pkg.replace('.', File.separatorChar));
-
-        ensurePackages(pkgFolder);
-
-        File cacheCfg = new File(pkgFolder, "CacheConfig.java");
-
-        if (cacheCfg.exists()) {
-            MessageBox.Result choice = askOverwrite.confirm(cacheCfg.getName());
-
-            if (CANCEL == choice)
-                throw new IllegalStateException("Java snippet generation was canceled!");
-
-            if (NO == choice || NO_TO_ALL == choice)
-                return;
-        }
-
-        Collection<String> src = new ArrayList<>(256);
-
-        header(src, pkg, "CacheConfig", "CacheConfig", "java.sql.*", "java.util.*", "", "org.apache.ignite.cache.*",
-            "org.apache.ignite.cache.store.jdbc.*", "org.apache.ignite.configuration.*");
-
-        // Generate methods for each type in order to avoid compiler error "java: code too large".
-        for (PojoDescriptor pojo : pojos) {
-            String tbl = pojo.table();
-            String valClsName = pojo.valueClassName();
-            Collection<PojoField> fields = pojo.valueFields(true);
-
-            add1(src, "/**");
-            add1(src, " * Create JDBC type for " + tbl + ".");
-            add1(src, " *");
-            add1(src, " * @param cacheName Cache name.");
-            add1(src, " * @return Configured JDBC type.");
-            add1(src, " */");
-            add1(src, "private static JdbcType jdbcType" + valClsName + "(String cacheName) {");
-
-            add2(src, "JdbcType jdbcType = new JdbcType();");
-            add0(src, "");
-
-            add2(src, "jdbcType.setCacheName(cacheName);");
-
-            // Database schema.
-            if (pojo.schema() != null)
-                add2(src, "jdbcType.setDatabaseSchema(\"" + pojo.schema() + "\");");
-
-            // Database table.
-            add2(src, "jdbcType.setDatabaseTable(\"" + tbl + "\");");
-
-            // Java info.
-            add2(src, "jdbcType.setKeyType(\"" + pkg + "." + pojo.keyClassName() + "\");");
-            add2(src, "jdbcType.setValueType(\"" + pkg + "." + valClsName + "\");");
-            add0(src, "");
-
-            // Key fields.
-            add2(src, "// Key fields for " + tbl + ".");
-            add2(src, "Collection<JdbcTypeField> keys = new ArrayList<>();");
-            addFields(src, "keys", pojo.keyFields());
-            add2(src, "jdbcType.setKeyFields(keys.toArray(new JdbcTypeField[keys.size()]));");
-            add0(src, "");
-
-            // Value fields.
-            add2(src, "// Value fields for " + tbl + ".");
-            add2(src, "Collection<JdbcTypeField> vals = new ArrayList<>();");
-            addFields(src, "vals", pojo.valueFields(includeKeys));
-            add2(src, "jdbcType.setValueFields(vals.toArray(new JdbcTypeField[vals.size()]));");
-            add0(src, "");
-            add2(src, "return jdbcType;");
-            add1(src, "}");
-            add0(src, "");
-
-            add1(src, "/**");
-            add1(src, " * Create SQL Query descriptor for " + tbl + ".");
-            add1(src, " *");
-            add1(src, " * @return Configured query entity.");
-            add1(src, " */");
-            add1(src, "private static QueryEntity queryEntity" + valClsName + "() {");
-
-            // Query entity.
-            add2(src, "QueryEntity qryEntity = new QueryEntity();");
-            add0(src, "");
-            add2(src, "qryEntity.setKeyType(\"" + pkg + "." + pojo.keyClassName() + "\");");
-            add2(src, "qryEntity.setValueType(\"" + pkg + "." + valClsName + "\");");
-
-            add0(src, "");
-
-            // Query fields.
-            add2(src, "// Query fields for " + tbl + ".");
-            add2(src, "LinkedHashMap<String, String> fields = new LinkedHashMap<>();");
-            add0(src, "");
-
-            for (PojoField field : fields)
-                add2(src, "fields.put(\"" + field.javaName() + "\", \"" +
-                    GeneratorUtils.boxPrimitiveType(field.javaTypeName()) + "\");");
-
-            add0(src, "");
-            add2(src, "qryEntity.setFields(fields);");
-            add0(src, "");
-
-            // Aliases.
-            if (generateAliases) {
-                Collection<PojoField> aliases = new ArrayList<>();
-
-                for (PojoField field : fields) {
-                    if (!field.javaName().equalsIgnoreCase(field.dbName()))
-                        aliases.add(field);
-                }
-
-                if (!aliases.isEmpty()) {
-                    add2(src, "// Aliases for fields.");
-                    add2(src, "Map<String, String> aliases = new HashMap<>();");
-                    add0(src, "");
-
-                    for (PojoField alias : aliases)
-                        add2(src, "aliases.put(\"" + alias.javaName() + "\", \"" + alias.dbName() + "\");");
-
-                    add0(src, "");
-                    add2(src, "qryEntity.setAliases(aliases);");
-                    add0(src, "");
-                }
-            }
-
-            // Indexes.
-            Collection<QueryIndex> idxs = pojo.indexes();
-
-            if (!idxs.isEmpty()) {
-                boolean first = true;
-                boolean firstIdx = true;
-
-                for (QueryIndex idx : idxs) {
-                    Set<Map.Entry<String, Boolean>> dbIdxFlds = idx.getFields().entrySet();
-
-                    int sz = dbIdxFlds.size();
-
-                    List<T2<String, Boolean>> idxFlds = new ArrayList<>(sz);
-
-                    for (Map.Entry<String, Boolean> idxFld : dbIdxFlds) {
-                        PojoField field = GeneratorUtils.findFieldByName(fields, idxFld.getKey());
-
-                        if (field != null)
-                            idxFlds.add(new T2<>(field.javaName(), idxFld.getValue()));
-                        else
-                            break;
-                    }
-
-                    // Only if all fields present, add index description.
-                    if (idxFlds.size() == sz) {
-                        if (first) {
-                            add2(src, "// Indexes for " + tbl + ".");
-                            add2(src, "Collection<QueryIndex> idxs = new ArrayList<>();");
-                            add0(src, "");
-                        }
-
-                        if (sz == 1) {
-                            T2<String, Boolean> idxFld = idxFlds.get(0);
-
-                            add2(src, "idxs.add(new QueryIndex(\"" + idxFld.getKey() + "\", " + idxFld.getValue() + ", \"" +
-                                idx.getName() + "\"));");
-                            add0(src, "");
-                        }
-                        else {
-                            add2(src, (firstIdx ? "QueryIndex " : "") + "idx = new QueryIndex();");
-                            add0(src, "");
-
-                            add2(src, "idx.setName(\"" + idx.getName() + "\");");
-                            add0(src, "");
-
-                            add2(src, "idx.setIndexType(QueryIndexType." + idx.getIndexType() + ");");
-                            add0(src, "");
-
-                            add2(src, (firstIdx ? "LinkedHashMap<String, Boolean> " : "") +
-                                "idxFlds = new LinkedHashMap<>();");
-                            add0(src, "");
-
-                            for (T2<String, Boolean> idxFld : idxFlds)
-                                add2(src, "idxFlds.put(\"" + idxFld.getKey() + "\", " + idxFld.getValue() + ");");
-
-                            add0(src, "");
-
-                            add2(src, "idx.setFields(idxFlds);");
-                            add0(src, "");
-
-                            add2(src, "idxs.add(idx);");
-                            add0(src, "");
-
-                            firstIdx = false;
-                        }
-
-                        first = false;
-                    }
-                }
-
-                if (!first) {
-                    add2(src, "qryEntity.setIndexes(idxs);");
-                    add0(src, "");
-                }
-            }
-
-            add2(src, "return qryEntity;");
-
-            add1(src, "}");
-            add0(src, "");
-        }
-
-        add1(src, "/**");
-        add1(src, " * Configure cache.");
-        add1(src, " *");
-        add1(src, " * @param cacheName Cache name.");
-        add1(src, " * @param storeFactory Cache store factory.");
-        add1(src, " * @return Cache configuration.");
-        add1(src, " */");
-        add1(src, "public static <K, V> CacheConfiguration<K, V> cache(String cacheName," +
-            " CacheJdbcPojoStoreFactory<K, V> storeFactory) {");
-        add2(src, "if (storeFactory == null)");
-        add3(src, " throw new IllegalArgumentException(\"Cache store factory cannot be null.\");");
-        add0(src, "");
-        add2(src, "CacheConfiguration<K, V> ccfg = new CacheConfiguration<>(cacheName);");
-        add0(src, "");
-        add2(src, "ccfg.setCacheStoreFactory(storeFactory);");
-        add2(src, "ccfg.setReadThrough(true);");
-        add2(src, "ccfg.setWriteThrough(true);");
-        add0(src, "");
-
-        add2(src, "// Configure JDBC types.");
-        add2(src, "Collection<JdbcType> jdbcTypes = new ArrayList<>();");
-        add0(src, "");
-
-        for (PojoDescriptor pojo : pojos)
-            add2(src, "jdbcTypes.add(jdbcType" + pojo.valueClassName() + "(cacheName));");
-
-        add0(src, "");
-
-        add2(src, "storeFactory.setTypes(jdbcTypes.toArray(new JdbcType[jdbcTypes.size()]));");
-        add0(src, "");
-
-
-        add2(src, "// Configure query entities.");
-        add2(src, "Collection<QueryEntity> qryEntities = new ArrayList<>();");
-        add0(src, "");
-
-        for (PojoDescriptor pojo : pojos)
-            add2(src, "qryEntities.add(queryEntity" + pojo.valueClassName() + "());");
-
-        add0(src, "");
-
-        add2(src, "ccfg.setQueryEntities(qryEntities);");
-        add0(src, "");
-
-        add2(src, "return ccfg;");
-        add1(src, "}");
-
-        add0(src, "}");
-
-        write(src, cacheCfg);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/GeneratorUtils.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/GeneratorUtils.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/GeneratorUtils.java
deleted file mode 100644
index ac710db..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/GeneratorUtils.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.schema.generator;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.ignite.schema.model.PojoField;
-
-/**
- * Schema import generator utils.
- */
-public class GeneratorUtils {
-    /** Map of conformity between primitive type and Java class. */
-    private static final Map<String, String> primitiveToObject = new HashMap<>();
-
-    static {
-        primitiveToObject.put("boolean", "java.lang.Boolean");
-        primitiveToObject.put("byte", "java.lang.Byte");
-        primitiveToObject.put("short", "java.lang.Short");
-        primitiveToObject.put("int", "java.lang.Integer");
-        primitiveToObject.put("long", "java.lang.Long");
-        primitiveToObject.put("float", "java.lang.Float");
-        primitiveToObject.put("double", "java.lang.Double");
-    }
-
-    /**
-     * Convert primitive type to conformity Java class.
-     *
-     * @param type Primitive type.
-     * @return Conformity Java class
-     */
-    public static String boxPrimitiveType(String type) {
-        if (primitiveToObject.containsKey(type))
-            return primitiveToObject.get(type);
-
-        return type;
-    }
-
-    /**
-     * Find field by name.
-     *
-     * @param fields Field descriptors.
-     * @param name Field name to find.
-     * @return Field descriptor or {@code null} if not found.
-     */
-    public static PojoField findFieldByName(Collection<PojoField> fields, String name) {
-        for (PojoField field: fields)
-            if (field.dbName().equals(name))
-                return field;
-
-        return null;
-    }
-}


[13/50] [abbrv] ignite git commit: IGNITE-4625 .NET: Fix java-only node stop

Posted by dm...@apache.org.
IGNITE-4625 .NET: Fix java-only node stop

Solves "Ignite instance with this name has already been started" test failures


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

Branch: refs/heads/ignite-1192
Commit: 7696dd24e15c4dd387db430bd7b1679eceb843fb
Parents: 889594f
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Tue Apr 4 11:03:40 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Tue Apr 4 11:03:40 2017 +0300

----------------------------------------------------------------------
 .../ignite/platform/PlatformStopIgniteTask.java | 11 ++++++-
 .../Compute/AbstractTaskTest.cs                 | 28 ++----------------
 .../Compute/MixedClusterTest.cs                 | 31 +++-----------------
 .../Apache.Ignite.Core.Tests/DeploymentTest.cs  | 10 +++++++
 4 files changed, 26 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7696dd24/modules/core/src/test/java/org/apache/ignite/platform/PlatformStopIgniteTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformStopIgniteTask.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformStopIgniteTask.java
index be23ed6..b79aa52 100644
--- a/modules/core/src/test/java/org/apache/ignite/platform/PlatformStopIgniteTask.java
+++ b/modules/core/src/test/java/org/apache/ignite/platform/PlatformStopIgniteTask.java
@@ -38,7 +38,16 @@ public class PlatformStopIgniteTask extends ComputeTaskAdapter<String, Boolean>
     /** {@inheritDoc} */
     @Nullable @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid,
         @Nullable String arg) throws IgniteException {
-        return Collections.singletonMap(new PlatformStopIgniteJob(arg), F.first(subgrid));
+        ClusterNode node = subgrid.get(0);
+
+        for (ClusterNode n : subgrid) {
+            if (n.isLocal()) {
+                node = n;
+                break;
+            }
+        }
+
+        return Collections.singletonMap(new PlatformStopIgniteJob(arg), node);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/7696dd24/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/AbstractTaskTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/AbstractTaskTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/AbstractTaskTest.cs
index 6bcd010..65bb369 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/AbstractTaskTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/AbstractTaskTest.cs
@@ -129,32 +129,8 @@ namespace Apache.Ignite.Core.Tests.Compute
         [TestFixtureTearDown]
         public void StopClient()
         {
-            if (Grid1 != null)
-                Ignition.Stop(Grid1.Name, true);
-
-            if (_fork)
-            {
-                if (_proc2 != null) {
-                    _proc2.Kill();
-
-                    _proc2.Join();
-                }
-
-                if (_proc3 != null)
-                {
-                    _proc3.Kill();
-
-                    _proc3.Join();
-                }
-            }
-            else
-            {
-                if (_grid2 != null)
-                    Ignition.Stop(_grid2.Name, true);
-
-                if (_grid3 != null)
-                    Ignition.Stop(_grid3.Name, true);
-            }
+            Ignition.StopAll(true);
+            IgniteProcess.KillAll();
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/7696dd24/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/MixedClusterTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/MixedClusterTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/MixedClusterTest.cs
index ab4e6ab..41817eb 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/MixedClusterTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/MixedClusterTest.cs
@@ -21,8 +21,6 @@ namespace Apache.Ignite.Core.Tests.Compute
     using System.Collections;
     using System.Linq;
     using Apache.Ignite.Core.Cache;
-    using Apache.Ignite.Core.Cache.Query;
-    using Apache.Ignite.Core.Common;
     using Apache.Ignite.Core.Compute;
     using NUnit.Framework;
 
@@ -31,8 +29,12 @@ namespace Apache.Ignite.Core.Tests.Compute
     /// </summary>
     public class MixedClusterTest
     {
+        /** */
         private IIgnite _ignite;
+        
+        /** */
         private string _javaNodeName;
+
         /** */
         private const string SpringConfig = @"Config\Compute\compute-grid1.xml";
 
@@ -89,18 +91,6 @@ namespace Apache.Ignite.Core.Tests.Compute
         }
 
         /// <summary>
-        /// Tests the scan query.
-        /// </summary>
-        [Test]
-        public void TestScanQuery()
-        {
-            var cache = GetCache();
-            
-            // Scan query does not work in the mixed cluster.
-            Assert.Throws<IgniteException>(() => cache.Query(new ScanQuery<int, int>(new ScanFilter())).GetAll());
-        }
-
-        /// <summary>
         /// Tests the cache invoke.
         /// </summary>
         [Test]
@@ -154,19 +144,6 @@ namespace Apache.Ignite.Core.Tests.Compute
         }
 
         /// <summary>
-        /// Test filter.
-        /// </summary>
-        [Serializable]
-        private class ScanFilter : ICacheEntryFilter<int, int>
-        {
-            /** <inheritdoc /> */
-            public bool Invoke(ICacheEntry<int, int> entry)
-            {
-                return entry.Key < 100;
-            }
-        }
-
-        /// <summary>
         /// Test processor.
         /// </summary>
         [Serializable]

http://git-wip-us.apache.org/repos/asf/ignite/blob/7696dd24/modules/platforms/dotnet/Apache.Ignite.Core.Tests/DeploymentTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/DeploymentTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/DeploymentTest.cs
index ece4894..5f2ecfa 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/DeploymentTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/DeploymentTest.cs
@@ -111,6 +111,16 @@ namespace Apache.Ignite.Core.Tests
         }
 
         /// <summary>
+        /// Fixture tear down.
+        /// </summary>
+        [TestFixtureTearDown]
+        public void TestFixtureTearDown()
+        {
+            Ignition.StopAll(true);
+            IgniteProcess.KillAll();
+        }
+
+        /// <summary>
         /// Verifies that custom-deployed node has started.
         /// </summary>
         private static void VerifyNodeStarted(string exePath)


[17/50] [abbrv] ignite git commit: IGNITE-3583: Replaced passing by value with passing by reference

Posted by dm...@apache.org.
IGNITE-3583: Replaced passing by value with passing by reference


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

Branch: refs/heads/ignite-1192
Commit: c3431e901678ea1520bfc647b935e7d425b839d4
Parents: 5d5ba5c
Author: Igor Sapego <ig...@gmail.com>
Authored: Tue Apr 4 19:07:49 2017 +0300
Committer: Igor Sapego <ig...@gmail.com>
Committed: Tue Apr 4 19:07:49 2017 +0300

----------------------------------------------------------------------
 .../cpp/binary/include/ignite/binary/binary_raw_writer.h         | 4 ++--
 .../platforms/cpp/binary/include/ignite/binary/binary_writer.h   | 4 ++--
 .../cpp/binary/include/ignite/impl/binary/binary_writer_impl.h   | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c3431e90/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h
index 88a8014..a43c957 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h
@@ -377,7 +377,7 @@ namespace ignite
              * @param val Object.
              */
             template<typename T>
-            void WriteObject(T val)
+            void WriteObject(const T& val)
             {
                 impl->WriteObject<T>(val);
             }
@@ -388,4 +388,4 @@ namespace ignite
     }
 }
 
-#endif //_IGNITE_BINARY_BINARY_RAW_WRITER
\ No newline at end of file
+#endif //_IGNITE_BINARY_BINARY_RAW_WRITER

http://git-wip-us.apache.org/repos/asf/ignite/blob/c3431e90/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h
index e3962cf..f8e7de3 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h
@@ -410,7 +410,7 @@ namespace ignite
              * @param val Value.
              */
             template<typename T>
-            void WriteObject(const char* fieldName, T val)
+            void WriteObject(const char* fieldName, const T& val)
             {
                 impl->WriteObject<T>(fieldName, val);
             }
@@ -428,4 +428,4 @@ namespace ignite
     }
 }
 
-#endif //_IGNITE_BINARY_BINARY_WRITER
\ No newline at end of file
+#endif //_IGNITE_BINARY_BINARY_WRITER

http://git-wip-us.apache.org/repos/asf/ignite/blob/c3431e90/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
index 2cc86e1..50b2375 100644
--- a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
+++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
@@ -654,7 +654,7 @@ namespace ignite
                  * @param val Object.
                  */
                 template<typename T>
-                void WriteObject(const char* fieldName, T val)
+                void WriteObject(const char* fieldName, const T& val)
                 {
                     CheckRawMode(false);
 
@@ -1018,4 +1018,4 @@ namespace ignite
     }
 }
 
-#endif //_IGNITE_IMPL_BINARY_BINARY_WRITER
\ No newline at end of file
+#endif //_IGNITE_IMPL_BINARY_BINARY_WRITER


[38/50] [abbrv] ignite git commit: Fixed test.

Posted by dm...@apache.org.
Fixed test.


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

Branch: refs/heads/ignite-1192
Commit: 676d6f778c8ffa50f4fbc864e8e3ce00549de34e
Parents: 512b7af
Author: Alexey Kuznetsov <ak...@gridgain.com>
Authored: Sun Apr 9 18:30:18 2017 +0700
Committer: Alexey Kuznetsov <ak...@gridgain.com>
Committed: Sun Apr 9 18:30:18 2017 +0700

----------------------------------------------------------------------
 .../processors/rest/JettyRestProcessorAbstractSelfTest.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/676d6f77/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
index 5e3d896..ea8aaae 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
@@ -1413,7 +1413,7 @@ public abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestPro
 
         ret = content(new VisorGatewayArgument(VisorQueryTask.class)
             .forNode(locNode)
-            .argument(VisorQueryArg.class, "person", URLEncoder.encode("select * from Person", CHARSET), false, 1));
+            .argument(VisorQueryArg.class, "person", URLEncoder.encode("select * from Person", CHARSET), false, false, false, 1));
 
         info("VisorQueryTask result: " + ret);