You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2015/03/03 03:31:16 UTC

[01/50] incubator-ignite git commit: # ignite-239

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-45 4010cd339 -> 893d0fe08


# ignite-239


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

Branch: refs/heads/ignite-45
Commit: 4f7dbf76ea6638792abd23e7d0327eabd8bc377b
Parents: 1689a20
Author: sboikov <sb...@gridgain.com>
Authored: Fri Feb 27 17:27:18 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Feb 27 17:27:18 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/IgnitionEx.java  | 71 +++++++++-----------
 1 file changed, 33 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4f7dbf76/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 f39cd7e..ca3abe9 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
@@ -1517,36 +1517,28 @@ public class IgnitionEx {
         /**
          * @param cfg Ignite configuration copy to.
          * @return New ignite configuration.
+         * @throws IgniteCheckedException If failed.
          */
         private IgniteConfiguration initializeConfiguration(IgniteConfiguration cfg)
             throws IgniteCheckedException {
             IgniteConfiguration myCfg = new IgniteConfiguration(cfg);
 
-            initializeDefaultConfigurationParameters(myCfg);
-
-            return myCfg;
-        }
-
-        /**
-         * Initialize default parameters.
-         */
-        public void initializeDefaultConfigurationParameters(IgniteConfiguration cfg) throws IgniteCheckedException {
-            cfg.setIgniteHome(U.getIgniteHome());
+            myCfg.setIgniteHome(U.getIgniteHome());
 
             // Local host.
             String locHost = IgniteSystemProperties.getString(IGNITE_LOCAL_HOST);
 
-            cfg.setLocalHost(F.isEmpty(locHost) ? cfg.getLocalHost() : locHost);
+            myCfg.setLocalHost(F.isEmpty(locHost) ? myCfg.getLocalHost() : locHost);
 
             // Override daemon flag if it was set on the factory.
             if (daemon)
-                cfg.setDaemon(true);
+                myCfg.setDaemon(true);
 
-            Marshaller marsh = cfg.getMarshaller();
+            Marshaller marsh = myCfg.getMarshaller();
 
             if (marsh == null) {
                 if (!U.isHotSpot()) {
-                    U.warn(log, "GridOptimizedMarshaller is not supported on this JVM " +
+                    U.warn(log, "OptimizedMarshaller is not supported on this JVM " +
                             "(only Java HotSpot VMs are supported). Switching to standard JDK marshalling - " +
                             "object serialization performance will be significantly slower.",
                         "To enable fast marshalling upgrade to recent 1.6 or 1.7 HotSpot VM release.");
@@ -1554,7 +1546,7 @@ public class IgnitionEx {
                     marsh = new JdkMarshaller();
                 }
                 else if (!OptimizedMarshaller.available()) {
-                    U.warn(log, "GridOptimizedMarshaller is not supported on this JVM " +
+                    U.warn(log, "OptimizedMarshaller is not supported on this JVM " +
                             "(only recent 1.6 and 1.7 versions HotSpot VMs are supported). " +
                             "To enable fast marshalling upgrade to recent 1.6 or 1.7 HotSpot VM release. " +
                             "Switching to standard JDK marshalling - " +
@@ -1567,7 +1559,7 @@ public class IgnitionEx {
                     marsh = new OptimizedMarshaller();
             }
             else if (marsh instanceof OptimizedMarshaller && !U.isHotSpot()) {
-                U.warn(log, "Using GridOptimizedMarshaller on untested JVM (only Java HotSpot VMs were tested) - " +
+                U.warn(log, "Using OptimizedMarshaller on untested JVM (only Java HotSpot VMs were tested) - " +
                         "object serialization behavior could yield unexpected results.",
                     "Using GridOptimizedMarshaller on untested JVM.");
             }
@@ -1576,7 +1568,7 @@ public class IgnitionEx {
             String depModeName = IgniteSystemProperties.getString(IGNITE_DEP_MODE_OVERRIDE);
 
             if (!F.isEmpty(depModeName)) {
-                if (!F.isEmpty(cfg.getCacheConfiguration())) {
+                if (!F.isEmpty(myCfg.getCacheConfiguration())) {
                     U.quietAndInfo(log, "Skipping deployment mode override for caches (custom closure " +
                         "execution may not work for console Visor)");
                 }
@@ -1584,8 +1576,8 @@ public class IgnitionEx {
                     try {
                         DeploymentMode depMode = DeploymentMode.valueOf(depModeName);
 
-                        if (cfg.getDeploymentMode() != depMode)
-                            cfg.setDeploymentMode(depMode);
+                        if (myCfg.getDeploymentMode() != depMode)
+                            myCfg.setDeploymentMode(depMode);
                     }
                     catch (IllegalArgumentException e) {
                         throw new IgniteCheckedException("Failed to override deployment mode using system property " +
@@ -1595,12 +1587,12 @@ public class IgnitionEx {
                 }
             }
 
-            cfg.setMarshaller(marsh);
+            myCfg.setMarshaller(marsh);
 
-            cfg.setConnectorConfiguration(cfg.getConnectorConfiguration() != null ?
-                new ConnectorConfiguration(cfg.getConnectorConfiguration()) : null);
+            myCfg.setConnectorConfiguration(myCfg.getConnectorConfiguration() != null ?
+                new ConnectorConfiguration(myCfg.getConnectorConfiguration()) : null);
 
-            IgfsConfiguration[] igfsCfgs = cfg.getIgfsConfiguration();
+            IgfsConfiguration[] igfsCfgs = myCfg.getIgfsConfiguration();
 
             if (igfsCfgs != null) {
                 IgfsConfiguration[] clone = igfsCfgs.clone();
@@ -1608,19 +1600,19 @@ public class IgnitionEx {
                 for (int i = 0; i < igfsCfgs.length; i++)
                     clone[i] = new IgfsConfiguration(igfsCfgs[i]);
 
-                cfg.setIgfsConfiguration(clone);
+                myCfg.setIgfsConfiguration(clone);
             }
 
-            if (cfg.getMBeanServer() == null)
-                cfg.setMBeanServer(ManagementFactory.getPlatformMBeanServer());
+            if (myCfg.getMBeanServer() == null)
+                myCfg.setMBeanServer(ManagementFactory.getPlatformMBeanServer());
 
-            if (cfg.getNodeId() == null)
-               cfg.setNodeId(UUID.randomUUID());
+            if (myCfg.getNodeId() == null)
+               myCfg.setNodeId(UUID.randomUUID());
 
-            if (cfg.getPeerClassLoadingLocalClassPathExclude() == null)
-                cfg.setPeerClassLoadingLocalClassPathExclude(EMPTY_STR_ARR);
+            if (myCfg.getPeerClassLoadingLocalClassPathExclude() == null)
+                myCfg.setPeerClassLoadingLocalClassPathExclude(EMPTY_STR_ARR);
 
-            StreamerConfiguration[] streamerCfgs = cfg.getStreamerConfiguration();
+            StreamerConfiguration[] streamerCfgs = myCfg.getStreamerConfiguration();
 
             if (streamerCfgs != null) {
                 StreamerConfiguration[] clone = streamerCfgs.clone();
@@ -1628,26 +1620,29 @@ public class IgnitionEx {
                 for (int i = 0; i < streamerCfgs.length; i++)
                     clone[i] = new StreamerConfiguration(streamerCfgs[i]);
 
-                cfg.setStreamerConfiguration(clone);
+                myCfg.setStreamerConfiguration(clone);
             }
 
-            cfg.setTransactionConfiguration(cfg.getTransactionConfiguration() != null ?
-                new TransactionConfiguration(cfg.getTransactionConfiguration()) : null);
+            myCfg.setTransactionConfiguration(myCfg.getTransactionConfiguration() != null ?
+                new TransactionConfiguration(myCfg.getTransactionConfiguration()) : null);
 
-            if (cfg.getUserAttributes() == null) {
+            if (myCfg.getUserAttributes() == null) {
                 Map<String, ?> emptyAttr = Collections.emptyMap();
-                cfg.setUserAttributes(emptyAttr);
+                myCfg.setUserAttributes(emptyAttr);
             }
 
-            initializeDefaultCacheConfiguration(cfg);
+            initializeDefaultCacheConfiguration(myCfg);
+
+            initializeDefaultSpi(myCfg);
 
-            initializeDefaultSpi(cfg);
+            return myCfg;
         }
 
         /**
          * Initialize default cache configuration.
          *
          * @param cfg Ignite configuration.
+         * @throws IgniteCheckedException If failed.
          */
         public void initializeDefaultCacheConfiguration(IgniteConfiguration cfg) throws IgniteCheckedException {
             CacheConfiguration[] cacheCfgs = cfg.getCacheConfiguration();


[22/50] incubator-ignite git commit: sprint-2 - Added isWithinTransaction() method to session.

Posted by ag...@apache.org.
sprint-2 - Added isWithinTransaction() method to session.


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

Branch: refs/heads/ignite-45
Commit: 16105ec9687732d0b01cfeaee9a5b1c227b0921f
Parents: 6097e7b
Author: Dmitiry Setrakyan <ds...@gridgain.com>
Authored: Sat Feb 28 09:44:30 2015 -0800
Committer: Dmitiry Setrakyan <ds...@gridgain.com>
Committed: Sat Feb 28 09:44:30 2015 -0800

----------------------------------------------------------------------
 .../store/jdbc/CacheJdbcPersonStore.java        | 110 +++++++------------
 .../ignite/cache/store/CacheStoreSession.java   |   9 ++
 .../processors/cache/GridCacheStoreManager.java |   6 +-
 .../junits/cache/TestCacheSession.java          |   5 +
 .../cache/TestThreadLocalCacheSession.java      |   5 +
 5 files changed, 62 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/16105ec9/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
index d80861d..0473280 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
@@ -22,7 +22,6 @@ import org.apache.ignite.cache.store.*;
 import org.apache.ignite.examples.datagrid.store.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.resources.*;
-import org.apache.ignite.transactions.*;
 import org.jetbrains.annotations.*;
 
 import javax.cache.*;
@@ -72,8 +71,6 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> {
 
     /** {@inheritDoc} */
     @Override public void txEnd(boolean commit) {
-        Transaction tx = transaction();
-
         Map<String, Connection> props = ses.properties();
 
         try (Connection conn = props.remove(ATTR_NAME)) {
@@ -84,23 +81,21 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> {
                     conn.rollback();
             }
 
-            System.out.println(">>> Transaction ended [xid=" + tx.xid() + ", commit=" + commit + ']');
+            System.out.println(">>> Transaction ended [commit=" + commit + ']');
         }
         catch (SQLException e) {
-            throw new CacheWriterException("Failed to end transaction [xid=" + tx.xid() + ", commit=" + commit + ']', e);
+            throw new CacheWriterException("Failed to end transaction: " + ses.transaction(), e);
         }
     }
 
     /** {@inheritDoc} */
     @Override public Person load(Long key) {
-        Transaction tx = transaction();
-
-        System.out.println(">>> Store load [key=" + key + ", xid=" + (tx == null ? null : tx.xid()) + ']');
+        System.out.println(">>> Loading key: " + key);
 
         Connection conn = null;
 
         try {
-            conn = connection(tx);
+            conn = connection();
 
             try (PreparedStatement st = conn.prepareStatement("select * from PERSONS where id=?")) {
                 st.setString(1, key.toString());
@@ -108,14 +103,14 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> {
                 ResultSet rs = st.executeQuery();
 
                 if (rs.next())
-                    return person(rs.getLong(1), rs.getString(2), rs.getString(3));
+                    return new Person(rs.getLong(1), rs.getString(2), rs.getString(3));
             }
         }
         catch (SQLException e) {
             throw new CacheLoaderException("Failed to load object: " + key, e);
         }
         finally {
-            end(tx, conn);
+            end(conn);
         }
 
         return null;
@@ -123,60 +118,57 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> {
 
     /** {@inheritDoc} */
     @Override public void write(Cache.Entry<? extends Long, ? extends Person> entry) {
-        Transaction tx = transaction();
-
         Long key = entry.getKey();
 
         Person val = entry.getValue();
 
-        System.out.println(">>> Store put [key=" + key + ", val=" + val + ", xid=" + (tx == null ? null : tx.xid()) + ']');
+        System.out.println(">>> Putting [key=" + key + ", val=" + val +  ']');
 
         Connection conn = null;
 
         try {
-            conn = connection(tx);
+            conn = connection();
 
-        int updated;
+            int updated;
 
-        try (PreparedStatement st = conn.prepareStatement(
-            "update PERSONS set firstName=?, lastName=? where id=?")) {
-            st.setString(1, val.getFirstName());
-            st.setString(2, val.getLastName());
-            st.setLong(3, val.getId());
+            // Try update first.
+            try (PreparedStatement st = conn.prepareStatement(
+                "update PERSONS set firstName=?, lastName=? where id=?")) {
+                st.setString(1, val.getFirstName());
+                st.setString(2, val.getLastName());
+                st.setLong(3, val.getId());
 
-            updated = st.executeUpdate();
-        }
+                updated = st.executeUpdate();
+            }
 
-        // If update failed, try to insert.
-        if (updated == 0) {
-            try (PreparedStatement st = conn.prepareStatement(
-                "insert into PERSONS (id, firstName, lastName) values(?, ?, ?)")) {
-                st.setLong(1, val.getId());
-                st.setString(2, val.getFirstName());
-                st.setString(3, val.getLastName());
+            // If update failed, try to insert.
+            if (updated == 0) {
+                try (PreparedStatement st = conn.prepareStatement(
+                    "insert into PERSONS (id, firstName, lastName) values(?, ?, ?)")) {
+                    st.setLong(1, val.getId());
+                    st.setString(2, val.getFirstName());
+                    st.setString(3, val.getLastName());
 
-                st.executeUpdate();
+                    st.executeUpdate();
+                }
             }
         }
-        }
         catch (SQLException e) {
             throw new CacheLoaderException("Failed to put object [key=" + key + ", val=" + val + ']', e);
         }
         finally {
-            end(tx, conn);
+            end(conn);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void delete(Object key) {
-        Transaction tx = transaction();
-
-        System.out.println(">>> Store remove [key=" + key + ", xid=" + (tx == null ? null : tx.xid()) + ']');
+        System.out.println(">>> Removing key: " + key);
 
         Connection conn = null;
 
         try {
-            conn = connection(tx);
+            conn = connection();
 
             try (PreparedStatement st = conn.prepareStatement("delete from PERSONS where id=?")) {
                 st.setLong(1, (Long)key);
@@ -188,7 +180,7 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> {
             throw new CacheWriterException("Failed to remove object: " + key, e);
         }
         finally {
-            end(tx, conn);
+            end(conn);
         }
     }
 
@@ -199,17 +191,13 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> {
 
         final int entryCnt = (Integer)args[0];
 
-        Connection conn = null;
-
-        try {
-            conn = connection(null);
-
+        try (Connection conn = connection()) {
             try (PreparedStatement st = conn.prepareStatement("select * from PERSONS")) {
                 try (ResultSet rs = st.executeQuery()) {
                     int cnt = 0;
 
                     while (cnt < entryCnt && rs.next()) {
-                        Person person = person(rs.getLong(1), rs.getString(2), rs.getString(3));
+                        Person person = new Person(rs.getLong(1), rs.getString(2), rs.getString(3));
 
                         clo.apply(person.getId(), person);
 
@@ -223,18 +211,16 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> {
         catch (SQLException e) {
             throw new CacheLoaderException("Failed to load values from cache store.", e);
         }
-        finally {
-            end(null, conn);
-        }
     }
 
     /**
-     * @param tx Cache transaction.
      * @return Connection.
      * @throws SQLException In case of error.
      */
-    private Connection connection(@Nullable Transaction tx) throws SQLException  {
-        if (tx != null) {
+    private Connection connection() throws SQLException  {
+        // If there is an ongoing transaction,
+        // we must reuse the same connection.
+        if (ses.isWithinTransaction()) {
             Map<Object, Object> props = ses.properties();
 
             Connection conn = (Connection)props.get(ATTR_NAME);
@@ -257,11 +243,10 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> {
     /**
      * Closes allocated resources depending on transaction status.
      *
-     * @param tx Active transaction, if any.
      * @param conn Allocated connection.
      */
-    private void end(@Nullable Transaction tx, @Nullable Connection conn) {
-        if (tx == null && conn != null) {
+    private void end(@Nullable Connection conn) {
+        if (!ses.isWithinTransaction() && conn != null) {
             // Close connection right away if there is no transaction.
             try {
                 conn.close();
@@ -286,23 +271,4 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> {
 
         return conn;
     }
-
-    /**
-     * Builds person object out of provided values.
-     *
-     * @param id ID.
-     * @param firstName First name.
-     * @param lastName Last name.
-     * @return Person.
-     */
-    private Person person(Long id, String firstName, String lastName) {
-        return new Person(id, firstName, lastName);
-    }
-
-    /**
-     * @return Current transaction.
-     */
-    private Transaction transaction() {
-        return ses != null ? ses.transaction() : null;
-    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/16105ec9/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java b/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java
index a2be4c5..38fe95c 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java
@@ -43,6 +43,15 @@ public interface CacheStoreSession {
     public Transaction transaction();
 
     /**
+     * Returns {@code true} if performing store operation within a transaction,
+     * {@code false} otherwise. Analogous to calling {@code transaction() != null}.
+     *
+     * @return {@code True} if performing store operation within a transaction,
+     * {@code false} otherwise.
+     */
+    public boolean isWithinTransaction();
+
+    /**
      * Gets current session properties. You can add properties directly to the
      * returned map.
      *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/16105ec9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
index fac6ea3..9262a8f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
@@ -36,7 +36,6 @@ import org.jetbrains.annotations.*;
 
 import javax.cache.*;
 import javax.cache.integration.*;
-import java.lang.reflect.*;
 import java.util.*;
 
 /**
@@ -913,6 +912,11 @@ public class GridCacheStoreManager<K, V> extends GridCacheManagerAdapter<K, V> {
         }
 
         /** {@inheritDoc} */
+        @Override public boolean isWithinTransaction() {
+            return transaction() != null;
+        }
+
+        /** {@inheritDoc} */
         @SuppressWarnings("unchecked")
         @Override public <K1, V1> Map<K1, V1> properties() {
             SessionData ses0 = sesHolder.get();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/16105ec9/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/TestCacheSession.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/TestCacheSession.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/TestCacheSession.java
index cca20fe..0709880 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/TestCacheSession.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/TestCacheSession.java
@@ -50,6 +50,11 @@ public class TestCacheSession implements CacheStoreSession {
     }
 
     /** {@inheritDoc} */
+    @Override public boolean isWithinTransaction() {
+        return transaction() != null;
+    }
+
+    /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Override public <K, V> Map<K, V> properties() {
         if (props == null)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/16105ec9/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/TestThreadLocalCacheSession.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/TestThreadLocalCacheSession.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/TestThreadLocalCacheSession.java
index 6687f1f..2bbcf1b 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/TestThreadLocalCacheSession.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/cache/TestThreadLocalCacheSession.java
@@ -49,6 +49,11 @@ public class TestThreadLocalCacheSession implements CacheStoreSession {
     }
 
     /** {@inheritDoc} */
+    @Override public boolean isWithinTransaction() {
+        return transaction() != null;
+    }
+
+    /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Override public <K, V> Map<K, V> properties() {
         TestCacheSession ses = sesHolder.get();


[29/50] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-2' into ignite-239

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/sprint-2' into ignite-239


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

Branch: refs/heads/ignite-45
Commit: 0b1eccf96a260b3208c153ead6b4e314798726ad
Parents: 0dfe349 c9f46c1
Author: ivasilinets <iv...@gridgain.com>
Authored: Mon Mar 2 11:40:06 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Mon Mar 2 11:40:06 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/util/IgniteUtils.java       |  90 ++++++++++--
 .../spi/discovery/tcp/TcpDiscoverySpi.java      | 137 +++++++++++--------
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   | 116 ++++++++++++++++
 3 files changed, 275 insertions(+), 68 deletions(-)
----------------------------------------------------------------------



[49/50] incubator-ignite git commit: Merge branch 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-45

Posted by ag...@apache.org.
Merge branch 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-45


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

Branch: refs/heads/ignite-45
Commit: 346836905c551d606ec13e8140e46d9d81edbcb2
Parents: bceb33a b2675bc
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Mon Mar 2 14:05:20 2015 -0800
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Mon Mar 2 14:05:20 2015 -0800

----------------------------------------------------------------------
 examples/pom-standalone.xml                     |   2 +-
 .../store/CacheNodeWithStoreStartup.java        |   6 +-
 .../store/jdbc/CacheJdbcPersonStore.java        | 115 ++--
 .../java/org/apache/ignite/IgniteCluster.java   |   8 +-
 .../apache/ignite/cache/store/CacheStore.java   |   4 +-
 .../ignite/cache/store/CacheStoreAdapter.java   |   2 +-
 .../ignite/cache/store/CacheStoreSession.java   |  17 +-
 .../configuration/IgniteConfiguration.java      |   5 +-
 .../ignite/internal/GridKernalContext.java      |  10 +-
 .../ignite/internal/GridKernalContextImpl.java  |  14 +-
 .../apache/ignite/internal/IgniteKernal.java    |  23 +-
 .../org/apache/ignite/internal/IgnitionEx.java  | 592 +++++++++----------
 .../affinity/GridAffinityAssignmentCache.java   |  13 +-
 .../processors/cache/CacheMetricsImpl.java      |   4 +
 .../processors/cache/GridCacheContext.java      |  19 +
 .../processors/cache/GridCacheMapEntry.java     |   9 +
 .../processors/cache/GridCacheProcessor.java    |  15 +
 .../processors/cache/GridCacheStoreManager.java |  18 +-
 .../GridDistributedCacheAdapter.java            |   2 +
 .../distributed/dht/GridDhtCacheEntry.java      |   3 +
 .../distributed/dht/GridDhtLocalPartition.java  |   5 +
 .../dht/atomic/GridDhtAtomicCache.java          |   2 +-
 .../dht/colocated/GridDhtColocatedCache.java    |   2 +-
 .../cache/transactions/IgniteTxManager.java     |   7 +-
 .../processors/cluster/ClusterProcessor.java    |  46 ++
 .../dataload/IgniteDataLoaderImpl.java          |  29 +-
 .../ignite/internal/util/IgniteUtils.java       |  90 ++-
 .../ignite/internal/visor/cache/VisorCache.java | 190 ++----
 .../cache/VisorCacheAffinityConfiguration.java  |  53 +-
 .../visor/cache/VisorCacheConfiguration.java    | 484 +++------------
 .../cache/VisorCacheDefaultConfiguration.java   |  27 +-
 .../cache/VisorCacheEvictionConfiguration.java  |  81 +--
 .../cache/VisorCacheNearConfiguration.java      |  42 +-
 .../cache/VisorCachePreloadConfiguration.java   |  54 +-
 .../cache/VisorCacheStoreConfiguration.java     | 148 ++++-
 .../VisorCacheWriteBehindConfiguration.java     | 137 -----
 .../visor/node/VisorAtomicConfiguration.java    |  27 +-
 .../visor/node/VisorBasicConfiguration.java     | 180 +-----
 .../node/VisorCacheQueryConfiguration.java      |  45 +-
 .../node/VisorExecutorServiceConfiguration.java |  54 +-
 .../visor/node/VisorGridConfiguration.java      | 177 +-----
 .../visor/node/VisorIgfsConfiguration.java      | 244 +-------
 .../visor/node/VisorLifecycleConfiguration.java |   9 +-
 .../visor/node/VisorMetricsConfiguration.java   |  29 +-
 .../node/VisorPeerToPeerConfiguration.java      |  28 +-
 .../visor/node/VisorQueryConfiguration.java     |  65 +-
 .../visor/node/VisorRestConfiguration.java      |  80 +--
 .../node/VisorSegmentationConfiguration.java    |  45 +-
 .../visor/node/VisorSpisConfiguration.java      |  92 +--
 .../node/VisorTransactionConfiguration.java     |  62 +-
 .../internal/visor/util/VisorTaskUtils.java     |   4 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      | 137 +++--
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   | 116 ++++
 .../core/src/main/resources/ignite.properties   |   2 +-
 .../core/src/test/config/store/jdbc/Ignite.xml  |  63 +-
 .../GridCacheAbstractLocalStoreSelfTest.java    | 440 ++++++++++++++
 .../cache/GridCacheAbstractMetricsSelfTest.java |  42 ++
 ...acheAbstractUsersAffinityMapperSelfTest.java | 207 +++++++
 ...dCacheAtomicUsersAffinityMapperSelfTest.java |  45 ++
 .../GridCachePartitionedLocalStoreSelfTest.java |  51 ++
 ...chePartitionedOffHeapLocalStoreSelfTest.java |  56 ++
 .../GridCacheReplicatedLocalStoreSelfTest.java  |  51 ++
 ...heReplicatedUsersAffinityMapperSelfTest.java |  45 ++
 ...ridCacheTxPartitionedLocalStoreSelfTest.java |  51 ++
 .../GridCacheTxUsersAffinityMapperSelfTest.java |  45 ++
 .../GridCacheQueueCleanupSelfTest.java          |   1 -
 .../IgniteCacheExpiryPolicyAbstractTest.java    |  38 +-
 .../junits/cache/TestCacheSession.java          |   5 +
 .../cache/TestThreadLocalCacheSession.java      |   5 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |   4 +
 modules/scalar/pom.xml                          |   6 +
 .../ignite/schema/generator/XmlGenerator.java   |   8 +-
 .../apache/ignite/schema/model/PojoField.java   |  11 +-
 .../apache/ignite/schema/load/model/Ignite.xml  | 133 +++--
 .../commands/cache/VisorCacheCommand.scala      |  25 +-
 .../yardstick/config/ignite-store-config.xml    |  15 +-
 pom.xml                                         |   4 +-
 77 files changed, 2459 insertions(+), 2566 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34683690/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34683690/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34683690/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34683690/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34683690/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34683690/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34683690/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34683690/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34683690/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34683690/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/34683690/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
----------------------------------------------------------------------


[38/50] incubator-ignite git commit: sprint-2 fix for ignite-321

Posted by ag...@apache.org.
sprint-2 fix for ignite-321


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

Branch: refs/heads/ignite-45
Commit: 11efb91874a547c408dcac58f0651725ad518abe
Parents: 3be22ab
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Mar 2 16:36:02 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Mar 2 16:36:02 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheStoreManager.java | 12 ++++----
 .../GridDistributedCacheAdapter.java            |  2 ++
 .../dataload/IgniteDataLoaderImpl.java          | 29 +++++++++++++++-----
 3 files changed, 30 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/11efb918/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
index 9262a8f..c768f54 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
@@ -616,6 +616,9 @@ public class GridCacheStoreManager<K, V> extends GridCacheManagerAdapter<K, V> {
                     handleClassCastException(e);
                 }
                 catch (Exception e) {
+                    if (!(e instanceof CacheWriterException))
+                        e = new CacheWriterException(e);
+
                     if (!entries.isEmpty()) {
                         List<Object> keys = new ArrayList<>(entries.size());
 
@@ -625,9 +628,6 @@ public class GridCacheStoreManager<K, V> extends GridCacheManagerAdapter<K, V> {
                         throw new CacheStorePartialUpdateException(keys, e);
                     }
 
-                    if (!(e instanceof CacheWriterException))
-                        e = new CacheWriterException(e);
-
                     throw new IgniteCheckedException(e);
                 }
                 finally {
@@ -725,12 +725,12 @@ public class GridCacheStoreManager<K, V> extends GridCacheManagerAdapter<K, V> {
                 handleClassCastException(e);
             }
             catch (Exception e) {
-                if (!keys0.isEmpty())
-                    throw new CacheStorePartialUpdateException(keys0, e);
-
                 if (!(e instanceof CacheWriterException))
                     e = new CacheWriterException(e);
 
+                if (!keys0.isEmpty())
+                    throw new CacheStorePartialUpdateException(keys0, e);
+
                 throw new IgniteCheckedException(e);
             }
             finally {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/11efb918/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
index dc82e83..00190d9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
@@ -277,6 +277,8 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter
                     dht = (GridDhtCacheAdapter<K, V>)cacheAdapter;
 
                 try (IgniteDataLoader<K, V> dataLdr = ignite.dataLoader(cacheName)) {
+                    ((IgniteDataLoaderImpl)dataLdr).maxRemapCount(0);
+
                     dataLdr.updater(GridDataLoadCacheUpdaters.<K, V>batched());
 
                     for (GridDhtLocalPartition<K, V> locPart : dht.topology().currentLocalPartitions()) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/11efb918/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java
index ced8d1d..ed3bbcb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java
@@ -66,7 +66,7 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
     private byte[] updaterBytes;
 
     /** Max remap count before issuing an error. */
-    private static final int MAX_REMAP_CNT = 32;
+    private static final int DFLT_MAX_REMAP_CNT = 32;
 
     /** Log reference. */
     private static final AtomicReference<IgniteLogger> logRef = new AtomicReference<>();
@@ -156,6 +156,9 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
     /** */
     private boolean skipStore;
 
+    /** */
+    private int maxRemapCnt = DFLT_MAX_REMAP_CNT;
+
     /**
      * @param ctx Grid kernal context.
      * @param cacheName Cache name.
@@ -434,12 +437,6 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
     ) {
         assert entries != null;
 
-        if (remaps >= MAX_REMAP_CNT) {
-            resFut.onDone(new IgniteCheckedException("Failed to finish operation (too many remaps): " + remaps));
-
-            return;
-        }
-
         Map<ClusterNode, Collection<Map.Entry<K, V>>> mappings = new HashMap<>();
 
         boolean initPda = ctx.deploy().enabled() && jobPda == null;
@@ -526,6 +523,10 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
                             resFut.onDone(new IgniteCheckedException("Data loader has been cancelled: " +
                                 IgniteDataLoaderImpl.this, e1));
                         }
+                        else if (remaps + 1 > maxRemapCnt) {
+                            resFut.onDone(new IgniteCheckedException("Failed to finish operation (too many remaps): "
+                                + remaps), e1);
+                        }
                         else
                             load0(entriesForNode, resFut, activeKeys, remaps + 1);
                     }
@@ -760,6 +761,20 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
         close(false);
     }
 
+    /**
+     * @return Max remap count.
+     */
+    public int maxRemapCount() {
+        return maxRemapCnt;
+    }
+
+    /**
+     * @param maxRemapCnt New max remap count.
+     */
+    public void maxRemapCount(int maxRemapCnt) {
+        this.maxRemapCnt = maxRemapCnt;
+    }
+
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(IgniteDataLoaderImpl.class, this);


[25/50] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-2' into ignite-239

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/sprint-2' into ignite-239


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

Branch: refs/heads/ignite-45
Commit: ba010da403a0425f6d0ccfe006e41e1997bbbf9f
Parents: 8476463 036bd71
Author: ivasilinets <va...@gmail.com>
Authored: Sun Mar 1 15:26:27 2015 +0300
Committer: ivasilinets <va...@gmail.com>
Committed: Sun Mar 1 15:26:27 2015 +0300

----------------------------------------------------------------------
 .../store/CacheNodeWithStoreStartup.java        |   6 +-
 .../store/jdbc/CacheJdbcPersonStore.java        | 115 +++++++------------
 .../apache/ignite/cache/store/CacheStore.java   |   4 +-
 .../ignite/cache/store/CacheStoreAdapter.java   |   2 +-
 .../ignite/cache/store/CacheStoreSession.java   |  17 ++-
 .../apache/ignite/internal/GridProperties.java  |  78 -------------
 .../ignite/internal/GridUpdateNotifier.java     |   2 +-
 .../apache/ignite/internal/IgniteKernal.java    |  18 +--
 .../ignite/internal/IgniteProperties.java       |  79 +++++++++++++
 .../ignite/internal/IgniteVersionUtils.java     |   8 +-
 .../processors/cache/GridCacheStoreManager.java |   6 +-
 .../plugin/IgnitePluginProcessor.java           |  24 ++++
 .../apache/ignite/plugin/PluginProvider.java    |   5 +
 .../internal/GridUpdateNotifierSelfTest.java    |   2 +-
 .../junits/cache/TestCacheSession.java          |   5 +
 .../cache/TestThreadLocalCacheSession.java      |   5 +
 .../HibernateReadWriteAccessStrategy.java       |  81 ++++++++++---
 17 files changed, 264 insertions(+), 193 deletions(-)
----------------------------------------------------------------------



[32/50] incubator-ignite git commit: #ignite-239: review.

Posted by ag...@apache.org.
#ignite-239: review.


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

Branch: refs/heads/ignite-45
Commit: 08df446b39f28b7a4b670650f0e39797c0cfa5c5
Parents: 0b1eccf
Author: ivasilinets <iv...@gridgain.com>
Authored: Mon Mar 2 12:15:13 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Mon Mar 2 12:15:13 2015 +0300

----------------------------------------------------------------------
 .../main/java/org/apache/ignite/internal/IgnitionEx.java  | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08df446b/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 c2c23f7..cb2efbf 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
@@ -1494,6 +1494,8 @@ public class IgnitionEx {
 
             UUID nodeId = cfg.getNodeId() != null ? cfg.getNodeId() : UUID.randomUUID();
 
+            myCfg.setNodeId(nodeId);
+
             IgniteLogger cfgLog = initLogger(cfg.getGridLogger(), nodeId);
 
             assert cfgLog != null;
@@ -1563,10 +1565,8 @@ public class IgnitionEx {
                 }
             }
 
-            if (myCfg.getUserAttributes() == null) {
-                Map<String, ?> emptyAttr = Collections.emptyMap();
-                myCfg.setUserAttributes(emptyAttr);
-            }
+            if (myCfg.getUserAttributes() == null)
+                myCfg.setUserAttributes(Collections.<String, Object>emptyMap());
 
             if (myCfg.getMBeanServer() == null)
                 myCfg.setMBeanServer(ManagementFactory.getPlatformMBeanServer());
@@ -1606,8 +1606,6 @@ public class IgnitionEx {
             if (myCfg.getPeerClassLoadingLocalClassPathExclude() == null)
                 myCfg.setPeerClassLoadingLocalClassPathExclude(EMPTY_STR_ARR);
 
-            myCfg.setNodeId(nodeId);
-
             IgfsConfiguration[] igfsCfgs = myCfg.getIgfsConfiguration();
 
             if (igfsCfgs != null) {


[43/50] incubator-ignite git commit: Merge branch 'ignite-270' into sprint-2

Posted by ag...@apache.org.
Merge branch 'ignite-270' into sprint-2


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

Branch: refs/heads/ignite-45
Commit: 2511ebe18c564e43e642bc879ffe44b02497c90a
Parents: b0e6ab1 18548b2
Author: anovikov <an...@gridgain.com>
Authored: Mon Mar 2 21:43:59 2015 +0700
Committer: anovikov <an...@gridgain.com>
Committed: Mon Mar 2 21:43:59 2015 +0700

----------------------------------------------------------------------
 modules/scalar/pom.xml | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2511ebe1/modules/scalar/pom.xml
----------------------------------------------------------------------


[27/50] incubator-ignite git commit: #ignite-239: small refactoring.

Posted by ag...@apache.org.
#ignite-239: small refactoring.


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

Branch: refs/heads/ignite-45
Commit: 0dfe349c28e2fc24b3b2e092f4f36c1d63f84ff3
Parents: 55669d4
Author: ivasilinets <va...@gmail.com>
Authored: Sun Mar 1 21:21:11 2015 +0300
Committer: ivasilinets <va...@gmail.com>
Committed: Sun Mar 1 21:21:11 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/IgnitionEx.java  | 28 ++++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0dfe349c/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 9770205..c2c23f7 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
@@ -1393,7 +1393,7 @@ public class IgnitionEx {
                 Class helperCls = Class.forName("org.apache.ignite.util.GridConfigurationHelper");
 
                 helperCls.getMethod("overrideConfiguration", IgniteConfiguration.class, Properties.class,
-                        String.class, IgniteLogger.class).invoke(helperCls, myCfg, System.getProperties(), name, log);
+                    String.class, IgniteLogger.class).invoke(helperCls, myCfg, System.getProperties(), name, log);
             }
             catch (Exception ignored) {
                 // No-op.
@@ -1522,14 +1522,14 @@ public class IgnitionEx {
             // for correct segment after segmentation happens.
             if (!F.isEmpty(cfg.getSegmentationResolvers()) && segPlc == RESTART_JVM && !cfg.isWaitForSegmentOnStart()) {
                 U.warn(log, "Found potential configuration problem (forgot to enable waiting for segment" +
-                        "on start?) [segPlc=" + segPlc + ", wait=false]");
+                    "on start?) [segPlc=" + segPlc + ", wait=false]");
             }
 
             myCfg.setTransactionConfiguration(myCfg.getTransactionConfiguration() != null ?
-                    new TransactionConfiguration(myCfg.getTransactionConfiguration()) : null);
+                new TransactionConfiguration(myCfg.getTransactionConfiguration()) : null);
 
             myCfg.setConnectorConfiguration(myCfg.getConnectorConfiguration() != null ?
-                    new ConnectorConfiguration(myCfg.getConnectorConfiguration()) : null);
+                new ConnectorConfiguration(myCfg.getConnectorConfiguration()) : null);
 
             // Local host.
             String locHost = IgniteSystemProperties.getString(IGNITE_LOCAL_HOST);
@@ -1546,7 +1546,7 @@ public class IgnitionEx {
             if (!F.isEmpty(depModeName)) {
                 if (!F.isEmpty(myCfg.getCacheConfiguration())) {
                     U.quietAndInfo(log, "Skipping deployment mode override for caches (custom closure " +
-                            "execution may not work for console Visor)");
+                        "execution may not work for console Visor)");
                 }
                 else {
                     try {
@@ -1557,8 +1557,8 @@ public class IgnitionEx {
                     }
                     catch (IllegalArgumentException e) {
                         throw new IgniteCheckedException("Failed to override deployment mode using system property " +
-                                "(are there any misspellings?)" +
-                                "[name=" + IGNITE_DEP_MODE_OVERRIDE + ", value=" + depModeName + ']', e);
+                            "(are there any misspellings?)" +
+                            "[name=" + IGNITE_DEP_MODE_OVERRIDE + ", value=" + depModeName + ']', e);
                     }
                 }
             }
@@ -1576,18 +1576,18 @@ public class IgnitionEx {
             if (marsh == null) {
                 if (!U.isHotSpot()) {
                     U.warn(log, "OptimizedMarshaller is not supported on this JVM " +
-                            "(only Java HotSpot VMs are supported). Switching to standard JDK marshalling - " +
-                            "object serialization performance will be significantly slower.",
+                        "(only Java HotSpot VMs are supported). Switching to standard JDK marshalling - " +
+                        "object serialization performance will be significantly slower.",
                         "To enable fast marshalling upgrade to recent 1.6 or 1.7 HotSpot VM release.");
 
                     marsh = new JdkMarshaller();
                 }
                 else if (!OptimizedMarshaller.available()) {
                     U.warn(log, "OptimizedMarshaller is not supported on this JVM " +
-                            "(only recent 1.6 and 1.7 versions HotSpot VMs are supported). " +
-                            "To enable fast marshalling upgrade to recent 1.6 or 1.7 HotSpot VM release. " +
-                            "Switching to standard JDK marshalling - " +
-                            "object serialization performance will be significantly slower.",
+                        "(only recent 1.6 and 1.7 versions HotSpot VMs are supported). " +
+                        "To enable fast marshalling upgrade to recent 1.6 or 1.7 HotSpot VM release. " +
+                        "Switching to standard JDK marshalling - " +
+                        "object serialization performance will be significantly slower.",
                         "To enable fast marshalling upgrade to recent 1.6 or 1.7 HotSpot VM release.");
 
                     marsh = new JdkMarshaller();
@@ -1597,7 +1597,7 @@ public class IgnitionEx {
             }
             else if (marsh instanceof OptimizedMarshaller && !U.isHotSpot()) {
                 U.warn(log, "Using OptimizedMarshaller on untested JVM (only Java HotSpot VMs were tested) - " +
-                        "object serialization behavior could yield unexpected results.",
+                    "object serialization behavior could yield unexpected results.",
                     "Using GridOptimizedMarshaller on untested JVM.");
             }
 


[26/50] incubator-ignite git commit: #ignite-239: small refactoring.

Posted by ag...@apache.org.
#ignite-239: small refactoring.


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

Branch: refs/heads/ignite-45
Commit: 55669d46b838a1312e1067c8608243b89462fc54
Parents: ba010da
Author: ivasilinets <va...@gmail.com>
Authored: Sun Mar 1 15:39:37 2015 +0300
Committer: ivasilinets <va...@gmail.com>
Committed: Sun Mar 1 15:39:37 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/IgnitionEx.java  | 172 +++++++++----------
 1 file changed, 86 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/55669d46/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 c7e7cb6..9770205 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
@@ -1295,29 +1295,14 @@ public class IgnitionEx {
         private void start0(GridStartContext startCtx) throws IgniteCheckedException {
             assert grid == null : "Grid is already started: " + name;
 
-            // Set configuration URL, if any, into system property.
-            if (startCtx.configUrl() != null)
-                System.setProperty(IGNITE_CONFIG_URL, startCtx.configUrl().toString());
-
             IgniteConfiguration cfg = startCtx.config() != null ? startCtx.config() : new IgniteConfiguration();
 
-            // Ensure invariant.
-            // It's a bit dirty - but this is a result of late refactoring
-            // and I don't want to reshuffle a lot of code.
-            assert F.eq(name, cfg.getGridName());
-
-            // Validate segmentation configuration.
-            GridSegmentationPolicy segPlc = cfg.getSegmentationPolicy();
-
-            // 1. Warn on potential configuration problem: grid is not configured to wait
-            // for correct segment after segmentation happens.
-            if (!F.isEmpty(cfg.getSegmentationResolvers()) && segPlc == RESTART_JVM && !cfg.isWaitForSegmentOnStart()) {
-                U.warn(log, "Found potential configuration problem (forgot to enable waiting for segment" +
-                    "on start?) [segPlc=" + segPlc + ", wait=false]");
-            }
-
             IgniteConfiguration myCfg = initializeConfiguration(cfg);
 
+            // Set configuration URL, if any, into system property.
+            if (startCtx.configUrl() != null)
+                System.setProperty(IGNITE_CONFIG_URL, startCtx.configUrl().toString());
+
             // Ensure that SPIs support multiple grid instances, if required.
             if (!startCtx.single()) {
                 ensureMultiInstanceSupport(myCfg.getDeploymentSpi());
@@ -1331,17 +1316,6 @@ public class IgnitionEx {
                 ensureMultiInstanceSupport(myCfg.getSwapSpaceSpi());
             }
 
-            try {
-                // Use reflection to avoid loading undesired classes.
-                Class helperCls = Class.forName("org.apache.ignite.util.GridConfigurationHelper");
-
-                helperCls.getMethod("overrideConfiguration", IgniteConfiguration.class, Properties.class,
-                    String.class, IgniteLogger.class).invoke(helperCls, myCfg, System.getProperties(), name, log);
-            }
-            catch (Exception ignored) {
-                // No-op.
-            }
-
             execSvc = new IgniteThreadPoolExecutor(
                 "pub-" + cfg.getGridName(),
                 cfg.getPublicThreadPoolSize(),
@@ -1414,6 +1388,17 @@ public class IgnitionEx {
             // Register Ignite MBean for current grid instance.
             registerFactoryMbean(myCfg.getMBeanServer());
 
+            try {
+                // Use reflection to avoid loading undesired classes.
+                Class helperCls = Class.forName("org.apache.ignite.util.GridConfigurationHelper");
+
+                helperCls.getMethod("overrideConfiguration", IgniteConfiguration.class, Properties.class,
+                        String.class, IgniteLogger.class).invoke(helperCls, myCfg, System.getProperties(), name, log);
+            }
+            catch (Exception ignored) {
+                // No-op.
+            }
+
             boolean started = false;
 
             try {
@@ -1489,16 +1474,7 @@ public class IgnitionEx {
          */
         private IgniteConfiguration initializeConfiguration(IgniteConfiguration cfg)
             throws IgniteCheckedException {
-            // Initialize factory's log.
-            UUID nodeId = cfg.getNodeId() != null ? cfg.getNodeId() : UUID.randomUUID();
-
-            IgniteLogger cfgLog = initLogger(cfg.getGridLogger(), nodeId);
-
-            assert cfgLog != null;
-
-            cfgLog = new GridLoggerProxy(cfgLog, null, name, U.id8(nodeId));
-
-            log = cfgLog.getLogger(G.class);
+            IgniteConfiguration myCfg = new IgniteConfiguration(cfg);
 
             String ggHome = cfg.getIgniteHome();
 
@@ -1511,6 +1487,24 @@ public class IgnitionEx {
 
             U.setWorkDirectory(cfg.getWorkDirectory(), ggHome);
 
+            // Ensure invariant.
+            // It's a bit dirty - but this is a result of late refactoring
+            // and I don't want to reshuffle a lot of code.
+            assert F.eq(name, cfg.getGridName());
+
+            UUID nodeId = cfg.getNodeId() != null ? cfg.getNodeId() : UUID.randomUUID();
+
+            IgniteLogger cfgLog = initLogger(cfg.getGridLogger(), nodeId);
+
+            assert cfgLog != null;
+
+            cfgLog = new GridLoggerProxy(cfgLog, null, name, U.id8(nodeId));
+
+            // Initialize factory's log.
+            log = cfgLog.getLogger(G.class);
+
+            myCfg.setGridLogger(cfgLog);
+
             // Check Ignite home folder (after log is available).
             if (ggHome != null) {
                 File ggHomeFile = new File(ggHome);
@@ -1519,11 +1513,23 @@ public class IgnitionEx {
                     throw new IgniteCheckedException("Invalid Ignite installation home folder: " + ggHome);
             }
 
-            IgniteConfiguration myCfg = new IgniteConfiguration(cfg);
-
             myCfg.setIgniteHome(ggHome);
 
-            myCfg.setGridLogger(cfgLog);
+            // Validate segmentation configuration.
+            GridSegmentationPolicy segPlc = cfg.getSegmentationPolicy();
+
+            // 1. Warn on potential configuration problem: grid is not configured to wait
+            // for correct segment after segmentation happens.
+            if (!F.isEmpty(cfg.getSegmentationResolvers()) && segPlc == RESTART_JVM && !cfg.isWaitForSegmentOnStart()) {
+                U.warn(log, "Found potential configuration problem (forgot to enable waiting for segment" +
+                        "on start?) [segPlc=" + segPlc + ", wait=false]");
+            }
+
+            myCfg.setTransactionConfiguration(myCfg.getTransactionConfiguration() != null ?
+                    new TransactionConfiguration(myCfg.getTransactionConfiguration()) : null);
+
+            myCfg.setConnectorConfiguration(myCfg.getConnectorConfiguration() != null ?
+                    new ConnectorConfiguration(myCfg.getConnectorConfiguration()) : null);
 
             // Local host.
             String locHost = IgniteSystemProperties.getString(IGNITE_LOCAL_HOST);
@@ -1534,6 +1540,37 @@ public class IgnitionEx {
             if (daemon)
                 myCfg.setDaemon(true);
 
+            // Check for deployment mode override.
+            String depModeName = IgniteSystemProperties.getString(IGNITE_DEP_MODE_OVERRIDE);
+
+            if (!F.isEmpty(depModeName)) {
+                if (!F.isEmpty(myCfg.getCacheConfiguration())) {
+                    U.quietAndInfo(log, "Skipping deployment mode override for caches (custom closure " +
+                            "execution may not work for console Visor)");
+                }
+                else {
+                    try {
+                        DeploymentMode depMode = DeploymentMode.valueOf(depModeName);
+
+                        if (myCfg.getDeploymentMode() != depMode)
+                            myCfg.setDeploymentMode(depMode);
+                    }
+                    catch (IllegalArgumentException e) {
+                        throw new IgniteCheckedException("Failed to override deployment mode using system property " +
+                                "(are there any misspellings?)" +
+                                "[name=" + IGNITE_DEP_MODE_OVERRIDE + ", value=" + depModeName + ']', e);
+                    }
+                }
+            }
+
+            if (myCfg.getUserAttributes() == null) {
+                Map<String, ?> emptyAttr = Collections.emptyMap();
+                myCfg.setUserAttributes(emptyAttr);
+            }
+
+            if (myCfg.getMBeanServer() == null)
+                myCfg.setMBeanServer(ManagementFactory.getPlatformMBeanServer());
+
             Marshaller marsh = myCfg.getMarshaller();
 
             if (marsh == null) {
@@ -1564,33 +1601,12 @@ public class IgnitionEx {
                     "Using GridOptimizedMarshaller on untested JVM.");
             }
 
-            // Check for deployment mode override.
-            String depModeName = IgniteSystemProperties.getString(IGNITE_DEP_MODE_OVERRIDE);
-
-            if (!F.isEmpty(depModeName)) {
-                if (!F.isEmpty(myCfg.getCacheConfiguration())) {
-                    U.quietAndInfo(log, "Skipping deployment mode override for caches (custom closure " +
-                        "execution may not work for console Visor)");
-                }
-                else {
-                    try {
-                        DeploymentMode depMode = DeploymentMode.valueOf(depModeName);
-
-                        if (myCfg.getDeploymentMode() != depMode)
-                            myCfg.setDeploymentMode(depMode);
-                    }
-                    catch (IllegalArgumentException e) {
-                        throw new IgniteCheckedException("Failed to override deployment mode using system property " +
-                            "(are there any misspellings?)" +
-                            "[name=" + IGNITE_DEP_MODE_OVERRIDE + ", value=" + depModeName + ']', e);
-                    }
-                }
-            }
-
             myCfg.setMarshaller(marsh);
 
-            myCfg.setConnectorConfiguration(myCfg.getConnectorConfiguration() != null ?
-                new ConnectorConfiguration(myCfg.getConnectorConfiguration()) : null);
+            if (myCfg.getPeerClassLoadingLocalClassPathExclude() == null)
+                myCfg.setPeerClassLoadingLocalClassPathExclude(EMPTY_STR_ARR);
+
+            myCfg.setNodeId(nodeId);
 
             IgfsConfiguration[] igfsCfgs = myCfg.getIgfsConfiguration();
 
@@ -1603,14 +1619,6 @@ public class IgnitionEx {
                 myCfg.setIgfsConfiguration(clone);
             }
 
-            if (myCfg.getMBeanServer() == null)
-                myCfg.setMBeanServer(ManagementFactory.getPlatformMBeanServer());
-
-            myCfg.setNodeId(nodeId);
-
-            if (myCfg.getPeerClassLoadingLocalClassPathExclude() == null)
-                myCfg.setPeerClassLoadingLocalClassPathExclude(EMPTY_STR_ARR);
-
             StreamerConfiguration[] streamerCfgs = myCfg.getStreamerConfiguration();
 
             if (streamerCfgs != null) {
@@ -1622,18 +1630,10 @@ public class IgnitionEx {
                 myCfg.setStreamerConfiguration(clone);
             }
 
-            myCfg.setTransactionConfiguration(myCfg.getTransactionConfiguration() != null ?
-                new TransactionConfiguration(myCfg.getTransactionConfiguration()) : null);
-
-            if (myCfg.getUserAttributes() == null) {
-                Map<String, ?> emptyAttr = Collections.emptyMap();
-                myCfg.setUserAttributes(emptyAttr);
-            }
+            initializeDefaultSpi(myCfg);
 
             initializeDefaultCacheConfiguration(myCfg);
 
-            initializeDefaultSpi(myCfg);
-
             return myCfg;
         }
 
@@ -1722,7 +1722,7 @@ public class IgnitionEx {
         }
 
         /**
-         * Initialize default values for spi.
+         * Initialize default SPI implementations.
          *
          * @param cfg Ignite configuration.
          */


[45/50] incubator-ignite git commit: Merge remote-tracking branch 'origin/sprint-2' into sprint-2

Posted by ag...@apache.org.
Merge remote-tracking branch 'origin/sprint-2' into sprint-2


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

Branch: refs/heads/ignite-45
Commit: 028e44637fe9ff3fe3347d685f7d52422ff1cb0d
Parents: 2511ebe 235758c
Author: anovikov <an...@gridgain.com>
Authored: Mon Mar 2 21:44:49 2015 +0700
Committer: anovikov <an...@gridgain.com>
Committed: Mon Mar 2 21:44:49 2015 +0700

----------------------------------------------------------------------
 .../core/src/main/java/org/apache/ignite/IgniteCluster.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[46/50] incubator-ignite git commit: Merge branch 'ignite-136' into sprint-2

Posted by ag...@apache.org.
Merge branch 'ignite-136' into sprint-2


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

Branch: refs/heads/ignite-45
Commit: 9a931983f51f96ad9b96551aee654874e746aa94
Parents: 028e446 2e115bf
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Mar 2 17:47:24 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Mar 2 17:47:24 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheMapEntry.java     |   9 +
 .../distributed/dht/GridDhtCacheEntry.java      |   3 +
 .../distributed/dht/GridDhtLocalPartition.java  |   5 +
 .../GridCacheAbstractLocalStoreSelfTest.java    | 440 +++++++++++++++++++
 .../GridCachePartitionedLocalStoreSelfTest.java |  51 +++
 ...chePartitionedOffHeapLocalStoreSelfTest.java |  56 +++
 .../GridCacheReplicatedLocalStoreSelfTest.java  |  51 +++
 ...ridCacheTxPartitionedLocalStoreSelfTest.java |  51 +++
 .../ignite/testsuites/IgniteCacheTestSuite.java |   4 +
 9 files changed, 670 insertions(+)
----------------------------------------------------------------------



[33/50] incubator-ignite git commit: # ignite-382 Changed version.

Posted by ag...@apache.org.
# ignite-382 Changed version.


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

Branch: refs/heads/ignite-45
Commit: f252ee4177c3f1cf4b8eb47014e930da696600c2
Parents: 13e2d1f
Author: anovikov <an...@gridgain.com>
Authored: Mon Mar 2 16:36:11 2015 +0700
Committer: anovikov <an...@gridgain.com>
Committed: Mon Mar 2 16:36:11 2015 +0700

----------------------------------------------------------------------
 examples/pom-standalone.xml                       | 2 +-
 modules/core/src/main/resources/ignite.properties | 2 +-
 pom.xml                                           | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f252ee41/examples/pom-standalone.xml
----------------------------------------------------------------------
diff --git a/examples/pom-standalone.xml b/examples/pom-standalone.xml
index 47df6bd..5de7433 100644
--- a/examples/pom-standalone.xml
+++ b/examples/pom-standalone.xml
@@ -28,7 +28,7 @@
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <ignite.version>1.0.1-RC1-SNAPSHOT</ignite.version>
+        <ignite.version>1.0.0-RC2-SNAPSHOT</ignite.version>
     </properties>
 
     <groupId>org.apache.ignite</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f252ee41/modules/core/src/main/resources/ignite.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/ignite.properties b/modules/core/src/main/resources/ignite.properties
index caa7553..4295dce 100644
--- a/modules/core/src/main/resources/ignite.properties
+++ b/modules/core/src/main/resources/ignite.properties
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-ignite.version=1.0.1-rc1
+ignite.version=1.0.0-rc2
 ignite.build=0
 ignite.revision=DEV
 ignite.rel.date=01011970

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f252ee41/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 98f649d..b0ebc44 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
     </parent>
 
     <properties>
-        <ignite.version>1.0.1-RC1-SNAPSHOT</ignite.version>
+        <ignite.version>1.0.0-RC2-SNAPSHOT</ignite.version>
         <ignite.edition>fabric</ignite.edition>
         <hadoop.version>2.4.1</hadoop.version>
         <spring.version>4.1.0.RELEASE</spring.version>
@@ -574,7 +574,7 @@
                 </plugins>
             </build>
         </profile>
-        
+
         <profile>
             <id>test</id>
             <build>


[28/50] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-11' into sprint-2

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-11' into sprint-2


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

Branch: refs/heads/ignite-45
Commit: c9f46c1b39577c82d1084f13ffedb965a8e2c83c
Parents: 036bd71 6130f7e
Author: sevdokimov <se...@jetbrains.com>
Authored: Sun Mar 1 22:59:09 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Sun Mar 1 22:59:09 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/util/IgniteUtils.java       |  90 ++++++++++--
 .../spi/discovery/tcp/TcpDiscoverySpi.java      | 137 +++++++++++--------
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   | 116 ++++++++++++++++
 3 files changed, 275 insertions(+), 68 deletions(-)
----------------------------------------------------------------------



[23/50] incubator-ignite git commit: # sprint-2 - fixing comments.

Posted by ag...@apache.org.
# sprint-2 - fixing comments.


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

Branch: refs/heads/ignite-45
Commit: 3a77acf759cd30bbb7bdcb51ab8e1bcecb273639
Parents: 16105ec
Author: Dmitiry Setrakyan <ds...@gridgain.com>
Authored: Sat Feb 28 09:49:15 2015 -0800
Committer: Dmitiry Setrakyan <ds...@gridgain.com>
Committed: Sat Feb 28 09:49:15 2015 -0800

----------------------------------------------------------------------
 .../ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a77acf7/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
index 0473280..55ba1a7 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
@@ -131,7 +131,8 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> {
 
             int updated;
 
-            // Try update first.
+            // Try update first. If it does not work, then try insert.
+            // Some databases would allow these to be done in one 'upsert' operation.
             try (PreparedStatement st = conn.prepareStatement(
                 "update PERSONS set firstName=?, lastName=? where id=?")) {
                 st.setString(1, val.getFirstName());


[41/50] incubator-ignite git commit: Merge remote-tracking branch 'origin/sprint-2' into sprint-2

Posted by ag...@apache.org.
Merge remote-tracking branch 'origin/sprint-2' into sprint-2


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

Branch: refs/heads/ignite-45
Commit: 403d60feed477a4598509b619b2f63de307b9b5b
Parents: 8baca04 9671471
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Mar 2 17:16:40 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Mar 2 17:16:40 2015 +0300

----------------------------------------------------------------------
 .../configuration/IgniteConfiguration.java      |   5 +-
 .../org/apache/ignite/internal/IgnitionEx.java  | 592 +++++++++----------
 .../GridCacheQueueCleanupSelfTest.java          |   1 -
 3 files changed, 267 insertions(+), 331 deletions(-)
----------------------------------------------------------------------



[24/50] incubator-ignite git commit: # sprint-2 - javadoc fixes.

Posted by ag...@apache.org.
# sprint-2 - javadoc fixes.


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

Branch: refs/heads/ignite-45
Commit: 036bd71537630b082b747f518172da6ebfe11105
Parents: 3a77acf
Author: Dmitiry Setrakyan <ds...@gridgain.com>
Authored: Sat Feb 28 19:05:42 2015 -0800
Committer: Dmitiry Setrakyan <ds...@gridgain.com>
Committed: Sat Feb 28 19:05:42 2015 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/cache/store/CacheStore.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/036bd715/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStore.java b/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStore.java
index 848df39..eefcfb3 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStore.java
@@ -119,7 +119,7 @@ public interface CacheStore<K, V> extends CacheLoader<K, V>, CacheWriter<K, V> {
     /**
      * Loads all values from underlying persistent storage. Note that keys are not
      * passed, so it is up to implementation to figure out what to load. This method
-     * is called whenever {@link org.apache.ignite.cache.GridCache#loadCache(org.apache.ignite.lang.IgniteBiPredicate, long, Object...)}
+     * is called whenever {@link org.apache.ignite.IgniteCache#loadCache(IgniteBiPredicate, Object...)}
      * method is invoked which is usually to preload the cache from persistent storage.
      * <p>
      * This method is optional, and cache implementation does not depend on this
@@ -132,7 +132,7 @@ public interface CacheStore<K, V> extends CacheLoader<K, V>, CacheWriter<K, V> {
      *
      * @param clo Closure for loaded values.
      * @param args Arguments passes into
-     *      {@link org.apache.ignite.cache.GridCache#loadCache(org.apache.ignite.lang.IgniteBiPredicate, long, Object...)} method.
+     *      {@link org.apache.ignite.IgniteCache#loadCache(IgniteBiPredicate, Object...)} method.
      * @throws CacheLoaderException If loading failed.
      */
     public void loadCache(IgniteBiInClosure<K, V> clo, @Nullable Object... args) throws CacheLoaderException;


[06/50] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-2' into ignite-311

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/sprint-2' into ignite-311


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

Branch: refs/heads/ignite-45
Commit: 2ef2271b3f214db6143cd4166377c46f465449f8
Parents: 6e2ef56 e1c0945
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Feb 27 17:56:34 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Feb 27 17:56:34 2015 +0300

----------------------------------------------------------------------
 config/hadoop/default-config.xml                |   12 +
 config/ignite-log4j.xml                         |    2 +-
 .../datagrid/CacheContinuousQueryExample.java   |    2 +-
 ipc/shmem/Makefile.am                           |   15 +
 ipc/shmem/igniteshmem/Makefile.am               |   15 +
 ipc/shmem/include/Makefile.am                   |   15 +
 modules/clients/src/test/keystore/generate.sh   |   15 +-
 .../src/main/java/org/apache/ignite/Ignite.java |    4 +-
 .../main/java/org/apache/ignite/IgniteFs.java   |    2 +-
 .../ignite/cache/query/ContinuousQuery.java     |   18 +-
 .../apache/ignite/cluster/ClusterMetrics.java   |    2 +-
 .../configuration/QueryConfiguration.java       |   37 +-
 .../ignite/events/DiscoveryCustomEvent.java     |   56 -
 .../org/apache/ignite/events/EventType.java     |   14 +-
 .../java/org/apache/ignite/igfs/IgfsMode.java   |    6 +-
 .../java/org/apache/ignite/igfs/package.html    |    2 +-
 .../internal/events/DiscoveryCustomEvent.java   |   71 +
 .../discovery/GridDiscoveryManager.java         |    7 +-
 .../processors/cache/IgniteCacheProxy.java      |    6 +-
 .../cache/VisorCacheMetricsCollectorTask.java   |   10 +-
 .../visor/node/VisorBasicConfiguration.java     |   17 -
 .../node/VisorNodeEventsCollectorTask.java      |   10 +-
 .../internal/visor/node/VisorNodeGcTask.java    |   10 +-
 .../internal/visor/node/VisorNodePingTask.java  |   10 +-
 .../optimized-classnames.previous.properties    |   15 +
 .../optimized/optimized-classnames.properties   | 1565 +-----------------
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |    9 +-
 .../TcpDiscoveryCustomEventMessage.java         |    3 +
 .../internal/GridDiscoveryEventSelfTest.java    |    9 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |    8 +-
 ...dStartupWithUndefinedIgniteHomeSelfTest.java |  103 ++
 .../config/GridTestProperties.java              |   10 +-
 .../testsuites/IgniteKernalSelfTestSuite.java   |    1 +
 modules/extdata/p2p/pom.xml                     |    6 -
 .../client/hadoop/GridHadoopClientProtocol.java |    6 +-
 .../hadoop/IgfsHadoopFileSystemWrapper.java     |  412 +++++
 .../igfs/hadoop/v1/IgfsHadoopFileSystem.java    |    3 +-
 .../igfs/hadoop/v2/IgfsHadoopFileSystem.java    |    3 +-
 .../java/org/apache/ignite/igfs/package.html    |    2 +-
 .../igfs/hadoop/IgfsHadoopFSProperties.java     |   10 +-
 .../hadoop/IgfsHadoopFileSystemWrapper.java     |  413 -----
 .../internal/igfs/hadoop/IgfsHadoopReader.java  |    2 +-
 .../internal/igfs/hadoop/IgfsHadoopUtils.java   |    4 +-
 .../hadoop/GridHadoopClassLoader.java           |   12 +-
 .../processors/hadoop/GridHadoopSetup.java      |    8 +-
 .../processors/hadoop/GridHadoopUtils.java      |    4 +-
 .../collections/GridHadoopHashMultimapBase.java |    2 +-
 .../GridHadoopExternalCommunication.java        |   14 +-
 .../hadoop/v1/GridHadoopV1MapTask.java          |    6 +-
 .../v2/GridHadoopV2JobResourceManager.java      |    2 +-
 .../GridHadoopClientProtocolSelfTest.java       |    6 +-
 .../apache/ignite/igfs/IgfsEventsTestSuite.java |    2 +-
 .../IgfsHadoop20FileSystemAbstractSelfTest.java |    2 +-
 .../igfs/IgfsHadoopDualAbstractSelfTest.java    |    2 +-
 .../IgfsHadoopFileSystemAbstractSelfTest.java   |    1 +
 ...fsHadoopFileSystemSecondaryModeSelfTest.java |    2 +-
 .../hadoop/GridHadoopGroupingTest.java          |    4 +-
 .../igfs/IgfsPerformanceBenchmark.java          |    9 +-
 .../testsuites/IgniteHadoopTestSuite.java       |    7 +-
 modules/hibernate/pom.xml                       |    6 -
 modules/indexing/pom.xml                        |    6 -
 modules/jta/pom.xml                             |    6 -
 modules/scalar/pom.xml                          |    6 -
 modules/spring/pom.xml                          |    6 -
 modules/visor-console/pom.xml                   |    7 -
 .../commands/alert/VisorAlertCommand.scala      |    8 +-
 .../commands/cache/VisorCacheCommand.scala      |   82 +-
 .../config/VisorConfigurationCommand.scala      |  140 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |    2 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   64 +-
 .../commands/tasks/VisorTasksCommandSpec.scala  |    2 +-
 modules/web/pom.xml                             |    6 -
 modules/winservice/IgniteService.sln            |    2 +-
 .../IgniteService/IgniteService.csproj          |    2 +-
 .../config/benchmark-atomic-win.properties      |   15 +
 .../config/benchmark-atomic.properties          |   15 +
 .../config/benchmark-compute-win.properties     |   15 +
 .../config/benchmark-compute.properties         |   15 +
 .../config/benchmark-multicast.properties       |   15 +
 .../config/benchmark-query-win.properties       |   15 +
 .../yardstick/config/benchmark-query.properties |   15 +
 .../config/benchmark-tx-win.properties          |   15 +
 .../yardstick/config/benchmark-tx.properties    |   15 +
 .../yardstick/config/benchmark-win.properties   |   15 +
 modules/yardstick/config/benchmark.properties   |   15 +
 pom.xml                                         |  150 +-
 86 files changed, 1280 insertions(+), 2405 deletions(-)
----------------------------------------------------------------------



[19/50] incubator-ignite git commit: # sprint-2 - javadoc fixes.

Posted by ag...@apache.org.
# sprint-2 - javadoc fixes.


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

Branch: refs/heads/ignite-45
Commit: a14ef18335ad5f6c78c35b711f4bd8d5a40f6910
Parents: 375376b
Author: Dmitiry Setrakyan <ds...@gridgain.com>
Authored: Sat Feb 28 00:19:58 2015 -0500
Committer: Dmitiry Setrakyan <ds...@gridgain.com>
Committed: Sat Feb 28 00:19:58 2015 -0500

----------------------------------------------------------------------
 .../org/apache/ignite/cache/store/CacheStoreAdapter.java     | 2 +-
 .../org/apache/ignite/cache/store/CacheStoreSession.java     | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a14ef183/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreAdapter.java b/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreAdapter.java
index 794281b..58a3f76 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreAdapter.java
@@ -39,7 +39,7 @@ import java.util.*;
 public abstract class CacheStoreAdapter<K, V> implements CacheStore<K, V> {
     /**
      * Default empty implementation. This method needs to be overridden only if
-     * {@link org.apache.ignite.cache.GridCache#loadCache(IgniteBiPredicate, long, Object...)} method
+     * {@link org.apache.ignite.IgniteCache#loadCache(IgniteBiPredicate, Object...)} method
      * is explicitly called.
      *
      * @param clo {@inheritDoc}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a14ef183/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java b/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java
index 0bfc6fc..a2be4c5 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java
@@ -23,7 +23,13 @@ import org.apache.ignite.transactions.*;
 import java.util.*;
 
 /**
- * Session for the cache store operations.
+ * Session for the cache store operations. The main purpose of cache store session
+ * is to hold context between multiple store invocations whenever in transaction. For example,
+ * if using JDBC, you can store the ongoing database connection in the session {@link #properties()} map.
+ * You can then commit this connection in the {@link CacheStore#txEnd(boolean)} method.
+ * <p>
+ * {@code CacheStoreSession} can be injected into an implementation of {@link CacheStore} with
+ * {@link CacheStoreSessionResource @CacheStoreSessionResource} annotation.
  *
  * @see CacheStoreSessionResource
  */


[04/50] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-2' into ignite-343

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/sprint-2' into ignite-343


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

Branch: refs/heads/ignite-45
Commit: 28ecf57acd93c7ca5fe6ca9abf90fa9a233e3707
Parents: e16f2a1 b14be3b
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Feb 27 17:41:06 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Feb 27 17:41:06 2015 +0300

----------------------------------------------------------------------
 config/hadoop/default-config.xml                |   12 +
 .../datagrid/CacheContinuousQueryExample.java   |    2 +-
 ipc/shmem/Makefile.am                           |   15 +
 ipc/shmem/igniteshmem/Makefile.am               |   15 +
 ipc/shmem/include/Makefile.am                   |   15 +
 modules/clients/src/test/keystore/generate.sh   |   15 +-
 .../src/main/java/org/apache/ignite/Ignite.java |    4 +-
 .../ignite/cache/query/ContinuousQuery.java     |   18 +-
 .../apache/ignite/cluster/ClusterMetrics.java   |    2 +-
 .../configuration/QueryConfiguration.java       |   37 +-
 .../java/org/apache/ignite/igfs/IgfsMode.java   |    6 +-
 .../internal/events/DiscoveryCustomEvent.java   |    3 +
 .../processors/cache/IgniteCacheProxy.java      |    6 +-
 .../visor/node/VisorBasicConfiguration.java     |   17 -
 .../optimized-classnames.previous.properties    |   15 +
 .../optimized/optimized-classnames.properties   | 1565 +-----------------
 .../TcpDiscoveryCustomEventMessage.java         |    3 +
 ...ridCacheContinuousQueryAbstractSelfTest.java |    8 +-
 .../config/GridTestProperties.java              |   10 +-
 modules/extdata/p2p/pom.xml                     |    6 -
 .../client/hadoop/GridHadoopClientProtocol.java |    6 +-
 .../hadoop/IgfsHadoopFileSystemWrapper.java     |  412 +++++
 .../igfs/hadoop/v1/IgfsHadoopFileSystem.java    |    3 +-
 .../igfs/hadoop/v2/IgfsHadoopFileSystem.java    |    3 +-
 .../igfs/hadoop/IgfsHadoopFSProperties.java     |   10 +-
 .../hadoop/IgfsHadoopFileSystemWrapper.java     |  413 -----
 .../internal/igfs/hadoop/IgfsHadoopReader.java  |    2 +-
 .../internal/igfs/hadoop/IgfsHadoopUtils.java   |    4 +-
 .../hadoop/GridHadoopClassLoader.java           |   12 +-
 .../processors/hadoop/GridHadoopSetup.java      |    8 +-
 .../processors/hadoop/GridHadoopUtils.java      |    4 +-
 .../collections/GridHadoopHashMultimapBase.java |    2 +-
 .../GridHadoopExternalCommunication.java        |   14 +-
 .../hadoop/v1/GridHadoopV1MapTask.java          |    6 +-
 .../v2/GridHadoopV2JobResourceManager.java      |    2 +-
 .../GridHadoopClientProtocolSelfTest.java       |    6 +-
 .../apache/ignite/igfs/IgfsEventsTestSuite.java |    2 +-
 .../IgfsHadoop20FileSystemAbstractSelfTest.java |    2 +-
 .../igfs/IgfsHadoopDualAbstractSelfTest.java    |    2 +-
 .../IgfsHadoopFileSystemAbstractSelfTest.java   |    1 +
 ...fsHadoopFileSystemSecondaryModeSelfTest.java |    2 +-
 .../hadoop/GridHadoopGroupingTest.java          |    4 +-
 .../igfs/IgfsPerformanceBenchmark.java          |    9 +-
 modules/hibernate/pom.xml                       |    6 -
 modules/indexing/pom.xml                        |    6 -
 modules/jta/pom.xml                             |    6 -
 modules/scalar/pom.xml                          |    6 -
 modules/spring/pom.xml                          |    6 -
 modules/visor-console/pom.xml                   |    7 -
 .../commands/alert/VisorAlertCommand.scala      |    8 +-
 .../commands/cache/VisorCacheCommand.scala      |   82 +-
 .../config/VisorConfigurationCommand.scala      |  140 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |    2 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   64 +-
 .../commands/tasks/VisorTasksCommandSpec.scala  |    2 +-
 modules/web/pom.xml                             |    6 -
 modules/winservice/IgniteService.sln            |    2 +-
 .../IgniteService/IgniteService.csproj          |    2 +-
 .../config/benchmark-atomic-win.properties      |   15 +
 .../config/benchmark-atomic.properties          |   15 +
 .../config/benchmark-compute-win.properties     |   15 +
 .../config/benchmark-compute.properties         |   15 +
 .../config/benchmark-multicast.properties       |   15 +
 .../config/benchmark-query-win.properties       |   15 +
 .../yardstick/config/benchmark-query.properties |   15 +
 .../config/benchmark-tx-win.properties          |   15 +
 .../yardstick/config/benchmark-tx.properties    |   15 +
 .../yardstick/config/benchmark-win.properties   |   15 +
 modules/yardstick/config/benchmark.properties   |   15 +
 pom.xml                                         |  150 +-
 70 files changed, 1060 insertions(+), 2303 deletions(-)
----------------------------------------------------------------------



[42/50] incubator-ignite git commit: ignite-352 review

Posted by ag...@apache.org.
ignite-352 review


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

Branch: refs/heads/ignite-45
Commit: b0e6ab17c284850190012e7c120a95c34316b982
Parents: 403d60f
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Mar 2 17:28:39 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Mar 2 17:28:39 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/CacheMetricsImpl.java      |  4 ++
 .../dht/atomic/GridDhtAtomicCache.java          |  2 +-
 .../dht/colocated/GridDhtColocatedCache.java    |  2 +-
 .../cache/transactions/IgniteTxManager.java     |  7 +++-
 .../cache/GridCacheAbstractMetricsSelfTest.java | 42 ++++++++++++++++++++
 5 files changed, 53 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b0e6ab17/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
index 0de039b..446070e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
@@ -460,6 +460,8 @@ public class CacheMetricsImpl implements CacheMetrics {
 
     /**
      * Transaction commit callback.
+     *
+     * @param duration the time taken in nanoseconds.
      */
     public void onTxCommit(long duration) {
         txCommits.incrementAndGet();
@@ -472,6 +474,8 @@ public class CacheMetricsImpl implements CacheMetrics {
 
     /**
      * Transaction rollback callback.
+     *
+     * @param duration the time taken in nanoseconds.
      */
     public void onTxRollback(long duration) {
         txRollbacks.incrementAndGet();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b0e6ab17/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 9f9af31..add51bd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -990,7 +990,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
 
                 if (!success)
                     break;
-                else if (!skipVals)
+                else if (!skipVals && ctx.config().isStatisticsEnabled())
                     metrics0().onRead(true);
             }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b0e6ab17/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
index a59b6aa..cdb1759 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
@@ -318,7 +318,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
 
                 if (!success)
                     break;
-                else if (!skipVals)
+                else if (!skipVals && ctx.config().isStatisticsEnabled())
                     ctx.cache().metrics0().onRead(true);
             }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b0e6ab17/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 cf32dcc..af57ce4 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
@@ -1243,7 +1243,8 @@ public class IgniteTxManager<K, V> extends GridCacheSharedManagerAdapter<K, V> {
                     GridCacheContext<K, V> cacheCtx = cctx.cacheContext(cacheId);
 
                     if (cacheCtx.cache().configuration().isStatisticsEnabled())
-                        cacheCtx.cache().metrics0().onTxCommit(System.nanoTime() - tx.startTime());
+                        // Convert start time from ms to ns.
+                        cacheCtx.cache().metrics0().onTxCommit((U.currentTimeMillis() - tx.startTime()) * 1000);
                 }
             }
 
@@ -1316,7 +1317,9 @@ public class IgniteTxManager<K, V> extends GridCacheSharedManagerAdapter<K, V> {
                 for (int cacheId : tx.activeCacheIds()) {
                     GridCacheContext<K, V> cacheCtx = cctx.cacheContext(cacheId);
 
-                    cacheCtx.cache().metrics0().onTxRollback(System.nanoTime() - tx.startTime());
+                    if (cacheCtx.cache().configuration().isStatisticsEnabled())
+                        // Convert start time from ms to ns.
+                        cacheCtx.cache().metrics0().onTxRollback((U.currentTimeMillis() - tx.startTime()) * 1000);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b0e6ab17/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
index d1c5e12..a7fb34a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
@@ -103,6 +103,48 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
     /**
      * @throws Exception If failed.
      */
+    public void testGetMetricsDisable() throws Exception {
+        // Disable statistics.
+        for (int i = 0; i < gridCount(); i++) {
+            Ignite g = grid(i);
+
+            g.jcache(null).getConfiguration(CacheConfiguration.class).setStatisticsEnabled(false);
+        }
+
+        IgniteCache<Object, Object> jcache = grid(0).jcache(null);
+
+        // Write to cache.
+        for (int i = 0; i < KEY_CNT; i++)
+            jcache.put(i, i);
+
+        // Get from cache.
+        for (int i = 0; i < KEY_CNT; i++)
+            jcache.get(i);
+
+        // Remove from cache.
+        for (int i = 0; i < KEY_CNT; i++)
+            jcache.remove(i);
+
+        // Assert that statistics is clear.
+        for (int i = 0; i < gridCount(); i++) {
+            CacheMetrics m = grid(i).jcache(null).metrics();
+
+            assertEquals(m.getCacheGets(), 0);
+            assertEquals(m.getCachePuts(), 0);
+            assertEquals(m.getCacheRemovals(), 0);
+            assertEquals(m.getCacheHits(), 0);
+            assertEquals(m.getCacheMisses(), 0);
+            assertEquals(m.getAverageGetTime(), 0f);
+            assertEquals(m.getAverageRemoveTime(), 0f);
+            assertEquals(m.getAveragePutTime(), 0f);
+            assertEquals(m.getAverageTxCommitTime(), 0f);
+            assertEquals(m.getAverageTxRollbackTime(), 0f);
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testGetMetricsSnapshot() throws Exception {
         IgniteCache<Object, Object> cache = grid(0).jcache(null);
 


[09/50] incubator-ignite git commit: Merge branch 'ignite-322' into sprint-2

Posted by ag...@apache.org.
Merge branch 'ignite-322' into sprint-2


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

Branch: refs/heads/ignite-45
Commit: a663f8395668f6a473b63260a373776312f78154
Parents: b14be3b 96deb43
Author: Artem Shutak <as...@gridgain.com>
Authored: Fri Feb 27 18:00:50 2015 +0300
Committer: Artem Shutak <as...@gridgain.com>
Committed: Fri Feb 27 18:00:50 2015 +0300

----------------------------------------------------------------------
 .../HibernateReadWriteAccessStrategy.java       | 81 +++++++++++++++-----
 1 file changed, 63 insertions(+), 18 deletions(-)
----------------------------------------------------------------------



[36/50] incubator-ignite git commit: sprint-2 fix for ignite-301

Posted by ag...@apache.org.
sprint-2 fix for ignite-301


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

Branch: refs/heads/ignite-45
Commit: ea6a1c03c66c1f78a9d9f00f73f9483c32569858
Parents: c9f46c1
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Mar 2 16:00:21 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Mar 2 16:00:21 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/GridKernalContext.java      | 10 ++++-
 .../ignite/internal/GridKernalContextImpl.java  | 14 +++++-
 .../apache/ignite/internal/IgniteKernal.java    | 23 +++++-----
 .../processors/cluster/ClusterProcessor.java    | 46 ++++++++++++++++++++
 4 files changed, 78 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ea6a1c03/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
index 100ad28..cb9ffa1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
@@ -33,11 +33,12 @@ import org.apache.ignite.internal.processors.affinity.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.clock.*;
 import org.apache.ignite.internal.processors.closure.*;
+import org.apache.ignite.internal.processors.cluster.*;
 import org.apache.ignite.internal.processors.continuous.*;
 import org.apache.ignite.internal.processors.dataload.*;
 import org.apache.ignite.internal.processors.datastructures.*;
-import org.apache.ignite.internal.processors.igfs.*;
 import org.apache.ignite.internal.processors.hadoop.*;
+import org.apache.ignite.internal.processors.igfs.*;
 import org.apache.ignite.internal.processors.job.*;
 import org.apache.ignite.internal.processors.jobmetrics.*;
 import org.apache.ignite.internal.processors.offheap.*;
@@ -508,4 +509,11 @@ public interface GridKernalContext extends Iterable<GridComponent> {
      * @return Exception registry.
      */
     public IgniteExceptionRegistry exceptionRegistry();
+
+    /**
+     * Gets Cluster processor.
+     *
+     * @return Cluster processor.
+     */
+    public ClusterProcessor cluster();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ea6a1c03/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
index 395ad52..756c16a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
@@ -36,11 +36,12 @@ import org.apache.ignite.internal.processors.cache.dr.os.*;
 import org.apache.ignite.internal.processors.cache.serialization.*;
 import org.apache.ignite.internal.processors.clock.*;
 import org.apache.ignite.internal.processors.closure.*;
+import org.apache.ignite.internal.processors.cluster.*;
 import org.apache.ignite.internal.processors.continuous.*;
 import org.apache.ignite.internal.processors.dataload.*;
 import org.apache.ignite.internal.processors.datastructures.*;
-import org.apache.ignite.internal.processors.igfs.*;
 import org.apache.ignite.internal.processors.hadoop.*;
+import org.apache.ignite.internal.processors.igfs.*;
 import org.apache.ignite.internal.processors.job.*;
 import org.apache.ignite.internal.processors.jobmetrics.*;
 import org.apache.ignite.internal.processors.offheap.*;
@@ -245,6 +246,10 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable
 
     /** */
     @GridToStringExclude
+    private ClusterProcessor cluster;
+
+    /** */
+    @GridToStringExclude
     private DataStructuresProcessor dataStructuresProc;
 
     /** */
@@ -461,6 +466,8 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable
             qryProc = (GridQueryProcessor)comp;
         else if (comp instanceof DataStructuresProcessor)
             dataStructuresProc = (DataStructuresProcessor)comp;
+        else if (comp instanceof ClusterProcessor)
+            cluster = (ClusterProcessor)comp;
         else
             assert (comp instanceof GridPluginComponent) : "Unknown manager class: " + comp.getClass();
 
@@ -854,6 +861,11 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable
     }
 
     /** {@inheritDoc} */
+    @Override public ClusterProcessor cluster() {
+        return cluster;
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(GridKernalContextImpl.class, this);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ea6a1c03/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 9c92edd..f46d071 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -39,6 +39,7 @@ import org.apache.ignite.internal.processors.affinity.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.clock.*;
 import org.apache.ignite.internal.processors.closure.*;
+import org.apache.ignite.internal.processors.cluster.*;
 import org.apache.ignite.internal.processors.continuous.*;
 import org.apache.ignite.internal.processors.dataload.*;
 import org.apache.ignite.internal.processors.datastructures.*;
@@ -182,10 +183,6 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
     @GridToStringExclude
     private boolean errOnStop;
 
-    /** Cluster. */
-    @GridToStringExclude
-    private IgniteClusterImpl cluster;
-
     /** Scheduler. */
     @GridToStringExclude
     private IgniteScheduler scheduler;
@@ -229,37 +226,37 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
 
     /** {@inheritDoc} */
     @Override public IgniteClusterEx cluster() {
-        return cluster;
+        return ctx.cluster().get();
     }
 
     /** {@inheritDoc} */
     @Override public ClusterNode localNode() {
-        return cluster.localNode();
+        return ctx.cluster().get().localNode();
     }
 
     /** {@inheritDoc} */
     @Override public IgniteCompute compute() {
-        return cluster.compute();
+        return ctx.cluster().get().compute();
     }
 
     /** {@inheritDoc} */
     @Override public IgniteMessaging message() {
-        return cluster.message();
+        return ctx.cluster().get().message();
     }
 
     /** {@inheritDoc} */
     @Override public IgniteEvents events() {
-        return cluster.events();
+        return ctx.cluster().get().events();
     }
 
     /** {@inheritDoc} */
     @Override public IgniteServices services() {
-        return cluster.services();
+        return ctx.cluster().get().services();
     }
 
     /** {@inheritDoc} */
     @Override public ExecutorService executorService() {
-        return cluster.executorService();
+        return ctx.cluster().get().executorService();
     }
 
     /** {@inheritDoc} */
@@ -678,7 +675,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
                 igfsExecSvc,
                 restExecSvc);
 
-            cluster = new IgniteClusterImpl(ctx);
+            startProcessor(ctx, new ClusterProcessor(ctx), attrs);
 
             U.onGridStart();
 
@@ -1793,7 +1790,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
                 // No more kernal calls from this point on.
                 gw.setState(STOPPING);
 
-                cluster.clearNodeMap();
+                ctx.cluster().get().clearNodeMap();
 
                 if (log.isDebugEnabled())
                     log.debug("Grid " + (gridName == null ? "" : '\'' + gridName + "' ") + "is stopping.");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ea6a1c03/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterProcessor.java
new file mode 100644
index 0000000..0ee00f1
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterProcessor.java
@@ -0,0 +1,46 @@
+/*
+ * 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.cluster;
+
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.cluster.*;
+import org.apache.ignite.internal.processors.*;
+
+/**
+ *
+ */
+public class ClusterProcessor extends GridProcessorAdapter {
+    /** */
+    private IgniteClusterImpl cluster;
+
+    /**
+     * @param ctx Kernal context.
+     */
+    public ClusterProcessor(GridKernalContext ctx) {
+        super(ctx);
+
+        cluster = new IgniteClusterImpl(ctx);
+    }
+
+    /**
+     * @return Cluster.
+     */
+    public IgniteClusterImpl get() {
+        return cluster;
+    }
+}


[15/50] incubator-ignite git commit: Merge branches 'ignite-339' and 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-339

Posted by ag...@apache.org.
Merge branches 'ignite-339' and 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-339


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

Branch: refs/heads/ignite-45
Commit: 2710ece0fb8c18fec65d7e4f745f048eca07790e
Parents: 57bdd8a a792c99
Author: AKuznetsov <ak...@gridgain.com>
Authored: Sat Feb 28 01:40:08 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Sat Feb 28 01:40:08 2015 +0700

----------------------------------------------------------------------
 config/hadoop/default-config.xml                |   12 +
 config/ignite-log4j.xml                         |    2 +-
 .../datagrid/CacheContinuousQueryExample.java   |    2 +-
 ipc/shmem/Makefile.am                           |   15 +
 ipc/shmem/igniteshmem/Makefile.am               |   15 +
 ipc/shmem/include/Makefile.am                   |   15 +
 modules/clients/src/test/keystore/generate.sh   |   15 +-
 .../src/main/java/org/apache/ignite/Ignite.java |    4 +-
 .../ignite/cache/query/ContinuousQuery.java     |   18 +-
 .../apache/ignite/cluster/ClusterMetrics.java   |    2 +-
 .../configuration/QueryConfiguration.java       |   37 +-
 .../java/org/apache/ignite/igfs/IgfsMode.java   |    6 +-
 .../apache/ignite/internal/GridProperties.java  |   78 -
 .../ignite/internal/GridUpdateNotifier.java     |    2 +-
 .../apache/ignite/internal/IgniteKernal.java    |   18 +-
 .../ignite/internal/IgniteProperties.java       |   79 +
 .../ignite/internal/IgniteVersionUtils.java     |    8 +-
 .../internal/events/DiscoveryCustomEvent.java   |    3 +
 .../processors/cache/IgniteCacheProxy.java      |    6 +-
 .../plugin/IgnitePluginProcessor.java           |   24 +
 .../optimized-classnames.previous.properties    |   15 +
 .../optimized/optimized-classnames.properties   | 1565 +-----------------
 .../apache/ignite/plugin/PluginProvider.java    |    5 +
 .../TcpDiscoveryCustomEventMessage.java         |    3 +
 .../internal/GridUpdateNotifierSelfTest.java    |    2 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |    8 +-
 .../config/GridTestProperties.java              |   10 +-
 modules/extdata/p2p/pom.xml                     |    6 -
 .../client/hadoop/GridHadoopClientProtocol.java |    6 +-
 .../hadoop/IgfsHadoopFileSystemWrapper.java     |  412 +++++
 .../igfs/hadoop/v1/IgfsHadoopFileSystem.java    |    3 +-
 .../igfs/hadoop/v2/IgfsHadoopFileSystem.java    |    3 +-
 .../igfs/hadoop/IgfsHadoopFSProperties.java     |   10 +-
 .../hadoop/IgfsHadoopFileSystemWrapper.java     |  413 -----
 .../internal/igfs/hadoop/IgfsHadoopReader.java  |    2 +-
 .../internal/igfs/hadoop/IgfsHadoopUtils.java   |    4 +-
 .../hadoop/GridHadoopClassLoader.java           |   12 +-
 .../processors/hadoop/GridHadoopSetup.java      |    8 +-
 .../processors/hadoop/GridHadoopUtils.java      |    4 +-
 .../collections/GridHadoopHashMultimapBase.java |    2 +-
 .../GridHadoopExternalCommunication.java        |   14 +-
 .../hadoop/v1/GridHadoopV1MapTask.java          |    6 +-
 .../v2/GridHadoopV2JobResourceManager.java      |    2 +-
 .../GridHadoopClientProtocolSelfTest.java       |    6 +-
 .../apache/ignite/igfs/IgfsEventsTestSuite.java |    2 +-
 .../IgfsHadoop20FileSystemAbstractSelfTest.java |    2 +-
 .../igfs/IgfsHadoopDualAbstractSelfTest.java    |    2 +-
 .../IgfsHadoopFileSystemAbstractSelfTest.java   |    1 +
 ...fsHadoopFileSystemSecondaryModeSelfTest.java |    2 +-
 .../hadoop/GridHadoopGroupingTest.java          |    4 +-
 .../igfs/IgfsPerformanceBenchmark.java          |    9 +-
 modules/hibernate/pom.xml                       |    6 -
 .../HibernateReadWriteAccessStrategy.java       |   81 +-
 modules/indexing/pom.xml                        |    6 -
 modules/jta/pom.xml                             |    6 -
 modules/scalar/pom.xml                          |    6 -
 modules/spring/pom.xml                          |    6 -
 modules/visor-console/pom.xml                   |    7 -
 modules/web/pom.xml                             |    6 -
 modules/winservice/IgniteService.sln            |    2 +-
 .../IgniteService/IgniteService.csproj          |    2 +-
 .../config/benchmark-atomic-win.properties      |   15 +
 .../config/benchmark-atomic.properties          |   15 +
 .../config/benchmark-compute-win.properties     |   15 +
 .../config/benchmark-compute.properties         |   15 +
 .../config/benchmark-multicast.properties       |   15 +
 .../config/benchmark-query-win.properties       |   15 +
 .../yardstick/config/benchmark-query.properties |   15 +
 .../config/benchmark-tx-win.properties          |   15 +
 .../yardstick/config/benchmark-tx.properties    |   15 +
 .../yardstick/config/benchmark-win.properties   |   15 +
 modules/yardstick/config/benchmark.properties   |   15 +
 pom.xml                                         |  150 +-
 73 files changed, 1074 insertions(+), 2273 deletions(-)
----------------------------------------------------------------------



[40/50] incubator-ignite git commit: ignite-342 review

Posted by ag...@apache.org.
ignite-342 review


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

Branch: refs/heads/ignite-45
Commit: 8baca046e02e703b5ce5c0a2f1a34ba279392a3e
Parents: 11efb91
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Mar 2 17:16:26 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Mar 2 17:16:26 2015 +0300

----------------------------------------------------------------------
 .../affinity/GridAffinityAssignmentCache.java   |  13 +-
 .../processors/cache/GridCacheContext.java      |  19 ++
 .../processors/cache/GridCacheProcessor.java    |  15 ++
 ...acheAbstractUsersAffinityMapperSelfTest.java | 207 +++++++++++++++++++
 ...dCacheAtomicUsersAffinityMapperSelfTest.java |  45 ++++
 ...heReplicatedUsersAffinityMapperSelfTest.java |  45 ++++
 .../GridCacheTxUsersAffinityMapperSelfTest.java |  45 ++++
 7 files changed, 388 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8baca046/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
index 9c12a17..69795b1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
@@ -305,7 +305,18 @@ public class GridAffinityAssignmentCache {
             }
         }
 
-        return aff.partition(affMapper.affinityKey(key));
+        return aff.partition(affinityKey(key));
+    }
+
+    /**
+     * If Key is {@link GridCacheInternal GridCacheInternal} entry when won't passed into user's mapper and
+     * will use {@link GridCacheDefaultAffinityKeyMapper default}.
+     *
+     * @param key Key.
+     * @return Affinity key.
+     */
+    private Object affinityKey(Object key) {
+        return (key instanceof GridCacheInternal ? ctx.defaultAffMapper() : affMapper).affinityKey(key);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8baca046/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index 3ec013c..44f8e69 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
@@ -164,6 +165,9 @@ public class GridCacheContext<K, V> implements Externalizable {
     /** Cached local rich node. */
     private ClusterNode locNode;
 
+    /** Default cache affinity mapper. */
+    private CacheAffinityKeyMapper affMapper;
+
     /**
      * Thread local projection. If it's set it means that method call was initiated
      * by child projection of initial cache.
@@ -1016,6 +1020,20 @@ public class GridCacheContext<K, V> implements Externalizable {
     }
 
     /**
+     * @return Default affinity key mapper.
+     */
+    public CacheAffinityKeyMapper defaultAffMapper() {
+        return affMapper;
+    }
+
+    /**
+     * Sets default affinity key mapper.
+     */
+    public void defaultAffMapper(CacheAffinityKeyMapper dfltAffMapper) {
+        this.affMapper = dfltAffMapper;
+    }
+
+    /**
      * @param p Single predicate.
      * @return Array containing single predicate.
      */
@@ -1770,6 +1788,7 @@ public class GridCacheContext<K, V> implements Externalizable {
         evictMgr = null;
         qryMgr = null;
         dataStructuresMgr = null;
+        affMapper = null;
 
         mgrs.clear();
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8baca046/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index e99c706..f74f969 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -618,6 +618,17 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
             U.startLifecycleAware(lifecycleAwares(cfg, jta.tmLookup(), cfgStore));
 
+            // Init default key mapper.
+            CacheAffinityKeyMapper dfltAffMapper;
+
+            if (cfg.getAffinityMapper().getClass().equals(GridCacheDefaultAffinityKeyMapper.class))
+                dfltAffMapper = cfg.getAffinityMapper();
+            else {
+                dfltAffMapper = new GridCacheDefaultAffinityKeyMapper();
+
+                prepare(cfg, dfltAffMapper, false);
+            }
+
             cfgs[i] = cfg; // Replace original configuration value.
 
             GridCacheAffinityManager affMgr = new GridCacheAffinityManager();
@@ -655,6 +666,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                 drMgr,
                 jta);
 
+            cacheCtx.defaultAffMapper(dfltAffMapper);
+
             GridCacheAdapter cache = null;
 
             switch (cfg.getCacheMode()) {
@@ -793,6 +806,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                     drMgr,
                     jta);
 
+                cacheCtx.defaultAffMapper(dfltAffMapper);
+
                 GridDhtCacheAdapter dht = null;
 
                 switch (cfg.getAtomicityMode()) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8baca046/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java
new file mode 100644
index 0000000..71f28ce
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractUsersAffinityMapperSelfTest.java
@@ -0,0 +1,207 @@
+/*
+ * 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 org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.affinity.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.io.*;
+
+/**
+ * Test affinity mapper.
+ */
+public abstract class GridCacheAbstractUsersAffinityMapperSelfTest extends GridCommonAbstractTest {
+    /** */
+    private static final int KEY_CNT = 1000;
+
+    /** */
+    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /** */
+    public static final CacheAffinityKeyMapper AFFINITY_MAPPER = new UsersAffinityKeyMapper();
+
+    /** */
+    public GridCacheAbstractUsersAffinityMapperSelfTest() {
+        super(false /* doesn't start grid */);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        super.afterTest();
+
+        stopAllGrids();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        CacheConfiguration cacheCfg = new CacheConfiguration();
+
+        cacheCfg.setName(null);
+        cacheCfg.setCacheMode(getCacheMode());
+        cacheCfg.setAtomicityMode(getAtomicMode());
+        cacheCfg.setDistributionMode(getDistributionMode());
+        cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
+        cacheCfg.setPreloadMode(CachePreloadMode.SYNC);
+        cacheCfg.setAffinityMapper(AFFINITY_MAPPER);
+
+        cfg.setCacheConfiguration(cacheCfg);
+
+        TcpDiscoverySpi spi = new TcpDiscoverySpi();
+
+        spi.setIpFinder(IP_FINDER);
+
+        cfg.setDiscoverySpi(spi);
+
+        return cfg;
+    }
+
+    /**
+     * @return Distribution mode.
+     */
+    protected abstract CacheDistributionMode getDistributionMode();
+
+    /**
+     * @return Cache atomicity mode.
+     */
+    protected abstract CacheAtomicityMode getAtomicMode();
+
+    /**
+     * @return Cache mode.
+     */
+    protected abstract CacheMode getCacheMode();
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testAffinityMapper() throws Exception {
+        IgniteCache<Object, Object> cache = startGrid(0).jcache(null);
+
+        for (int i = 0; i < KEY_CNT; i++) {
+            cache.put(String.valueOf(i), String.valueOf(i));
+
+            cache.put(new TestAffinityKey(i, String.valueOf(i)), i);
+        }
+
+        assertEquals(1, cache.get(new TestAffinityKey(1, "1")));
+
+        startGrid(1);
+
+        for (int i = 0; i < KEY_CNT; i++)
+            grid(i % 2).compute().affinityRun(null, new TestAffinityKey(1, "1"), new NoopClosure());
+    }
+
+    /**
+     * Test key for field annotation.
+     */
+    private static class TestAffinityKey implements Externalizable {
+        /** Key. */
+        private int key;
+
+        /** Affinity key. */
+        @CacheAffinityKeyMapped
+        private String affKey;
+
+        /**
+         * Constructor.
+         */
+        public TestAffinityKey() {
+        }
+
+        /**
+         * Constructor.
+         *
+         * @param key Key.
+         * @param affKey Affinity key.
+         */
+        TestAffinityKey(int key, String affKey) {
+            this.key = key;
+            this.affKey = affKey;
+        }
+
+        /**
+         * @return Key.
+         */
+        public int key() {
+            return key;
+        }
+
+        /**
+         * @return Affinity key.
+         */
+        public String affinityKey() {
+            return affKey;
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            return o instanceof TestAffinityKey && key == ((TestAffinityKey)o).key();
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            return key + affKey.hashCode();
+        }
+
+        /** {@inheritDoc} */
+        @Override public void writeExternal(ObjectOutput out) throws IOException {
+            out.writeInt(key);
+            out.writeUTF(affKey);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+            key = in.readInt();
+            affKey = in.readUTF();
+        }
+    }
+
+    /**
+     * Users affinity mapper.
+     */
+    private static class UsersAffinityKeyMapper extends GridCacheDefaultAffinityKeyMapper{
+        /** {@inheritDoc} */
+        @Override public Object affinityKey(Object key) {
+            GridArgumentCheck.notNull(key, "key");
+
+            assertFalse("GridCacheInternal entry mustn't be passed in user's key mapper.",
+                key instanceof GridCacheInternal);
+
+            return super.affinityKey(key);
+        }
+    }
+
+    /**
+     * Noop closure.
+     */
+    private static class NoopClosure implements IgniteRunnable {
+        /** {@inheritDoc} */
+        @Override public void run() {
+            // No-op.
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8baca046/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicUsersAffinityMapperSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicUsersAffinityMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicUsersAffinityMapperSelfTest.java
new file mode 100644
index 0000000..8a80e35
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicUsersAffinityMapperSelfTest.java
@@ -0,0 +1,45 @@
+/*
+ * 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 org.apache.ignite.cache.*;
+
+/**
+ * Test affinity mapper.
+ */
+public class GridCacheAtomicUsersAffinityMapperSelfTest extends GridCacheAbstractUsersAffinityMapperSelfTest {
+    /** */
+    public GridCacheAtomicUsersAffinityMapperSelfTest() {
+        super();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheDistributionMode getDistributionMode() {
+        return CacheDistributionMode.PARTITIONED_ONLY;
+    };
+
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode getAtomicMode() {
+        return CacheAtomicityMode.ATOMIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheMode getCacheMode() {
+        return CacheMode.PARTITIONED;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8baca046/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedUsersAffinityMapperSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedUsersAffinityMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedUsersAffinityMapperSelfTest.java
new file mode 100644
index 0000000..47e5dc7
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReplicatedUsersAffinityMapperSelfTest.java
@@ -0,0 +1,45 @@
+/*
+ * 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 org.apache.ignite.cache.*;
+
+/**
+ * Test affinity mapper.
+ */
+public class GridCacheReplicatedUsersAffinityMapperSelfTest extends GridCacheAbstractUsersAffinityMapperSelfTest {
+    /** */
+    public GridCacheReplicatedUsersAffinityMapperSelfTest() {
+        super();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheDistributionMode getDistributionMode() {
+        return CacheDistributionMode.PARTITIONED_ONLY;
+    };
+
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode getAtomicMode() {
+        return CacheAtomicityMode.ATOMIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheMode getCacheMode() {
+        return CacheMode.REPLICATED;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8baca046/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTxUsersAffinityMapperSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTxUsersAffinityMapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTxUsersAffinityMapperSelfTest.java
new file mode 100644
index 0000000..61af04e
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTxUsersAffinityMapperSelfTest.java
@@ -0,0 +1,45 @@
+/*
+ * 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 org.apache.ignite.cache.*;
+
+/**
+ * Test affinity mapper.
+ */
+public class GridCacheTxUsersAffinityMapperSelfTest extends GridCacheAbstractUsersAffinityMapperSelfTest {
+    /** */
+    public GridCacheTxUsersAffinityMapperSelfTest() {
+        super();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheDistributionMode getDistributionMode() {
+        return CacheDistributionMode.PARTITIONED_ONLY;
+    };
+
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode getAtomicMode() {
+        return CacheAtomicityMode.TRANSACTIONAL;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheMode getCacheMode() {
+        return CacheMode.PARTITIONED;
+    }
+}


[12/50] incubator-ignite git commit: #ignite-239: review.

Posted by ag...@apache.org.
#ignite-239: review.


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

Branch: refs/heads/ignite-45
Commit: 8476463b9145eff58d28da7e57d83d96e50a066c
Parents: 4ff4fd1
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Feb 27 18:17:07 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Feb 27 18:17:07 2015 +0300

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


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8476463b/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 6b8b197..c7e7cb6 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
@@ -1306,8 +1306,6 @@ public class IgnitionEx {
             // and I don't want to reshuffle a lot of code.
             assert F.eq(name, cfg.getGridName());
 
-            IgniteConfiguration myCfg = initializeConfiguration(cfg);
-
             // Validate segmentation configuration.
             GridSegmentationPolicy segPlc = cfg.getSegmentationPolicy();
 
@@ -1318,6 +1316,8 @@ public class IgnitionEx {
                     "on start?) [segPlc=" + segPlc + ", wait=false]");
             }
 
+            IgniteConfiguration myCfg = initializeConfiguration(cfg);
+
             // Ensure that SPIs support multiple grid instances, if required.
             if (!startCtx.single()) {
                 ensureMultiInstanceSupport(myCfg.getDeploymentSpi());


[50/50] incubator-ignite git commit: #IGNITE-45 - WIP.

Posted by ag...@apache.org.
#IGNITE-45 - WIP.


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

Branch: refs/heads/ignite-45
Commit: 893d0fe08ebe6502ac8efd772de3e5bc120be6f3
Parents: 3468369
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Mon Mar 2 18:31:01 2015 -0800
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Mon Mar 2 18:31:01 2015 -0800

----------------------------------------------------------------------
 .../ignite/internal/GridKernalContextImpl.java  |  10 +-
 .../apache/ignite/internal/IgniteKernal.java    |   8 +-
 .../discovery/GridDiscoveryManager.java         |  37 +++--
 .../cache/DynamicCacheDescriptor.java           |  70 +++++++++
 .../GridCachePartitionExchangeManager.java      |  10 ++
 .../processors/cache/GridCacheProcessor.java    | 143 +++++++++++++++++++
 .../spi/discovery/DiscoverySpiListener.java     |   3 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |  55 +++----
 .../cache/IgniteDynamicCacheStartSelfTest.java  | 139 ++++++++++++++++++
 9 files changed, 438 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/893d0fe0/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
index 756c16a..7fb080d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
@@ -381,6 +381,13 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable
      * @param comp Manager to add.
      */
     public void add(GridComponent comp) {
+        add(comp, true);
+    }
+
+    /**
+     * @param comp Manager to add.
+     */
+    public void add(GridComponent comp, boolean addToList) {
         assert comp != null;
 
         /*
@@ -471,7 +478,8 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable
         else
             assert (comp instanceof GridPluginComponent) : "Unknown manager class: " + comp.getClass();
 
-        comps.add(comp);
+        if (addToList)
+            comps.add(comp);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/893d0fe0/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index f46d071..b17ed37 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -740,6 +740,12 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
 
             ackSecurity(ctx);
 
+            // Assign discovery manager to context before other processors start so they
+            // are able to register custom event listener.
+            GridManager discoMgr = new GridDiscoveryManager(ctx);
+
+            ctx.add(discoMgr, false);
+
             // Start processors before discovery manager, so they will
             // be able to start receiving messages once discovery completes.
             startProcessor(ctx, new GridClockSyncProcessor(ctx), attrs);
@@ -776,7 +782,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
                 gw.setState(STARTED);
 
                 // Start discovery manager last to make sure that grid is fully initialized.
-                startManager(ctx, new GridDiscoveryManager(ctx), attrs);
+                startManager(ctx, discoMgr, attrs);
             }
             finally {
                 gw.writeUnlock();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/893d0fe0/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 68f0a4a..dce04e2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -163,6 +163,9 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
     /** Metrics update worker. */
     private final MetricsUpdater metricsUpdater = new MetricsUpdater();
 
+    /** Custom event listener. */
+    private GridPlainInClosure<Serializable> customEvtLsnr;
+
     /** @param ctx Context. */
     public GridDiscoveryManager(GridKernalContext ctx) {
         super(ctx, ctx.config().getDiscoverySpi());
@@ -304,6 +307,15 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                     return;
                 }
 
+                if (type == DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT) {
+                    try {
+                        customEvtLsnr.apply(data);
+                    }
+                    catch (Exception e) {
+                        U.error(log, "Failed to notify direct custom event listener: " + data, e);
+                    }
+                }
+
                 if (topVer > 0 && (type == EVT_NODE_JOINED || type == EVT_NODE_FAILED || type == EVT_NODE_LEFT)) {
                     boolean set = GridDiscoveryManager.this.topVer.setIfGreater(topVer);
 
@@ -380,6 +392,13 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
     }
 
     /**
+     * @param customEvtLsnr Custom event listener.
+     */
+    public void setCustomEventListener(GridPlainInClosure<Serializable> customEvtLsnr) {
+        this.customEvtLsnr = customEvtLsnr;
+    }
+
+    /**
      * @return Metrics.
      */
     private GridLocalMetrics createMetrics() {
@@ -1488,17 +1507,17 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                 }
 
                 case DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT: {
-                    DiscoveryCustomEvent customEvt = new DiscoveryCustomEvent();
-
-                    customEvt.node(ctx.discovery().localNode());
-                    customEvt.eventNode(node);
-                    customEvt.type(type);
-                    customEvt.topologySnapshot(topVer, null);
-                    customEvt.data(evt.get5());
+                    if (ctx.event().isRecordable(DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT)) {
+                        DiscoveryCustomEvent customEvt = new DiscoveryCustomEvent();
 
-                    assert ctx.event().isRecordable(DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT);
+                        customEvt.node(ctx.discovery().localNode());
+                        customEvt.eventNode(node);
+                        customEvt.type(type);
+                        customEvt.topologySnapshot(topVer, null);
+                        customEvt.data(evt.get5());
 
-                    ctx.event().record(customEvt);
+                        ctx.event().record(customEvt);
+                    }
 
                     return;
                 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/893d0fe0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
new file mode 100644
index 0000000..196730c
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
@@ -0,0 +1,70 @@
+/*
+ * 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 org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.tostring.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
+
+import java.io.*;
+
+/**
+ * Cache start descriptor.
+ */
+public class DynamicCacheDescriptor implements Serializable {
+    /** Cache configuration. */
+    @GridToStringExclude
+    private CacheConfiguration cacheCfg;
+
+    /** Deploy filter bytes. */
+    @GridToStringExclude
+    private byte[] deployFltrBytes;
+
+    /** Cache start ID. */
+    private IgniteUuid startId;
+
+    /**
+     * @param cacheCfg Cache configuration.
+     * @param deployFltrBytes Deployment filter bytes.
+     */
+    public DynamicCacheDescriptor(CacheConfiguration cacheCfg, byte[] deployFltrBytes, IgniteUuid startId) {
+        this.cacheCfg = cacheCfg;
+        this.deployFltrBytes = deployFltrBytes;
+        this.startId = startId;
+    }
+
+    /**
+     * @return Cache configuration.
+     */
+    public CacheConfiguration cacheConfiguration() {
+        return cacheCfg;
+    }
+
+    /**
+     * @return Start ID.
+     */
+    public IgniteUuid startId() {
+        return startId;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(DynamicCacheDescriptor.class, this, "cacheName", cacheCfg.getName());
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/893d0fe0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index 246ff37..09edf52 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -385,6 +385,16 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
     }
 
     /**
+     * Callback to start exchange for dynamically started cache.
+     *
+     * @param cacheDesc Cache descriptor.
+     */
+    public void onCacheDeployed(DynamicCacheDescriptor cacheDesc) {
+        // TODO IGNITE-45 move to exchange future.
+        cctx.kernalContext().cache().onCacheStartFinished(cacheDesc);
+    }
+
+    /**
      * @return {@code True} if topology has changed.
      */
     public boolean topologyChanged() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/893d0fe0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index f74f969..607204e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -44,8 +44,10 @@ import org.apache.ignite.internal.processors.cache.transactions.*;
 import org.apache.ignite.internal.processors.cache.version.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.future.*;
+import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
 import org.apache.ignite.lifecycle.*;
 import org.apache.ignite.spi.*;
 import org.jetbrains.annotations.*;
@@ -53,7 +55,9 @@ import org.jetbrains.annotations.*;
 import javax.cache.configuration.*;
 import javax.cache.integration.*;
 import javax.management.*;
+import java.io.*;
 import java.util.*;
+import java.util.concurrent.*;
 
 import static org.apache.ignite.IgniteSystemProperties.*;
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
@@ -102,6 +106,12 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     /** Transaction interface implementation. */
     private IgniteTransactionsImpl transactions;
 
+    /** Pending cache starts. */
+    private ConcurrentMap<String, IgniteInternalFuture> pendingStarts = new ConcurrentHashMap<>();
+
+    /** Dynamic caches. */
+    private ConcurrentMap<String, DynamicCacheDescriptor> dynamicCaches = new ConcurrentHashMap<>();
+
     /**
      * @param ctx Kernal context.
      */
@@ -558,6 +568,13 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         maxPreloadOrder = validatePreloadOrder(ctx.config().getCacheConfiguration());
 
+        ctx.discovery().setCustomEventListener(new GridPlainInClosure<Serializable>() {
+            @Override public void apply(Serializable evt) {
+                if (evt instanceof DynamicCacheDescriptor)
+                    onCacheDeploymentRequested((DynamicCacheDescriptor)evt);
+            }
+        });
+
         // Internal caches which should not be returned to user.
         IgfsConfiguration[] igfsCfgs = ctx.grid().configuration().getIgfsConfiguration();
 
@@ -916,6 +933,23 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     }
 
     /**
+     * Callback invoked when first exchange future for dynamic cache is completed.
+     *
+     * @param startDesc Cache start descriptor.
+     */
+    public void onCacheStartFinished(DynamicCacheDescriptor startDesc) {
+        CacheConfiguration ccfg = startDesc.cacheConfiguration();
+
+        DynamicCacheStartFuture fut = (DynamicCacheStartFuture)pendingStarts.get(ccfg.getName());
+
+        if (fut != null && fut.startId().equals(startDesc.startId())) {
+            fut.onDone();
+
+            pendingStarts.remove(ccfg.getName(), fut);
+        }
+    }
+
+    /**
      * Creates shared context.
      *
      * @param kernalCtx Kernal context.
@@ -972,6 +1006,89 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     }
 
     /**
+     * Dynamically starts cache.
+     *
+     * @param ccfg Cache configuration.
+     * @param nodeFilter Node filter to select nodes on which the cache should be deployed.
+     * @return Future that will be completed when cache is deployed.
+     */
+    public IgniteInternalFuture<?> startCache(CacheConfiguration ccfg, IgnitePredicate<ClusterNode> nodeFilter) {
+        if (nodeFilter == null)
+            nodeFilter = F.alwaysTrue();
+
+        DynamicCacheStartFuture fut = new DynamicCacheStartFuture(ctx, IgniteUuid.fromUuid(ctx.localNodeId()));
+
+        try {
+            byte[] filterBytes = ctx.config().getMarshaller().marshal(nodeFilter);
+
+            for (CacheConfiguration ccfg0 : ctx.config().getCacheConfiguration()) {
+                if (ccfg0.getName().equals(ccfg.getName()))
+                    return new GridFinishedFutureEx<>(new IgniteCheckedException("Failed to start cache " +
+                        "(a cache with the same name is already configured): " + ccfg.getName()));
+            }
+
+            if (caches.containsKey(ccfg.getName()))
+                return new GridFinishedFutureEx<>(new IgniteCheckedException("Failed to start cache " +
+                    "(a cache with the same name is already started): " + ccfg.getName()));
+
+            IgniteInternalFuture<?> old = pendingStarts.putIfAbsent(ccfg.getName(), fut);
+
+            if (old != null)
+                return new GridFinishedFutureEx<>(new IgniteCheckedException("Failed to start cache " +
+                    "(a cache with the same name is already started): " + ccfg.getName()));
+
+            ctx.discovery().sendCustomEvent(new DynamicCacheDescriptor(ccfg, filterBytes, fut.startId()));
+
+            return fut;
+        }
+        catch (IgniteCheckedException e) {
+            fut.onDone(e);
+
+            // Safety.
+            pendingStarts.remove(ccfg.getName(), fut);
+
+            return fut;
+        }
+    }
+
+    /**
+     * Callback invoked from discovery thread when cache deployment request is received.
+     *
+     * @param startDesc Cache start descriptor.
+     */
+    private void onCacheDeploymentRequested(DynamicCacheDescriptor startDesc) {
+        // TODO IGNITE-45 remove debug
+        U.debug(log, "Received start notification: " + startDesc);
+
+        CacheConfiguration ccfg = startDesc.cacheConfiguration();
+
+        // Check if cache with the same name was concurrently started form different node.
+        if (dynamicCaches.containsKey(ccfg.getName())) {
+            // If local node initiated start, fail the start future.
+            DynamicCacheStartFuture startFut = (DynamicCacheStartFuture)pendingStarts.get(ccfg.getName());
+
+            if (startFut != null && startFut.startId().equals(startDesc.startId())) {
+                assert !startFut.syncNotify();
+
+                startFut.onDone(new IgniteCheckedException("Failed to start cache " +
+                        "(a cache with the same name is already started): " + ccfg.getName()));
+
+                pendingStarts.remove(ccfg.getName(), startFut);
+            }
+
+            return;
+        }
+
+        DynamicCacheDescriptor old = dynamicCaches.put(ccfg.getName(), startDesc);
+
+        assert old == null : "Dynamic cache map was concurrently modified [new=" + startDesc + ", old=" + old + ']';
+
+        // TODO IGNITE-45 create cache context here.
+
+        sharedCtx.exchange().onCacheDeployed(startDesc);
+    }
+
+    /**
      * Checks that preload-order-dependant caches has SYNC or ASYNC preloading mode.
      *
      * @param cfgs Caches.
@@ -1858,6 +1975,32 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     /**
      *
      */
+    @SuppressWarnings("ExternalizableWithoutPublicNoArgConstructor")
+    private static class DynamicCacheStartFuture extends GridFutureAdapter<Object> {
+        /** Start ID. */
+        private IgniteUuid startId;
+
+        /**
+         * @param ctx Kernal context.
+         */
+        private DynamicCacheStartFuture(GridKernalContext ctx, IgniteUuid startId) {
+            // Start future can be completed from discovery thread, notification must NOT be sync.
+            super(ctx, false);
+
+            this.startId = startId;
+        }
+
+        /**
+         * @return Start ID.
+         */
+        private IgniteUuid startId() {
+            return startId;
+        }
+    }
+
+    /**
+     *
+     */
     private static class LocalAffinityFunction implements CacheAffinityFunction {
         /** */
         private static final long serialVersionUID = 0L;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/893d0fe0/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpiListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpiListener.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpiListener.java
index 243aaeb..7f17fe4 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpiListener.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/DiscoverySpiListener.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.spi.discovery;
 
 import org.apache.ignite.cluster.*;
+import org.apache.ignite.events.DiscoveryEvent;
 import org.jetbrains.annotations.*;
 
 import java.io.*;
@@ -31,7 +32,7 @@ public interface DiscoverySpiListener {
     /**
      * Notification for grid node discovery events.
      *
-     * @param type Node discovery event type. See {@link org.apache.ignite.events.DiscoveryEvent}
+     * @param type Node discovery event type. See {@link DiscoveryEvent}
      * @param topVer Topology version or {@code 0} if configured discovery SPI implementation
      *      does not support versioning.
      * @param node Node affected (e.g. newly joined node, left node, failed node or local node).

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/893d0fe0/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index df39d6b..3800783 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -20,6 +20,7 @@ package org.apache.ignite.spi.discovery.tcp;
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.events.DiscoveryEvent;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.events.*;
 import org.apache.ignite.internal.processors.security.*;
@@ -35,7 +36,11 @@ import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.*;
 import org.apache.ignite.spi.discovery.*;
 import org.apache.ignite.spi.discovery.tcp.internal.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.TcpDiscoveryJdbcIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.spi.discovery.tcp.messages.*;
 import org.jdk8.backport.*;
 import org.jetbrains.annotations.*;
@@ -60,7 +65,7 @@ import static org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryStatusChe
  * done across it.
  * <p>
  * At startup SPI tries to send messages to random IP taken from
- * {@link org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder} about self start (stops when send succeeds)
+ * {@link TcpDiscoveryIpFinder} about self start (stops when send succeeds)
  * and then this info goes to coordinator. When coordinator processes join request
  * and issues node added messages and all other nodes then receive info about new node.
  * <h1 class="header">Configuration</h1>
@@ -70,14 +75,14 @@ import static org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryStatusChe
  * The following configuration parameters are optional:
  * <ul>
  * <li>IP finder to share info about nodes IP addresses
- * (see {@link #setIpFinder(org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder)}).
+ * (see {@link #setIpFinder(TcpDiscoveryIpFinder)}).
  * See the following IP finder implementations for details on configuration:
  * <ul>
- * <li>{@link org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinder}</li>
+ * <li>{@link TcpDiscoverySharedFsIpFinder}</li>
  * <li>{@ignitelink org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder}</li>
- * <li>{@link org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.TcpDiscoveryJdbcIpFinder}</li>
- * <li>{@link org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder}</li>
- * <li>{@link org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder} - default</li>
+ * <li>{@link TcpDiscoveryJdbcIpFinder}</li>
+ * <li>{@link TcpDiscoveryVmIpFinder}</li>
+ * <li>{@link TcpDiscoveryMulticastIpFinder} - default</li>
  * </ul>
  * </li>
  * </ul>
@@ -136,7 +141,7 @@ import static org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryStatusChe
  * <img src="http://www.gridgain.com/images/spring-small.png">
  * <br>
  * For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a>
- * @see org.apache.ignite.spi.discovery.DiscoverySpi
+ * @see DiscoverySpi
  */
 @SuppressWarnings("NonPrivateFieldAccessedInSynchronizedContext")
 @IgniteSpiMultipleInstancesSupport(true)
@@ -373,7 +378,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
      *
      * @param joinTimeout Join timeout ({@code 0} means wait forever).
      *
-     * @see org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder#isShared()
+     * @see TcpDiscoveryIpFinder#isShared()
      */
     @IgniteSpiConfiguration(optional = true)
     public void setJoinTimeout(long joinTimeout) {
@@ -659,7 +664,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
      * Starts or restarts SPI after stop (to reconnect).
      *
      * @param restart {@code True} if SPI is restarted after stop.
-     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     * @throws IgniteSpiException If failed.
      */
     private void spiStart0(boolean restart) throws IgniteSpiException {
         if (!restart)
@@ -772,7 +777,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
     }
 
     /**
-     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     * @throws IgniteSpiException If failed.
      */
     @SuppressWarnings("BusyWait")
     private void registerLocalNodeAddress() throws IgniteSpiException {
@@ -803,7 +808,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
     }
 
     /**
-     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     * @throws IgniteSpiException If failed.
      */
     private void onSpiStart() throws IgniteSpiException {
         startStopwatch();
@@ -904,7 +909,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
      * Stops SPI finally or stops SPI for restart.
      *
      * @param disconnect {@code True} if SPI is being disconnected.
-     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     * @throws IgniteSpiException If failed.
      */
     private void spiStop0(boolean disconnect) throws IgniteSpiException {
         if (ctxInitLatch.getCount() > 0)
@@ -1059,7 +1064,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
     }
 
     /**
-     * @throws org.apache.ignite.spi.IgniteSpiException If any error occurs.
+     * @throws IgniteSpiException If any error occurs.
      * @return {@code true} if IP finder contains local address.
      */
     private boolean ipFinderHasLocalAddress() throws IgniteSpiException {
@@ -1075,8 +1080,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
                     if (resolved.equals(locAddr))
                         return true;
                 }
-                catch (UnknownHostException ignored) {
-                    onException(ignored.getMessage(), ignored);
+                catch (UnknownHostException e) {
+                    onException(e.getMessage(), e);
                 }
         }
 
@@ -1153,7 +1158,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
      *
      * @param addr Address of the node.
      * @return ID of the remote node if node alive.
-     * @throws org.apache.ignite.spi.IgniteSpiException If an error occurs.
+     * @throws IgniteSpiException If an error occurs.
      */
     private IgniteBiTuple<UUID, Boolean> pingNode(InetSocketAddress addr, @Nullable UUID clientNodeId)
         throws IgniteCheckedException {
@@ -1251,7 +1256,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
     /**
      * Tries to join this node to topology.
      *
-     * @throws org.apache.ignite.spi.IgniteSpiException If any error occurs.
+     * @throws IgniteSpiException If any error occurs.
      */
     private void joinTopology() throws IgniteSpiException {
         synchronized (mux) {
@@ -1378,11 +1383,11 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
 
     /**
      * Tries to send join request message to a random node presenting in topology.
-     * Address is provided by {@link org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder} and message is
+     * Address is provided by {@link TcpDiscoveryIpFinder} and message is
      * sent to first node connection succeeded to.
      *
      * @return {@code true} if send succeeded.
-     * @throws org.apache.ignite.spi.IgniteSpiException If any error occurs.
+     * @throws IgniteSpiException If any error occurs.
      */
     @SuppressWarnings({"BusyWait"})
     private boolean sendJoinRequestMessage() throws IgniteSpiException {
@@ -1726,7 +1731,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
     /**
      * Notify external listener on discovery event.
      *
-     * @param type Discovery event type. See {@link org.apache.ignite.events.DiscoveryEvent} for more details.
+     * @param type Discovery event type. See {@link DiscoveryEvent} for more details.
      * @param topVer Topology version.
      * @param node Remote node this event is connected with.
      */
@@ -1743,7 +1748,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
                 log.debug("Discovery notification [node=" + node + ", spiState=" + spiState +
                     ", type=" + U.gridEventName(type) + ", topVer=" + topVer + ']');
 
-            Collection<ClusterNode> top = F.upcast(ring.visibleNodes());
+            Collection<ClusterNode> top = F.<TcpDiscoveryNode, ClusterNode>upcast(ring.visibleNodes());
 
             Map<Long, Collection<ClusterNode>> hist = updateTopologyHistory(topVer, top);
 
@@ -2237,7 +2242,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
 
     /**
      * Thread that sends status check messages to next node if local node has not
-     * been receiving heartbeats ({@link org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryHeartbeatMessage})
+     * been receiving heartbeats ({@link TcpDiscoveryHeartbeatMessage})
      * for {@link TcpDiscoverySpi#getMaxMissedHeartbeats()} *
      * {@link TcpDiscoverySpi#getHeartbeatFrequency()}.
      */
@@ -2303,7 +2308,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
      * addresses of the nodes that has left the topology.
      * <p>
      * This thread should run only on coordinator node and will clean IP finder
-     * if and only if {@link org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder#isShared()} is {@code true}.
+     * if and only if {@link TcpDiscoveryIpFinder#isShared()} is {@code true}.
      */
     private class IpFinderCleaner extends IgniteSpiThread {
         /**
@@ -3956,11 +3961,11 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements TcpDiscov
                         try {
                             ipFinder.unregisterAddresses(leftNode.socketAddresses());
                         }
-                        catch (IgniteSpiException ignored) {
+                        catch (IgniteSpiException e) {
                             if (log.isDebugEnabled())
                                 log.debug("Failed to unregister left node address: " + leftNode);
 
-                            onException("Failed to unregister left node address: " + leftNode, ignored);
+                            onException("Failed to unregister left node address: " + leftNode, e);
                         }
                     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/893d0fe0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
new file mode 100644
index 0000000..dddf4a2
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
@@ -0,0 +1,139 @@
+/*
+ * 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 org.apache.ignite.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.testframework.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.util.*;
+import java.util.concurrent.*;
+
+/**
+ * Test for dynamic cache start.
+ */
+public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
+    /**
+     * @return Number of nodes for this test.
+     */
+    public int nodeCount() {
+        return 4;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTestsStarted() throws Exception {
+        startGridsMultiThreaded(nodeCount());
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTestsStopped() throws Exception {
+        stopAllGrids();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testStartCacheMultithreadedSameNode() throws Exception {
+        final Collection<IgniteInternalFuture<?>> futs = new ConcurrentLinkedDeque<>();
+
+        final IgniteKernal kernal = (IgniteKernal)grid(0);
+
+        int threadNum = 20;
+
+        GridTestUtils.runMultiThreaded(new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                CacheConfiguration ccfg = new CacheConfiguration();
+
+                ccfg.setName("TestCacheName");
+
+                futs.add(kernal.context().cache().startCache(ccfg, F.<ClusterNode>alwaysTrue()));
+
+                return null;
+            }
+        }, threadNum, "cache-starter");
+
+        assertEquals(threadNum, futs.size());
+
+        int succeeded = 0;
+        int failed = 0;
+
+        for (IgniteInternalFuture<?> fut : futs) {
+            try {
+                fut.get();
+
+                succeeded++;
+            }
+            catch (IgniteCheckedException e) {
+                info(e.getMessage());
+
+                failed++;
+            }
+        }
+
+        assertEquals(1, succeeded);
+        assertEquals(threadNum - 1, failed);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testStartCacheMultithreadedDifferentNodes() throws Exception {
+        final Collection<IgniteInternalFuture<?>> futs = new ConcurrentLinkedDeque<>();
+
+        int threadNum = 20;
+
+        GridTestUtils.runMultiThreaded(new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                CacheConfiguration ccfg = new CacheConfiguration();
+
+                ccfg.setName("TestCacheName2");
+
+                IgniteKernal kernal = (IgniteKernal)grid(ThreadLocalRandom.current().nextInt(nodeCount()));
+
+                futs.add(kernal.context().cache().startCache(ccfg, F.<ClusterNode>alwaysTrue()));
+
+                return null;
+            }
+        }, threadNum, "cache-starter");
+
+        assertEquals(threadNum, futs.size());
+
+        int succeeded = 0;
+        int failed = 0;
+
+        for (IgniteInternalFuture<?> fut : futs) {
+            try {
+                fut.get();
+
+                succeeded++;
+            }
+            catch (IgniteCheckedException e) {
+                info(e.getMessage());
+
+                failed++;
+            }
+        }
+
+        assertEquals(1, succeeded);
+        assertEquals(threadNum - 1, failed);
+    }
+}


[47/50] incubator-ignite git commit: Merge branch 'ignite-382' into sprint-2

Posted by ag...@apache.org.
Merge branch 'ignite-382' into sprint-2


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

Branch: refs/heads/ignite-45
Commit: 3b309f250e872fff4ea290fb2b8acb7388fadfb2
Parents: 028e446 f252ee4
Author: anovikov <an...@gridgain.com>
Authored: Mon Mar 2 21:48:07 2015 +0700
Committer: anovikov <an...@gridgain.com>
Committed: Mon Mar 2 21:48:07 2015 +0700

----------------------------------------------------------------------
 examples/pom-standalone.xml                       | 2 +-
 modules/core/src/main/resources/ignite.properties | 2 +-
 pom.xml                                           | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[35/50] incubator-ignite git commit: Improve IgniteCacheExpiryPolicyAbstractTest.

Posted by ag...@apache.org.
Improve IgniteCacheExpiryPolicyAbstractTest.


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

Branch: refs/heads/ignite-45
Commit: 0086e9cd2ab652d58adc4edf016932388de9686a
Parents: c847e88
Author: sevdokimov <se...@gridgain.com>
Authored: Mon Mar 2 14:23:19 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Mon Mar 2 14:25:02 2015 +0300

----------------------------------------------------------------------
 .../IgniteCacheExpiryPolicyAbstractTest.java    | 38 ++------------------
 1 file changed, 3 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0086e9cd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
index 3110cbc..e04659c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
@@ -103,23 +103,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
      * @throws Exception If failed.
      */
     public void testZeroOnUpdate() throws Exception {
-        factory = new Factory<ExpiryPolicy>() {
-            @Override public ExpiryPolicy create() {
-                return new ExpiryPolicy() {
-                    @Override public Duration getExpiryForCreation() {
-                        return null;
-                    }
-
-                    @Override public Duration getExpiryForAccess() {
-                        return null;
-                    }
-
-                    @Override public Duration getExpiryForUpdate() {
-                        return Duration.ZERO;
-                    }
-                };
-            }
-        };
+        factory = new FactoryBuilder.SingletonFactory<>(new TestPolicy(null, 0L, null));
 
         startGrids();
 
@@ -150,23 +134,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
      * @throws Exception If failed.
      */
     public void testZeroOnAccess() throws Exception {
-        factory = new Factory<ExpiryPolicy>() {
-            @Override public ExpiryPolicy create() {
-                return new ExpiryPolicy() {
-                    @Override public Duration getExpiryForCreation() {
-                        return null;
-                    }
-
-                    @Override public Duration getExpiryForAccess() {
-                        return Duration.ZERO;
-                    }
-
-                    @Override public Duration getExpiryForUpdate() {
-                        return null;
-                    }
-                };
-            }
-        };
+        factory = new FactoryBuilder.SingletonFactory<>(new TestPolicy(null, null, 0L));
 
         startGrids();
 
@@ -1087,7 +1055,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
     /**
      *
      */
-    private class TestPolicy implements ExpiryPolicy {
+    private static class TestPolicy implements ExpiryPolicy {
         /** */
         private Long create;
 


[20/50] incubator-ignite git commit: # sprint-2 - exception fix.

Posted by ag...@apache.org.
# sprint-2 - exception fix.


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

Branch: refs/heads/ignite-45
Commit: 6097e7bfc3af49296b50017d5661d313aaa3db80
Parents: a14ef18
Author: Dmitiry Setrakyan <ds...@gridgain.com>
Authored: Sat Feb 28 00:29:42 2015 -0500
Committer: Dmitiry Setrakyan <ds...@gridgain.com>
Committed: Sat Feb 28 00:29:42 2015 -0500

----------------------------------------------------------------------
 .../examples/datagrid/store/jdbc/CacheJdbcPersonStore.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6097e7bf/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
index 6388fbf..d80861d 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java
@@ -92,7 +92,7 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> {
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public Person load(Long key) {
+    @Override public Person load(Long key) {
         Transaction tx = transaction();
 
         System.out.println(">>> Store load [key=" + key + ", xid=" + (tx == null ? null : tx.xid()) + ']');
@@ -185,7 +185,7 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> {
             }
         }
         catch (SQLException e) {
-            throw new CacheLoaderException("Failed to remove object: " + key, e);
+            throw new CacheWriterException("Failed to remove object: " + key, e);
         }
         finally {
             end(tx, conn);
@@ -302,7 +302,7 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> {
     /**
      * @return Current transaction.
      */
-    @Nullable private Transaction transaction() {
+    private Transaction transaction() {
         return ses != null ? ses.transaction() : null;
     }
 }


[08/50] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/sprint-2' into ignite-239

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/sprint-2' into ignite-239


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

Branch: refs/heads/ignite-45
Commit: d1b9436a467148539d69a6dc70a084dd37ffa58f
Parents: 4f7dbf7 e1c0945
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Feb 27 17:59:43 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Feb 27 17:59:43 2015 +0300

----------------------------------------------------------------------
 config/ignite-log4j.xml                         |    2 +-
 .../datagrid/CacheContinuousQueryExample.java   |    2 +-
 ipc/shmem/Makefile.am                           |   15 +
 ipc/shmem/igniteshmem/Makefile.am               |   15 +
 ipc/shmem/include/Makefile.am                   |   15 +
 modules/clients/src/test/keystore/generate.sh   |   15 +-
 .../ignite/cache/query/ContinuousQuery.java     |   18 +-
 .../apache/ignite/cluster/ClusterMetrics.java   |    2 +-
 .../internal/events/DiscoveryCustomEvent.java   |    3 +
 .../processors/cache/IgniteCacheProxy.java      |    6 +-
 .../optimized-classnames.previous.properties    |   15 +
 .../optimized/optimized-classnames.properties   | 1565 +-----------------
 .../TcpDiscoveryCustomEventMessage.java         |    3 +
 ...ridCacheContinuousQueryAbstractSelfTest.java |    8 +-
 modules/extdata/p2p/pom.xml                     |    6 -
 modules/hibernate/pom.xml                       |    6 -
 modules/indexing/pom.xml                        |    6 -
 modules/jta/pom.xml                             |    6 -
 modules/scalar/pom.xml                          |    6 -
 modules/spring/pom.xml                          |    6 -
 modules/visor-console/pom.xml                   |    7 -
 modules/web/pom.xml                             |    6 -
 modules/winservice/IgniteService.sln            |    2 +-
 .../IgniteService/IgniteService.csproj          |    2 +-
 .../config/benchmark-atomic-win.properties      |   15 +
 .../config/benchmark-atomic.properties          |   15 +
 .../config/benchmark-compute-win.properties     |   15 +
 .../config/benchmark-compute.properties         |   15 +
 .../config/benchmark-multicast.properties       |   15 +
 .../config/benchmark-query-win.properties       |   15 +
 .../yardstick/config/benchmark-query.properties |   15 +
 .../config/benchmark-tx-win.properties          |   15 +
 .../yardstick/config/benchmark-tx.properties    |   15 +
 .../yardstick/config/benchmark-win.properties   |   15 +
 modules/yardstick/config/benchmark.properties   |   15 +
 pom.xml                                         |  150 +-
 36 files changed, 358 insertions(+), 1694 deletions(-)
----------------------------------------------------------------------



[03/50] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-335' into sprint-2

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-335' into sprint-2


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

Branch: refs/heads/ignite-45
Commit: b14be3bf279dc8400621ff65508a3df7082b0de2
Parents: 42f138a 27a160a
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Feb 27 17:36:12 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Feb 27 17:36:12 2015 +0300

----------------------------------------------------------------------
 .../datagrid/CacheContinuousQueryExample.java     |  2 +-
 .../ignite/cache/query/ContinuousQuery.java       | 18 +++++++++---------
 .../processors/cache/IgniteCacheProxy.java        |  6 +++---
 .../GridCacheContinuousQueryAbstractSelfTest.java |  8 ++++----
 4 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------



[39/50] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-239' into sprint-2

Posted by ag...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-239' into sprint-2


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

Branch: refs/heads/ignite-45
Commit: 96714719d98de537accd7c7c571cfdbbabfa948d
Parents: 11efb91 08df446
Author: ivasilinets <iv...@gridgain.com>
Authored: Mon Mar 2 17:05:34 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Mon Mar 2 17:05:34 2015 +0300

----------------------------------------------------------------------
 .../configuration/IgniteConfiguration.java      |   5 +-
 .../org/apache/ignite/internal/IgnitionEx.java  | 592 +++++++++----------
 .../GridCacheQueueCleanupSelfTest.java          |   1 -
 3 files changed, 267 insertions(+), 331 deletions(-)
----------------------------------------------------------------------



[34/50] incubator-ignite git commit: # IGNITE-339 Review.

Posted by ag...@apache.org.
# IGNITE-339 Review.


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

Branch: refs/heads/ignite-45
Commit: c847e88513d47925a03e84faf8739b6e7b012755
Parents: 60e0ecb
Author: AKuznetsov <ak...@gridgain.com>
Authored: Mon Mar 2 16:44:13 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Mar 2 16:44:13 2015 +0700

----------------------------------------------------------------------
 .../internal/visor/cache/VisorCacheConfiguration.java | 10 ----------
 .../visor/commands/cache/VisorCacheCommand.scala      | 14 +++++---------
 2 files changed, 5 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c847e885/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 2ad0e49..a6ec05c 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
@@ -48,9 +48,6 @@ public class VisorCacheConfiguration implements Serializable {
     /** Cache atomicity mode */
     private CacheAtomicityMode atomicityMode;
 
-    /** Cache atomic sequence reserve size */
-    private int atomicSeqReserveSize;
-
     /** Cache atomicity write ordering mode. */
     private CacheAtomicWriteOrderMode atomicWriteOrderMode;
 
@@ -226,13 +223,6 @@ public class VisorCacheConfiguration implements Serializable {
     }
 
     /**
-     * @return Cache atomic sequence reserve size
-     */
-    public int atomicSequenceReserveSize() {
-        return atomicSeqReserveSize;
-    }
-
-    /**
      * @return Cache atomicity write ordering mode.
      */
     public CacheAtomicWriteOrderMode atomicWriteOrderMode() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c847e885/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
index 7232221..e2ca05b 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
@@ -783,7 +783,6 @@ object VisorCacheCommand {
 
         cacheT += ("Mode", cfg.mode)
         cacheT += ("Atomicity Mode", safe(cfg.atomicityMode))
-        cacheT += ("Atomic Sequence Reserve Size", cfg.atomicSequenceReserveSize)
         cacheT += ("Atomic Write Ordering Mode", safe(cfg.atomicWriteOrderMode))
         cacheT += ("Statistic Enabled", bool2Str(cfg.statisticsEnabled()))
         cacheT += ("Management Enabled", bool2Str(cfg.managementEnabled()))
@@ -839,11 +838,10 @@ object VisorCacheCommand {
         cacheT += ("Cache Interceptor", safe(cfg.interceptor()))
 
         cacheT += ("Store Enabled", bool2Str(storeCfg.enabled()))
-        cacheT += ("Store", safe(storeCfg.store()))
-        cacheT += ("Configured JDBC Store", bool2Str(storeCfg.jdbcStore()))
-
-        cacheT += ("Read Through", bool2Str(storeCfg.readThrough()))
-        cacheT += ("Write Through", bool2Str(storeCfg.writeThrough()))
+        cacheT += ("Store Сlass", safe(storeCfg.store()))
+        cacheT += ("Store Factory Сlass", storeCfg.storeFactory())
+        cacheT += ("Store Read Through", bool2Str(storeCfg.readThrough()))
+        cacheT += ("Store Write Through", bool2Str(storeCfg.writeThrough()))
 
         cacheT += ("Write-Behind Enabled", bool2Str(storeCfg.enabled()))
         cacheT += ("Write-Behind Flush Size", storeCfg.flushSize())
@@ -853,9 +851,7 @@ object VisorCacheCommand {
 
         cacheT += ("Concurrent Asynchronous Operations Number", cfg.maxConcurrentAsyncOperations())
         cacheT += ("Memory Mode", cfg.memoryMode())
-
-        cacheT += ("Store Values Bytes", cfg.valueBytes())
-
+        cacheT += ("Keep Values Bytes", cfg.valueBytes())
         cacheT += ("Off-Heap Size", cfg.offsetHeapMaxMemory())
 
         cacheT += ("Loader Factory Class Name", safe(cfg.loaderFactory()))


[11/50] incubator-ignite git commit: #ignite-239: review.

Posted by ag...@apache.org.
#ignite-239: review.


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

Branch: refs/heads/ignite-45
Commit: 4ff4fd1d7ad0d7691bb911a5453d69d1a5ac627f
Parents: d1b9436
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Feb 27 18:14:15 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Feb 27 18:14:15 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/IgnitionEx.java  | 77 ++++++++++----------
 1 file changed, 38 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ff4fd1d/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 ca3abe9..6b8b197 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
@@ -1295,51 +1295,19 @@ public class IgnitionEx {
         private void start0(GridStartContext startCtx) throws IgniteCheckedException {
             assert grid == null : "Grid is already started: " + name;
 
-            IgniteConfiguration cfg = startCtx.config() != null ? startCtx.config() : new IgniteConfiguration();
-
-            String ggHome = cfg.getIgniteHome();
-
-            // Set Ignite home.
-            if (ggHome == null)
-                ggHome = U.getIgniteHome();
-            else
-                // If user provided IGNITE_HOME - set it as a system property.
-                U.setIgniteHome(ggHome);
+            // Set configuration URL, if any, into system property.
+            if (startCtx.configUrl() != null)
+                System.setProperty(IGNITE_CONFIG_URL, startCtx.configUrl().toString());
 
-            U.setWorkDirectory(cfg.getWorkDirectory(), ggHome);
+            IgniteConfiguration cfg = startCtx.config() != null ? startCtx.config() : new IgniteConfiguration();
 
             // Ensure invariant.
             // It's a bit dirty - but this is a result of late refactoring
             // and I don't want to reshuffle a lot of code.
             assert F.eq(name, cfg.getGridName());
 
-            // Set configuration URL, if any, into system property.
-            if (startCtx.configUrl() != null)
-                System.setProperty(IGNITE_CONFIG_URL, startCtx.configUrl().toString());
-
-            // Initialize factory's log.
-            UUID nodeId = cfg.getNodeId() != null ? cfg.getNodeId() : UUID.randomUUID();
-
-            IgniteLogger cfgLog = initLogger(cfg.getGridLogger(), nodeId);
-
-            assert cfgLog != null;
-
-            cfgLog = new GridLoggerProxy(cfgLog, null, name, U.id8(nodeId));
-
-            log = cfgLog.getLogger(G.class);
-
-            // Check Ignite home folder (after log is available).
-            if (ggHome != null) {
-                File ggHomeFile = new File(ggHome);
-
-                if (!ggHomeFile.exists() || !ggHomeFile.isDirectory())
-                    throw new IgniteCheckedException("Invalid Ignite installation home folder: " + ggHome);
-            }
-
             IgniteConfiguration myCfg = initializeConfiguration(cfg);
 
-            myCfg.setGridLogger(cfgLog);
-
             // Validate segmentation configuration.
             GridSegmentationPolicy segPlc = cfg.getSegmentationPolicy();
 
@@ -1521,9 +1489,41 @@ public class IgnitionEx {
          */
         private IgniteConfiguration initializeConfiguration(IgniteConfiguration cfg)
             throws IgniteCheckedException {
+            // Initialize factory's log.
+            UUID nodeId = cfg.getNodeId() != null ? cfg.getNodeId() : UUID.randomUUID();
+
+            IgniteLogger cfgLog = initLogger(cfg.getGridLogger(), nodeId);
+
+            assert cfgLog != null;
+
+            cfgLog = new GridLoggerProxy(cfgLog, null, name, U.id8(nodeId));
+
+            log = cfgLog.getLogger(G.class);
+
+            String ggHome = cfg.getIgniteHome();
+
+            // Set Ignite home.
+            if (ggHome == null)
+                ggHome = U.getIgniteHome();
+            else
+                // If user provided IGNITE_HOME - set it as a system property.
+                U.setIgniteHome(ggHome);
+
+            U.setWorkDirectory(cfg.getWorkDirectory(), ggHome);
+
+            // Check Ignite home folder (after log is available).
+            if (ggHome != null) {
+                File ggHomeFile = new File(ggHome);
+
+                if (!ggHomeFile.exists() || !ggHomeFile.isDirectory())
+                    throw new IgniteCheckedException("Invalid Ignite installation home folder: " + ggHome);
+            }
+
             IgniteConfiguration myCfg = new IgniteConfiguration(cfg);
 
-            myCfg.setIgniteHome(U.getIgniteHome());
+            myCfg.setIgniteHome(ggHome);
+
+            myCfg.setGridLogger(cfgLog);
 
             // Local host.
             String locHost = IgniteSystemProperties.getString(IGNITE_LOCAL_HOST);
@@ -1606,8 +1606,7 @@ public class IgnitionEx {
             if (myCfg.getMBeanServer() == null)
                 myCfg.setMBeanServer(ManagementFactory.getPlatformMBeanServer());
 
-            if (myCfg.getNodeId() == null)
-               myCfg.setNodeId(UUID.randomUUID());
+            myCfg.setNodeId(nodeId);
 
             if (myCfg.getPeerClassLoadingLocalClassPathExclude() == null)
                 myCfg.setPeerClassLoadingLocalClassPathExclude(EMPTY_STR_ARR);


[05/50] incubator-ignite git commit: #ignite-343: change Log4JFileAppender to Log4jRollingFileAppender.

Posted by ag...@apache.org.
#ignite-343: change Log4JFileAppender to Log4jRollingFileAppender.


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

Branch: refs/heads/ignite-45
Commit: e1c0945dd6e459ea9c5a890feac66d6c70274a60
Parents: 28ecf57
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Feb 27 17:45:36 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Feb 27 17:45:36 2015 +0300

----------------------------------------------------------------------
 config/ignite-log4j.xml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e1c0945d/config/ignite-log4j.xml
----------------------------------------------------------------------
diff --git a/config/ignite-log4j.xml b/config/ignite-log4j.xml
index 36fb40b..9d4521a 100644
--- a/config/ignite-log4j.xml
+++ b/config/ignite-log4j.xml
@@ -67,10 +67,12 @@
         Logs all output to specified file.
         By default, the logging goes to IGNITE_HOME/work/log folder
     -->
-    <appender name="FILE" class="org.apache.ignite.logger.log4j.Log4JFileAppender">
+    <appender name="FILE" class="org.apache.ignite.logger.log4j.Log4jRollingFileAppender">
         <param name="Threshold" value="DEBUG"/>
         <param name="File" value="${IGNITE_HOME}/work/log/ignite.log"/>
         <param name="Append" value="true"/>
+        <param name="MaxFileSize" value="10MB"/>
+        <param name="MaxBackupIndex" value="10"/>
         <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern" value="[%d{ABSOLUTE}][%-5p][%t][%c{1}] %m%n"/>
         </layout>


[07/50] incubator-ignite git commit: IGNITE-136 Added test eviction for local store.

Posted by ag...@apache.org.
IGNITE-136 Added test eviction for local store.


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

Branch: refs/heads/ignite-45
Commit: 2e115bf663aef70f6141119adcbd11e2c7bbbaaa
Parents: 3a466e8
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Fri Feb 27 17:57:04 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Fri Feb 27 17:57:04 2015 +0300

----------------------------------------------------------------------
 .../GridCacheAbstractLocalStoreSelfTest.java    | 30 ++++++++++++++++++++
 1 file changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e115bf6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java
index 781c6a6..c43b8f8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java
@@ -25,6 +25,7 @@ import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.processors.cache.store.*;
 import org.apache.ignite.internal.util.lang.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -35,6 +36,7 @@ import org.jetbrains.annotations.*;
 
 import javax.cache.*;
 import javax.cache.configuration.*;
+import javax.cache.expiry.*;
 import javax.cache.integration.*;
 import java.util.*;
 import java.util.concurrent.*;
@@ -170,6 +172,34 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst
     /**
      * @throws Exception If failed.
      */
+    public void testEvict() throws Exception {
+        Ignite ignite1 = startGrid(1);
+
+        IgniteCache<Object, Object> cache = ignite1.jcache(null).withExpiryPolicy(new CreatedExpiryPolicy(
+            new Duration(TimeUnit.MILLISECONDS, 100L)));
+
+        // Putting entry.
+        for (int i = 0; i < KEYS; i++)
+            cache.put(i, i);
+
+        // Wait when entry 
+        U.sleep(200);
+
+        // Check that entry is evicted from cache, but local store does contain it.
+        for (int i = 0; i < KEYS; i++) {
+            cache.localEvict(Arrays.asList(i));
+
+            assertNull(cache.localPeek(i));
+
+            assertEquals(i, (int)LOCAL_STORE_1.load(i).get1());
+
+            assertEquals(i, cache.get(i));
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testPrimaryNode() throws Exception {
         Ignite ignite1 = startGrid(1);
 


[31/50] incubator-ignite git commit: Merge branches 'ignite-339' and 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-339

Posted by ag...@apache.org.
Merge branches 'ignite-339' and 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-339


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

Branch: refs/heads/ignite-45
Commit: 60e0ecb2e269e6af2b0c04df2aed6f494657b03c
Parents: 5d3a2be 13e2d1f
Author: AKuznetsov <ak...@gridgain.com>
Authored: Mon Mar 2 15:59:00 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Mar 2 15:59:00 2015 +0700

----------------------------------------------------------------------
 .../store/CacheNodeWithStoreStartup.java        |   6 +-
 .../store/jdbc/CacheJdbcPersonStore.java        | 115 ++++++----------
 .../apache/ignite/cache/store/CacheStore.java   |   4 +-
 .../ignite/cache/store/CacheStoreAdapter.java   |   2 +-
 .../ignite/cache/store/CacheStoreSession.java   |  17 ++-
 .../processors/cache/GridCacheStoreManager.java |   6 +-
 .../ignite/internal/util/IgniteUtils.java       |  90 ++++++++++--
 .../spi/discovery/tcp/TcpDiscoverySpi.java      | 137 +++++++++++--------
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   | 116 ++++++++++++++++
 .../core/src/test/config/store/jdbc/Ignite.xml  |  63 +++++++--
 .../junits/cache/TestCacheSession.java          |   5 +
 .../cache/TestThreadLocalCacheSession.java      |   5 +
 .../ignite/schema/generator/XmlGenerator.java   |   8 +-
 .../apache/ignite/schema/model/PojoField.java   |  11 +-
 .../apache/ignite/schema/load/model/Ignite.xml  | 133 +++++++++++++-----
 .../yardstick/config/ignite-store-config.xml    |  15 +-
 16 files changed, 521 insertions(+), 212 deletions(-)
----------------------------------------------------------------------



[18/50] incubator-ignite git commit: # sprint-2 - Fixed warning in example.

Posted by ag...@apache.org.
# sprint-2 - Fixed warning in example.


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

Branch: refs/heads/ignite-45
Commit: 375376b68ccb9e8d83746f6eeac49a6388396012
Parents: a792c99
Author: Dmitiry Setrakyan <ds...@gridgain.com>
Authored: Fri Feb 27 23:50:04 2015 -0500
Committer: Dmitiry Setrakyan <ds...@gridgain.com>
Committed: Fri Feb 27 23:50:04 2015 -0500

----------------------------------------------------------------------
 .../examples/datagrid/store/CacheNodeWithStoreStartup.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/375376b6/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheNodeWithStoreStartup.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheNodeWithStoreStartup.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheNodeWithStoreStartup.java
index 0c87f84..5245f98 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheNodeWithStoreStartup.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheNodeWithStoreStartup.java
@@ -64,19 +64,19 @@ public class CacheNodeWithStoreStartup {
 
         discoSpi.setIpFinder(ipFinder);
 
-        CacheConfiguration cacheCfg = new CacheConfiguration();
+        CacheConfiguration<Long, Person> cacheCfg = new CacheConfiguration<>();
 
         // Set atomicity as transaction, since we are showing transactions in example.
         cacheCfg.setAtomicityMode(TRANSACTIONAL);
 
-        CacheStore store;
+        CacheStore<Long, Person> store;
 
         // Uncomment other cache stores to try them.
         store = new CacheDummyPersonStore();
         // store = new CacheJdbcPersonStore();
         // store = new CacheHibernatePersonStore();
 
-        cacheCfg.setCacheStoreFactory(new FactoryBuilder.SingletonFactory(store));
+        cacheCfg.setCacheStoreFactory(new FactoryBuilder.SingletonFactory<>(store));
         cacheCfg.setReadThrough(true);
         cacheCfg.setWriteThrough(true);
 


[21/50] incubator-ignite git commit: IGNITE-377 Rework schema load XML generator to generate instead of int number.

Posted by ag...@apache.org.
 IGNITE-377 Rework schema load XML generator to generate <util:constant static-field="java.sql.Types.XXX"/> instead of int number.


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

Branch: refs/heads/ignite-45
Commit: 061ea8aed7f43a47b5097f3c626701c688014e63
Parents: 6097e7b
Author: AKuznetsov <ak...@gridgain.com>
Authored: Sun Mar 1 00:17:19 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Sun Mar 1 00:17:19 2015 +0700

----------------------------------------------------------------------
 .../core/src/test/config/store/jdbc/Ignite.xml  |  63 ++++++---
 .../ignite/schema/generator/XmlGenerator.java   |   8 +-
 .../apache/ignite/schema/model/PojoField.java   |  11 +-
 .../apache/ignite/schema/load/model/Ignite.xml  | 133 ++++++++++++++-----
 .../yardstick/config/ignite-store-config.xml    |  15 ++-
 5 files changed, 168 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/061ea8ae/modules/core/src/test/config/store/jdbc/Ignite.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/store/jdbc/Ignite.xml b/modules/core/src/test/config/store/jdbc/Ignite.xml
index 1b6f702..d56b4e6 100644
--- a/modules/core/src/test/config/store/jdbc/Ignite.xml
+++ b/modules/core/src/test/config/store/jdbc/Ignite.xml
@@ -21,9 +21,12 @@
     XML generated by Apache Ignite Schema Load 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/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"/>
@@ -33,7 +36,9 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ID"/>
-                    <property name="databaseType" value="4"/>
+                    <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>
@@ -43,24 +48,31 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ID"/>
-                    <property name="databaseType" value="4"/>
+                    <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" value="12"/>
+                    <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" value="12"/>
+                    <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"/>
@@ -71,7 +83,9 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ID"/>
-                    <property name="databaseType" value="4"/>
+                    <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>
@@ -81,24 +95,31 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ID"/>
-                    <property name="databaseType" value="4"/>
+                    <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" value="4"/>
+                    <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" value="12"/>
+                    <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"/>
@@ -109,19 +130,25 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ID"/>
-                    <property name="databaseType" value="4"/>
+                    <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" value="4"/>
+                    <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" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="cityId"/>
                     <property name="javaType" value="int"/>
                 </bean>
@@ -131,19 +158,25 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ID"/>
-                    <property name="databaseType" value="4"/>
+                    <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" value="4"/>
+                    <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" value="12"/>
+                    <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>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/061ea8ae/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java b/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
index d4d7054..c62a720 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
@@ -159,7 +159,8 @@ public class XmlGenerator {
                 Element item = addBean(doc, list, CacheTypeFieldMetadata.class);
 
                 addProperty(doc, item, "databaseName", field.dbName());
-                addProperty(doc, item, "databaseType", String.valueOf(field.dbType()));
+                Element dbType = addProperty(doc, item, "databaseType", null);
+                addElement(doc, dbType, "util:constant", "static-field", "java.sql.Types." + field.dbTypeName());
                 addProperty(doc, item, "javaName", field.javaName());
                 addProperty(doc, item, "javaType", field.javaTypeName());
             }
@@ -308,9 +309,12 @@ public class XmlGenerator {
             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/beans/spring-beans.xsd " +
+                "http://www.springframework.org/schema/util " +
+                "http://www.springframework.org/schema/util/spring-util.xsd");
 
             for (PojoDescriptor pojo : pojos)
                 addTypeMetadata(doc, beans, pkg, pojo, includeKeys);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/061ea8ae/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java b/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java
index f9a5837..10939d9 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java
@@ -45,9 +45,6 @@ public class PojoField {
     /** Field name in database. */
     private final StringProperty dbNameProp;
 
-    /** JDBC field type in database. */
-    private final int dbType;
-
     /** Field type in database. */
     private final StringProperty dbTypeNameProp;
 
@@ -139,8 +136,6 @@ public class PojoField {
     public PojoField(String dbName, int dbType, String javaName, String javaTypeName, boolean key, boolean nullable) {
         dbNameProp = new SimpleStringProperty(dbName);
 
-        this.dbType = dbType;
-
         dbTypeNameProp = new SimpleStringProperty(jdbcTypeName(dbType));
 
         javaNamePrev = javaName;
@@ -340,10 +335,10 @@ public class PojoField {
     }
 
     /**
-     * @return POJO field JDBC type in database.
+     * @return POJO field JDBC type name in database.
      */
-    public int dbType() {
-        return dbType;
+    public String dbTypeName() {
+        return dbTypeNameProp.get();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/061ea8ae/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml b/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml
index 8690dbd..f0b5696 100644
--- a/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml
+++ b/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml
@@ -21,9 +21,12 @@
     XML generated by Apache Ignite Schema Load utility: 02/05/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/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="OBJECTS"/>
@@ -33,7 +36,9 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="PK"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="pk"/>
                     <property name="javaType" value="int"/>
                 </bean>
@@ -43,91 +48,121 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="PK"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="pk"/>
                     <property name="javaType" value="int"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="BOOLCOL"/>
-                    <property name="databaseType" value="16"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.BOOLEAN"/>
+                    </property>
                     <property name="javaName" value="boolcol"/>
                     <property name="javaType" value="java.lang.Boolean"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="BYTECOL"/>
-                    <property name="databaseType" value="-6"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.TINYINT"/>
+                    </property>
                     <property name="javaName" value="bytecol"/>
                     <property name="javaType" value="java.lang.Byte"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="SHORTCOL"/>
-                    <property name="databaseType" value="5"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.SMALLINT"/>
+                    </property>
                     <property name="javaName" value="shortcol"/>
                     <property name="javaType" value="java.lang.Short"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="INTCOL"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="intcol"/>
                     <property name="javaType" value="java.lang.Integer"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="LONGCOL"/>
-                    <property name="databaseType" value="-5"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.BIGINT"/>
+                    </property>
                     <property name="javaName" value="longcol"/>
                     <property name="javaType" value="java.lang.Long"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="FLOATCOL"/>
-                    <property name="databaseType" value="7"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.REAL"/>
+                    </property>
                     <property name="javaName" value="floatcol"/>
                     <property name="javaType" value="java.lang.Float"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="DOUBLECOL"/>
-                    <property name="databaseType" value="8"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DOUBLE"/>
+                    </property>
                     <property name="javaName" value="doublecol"/>
                     <property name="javaType" value="java.lang.Double"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="DOUBLECOL2"/>
-                    <property name="databaseType" value="8"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DOUBLE"/>
+                    </property>
                     <property name="javaName" value="doublecol2"/>
                     <property name="javaType" value="java.lang.Double"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="BIGDECIMALCOL"/>
-                    <property name="databaseType" value="3"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DECIMAL"/>
+                    </property>
                     <property name="javaName" value="bigdecimalcol"/>
                     <property name="javaType" value="java.math.BigDecimal"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="STRCOL"/>
-                    <property name="databaseType" value="12"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                    </property>
                     <property name="javaName" value="strcol"/>
                     <property name="javaType" value="java.lang.String"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="DATECOL"/>
-                    <property name="databaseType" value="91"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DATE"/>
+                    </property>
                     <property name="javaName" value="datecol"/>
                     <property name="javaType" value="java.sql.Date"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="TIMECOL"/>
-                    <property name="databaseType" value="92"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.TIME"/>
+                    </property>
                     <property name="javaName" value="timecol"/>
                     <property name="javaType" value="java.sql.Time"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="TSCOL"/>
-                    <property name="databaseType" value="93"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.TIMESTAMP"/>
+                    </property>
                     <property name="javaName" value="tscol"/>
                     <property name="javaType" value="java.sql.Timestamp"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ARRCOL"/>
-                    <property name="databaseType" value="-3"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.VARBINARY"/>
+                    </property>
                     <property name="javaName" value="arrcol"/>
                     <property name="javaType" value="java.lang.Object"/>
                 </bean>
@@ -181,7 +216,9 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="PK"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="pk"/>
                     <property name="javaType" value="int"/>
                 </bean>
@@ -191,91 +228,121 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="PK"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="pk"/>
                     <property name="javaType" value="int"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="BOOLCOL"/>
-                    <property name="databaseType" value="16"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.BOOLEAN"/>
+                    </property>
                     <property name="javaName" value="boolcol"/>
                     <property name="javaType" value="boolean"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="BYTECOL"/>
-                    <property name="databaseType" value="-6"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.TINYINT"/>
+                    </property>
                     <property name="javaName" value="bytecol"/>
                     <property name="javaType" value="byte"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="SHORTCOL"/>
-                    <property name="databaseType" value="5"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.SMALLINT"/>
+                    </property>
                     <property name="javaName" value="shortcol"/>
                     <property name="javaType" value="short"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="INTCOL"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="intcol"/>
                     <property name="javaType" value="int"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="LONGCOL"/>
-                    <property name="databaseType" value="-5"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.BIGINT"/>
+                    </property>
                     <property name="javaName" value="longcol"/>
                     <property name="javaType" value="long"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="FLOATCOL"/>
-                    <property name="databaseType" value="7"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.REAL"/>
+                    </property>
                     <property name="javaName" value="floatcol"/>
                     <property name="javaType" value="float"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="DOUBLECOL"/>
-                    <property name="databaseType" value="8"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DOUBLE"/>
+                    </property>
                     <property name="javaName" value="doublecol"/>
                     <property name="javaType" value="double"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="DOUBLECOL2"/>
-                    <property name="databaseType" value="8"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DOUBLE"/>
+                    </property>
                     <property name="javaName" value="doublecol2"/>
                     <property name="javaType" value="double"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="BIGDECIMALCOL"/>
-                    <property name="databaseType" value="3"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DECIMAL"/>
+                    </property>
                     <property name="javaName" value="bigdecimalcol"/>
                     <property name="javaType" value="java.math.BigDecimal"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="STRCOL"/>
-                    <property name="databaseType" value="12"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                    </property>
                     <property name="javaName" value="strcol"/>
                     <property name="javaType" value="java.lang.String"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="DATECOL"/>
-                    <property name="databaseType" value="91"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DATE"/>
+                    </property>
                     <property name="javaName" value="datecol"/>
                     <property name="javaType" value="java.sql.Date"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="TIMECOL"/>
-                    <property name="databaseType" value="92"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.TIME"/>
+                    </property>
                     <property name="javaName" value="timecol"/>
                     <property name="javaType" value="java.sql.Time"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="TSCOL"/>
-                    <property name="databaseType" value="93"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.TIMESTAMP"/>
+                    </property>
                     <property name="javaName" value="tscol"/>
                     <property name="javaType" value="java.sql.Timestamp"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ARRCOL"/>
-                    <property name="databaseType" value="-3"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.VARBINARY"/>
+                    </property>
                     <property name="javaName" value="arrcol"/>
                     <property name="javaType" value="java.lang.Object"/>
                 </bean>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/061ea8ae/modules/yardstick/config/ignite-store-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-store-config.xml b/modules/yardstick/config/ignite-store-config.xml
index 161cfa5..066b246 100644
--- a/modules/yardstick/config/ignite-store-config.xml
+++ b/modules/yardstick/config/ignite-store-config.xml
@@ -21,9 +21,12 @@
     Ignite Spring configuration file to startup grid.
 -->
 <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-2.5.xsd">
+       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">
     <!--
         Store data source.
     -->
@@ -45,7 +48,9 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ID"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="id"/>
                     <property name="javaType" value="int"/>
                 </bean>
@@ -55,7 +60,9 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="VALUE"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="id"/>
                     <property name="javaType" value="int"/>
                 </bean>


[37/50] incubator-ignite git commit: Merge remote-tracking branch 'origin/sprint-2' into sprint-2

Posted by ag...@apache.org.
Merge remote-tracking branch 'origin/sprint-2' into sprint-2


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

Branch: refs/heads/ignite-45
Commit: 3be22ab1f4d9e9096b5600cf8728b19800760ccc
Parents: ea6a1c0 0086e9c
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Mar 2 16:00:38 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Mar 2 16:00:38 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/visor/cache/VisorCache.java | 190 ++------
 .../cache/VisorCacheAffinityConfiguration.java  |  53 +-
 .../visor/cache/VisorCacheConfiguration.java    | 484 ++++---------------
 .../cache/VisorCacheDefaultConfiguration.java   |  27 +-
 .../cache/VisorCacheEvictionConfiguration.java  |  81 +---
 .../cache/VisorCacheNearConfiguration.java      |  42 +-
 .../cache/VisorCachePreloadConfiguration.java   |  54 +--
 .../cache/VisorCacheStoreConfiguration.java     | 148 +++++-
 .../VisorCacheWriteBehindConfiguration.java     | 137 ------
 .../visor/node/VisorAtomicConfiguration.java    |  27 +-
 .../visor/node/VisorBasicConfiguration.java     | 180 +------
 .../node/VisorCacheQueryConfiguration.java      |  45 +-
 .../node/VisorExecutorServiceConfiguration.java |  54 +--
 .../visor/node/VisorGridConfiguration.java      | 177 +------
 .../visor/node/VisorIgfsConfiguration.java      | 244 ++--------
 .../visor/node/VisorLifecycleConfiguration.java |   9 +-
 .../visor/node/VisorMetricsConfiguration.java   |  29 +-
 .../node/VisorPeerToPeerConfiguration.java      |  28 +-
 .../visor/node/VisorQueryConfiguration.java     |  65 +--
 .../visor/node/VisorRestConfiguration.java      |  80 +--
 .../node/VisorSegmentationConfiguration.java    |  45 +-
 .../visor/node/VisorSpisConfiguration.java      |  92 +---
 .../node/VisorTransactionConfiguration.java     |  62 +--
 .../internal/visor/util/VisorTaskUtils.java     |   4 +-
 .../core/src/test/config/store/jdbc/Ignite.xml  |  63 ++-
 .../IgniteCacheExpiryPolicyAbstractTest.java    |  38 +-
 .../ignite/schema/generator/XmlGenerator.java   |   8 +-
 .../apache/ignite/schema/model/PojoField.java   |  11 +-
 .../apache/ignite/schema/load/model/Ignite.xml  | 133 +++--
 .../commands/cache/VisorCacheCommand.scala      |  25 +-
 .../yardstick/config/ignite-store-config.xml    |  15 +-
 31 files changed, 606 insertions(+), 2044 deletions(-)
----------------------------------------------------------------------



[02/50] incubator-ignite git commit: Merge remote-tracking branch 'origin/sprint-2' into sprint-2

Posted by ag...@apache.org.
Merge remote-tracking branch 'origin/sprint-2' into sprint-2


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

Branch: refs/heads/ignite-45
Commit: 42f138a05f1308ff38a52e22aaaef7540d2420e8
Parents: b08bfe7 8c49ff6
Author: Artem Shutak <as...@gridgain.com>
Authored: Fri Feb 27 17:35:04 2015 +0300
Committer: Artem Shutak <as...@gridgain.com>
Committed: Fri Feb 27 17:35:04 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/cluster/ClusterMetrics.java  |  2 +-
 .../ignite/testframework/config/GridTestProperties.java | 10 +++++-----
 modules/extdata/p2p/pom.xml                             |  6 ------
 .../ignite/client/hadoop/GridHadoopClientProtocol.java  |  2 +-
 .../processors/hadoop/GridHadoopClassLoader.java        | 12 ++++++------
 .../internal/processors/hadoop/GridHadoopSetup.java     |  8 ++++----
 .../client/hadoop/GridHadoopClientProtocolSelfTest.java |  6 +++---
 modules/hibernate/pom.xml                               |  6 ------
 modules/indexing/pom.xml                                |  6 ------
 modules/jta/pom.xml                                     |  6 ------
 modules/scalar/pom.xml                                  |  6 ------
 modules/spring/pom.xml                                  |  6 ------
 modules/visor-console/pom.xml                           |  7 -------
 modules/web/pom.xml                                     |  6 ------
 14 files changed, 20 insertions(+), 69 deletions(-)
----------------------------------------------------------------------



[14/50] incubator-ignite git commit: Merge branch 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into sprint-2

Posted by ag...@apache.org.
Merge branch 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into sprint-2


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

Branch: refs/heads/ignite-45
Commit: a792c995ed211f56b741396ab9c2cf2f74646597
Parents: 9fb1eeb f053746
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Feb 27 19:57:11 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Feb 27 19:57:11 2015 +0300

----------------------------------------------------------------------
 .../HibernateReadWriteAccessStrategy.java       | 81 +++++++++++++++-----
 1 file changed, 63 insertions(+), 18 deletions(-)
----------------------------------------------------------------------



[30/50] incubator-ignite git commit: Merge branches 'ignite-377' and 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into sprint-2

Posted by ag...@apache.org.
Merge branches 'ignite-377' and 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into sprint-2


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

Branch: refs/heads/ignite-45
Commit: 13e2d1f678cea51f18b7c5ae2ec48157eccbf4c3
Parents: c9f46c1 061ea8a
Author: AKuznetsov <ak...@gridgain.com>
Authored: Mon Mar 2 15:55:59 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Mar 2 15:55:59 2015 +0700

----------------------------------------------------------------------
 .../core/src/test/config/store/jdbc/Ignite.xml  |  63 ++++++---
 .../ignite/schema/generator/XmlGenerator.java   |   8 +-
 .../apache/ignite/schema/model/PojoField.java   |  11 +-
 .../apache/ignite/schema/load/model/Ignite.xml  | 133 ++++++++++++++-----
 .../yardstick/config/ignite-store-config.xml    |  15 ++-
 5 files changed, 168 insertions(+), 62 deletions(-)
----------------------------------------------------------------------



[17/50] incubator-ignite git commit: Merge branch 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-45

Posted by ag...@apache.org.
Merge branch 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-45


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

Branch: refs/heads/ignite-45
Commit: bceb33a1f973cdc0212d41a44801bebce47cecd6
Parents: 4010cd3 a792c99
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Fri Feb 27 18:23:09 2015 -0800
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Fri Feb 27 18:23:09 2015 -0800

----------------------------------------------------------------------
 config/hadoop/default-config.xml                |   12 +
 config/ignite-log4j.xml                         |    2 +-
 .../ComputeFibonacciContinuationExample.java    |   15 +-
 .../datagrid/CacheContinuousQueryExample.java   |    2 +-
 .../examples/ScalarContinuationExample.scala    |   15 +-
 ipc/shmem/Makefile.am                           |   15 +
 ipc/shmem/igniteshmem/Makefile.am               |   15 +
 ipc/shmem/include/Makefile.am                   |   15 +
 modules/clients/src/test/keystore/generate.sh   |   15 +-
 .../src/main/java/org/apache/ignite/Ignite.java |    4 +-
 .../main/java/org/apache/ignite/IgniteFs.java   |    2 +-
 .../ignite/cache/query/ContinuousQuery.java     |   18 +-
 .../apache/ignite/cluster/ClusterMetrics.java   |    2 +-
 .../configuration/QueryConfiguration.java       |   37 +-
 .../ignite/events/DiscoveryCustomEvent.java     |   56 -
 .../org/apache/ignite/events/EventType.java     |   14 +-
 .../java/org/apache/ignite/igfs/IgfsMode.java   |    6 +-
 .../java/org/apache/ignite/igfs/package.html    |    2 +-
 .../apache/ignite/internal/GridProperties.java  |   78 -
 .../ignite/internal/GridUpdateNotifier.java     |    2 +-
 .../apache/ignite/internal/IgniteKernal.java    |   18 +-
 .../ignite/internal/IgniteProperties.java       |   79 +
 .../ignite/internal/IgniteVersionUtils.java     |    8 +-
 .../internal/events/DiscoveryCustomEvent.java   |   71 +
 .../discovery/GridDiscoveryManager.java         |    7 +-
 .../processors/cache/IgniteCacheProxy.java      |    6 +-
 .../plugin/IgnitePluginProcessor.java           |   24 +
 .../cache/VisorCacheMetricsCollectorTask.java   |   10 +-
 .../visor/node/VisorBasicConfiguration.java     |   17 -
 .../node/VisorNodeEventsCollectorTask.java      |   10 +-
 .../internal/visor/node/VisorNodeGcTask.java    |   10 +-
 .../internal/visor/node/VisorNodePingTask.java  |   10 +-
 .../optimized-classnames.previous.properties    |   15 +
 .../optimized/optimized-classnames.properties   | 1565 +-----------------
 .../apache/ignite/plugin/PluginProvider.java    |    5 +
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |    9 +-
 .../TcpDiscoveryCustomEventMessage.java         |    3 +
 .../internal/GridDiscoveryEventSelfTest.java    |    9 +-
 .../internal/GridUpdateNotifierSelfTest.java    |    2 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |    8 +-
 ...dStartupWithUndefinedIgniteHomeSelfTest.java |  103 ++
 .../config/GridTestProperties.java              |   10 +-
 .../testsuites/IgniteKernalSelfTestSuite.java   |    1 +
 modules/extdata/p2p/pom.xml                     |    6 -
 modules/hadoop/pom.xml                          |   10 -
 .../client/hadoop/GridHadoopClientProtocol.java |    6 +-
 .../hadoop/IgfsHadoopFileSystemWrapper.java     |  412 +++++
 .../igfs/hadoop/v1/IgfsHadoopFileSystem.java    |    3 +-
 .../igfs/hadoop/v2/IgfsHadoopFileSystem.java    |    3 +-
 .../java/org/apache/ignite/igfs/package.html    |    2 +-
 .../igfs/hadoop/IgfsHadoopFSProperties.java     |   10 +-
 .../hadoop/IgfsHadoopFileSystemWrapper.java     |  413 -----
 .../internal/igfs/hadoop/IgfsHadoopReader.java  |    2 +-
 .../internal/igfs/hadoop/IgfsHadoopUtils.java   |    4 +-
 .../hadoop/GridHadoopClassLoader.java           |   12 +-
 .../processors/hadoop/GridHadoopSetup.java      |    8 +-
 .../processors/hadoop/GridHadoopUtils.java      |    4 +-
 .../collections/GridHadoopHashMultimapBase.java |    2 +-
 .../GridHadoopExternalCommunication.java        |   14 +-
 .../hadoop/v1/GridHadoopV1MapTask.java          |    6 +-
 .../v2/GridHadoopV2JobResourceManager.java      |    2 +-
 .../GridHadoopClientProtocolSelfTest.java       |    6 +-
 .../apache/ignite/igfs/IgfsEventsTestSuite.java |    2 +-
 .../IgfsHadoop20FileSystemAbstractSelfTest.java |    2 +-
 .../igfs/IgfsHadoopDualAbstractSelfTest.java    |    2 +-
 .../IgfsHadoopFileSystemAbstractSelfTest.java   |    1 +
 ...fsHadoopFileSystemSecondaryModeSelfTest.java |    2 +-
 .../hadoop/GridHadoopGroupingTest.java          |    4 +-
 .../igfs/IgfsPerformanceBenchmark.java          |    9 +-
 .../testsuites/IgniteHadoopTestSuite.java       |    7 +-
 modules/hibernate/pom.xml                       |    6 -
 .../HibernateReadWriteAccessStrategy.java       |   81 +-
 modules/indexing/pom.xml                        |    6 -
 modules/jta/pom.xml                             |    6 -
 modules/scalar/pom.xml                          |    6 -
 modules/spring/pom.xml                          |    6 -
 modules/visor-console/pom.xml                   |    7 -
 .../commands/alert/VisorAlertCommand.scala      |    8 +-
 .../commands/cache/VisorCacheCommand.scala      |   82 +-
 .../config/VisorConfigurationCommand.scala      |  140 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |    2 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   64 +-
 .../commands/tasks/VisorTasksCommandSpec.scala  |    2 +-
 modules/web/pom.xml                             |    6 -
 modules/winservice/IgniteService.sln            |    2 +-
 .../IgniteService/IgniteService.csproj          |    2 +-
 .../config/benchmark-atomic-win.properties      |   15 +
 .../config/benchmark-atomic.properties          |   15 +
 .../config/benchmark-compute-win.properties     |   15 +
 .../config/benchmark-compute.properties         |   15 +
 .../config/benchmark-multicast.properties       |   15 +
 .../config/benchmark-query-win.properties       |   15 +
 .../yardstick/config/benchmark-query.properties |   15 +
 .../config/benchmark-tx-win.properties          |   15 +
 .../yardstick/config/benchmark-tx.properties    |   15 +
 .../yardstick/config/benchmark-win.properties   |   15 +
 modules/yardstick/config/benchmark.properties   |   15 +
 pom.xml                                         |  150 +-
 98 files changed, 1490 insertions(+), 2532 deletions(-)
----------------------------------------------------------------------



[13/50] incubator-ignite git commit: review ignite-311

Posted by ag...@apache.org.
review ignite-311


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

Branch: refs/heads/ignite-45
Commit: 9fb1eeb55e8eadf9190d0d675f65e5020543ad39
Parents: 2ef2271
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Fri Feb 27 19:09:27 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Fri Feb 27 19:09:27 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/GridProperties.java  | 79 --------------------
 .../ignite/internal/GridUpdateNotifier.java     |  2 +-
 .../apache/ignite/internal/IgniteKernal.java    |  2 +-
 .../ignite/internal/IgniteProperties.java       | 79 ++++++++++++++++++++
 .../ignite/internal/IgniteVersionUtils.java     |  8 +-
 .../plugin/IgnitePluginProcessor.java           | 37 +++------
 .../internal/GridUpdateNotifierSelfTest.java    |  2 +-
 7 files changed, 98 insertions(+), 111 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9fb1eeb5/modules/core/src/main/java/org/apache/ignite/internal/GridProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridProperties.java b/modules/core/src/main/java/org/apache/ignite/internal/GridProperties.java
deleted file mode 100644
index 89110af..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridProperties.java
+++ /dev/null
@@ -1,79 +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;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * Ignite properties holder.
- */
-public class GridProperties {
-    /** Properties file path. */
-    private static final String FILE_PATH = "ignite.properties";
-
-    /** Properties. */
-    private static final Properties PROPS;
-
-    /**
-     *
-     */
-    static {
-        PROPS = new Properties();
-
-        readProperties(FILE_PATH, PROPS, true);
-    }
-
-    /**
-     * @param path Path.
-     * @param props Properties.
-     * @param throwExc Flag indicating whether to throw an exception or not.
-     */
-    public static void readProperties(String path, Properties props, boolean throwExc) {
-        try (InputStream is = IgniteVersionUtils.class.getClassLoader().getResourceAsStream(path)) {
-            if (is == null) {
-                if (throwExc)
-                    throw new RuntimeException("Failed to find properties file: " + path);
-                else
-                    return;
-            }
-
-            props.load(is);
-        }
-        catch (IOException e) {
-            throw new RuntimeException("Failed to read properties file: " + path, e);
-        }
-    }
-
-    /**
-     * Gets property value.
-     *
-     * @param key Property key.
-     * @return Property value (possibly empty string, but never {@code null}).
-     */
-    public static String get(String key) {
-        return PROPS.getProperty(key, "");
-    }
-
-    /**
-     *
-     */
-    private GridProperties() {
-        // No-op.
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9fb1eeb5/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java b/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java
index d1436a9..830481f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java
@@ -42,7 +42,7 @@ import static java.net.URLEncoder.*;
  */
 class GridUpdateNotifier {
     /** Access URL to be used to access latest version data. */
-    private static final String UPD_STATUS_PARAMS = GridProperties.get("ignite.update.status.params");
+    private static final String UPD_STATUS_PARAMS = IgniteProperties.get("ignite.update.status.params");
 
     /** Throttling for logging out. */
     private static final long THROTTLE_PERIOD = 24 * 60 * 60 * 1000; // 1 day.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9fb1eeb5/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index c21ceb3..9c92edd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -100,7 +100,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
     private static final long serialVersionUID = 0L;
 
     /** Compatible versions. */
-    private static final String COMPATIBLE_VERS = GridProperties.get("ignite.compatible.vers");
+    private static final String COMPATIBLE_VERS = IgniteProperties.get("ignite.compatible.vers");
 
     /** Ignite site that is shown in log messages. */
     static final String SITE = "www.gridgain.com";

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9fb1eeb5/modules/core/src/main/java/org/apache/ignite/internal/IgniteProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteProperties.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteProperties.java
new file mode 100644
index 0000000..74c0ce4
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteProperties.java
@@ -0,0 +1,79 @@
+/*
+ * 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 java.io.*;
+import java.util.*;
+
+/**
+ * Ignite properties holder.
+ */
+public class IgniteProperties {
+    /** Properties file path. */
+    private static final String FILE_PATH = "ignite.properties";
+
+    /** Properties. */
+    private static final Properties PROPS;
+
+    /**
+     *
+     */
+    static {
+        PROPS = new Properties();
+
+        readProperties(FILE_PATH, PROPS, true);
+    }
+
+    /**
+     * @param path Path.
+     * @param props Properties.
+     * @param throwExc Flag indicating whether to throw an exception or not.
+     */
+    public static void readProperties(String path, Properties props, boolean throwExc) {
+        try (InputStream is = IgniteVersionUtils.class.getClassLoader().getResourceAsStream(path)) {
+            if (is == null) {
+                if (throwExc)
+                    throw new RuntimeException("Failed to find properties file: " + path);
+                else
+                    return;
+            }
+
+            props.load(is);
+        }
+        catch (IOException e) {
+            throw new RuntimeException("Failed to read properties file: " + path, e);
+        }
+    }
+
+    /**
+     * Gets property value.
+     *
+     * @param key Property key.
+     * @return Property value (possibly empty string, but never {@code null}).
+     */
+    public static String get(String key) {
+        return PROPS.getProperty(key, "");
+    }
+
+    /**
+     *
+     */
+    private IgniteProperties() {
+        // No-op.
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9fb1eeb5/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
index 51668b6..3c47f23 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
@@ -54,13 +54,13 @@ public class IgniteVersionUtils {
      * Static initializer.
      */
     static {
-        VER_STR = GridProperties.get("ignite.version");
+        VER_STR = IgniteProperties.get("ignite.version");
 
-        BUILD_TSTAMP = Long.valueOf(GridProperties.get("ignite.build"));
+        BUILD_TSTAMP = Long.valueOf(IgniteProperties.get("ignite.build"));
         BUILD_TSTAMP_STR = new SimpleDateFormat("yyyyMMdd").format(new Date(BUILD_TSTAMP * 1000));
 
-        REV_HASH_STR = GridProperties.get("ignite.revision");
-        RELEASE_DATE_STR = GridProperties.get("ignite.rel.date");
+        REV_HASH_STR = IgniteProperties.get("ignite.revision");
+        RELEASE_DATE_STR = IgniteProperties.get("ignite.rel.date");
 
         String rev = REV_HASH_STR.length() > 8 ? REV_HASH_STR.substring(0, 8) : REV_HASH_STR;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9fb1eeb5/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
index aca8fb8..05f227b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
@@ -42,9 +42,6 @@ public class IgnitePluginProcessor extends GridProcessorAdapter {
     /** */
     private volatile Map<Class<?>, Object[]> extensions;
 
-    /** Plugin information. */
-    public static final String PLUGIN_INFO = "Configured plugins: ";
-
     /**
      *
      * @param ctx Kernal context.
@@ -206,32 +203,22 @@ public class IgnitePluginProcessor extends GridProcessorAdapter {
     }
 
     /**
-     * Plugin information.
-     */
-    private String pluginInfo() {
-        Collection<PluginProvider> plugins = ctx.plugins().allProviders();
-
-        if (plugins.size() == 0)
-            return U.nl() + ">>>    " + PLUGIN_INFO + "none";
-
-        String info = U.nl() + ">>>    " + PLUGIN_INFO + U.nl();
-
-        for (PluginProvider plugin : plugins)
-            info += ">>>    " + plugin.name() + " " + plugin.version() + U.nl() +
-                ">>>    " + plugin.copyright();
-
-        return info;
-    }
-
-    /**
      * Print plugin information.
      */
     private void ackPluginsInfo() {
-        if (log.isQuiet())
-            U.quiet(false, pluginInfo().split(U.nl() + ">>> "));
+        U.quietAndInfo(log, "Configured plugins:");
 
-        if (log.isInfoEnabled())
-            log.info(pluginInfo());
+        if (plugins.isEmpty()) {
+            U.quietAndInfo(log, "  ^-- None");
+            U.quietAndInfo(log, "");
+        }
+        else {
+            for (PluginProvider plugin : plugins.values()) {
+                U.quietAndInfo(log, "  ^-- " + plugin.name() + " " + plugin.version());
+                U.quietAndInfo(log, "  ^-- " + plugin.copyright());
+                U.quietAndInfo(log, "");
+            }
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9fb1eeb5/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java
index 8cc0b28..07bcf48 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java
@@ -36,7 +36,7 @@ public class GridUpdateNotifierSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testNotifier() throws Exception {
-        GridUpdateNotifier ntf = new GridUpdateNotifier(null, GridProperties.get("ignite.version"),
+        GridUpdateNotifier ntf = new GridUpdateNotifier(null, IgniteProperties.get("ignite.version"),
             IgniteKernal.SITE, TEST_GATEWAY, false);
 
         ntf.checkForNewVersion(new SelfExecutor(), log);


[44/50] incubator-ignite git commit: # MInor JavADoc change.

Posted by ag...@apache.org.
# MInor JavADoc change.


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

Branch: refs/heads/ignite-45
Commit: 235758cd98f4aca320a6f9c07c5d90ddb956d796
Parents: b0e6ab1
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Mar 2 17:44:16 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Mar 2 17:44:16 2015 +0300

----------------------------------------------------------------------
 .../core/src/main/java/org/apache/ignite/IgniteCluster.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/235758cd/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java b/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
index 8669559..c24ba5e 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
@@ -28,10 +28,10 @@ import java.util.*;
 import java.util.concurrent.*;
 
 /**
- * {@code GridCluster} also provides a handle on {@link #nodeLocalMap()} which provides map-like functionality
- * linked to current grid node. Node-local map is useful for saving shared state between job executions
- * on the grid. Additionally you can also ping, start, and restart remote nodes, map keys to caching nodes,
- * and get other useful information about topology.
+ * Represents whole cluster (all available nodes) and also provides a handle on {@link #nodeLocalMap()} which
+ * provides map-like functionality linked to current grid node. Node-local map is useful for saving shared state
+ * between job executions on the grid. Additionally you can also ping, start, and restart remote nodes, map keys to
+ * caching nodes, and get other useful information about topology.
  */
 public interface IgniteCluster extends ClusterGroup, IgniteAsyncSupport {
     /**


[10/50] incubator-ignite git commit: Merge remote-tracking branch 'origin/sprint-2' into sprint-2

Posted by ag...@apache.org.
Merge remote-tracking branch 'origin/sprint-2' into sprint-2


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

Branch: refs/heads/ignite-45
Commit: f053746ff8c6f4c03726706f74de7bda3e0a8468
Parents: a663f83 e1c0945
Author: Artem Shutak <as...@gridgain.com>
Authored: Fri Feb 27 18:01:09 2015 +0300
Committer: Artem Shutak <as...@gridgain.com>
Committed: Fri Feb 27 18:01:09 2015 +0300

----------------------------------------------------------------------
 config/ignite-log4j.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[16/50] incubator-ignite git commit: # IGNITE-339 Review.

Posted by ag...@apache.org.
# IGNITE-339 Review.


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

Branch: refs/heads/ignite-45
Commit: 5d3a2be2b24b0d2c6e72648008219d269f92a142
Parents: 2710ece
Author: AKuznetsov <ak...@gridgain.com>
Authored: Sat Feb 28 01:53:32 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Sat Feb 28 01:53:32 2015 +0700

----------------------------------------------------------------------
 .../internal/visor/cache/VisorCacheConfiguration.java   | 12 ++----------
 .../visor/node/VisorTransactionConfiguration.java       |  2 +-
 .../ignite/visor/commands/cache/VisorCacheCommand.scala |  2 +-
 3 files changed, 4 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5d3a2be2/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 8eee437..2ad0e49 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
@@ -93,7 +93,7 @@ public class VisorCacheConfiguration implements Serializable {
     /** Cache interceptor. */
     private String interceptor;
 
-    /** Should value bytes be stored. */
+    /** Flag indicating if cached values should be additionally stored in serialized form. */
     private boolean valBytes;
 
     /** Cache affinityCfg config. */
@@ -331,21 +331,13 @@ public class VisorCacheConfiguration implements Serializable {
     }
 
     /**
-     * @return Should value bytes be stored.
+     * @return {@code true} if cached values should be additionally stored in serialized form.
      */
     public boolean valueBytes() {
         return valBytes;
     }
 
     /**
-     * @param valBytes New should value bytes be stored.
-     */
-    public void valueBytes(boolean valBytes) {
-        this.valBytes = valBytes;
-    }
-
-
-    /**
      * @return Collection of type metadata.
      */
     public Collection<VisorCacheTypeMetadata> typeMeta() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5d3a2be2/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorTransactionConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorTransactionConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorTransactionConfiguration.java
index 667ff51..773f9dd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorTransactionConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorTransactionConfiguration.java
@@ -3,7 +3,7 @@
  * 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 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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5d3a2be2/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
index 577067a..7232221 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
@@ -854,7 +854,7 @@ object VisorCacheCommand {
         cacheT += ("Concurrent Asynchronous Operations Number", cfg.maxConcurrentAsyncOperations())
         cacheT += ("Memory Mode", cfg.memoryMode())
 
-        cacheT += ("Store Values In Bytes", cfg.valueBytes())
+        cacheT += ("Store Values Bytes", cfg.valueBytes())
 
         cacheT += ("Off-Heap Size", cfg.offsetHeapMaxMemory())
 


[48/50] incubator-ignite git commit: Merge branch 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into sprint-2

Posted by ag...@apache.org.
Merge branch 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into sprint-2


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

Branch: refs/heads/ignite-45
Commit: b2675bc3a6875c462e3d0aeb1478ee4d72039c44
Parents: 9a93198 3b309f2
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Mar 2 17:50:47 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Mar 2 17:50:47 2015 +0300

----------------------------------------------------------------------
 examples/pom-standalone.xml                       | 2 +-
 modules/core/src/main/resources/ignite.properties | 2 +-
 pom.xml                                           | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------