You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/06/08 11:59:21 UTC

[01/17] incubator-ignite git commit: # GG-9621 WIP.

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-gg-10299 98176fead -> ea2150033


# GG-9621 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/1497cbe0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1497cbe0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1497cbe0

Branch: refs/heads/ignite-gg-10299
Commit: 1497cbe053fe849f2091355f97ba3f4596c719cd
Parents: 59b11b4
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Apr 14 18:11:24 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Apr 14 18:11:24 2015 +0700

----------------------------------------------------------------------
 .../ignite/internal/visor/cache/VisorCache.java  |  2 +-
 .../VisorCacheConfigurationCollectorJob.java     |  6 +++---
 .../internal/visor/cache/VisorCacheMetrics.java  | 19 +++++++++++--------
 .../cache/VisorCacheMetricsCollectorTask.java    | 10 ++++++----
 .../cache/VisorCacheStoreConfiguration.java      |  5 ++---
 5 files changed, 23 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1497cbe0/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
index 8c880a7..7de2c2d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
@@ -230,7 +230,7 @@ public class VisorCache implements Serializable {
         cache.partitions = ca.affinity().partitions();
         cache.primaryPartitions = pps;
         cache.backupPartitions = bps;
-        cache.metrics = VisorCacheMetrics.from(ignite, ca);
+        cache.metrics = VisorCacheMetrics.from(ignite, ca.name());
         cache.partitionsMap = partsMap;
 
         return cache;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1497cbe0/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfigurationCollectorJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfigurationCollectorJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfigurationCollectorJob.java
index ef12424..c8913c6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfigurationCollectorJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfigurationCollectorJob.java
@@ -45,17 +45,17 @@ public class VisorCacheConfigurationCollectorJob
 
     /** {@inheritDoc} */
     @Override protected Map<IgniteUuid, VisorCacheConfiguration> run(Collection<IgniteUuid> arg) {
-        Collection<GridCacheAdapter<?, ?>> caches = ignite.context().cache().internalCaches();
+        Collection<IgniteCacheProxy<?, ?>> caches = ignite.context().cache().jcaches();
 
         boolean all = arg == null || arg.isEmpty();
 
         Map<IgniteUuid, VisorCacheConfiguration> res = U.newHashMap(caches.size());
 
-        for (GridCacheAdapter<?, ?> cache : caches) {
+        for (IgniteCacheProxy<?, ?> cache : caches) {
             IgniteUuid deploymentId = cache.context().dynamicDeploymentId();
 
             if (all || arg.contains(deploymentId))
-                res.put(deploymentId, config(cache.configuration()));
+                res.put(deploymentId, config(cache.getConfiguration(CacheConfiguration.class)));
         }
 
         return res;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1497cbe0/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
index b0a1eb2..65a7f1b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.visor.cache;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
@@ -173,19 +174,21 @@ public class VisorCacheMetrics implements Serializable {
 
     /**
      * @param ignite Ignite.
-     * @param c Cache.
+     * @param cacheName Cache name.
      * @return Data transfer object for given cache metrics.
      */
-    public static VisorCacheMetrics from(IgniteEx ignite, GridCache c) {
+    public static VisorCacheMetrics from(IgniteEx ignite, String cacheName) {
         VisorCacheMetrics cm = new VisorCacheMetrics();
 
-        CacheMetrics m = c.metrics();
-
         GridCacheProcessor cacheProcessor = ignite.context().cache();
 
-        cm.name = c.name();
-        cm.mode = cacheProcessor.cacheMode(c.name());
-        cm.sys = cacheProcessor.systemCache(c.name());
+        IgniteCache<Object, Object> c = cacheProcessor.jcache(cacheName);
+
+        cm.name = cacheName;
+        cm.mode = cacheProcessor.cacheMode(cacheName);
+        cm.sys = cacheProcessor.systemCache(cacheName);
+
+        CacheMetrics m = c.metrics();
 
         cm.size = m.getSize();
         cm.keySize = m.getKeySize();
@@ -216,7 +219,7 @@ public class VisorCacheMetrics implements Serializable {
         cm.commitsPerSec = (int)(MICROSECONDS_IN_SECOND * 1.f / m.getAverageTxCommitTime());
         cm.rollbacksPerSec = (int)(MICROSECONDS_IN_SECOND * 1.f / m.getAverageTxRollbackTime());
 
-        cm.qryMetrics = VisorCacheQueryMetrics.from(c.queries().metrics());
+        cm.qryMetrics = VisorCacheQueryMetrics.from(c.queryMetrics());
 
         cm.dhtEvictQueueCurrSize = m.getDhtEvictQueueCurrentSize();
         cm.txThreadMapSize = m.getTxThreadMapSize();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1497cbe0/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetricsCollectorTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetricsCollectorTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetricsCollectorTask.java
index 8fd42a0..23263c0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetricsCollectorTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetricsCollectorTask.java
@@ -99,17 +99,19 @@ public class VisorCacheMetricsCollectorTask extends VisorMultiNodeTask<IgniteBiT
 
             GridCacheProcessor cacheProcessor = ignite.context().cache();
 
-            Collection<GridCacheAdapter<?, ?>> caches = cacheProcessor.internalCaches();
+            Collection<IgniteCacheProxy<?, ?>> caches = cacheProcessor.jcaches();
 
             Collection<VisorCacheMetrics> res = new ArrayList<>(caches.size());
 
             boolean allCaches = cacheNames.isEmpty();
 
-            for (GridCacheAdapter ca : caches) {
+            for (IgniteCacheProxy ca : caches) {
                 if (ca.context().started()) {
-                    VisorCacheMetrics cm = VisorCacheMetrics.from(ignite, ca);
+                    String cacheName = ca.getName();
 
-                    if ((allCaches || cacheNames.contains(ca.name())) && (showSysCaches || !cm.system()))
+                    VisorCacheMetrics cm = VisorCacheMetrics.from(ignite, cacheName);
+
+                    if ((allCaches || cacheNames.contains(cacheName)) && (showSysCaches || !cm.system()))
                         res.add(cm);
                 }
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1497cbe0/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java
index a4a2235..cacf528 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.visor.cache;
 
-import org.apache.ignite.*;
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.cache.store.jdbc.*;
 import org.apache.ignite.configuration.*;
@@ -72,10 +71,10 @@ public class VisorCacheStoreConfiguration implements Serializable {
      * @param ccfg Cache configuration.
      * @return Data transfer object for cache store configuration properties.
      */
-    public static VisorCacheStoreConfiguration from(Ignite ignite, CacheConfiguration ccfg) {
+    public static VisorCacheStoreConfiguration from(IgniteEx ignite, CacheConfiguration ccfg) {
         VisorCacheStoreConfiguration cfg = new VisorCacheStoreConfiguration();
 
-        GridCacheAdapter<Object, Object> c = ((IgniteKernal)ignite).internalCache(ccfg.getName());
+        IgniteCacheProxy<Object, Object> c = ignite.context().cache().jcache(ccfg.getName());
 
         CacheStore store = c != null && c.context().started() ? c.context().store().configuredStore() : null;
 


[12/17] incubator-ignite git commit: #ignite-990: Add method getAllOutTx to IgniteCache.

Posted by sb...@apache.org.
#ignite-990: Add method getAllOutTx to IgniteCache.


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

Branch: refs/heads/ignite-gg-10299
Commit: ab20fd9059c21c65f3b34da67d75fc94098850e3
Parents: 5f06f57
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Jun 5 19:06:10 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Jun 5 19:06:10 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCache.java     |  11 ++
 .../processors/cache/GridCacheAdapter.java      |  17 ++-
 .../processors/cache/GridCacheProxyImpl.java    |  14 ++-
 .../processors/cache/IgniteCacheProxy.java      |  23 +++++
 .../processors/cache/IgniteInternalCache.java   |  11 +-
 .../processors/igfs/IgfsMetaManager.java        |   2 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  83 +++++++++++++++
 .../GridCacheExAbstractFullApiSelfTest.java     | 103 -------------------
 .../GridCacheExColocatedFullApiSelfTest.java    |  33 ------
 .../near/GridCacheExNearFullApiSelfTest.java    |  39 -------
 .../GridCacheExReplicatedFullApiSelfTest.java   |  33 ------
 .../local/GridCacheExLocalFullApiSelfTest.java  |  30 ------
 .../IgniteCacheFullApiSelfTestSuite.java        |   6 --
 13 files changed, 155 insertions(+), 250 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index f9007a2..07f4f3f 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -311,10 +311,21 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
     @IgniteAsyncSupported
     @Override public Map<K, V> getAll(Set<? extends K> keys);
 
+    /**
+     * Gets values from cache. Will bypass started transaction, if any, i.e. will not enlist entries
+     * and will not lock any keys if pessimistic transaction is started by thread.
+     *
+     * @param keys The keys whose associated values are to be returned.
+     * @return A map of entries that were found for the given keys.
+     */
+    @IgniteAsyncSupported
+    public Map<K, V> getAllOutTx(Set<? extends K> keys);
+
     /** {@inheritDoc} */
     @IgniteAsyncSupported
     @Override public boolean containsKey(K key);
 
+    /** {@inheritDoc} */
     @IgniteAsyncSupported
     public boolean containsKeys(Set<? extends K> keys);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 9d98ce7..56b5c15 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -1220,11 +1220,22 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public Map<K, V> getAllOutTx(List<K> keys) throws IgniteCheckedException {
+    @Nullable @Override public Map<K, V> getAllOutTx(Set<? extends K> keys) throws IgniteCheckedException {
+        return getAllOutTxAsync(keys).get();
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteInternalFuture<Map<K, V>> getAllOutTxAsync(Set<? extends K> keys) {
         String taskName = ctx.kernalContext().job().currentTaskName();
 
-        return getAllAsync(keys, !ctx.config().isReadFromBackup(), /*skip tx*/true, null, null, taskName, true, false)
-            .get();
+        return getAllAsync(keys,
+            !ctx.config().isReadFromBackup(),
+            /*skip tx*/true,
+            null,
+            null,
+            taskName,
+            !ctx.keepPortable(),
+            false);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index 9a6d08a..63ba242 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -329,7 +329,7 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public Map<K, V> getAllOutTx(List<K> keys) throws IgniteCheckedException {
+    @Nullable @Override public Map<K, V> getAllOutTx(Set<? extends K> keys) throws IgniteCheckedException {
         CacheOperationContext prev = gate.enter(opCtx);
 
         try {
@@ -341,6 +341,18 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
     }
 
     /** {@inheritDoc} */
+    @Nullable @Override public IgniteInternalFuture<Map<K, V>> getAllOutTxAsync(Set<? extends K> keys) {
+        CacheOperationContext prev = gate.enter(opCtx);
+
+        try {
+            return delegate.getAllOutTxAsync(keys);
+        }
+        finally {
+            gate.leave(prev);
+        }
+    }
+
+    /** {@inheritDoc} */
     @Override public boolean isIgfsDataCache() {
         CacheOperationContext prev = gate.enter(opCtx);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index f840015..4390993 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -699,6 +699,29 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
         }
     }
 
+    /** {@inheritDoc} */
+    @Override public Map<K, V> getAllOutTx(Set<? extends K> keys) {
+        try {
+            CacheOperationContext prev = onEnter(opCtx);
+
+            try {
+                if (isAsync()) {
+                    setFuture(delegate.getAllOutTxAsync(keys));
+
+                    return null;
+                }
+                else
+                    return delegate.getAllOutTx(keys);
+            }
+            finally {
+                onLeave(prev);
+            }
+        }
+        catch (IgniteCheckedException e) {
+            throw cacheException(e);
+        }
+    }
+
     /**
      * @param keys Keys.
      * @return Values map.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
index ccce1b7..d98379c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
@@ -1623,7 +1623,16 @@ public interface IgniteInternalCache<K, V> extends Iterable<Cache.Entry<K, V>> {
      * @return Value.
      * @throws IgniteCheckedException If failed.
      */
-    @Nullable public Map<K, V> getAllOutTx(List<K> keys) throws IgniteCheckedException;
+    public Map<K, V> getAllOutTx(Set<? extends K> keys) throws IgniteCheckedException;
+
+    /**
+     * Gets values from cache. Will bypass started transaction, if any, i.e. will not enlist entries
+     * and will not lock any keys if pessimistic transaction is started by thread.
+     *
+     * @param keys Keys to get values for.
+     * @return Future for getAllOutTx operation.
+     */
+    public IgniteInternalFuture<Map<K, V>> getAllOutTxAsync(Set<? extends K> keys);
 
     /**
      * Checks whether this cache is IGFS data cache.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
index e33e0d4..b98c5d8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
@@ -669,7 +669,7 @@ public class IgfsMetaManager extends IgfsManager {
     private Map<String, IgfsListingEntry> directoryListing(IgniteUuid fileId, boolean skipTx) throws IgniteCheckedException {
         assert fileId != null;
 
-        IgfsFileInfo info = skipTx ? id2InfoPrj.getAllOutTx(Collections.singletonList(fileId)).get(fileId) :
+        IgfsFileInfo info = skipTx ? id2InfoPrj.getAllOutTx(Collections.singleton(fileId)).get(fileId) :
             id2InfoPrj.get(fileId);
 
         return info == null ? Collections.<String, IgfsListingEntry>emptyMap() : info.listing();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index da20869..9bfbd15 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -4893,6 +4893,89 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testGetOutTx() throws Exception {
+        checkGetOutTx(false);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testGetOutTxAsync() throws Exception {
+        checkGetOutTx(true);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    private void checkGetOutTx(boolean async) throws Exception {
+        final AtomicInteger lockEvtCnt = new AtomicInteger();
+
+        IgnitePredicate<Event> lsnr = new IgnitePredicate<Event>() {
+            @Override public boolean apply(Event evt) {
+                lockEvtCnt.incrementAndGet();
+
+                return true;
+            }
+        };
+
+        try {
+            IgniteCache<String, Integer> cache = grid(0).cache(null);
+
+            List<String> keys = primaryKeysForCache(cache, 2);
+
+            assertEquals(2, keys.size());
+
+            cache.put(keys.get(0), 0);
+            cache.put(keys.get(1), 1);
+
+            grid(0).events().localListen(lsnr, EVT_CACHE_OBJECT_LOCKED, EVT_CACHE_OBJECT_UNLOCKED);
+
+            if (async)
+                cache = cache.withAsync();
+
+            try (Transaction tx = transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
+                Integer val0 = cache.get(keys.get(0));
+
+                if (async)
+                    val0 = cache.<Integer>future().get();
+
+                assertEquals(0, val0.intValue());
+
+                Map<String, Integer> allOutTx = cache.getAllOutTx(F.asSet(keys.get(1)));
+
+                if (async)
+                    allOutTx = cache.<Map<String, Integer>>future().get();
+
+                assertEquals(1, allOutTx.size());
+
+                assertTrue(allOutTx.containsKey(keys.get(1)));
+
+                assertEquals(1, allOutTx.get(keys.get(1)).intValue());
+            }
+
+            assertTrue(GridTestUtils.waitForCondition(new PA() {
+                @Override public boolean apply() {
+                    info("Lock event count: " + lockEvtCnt.get());
+                    if (atomicityMode() == ATOMIC)
+                        return lockEvtCnt.get() == 0;
+
+                    if (cacheMode() == PARTITIONED && nearEnabled()) {
+                        if (!grid(0).configuration().isClientMode())
+                            return lockEvtCnt.get() == 4;
+                    }
+
+                    return lockEvtCnt.get() == 2;
+                }
+            }, 15000));
+        }
+        finally {
+            grid(0).events().stopLocalListen(lsnr, EVT_CACHE_OBJECT_LOCKED, EVT_CACHE_OBJECT_UNLOCKED);
+        }
+    }
+
+    /**
      * Sets given value, returns old value.
      */
     public static final class SetValueProcessor implements EntryProcessor<String, Integer, Integer> {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheExAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheExAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheExAbstractFullApiSelfTest.java
deleted file mode 100644
index 7a1b7cc..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheExAbstractFullApiSelfTest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.events.*;
-import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.lang.*;
-import org.apache.ignite.testframework.*;
-import org.apache.ignite.transactions.*;
-
-import java.util.concurrent.atomic.*;
-
-import static org.apache.ignite.events.EventType.*;
-import static org.apache.ignite.transactions.TransactionConcurrency.*;
-import static org.apache.ignite.transactions.TransactionIsolation.*;
-
-/**
- * Abstract test for private cache interface.
- */
-public abstract class GridCacheExAbstractFullApiSelfTest extends GridCacheAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 4;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected NearCacheConfiguration nearConfiguration() {
-        return null;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testGetOutTx() throws Exception {
-        final AtomicInteger lockEvtCnt = new AtomicInteger();
-
-        IgnitePredicate<Event> lsnr = new IgnitePredicate<Event>() {
-            @Override public boolean apply(Event evt) {
-                lockEvtCnt.incrementAndGet();
-
-                return true;
-            }
-        };
-
-        try {
-            grid(0).events().localListen(lsnr, EVT_CACHE_OBJECT_LOCKED, EVT_CACHE_OBJECT_UNLOCKED);
-
-            GridCacheAdapter<String, Integer> cache = ((IgniteKernal)grid(0)).internalCache();
-
-            try (Transaction tx = transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
-                int key = 0;
-
-                for (int i = 0; i < 1000; i++) {
-                    if (grid(0).affinity(null).mapKeyToNode("key" + i).id().equals(grid(0).localNode().id())) {
-                        key = i;
-
-                        break;
-                    }
-                }
-
-                cache.get("key" + key);
-
-                for (int i = key + 1; i < 1000; i++) {
-                    if (grid(0).affinity(null).mapKeyToNode("key" + i).id().equals(grid(0).localNode().id())) {
-                        key = i;
-
-                        break;
-                    }
-                }
-
-                cache.getAllOutTx(F.asList("key" + key));
-            }
-
-            assertTrue(GridTestUtils.waitForCondition(new PA() {
-                @Override public boolean apply() {
-                    info("Lock event count: " + lockEvtCnt.get());
-
-                    return lockEvtCnt.get() == (nearEnabled() ? 4 : 2);
-                }
-            }, 15000));
-        }
-        finally {
-            grid(0).events().stopLocalListen(lsnr, EVT_CACHE_OBJECT_LOCKED, EVT_CACHE_OBJECT_UNLOCKED);
-        }
-    }
-}

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

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

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

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
index 369e041..5fa3283 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
@@ -130,12 +130,6 @@ public class IgniteCacheFullApiSelfTestSuite extends TestSuite {
         suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.class);
         suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.class);
 
-        // Private cache API.
-        suite.addTestSuite(GridCacheExLocalFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheExReplicatedFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheExNearFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheExColocatedFullApiSelfTest.class);
-
 //        Multithreaded // TODO: GG-708
 //        suite.addTestSuite(GridCacheLocalFullApiMultithreadedSelfTest.class);
 //        suite.addTestSuite(GridCacheReplicatedFullApiMultithreadedSelfTest.class);


[15/17] incubator-ignite git commit: # ignite-sprint-5 javadoc warning

Posted by sb...@apache.org.
# ignite-sprint-5 javadoc warning


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

Branch: refs/heads/ignite-gg-10299
Commit: a5b5ec703dbcb593a945c8eb1d37e1261e55e834
Parents: 59db4a5
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 8 11:32:14 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 8 11:32:14 2015 +0300

----------------------------------------------------------------------
 modules/core/src/main/java/org/apache/ignite/IgniteCache.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5b5ec70/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index 07f4f3f..a54adc9 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -325,7 +325,12 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
     @IgniteAsyncSupported
     @Override public boolean containsKey(K key);
 
-    /** {@inheritDoc} */
+    /**
+     * Determines if the {@link Cache} contains entries for the specified keys.
+     *
+     * @param keys Key whose presence in this cache is to be tested.
+     * @return {@code True} if this cache contains a mapping for the specified keys.
+     */
     @IgniteAsyncSupported
     public boolean containsKeys(Set<? extends K> keys);
 


[11/17] incubator-ignite git commit: # ignite-sprint-5 disabled hanging test

Posted by sb...@apache.org.
# ignite-sprint-5 disabled hanging test


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

Branch: refs/heads/ignite-gg-10299
Commit: 5f06f578e57001e964d823daebc3bc67b1a27675
Parents: e87969c
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jun 5 17:21:23 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jun 5 17:21:23 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/messaging/IgniteMessagingWithClientTest.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5f06f578/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java
index 855a4f7..09abcdb 100644
--- a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java
@@ -77,6 +77,8 @@ public class IgniteMessagingWithClientTest extends GridCommonAbstractTest implem
      * @throws Exception If failed.
      */
     public void testMessageSendWithClientJoin() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-996");
+
         startGrid(0);
 
         Ignite ignite1 = startGrid(1);


[17/17] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-gg-10299

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-gg-10299


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

Branch: refs/heads/ignite-gg-10299
Commit: ea21500336c6d0df5a563eb662367cce7aca0705
Parents: 0fc2d73 8467a3c
Author: avinogradov <av...@gridgain.com>
Authored: Mon Jun 8 12:59:05 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Mon Jun 8 12:59:05 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCache.java     |   7 +-
 .../apache/ignite/internal/IgniteKernal.java    |   2 +
 .../ignite/internal/IgniteNodeAttributes.java   |   5 +-
 .../internal/MarshallerContextAdapter.java      |  36 +-
 .../cache/DynamicCacheDescriptor.java           |  17 +
 .../processors/cache/GridCacheContext.java      |  13 +
 .../processors/cache/GridCacheProcessor.java    |  37 ++-
 .../dht/atomic/GridDhtAtomicCache.java          |   4 +
 .../transactions/IgniteTxLocalAdapter.java      |  28 ++
 .../IgniteTxRollbackCheckedException.java       |   9 +
 ...acheReadOnlyTransactionalClientSelfTest.java | 327 +++++++++++++++++++
 .../loadtests/hashmap/GridCacheTestContext.java |   1 +
 .../testsuites/IgniteCacheTestSuite4.java       |   2 +
 13 files changed, 476 insertions(+), 12 deletions(-)
----------------------------------------------------------------------



[08/17] incubator-ignite git commit: Merge branches 'ignite-gg-9621' and 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-9621

Posted by sb...@apache.org.
Merge branches 'ignite-gg-9621' and 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-9621


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

Branch: refs/heads/ignite-gg-10299
Commit: ead66e7ed62f5134b98be984f098655ef4d04c68
Parents: 2b443d9 c9f7291
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Jun 5 10:14:08 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Jun 5 10:14:08 2015 +0700

----------------------------------------------------------------------
 .../managers/communication/GridIoManager.java   | 117 ++++----
 .../dht/GridClientPartitionTopology.java        |   2 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |   8 +-
 .../GridDhtPartitionsExchangeFuture.java        |  19 +-
 .../dht/preloader/GridDhtPreloader.java         |   2 +-
 .../processors/hadoop/HadoopTaskContext.java    |  14 +-
 .../igfs/IgfsSecondaryFileSystemImpl.java       |   2 +-
 ...niteDynamicCacheWithConfigStartSelfTest.java |  97 +++++++
 .../igfs/IgfsClientCacheSelfTest.java           |   9 +-
 .../IgniteMessagingWithClientTest.java          | 164 +++++++++++
 .../ignite/testsuites/IgniteBasicTestSuite.java |   1 +
 .../testsuites/IgniteCacheTestSuite4.java       |   1 +
 .../fs/IgniteHadoopFileSystemCounterWriter.java |  14 +-
 .../hadoop/fs/v1/IgniteHadoopFileSystem.java    |  70 ++---
 .../hadoop/fs/v2/IgniteHadoopFileSystem.java    |   2 +-
 .../processors/hadoop/HadoopDefaultJobInfo.java |   2 +-
 .../internal/processors/hadoop/HadoopUtils.java | 282 ++++++++++++++++++-
 .../hadoop/SecondaryFileSystemProvider.java     |   4 +-
 .../hadoop/taskexecutor/HadoopRunnableTask.java |  20 +-
 .../processors/hadoop/v2/HadoopV2Job.java       |  31 +-
 .../hadoop/v2/HadoopV2JobResourceManager.java   |  26 +-
 .../hadoop/v2/HadoopV2TaskContext.java          |  48 +++-
 .../hadoop/HadoopClientProtocolSelfTest.java    |   6 +-
 .../hadoop/HadoopAbstractSelfTest.java          |  14 +-
 .../hadoop/HadoopCommandLineTest.java           |  14 +-
 .../processors/hadoop/HadoopMapReduceTest.java  | 176 +++++++++++-
 .../hadoop/HadoopTaskExecutionSelfTest.java     |   2 +-
 .../hadoop/HadoopTasksAllVersionsTest.java      |  15 +-
 .../processors/hadoop/HadoopTasksV1Test.java    |   5 +-
 .../processors/hadoop/HadoopTasksV2Test.java    |   5 +-
 .../processors/hadoop/HadoopV2JobSelfTest.java  |   6 +-
 .../collections/HadoopAbstractMapTest.java      |  12 +
 32 files changed, 999 insertions(+), 191 deletions(-)
----------------------------------------------------------------------



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

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


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

Branch: refs/heads/ignite-gg-10299
Commit: e9cea3a311cd1ad9728a0ae14de9ba91f3859d1b
Parents: 54c72c3 bd3abbc
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Wed Jun 3 20:06:43 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Wed Jun 3 20:06:43 2015 -0700

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

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



[04/17] incubator-ignite git commit: Merge branches 'ignite-gg-9621' and 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-9621

Posted by sb...@apache.org.
Merge branches 'ignite-gg-9621' and 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-9621

Conflicts:
	modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
	modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java


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

Branch: refs/heads/ignite-gg-10299
Commit: 1f516a2531bec313bb6102f79d43d75e04c36a48
Parents: 1497cbe bf3203a
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Jun 4 16:34:33 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Jun 4 16:34:33 2015 +0700

----------------------------------------------------------------------
 .gitignore                                      |    3 +-
 DEVNOTES.txt                                    |   47 +-
 LICENSE                                         |  238 +
 LICENSE.txt                                     |  238 -
 NOTICE                                          |   12 +
 NOTICE.txt                                      |   12 -
 RELEASE_NOTES.txt                               |   13 +-
 assembly/dependencies-fabric.xml                |   50 +
 assembly/dependencies-hadoop.xml                |    1 -
 assembly/dependencies-optional-fabric.xml       |   82 -
 assembly/dependencies-optional-hadoop.xml       |   83 -
 assembly/dependencies-visor-console.xml         |    3 +
 assembly/release-base.xml                       |   15 +-
 assembly/release-fabric.xml                     |    5 +
 assembly/release-schema-import.xml              |   50 +
 bin/ignite-schema-import.bat                    |    2 +-
 bin/ignite-schema-import.sh                     |    2 +-
 bin/ignite.bat                                  |    2 +-
 bin/ignite.sh                                   |    2 +-
 bin/ignitevisorcmd.bat                          |    2 +-
 bin/ignitevisorcmd.sh                           |    2 +-
 bin/include/build-classpath.bat                 |   46 +
 bin/include/build-classpath.sh                  |   71 +
 bin/include/functions.sh                        |    2 +-
 bin/include/target-classpath.bat                |   46 -
 bin/include/target-classpath.sh                 |   71 -
 dev-tools/.gitignore                            |    2 +
 dev-tools/build.gradle                          |   54 +
 .../gradle/wrapper/gradle-wrapper.properties    |   20 +
 dev-tools/gradlew                               |  233 +
 dev-tools/slurp.sh                              |   76 +
 dev-tools/src/main/groovy/jiraslurp.groovy      |  544 ++
 examples/README.txt                             |    2 +-
 examples/pom.xml                                |    2 +-
 .../hibernate/CacheHibernatePersonStore.java    |  202 +-
 .../hibernate/CacheHibernateStoreExample.java   |   20 +-
 .../store/jdbc/CacheJdbcPersonStore.java        |  180 +-
 .../store/jdbc/CacheJdbcStoreExample.java       |   16 +-
 .../store/spring/CacheSpringPersonStore.java    |  128 +
 .../store/spring/CacheSpringStoreExample.java   |  143 +
 .../datagrid/store/spring/package-info.java     |   22 +
 .../streaming/StreamTransformerExample.java     |    4 +-
 .../streaming/StreamVisitorExample.java         |    4 +-
 .../ignite/examples/streaming/package-info.java |    1 -
 .../streaming/wordcount/CacheConfig.java        |    7 +-
 .../streaming/wordcount/QueryWords.java         |   12 +-
 .../streaming/wordcount/StreamWords.java        |   12 +-
 .../streaming/wordcount/package-info.java       |    1 -
 .../socket/WordsSocketStreamerClient.java       |   82 +
 .../socket/WordsSocketStreamerServer.java       |  124 +
 .../wordcount/socket/package-info.java          |   21 +
 .../examples/ScalarContinuationExample.scala    |   10 +-
 modules/aop/pom.xml                             |    2 +-
 .../aop/aspectj/GridifyAspectJAspect.java       |    2 +-
 .../aspectj/GridifySetToSetAspectJAspect.java   |    2 +-
 .../aspectj/GridifySetToValueAspectJAspect.java |    2 +-
 .../aop/spring/GridifySetToSetSpringAspect.java |    2 +-
 .../spring/GridifySetToValueSpringAspect.java   |    2 +-
 .../gridify/aop/spring/GridifySpringAspect.java |    2 +-
 modules/aws/pom.xml                             |    2 +-
 .../spi/checkpoint/s3/S3CheckpointSpi.java      |    2 +-
 .../s3/S3CheckpointManagerSelfTest.java         |    2 +-
 .../checkpoint/s3/S3CheckpointSpiSelfTest.java  |    2 +-
 .../s3/S3SessionCheckpointSelfTest.java         |    2 +-
 .../config/grid-client-config.properties        |   50 +-
 modules/clients/pom.xml                         |    2 +-
 .../ClientPropertiesConfigurationSelfTest.java  |   12 +-
 .../ClientAbstractConnectivitySelfTest.java     |   14 +
 .../clients/src/test/resources/spring-cache.xml |    4 +-
 .../src/test/resources/spring-server-node.xml   |    4 +-
 .../test/resources/spring-server-ssl-node.xml   |    4 +-
 modules/cloud/README.txt                        |   32 +
 modules/cloud/licenses/apache-2.0.txt           |  202 +
 modules/cloud/pom.xml                           |  106 +
 .../cloud/TcpDiscoveryCloudIpFinder.java        |  433 ++
 .../tcp/ipfinder/cloud/package-info.java        |   21 +
 .../TcpDiscoveryCloudIpFinderSelfTest.java      |  122 +
 .../tcp/ipfinder/cloud/package-info.java        |   22 +
 .../ignite/testsuites/IgniteCloudTestSuite.java |  112 +
 modules/codegen/pom.xml                         |   14 +-
 .../ignite/codegen/MessageCodeGenerator.java    |   30 +-
 modules/core/pom.xml                            |    2 +-
 modules/core/src/main/java/META-INF/LICENSE     |  238 +
 modules/core/src/main/java/META-INF/NOTICE      |   12 +
 .../src/main/java/org/apache/ignite/Ignite.java |    8 +-
 .../java/org/apache/ignite/IgniteCache.java     |    5 +
 .../org/apache/ignite/IgniteJdbcDriver.java     |   81 +-
 .../java/org/apache/ignite/IgniteLogger.java    |    8 +-
 .../java/org/apache/ignite/IgniteServices.java  |    7 +-
 .../apache/ignite/IgniteSystemProperties.java   |    6 -
 .../main/java/org/apache/ignite/Ignition.java   |   64 +-
 .../apache/ignite/cache/CacheInterceptor.java   |    9 +-
 .../org/apache/ignite/cache/CacheMetrics.java   |  187 +-
 .../cache/CacheServerNotFoundException.java     |   12 +-
 .../apache/ignite/cache/CachingProvider.java    |    3 +
 .../ignite/cache/eviction/EvictableEntry.java   |    7 +
 .../ignite/cache/eviction/EvictionPolicy.java   |    2 +
 .../cache/eviction/fifo/FifoEvictionPolicy.java |  120 +-
 .../eviction/fifo/FifoEvictionPolicyMBean.java  |   22 +
 .../igfs/IgfsPerBlockLruEvictionPolicy.java     |    3 +-
 .../cache/eviction/lru/LruEvictionPolicy.java   |  136 +-
 .../eviction/lru/LruEvictionPolicyMBean.java    |   38 +
 .../eviction/random/RandomEvictionPolicy.java   |   10 +-
 .../eviction/sorted/SortedEvictionPolicy.java   |  520 ++
 .../sorted/SortedEvictionPolicyMBean.java       |   88 +
 .../cache/eviction/sorted/package-info.java     |   21 +
 .../apache/ignite/cache/query/QueryMetrics.java |    6 +-
 .../apache/ignite/cache/store/CacheStore.java   |    2 +
 .../ignite/cache/store/CacheStoreSession.java   |   22 +
 .../cache/store/CacheStoreSessionListener.java  |  133 +
 .../jdbc/CacheJdbcStoreSessionListener.java     |  141 +
 .../org/apache/ignite/cluster/ClusterNode.java  |   24 +-
 .../ignite/compute/ComputeJobContinuation.java  |    2 +
 .../configuration/CacheConfiguration.java       |  350 +-
 .../configuration/ConnectorConfiguration.java   |    2 +-
 .../configuration/IgniteConfiguration.java      |  493 +-
 .../ignite/configuration/TopologyValidator.java |   35 +
 .../ignite/events/CacheQueryExecutedEvent.java  |    3 +-
 .../ignite/events/CacheQueryReadEvent.java      |    3 +-
 .../org/apache/ignite/igfs/IgfsUserContext.java |  119 +
 .../igfs/secondary/IgfsSecondaryFileSystem.java |    7 +
 .../ignite/internal/ClusterMetricsSnapshot.java |   14 +
 .../ignite/internal/GridDirectCollection.java   |    3 +
 .../internal/GridEventConsumeHandler.java       |  126 +-
 .../ignite/internal/GridJobContextImpl.java     |   99 +-
 .../ignite/internal/GridKernalContext.java      |    5 +
 .../ignite/internal/GridKernalContextImpl.java  |    5 +
 .../ignite/internal/GridUpdateNotifier.java     |   66 +-
 .../ignite/internal/IgniteComponentType.java    |   36 +-
 .../org/apache/ignite/internal/IgniteEx.java    |   10 +-
 .../apache/ignite/internal/IgniteKernal.java    |  164 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |  234 +-
 .../ignite/internal/MarshallerContextImpl.java  |    4 +-
 .../client/GridClientConfiguration.java         |    2 +-
 .../connection/GridClientNioTcpConnection.java  |    9 +-
 .../internal/cluster/ClusterGroupAdapter.java   |   16 +
 .../ClusterTopologyServerNotFoundException.java |   12 +-
 .../internal/direct/DirectByteBufferStream.java |    4 +-
 .../internal/events/DiscoveryCustomEvent.java   |   18 +-
 .../internal/igfs/common/IgfsMarshaller.java    |   35 +-
 .../igfs/common/IgfsPathControlRequest.java     |   22 +
 .../interop/InteropAwareEventFilter.java        |   37 +
 .../internal/interop/InteropBootstrap.java      |   34 +
 .../interop/InteropBootstrapFactory.java        |   39 +
 .../internal/interop/InteropException.java      |   71 +
 .../internal/interop/InteropIgnition.java       |  166 +
 .../interop/InteropLocalEventListener.java      |   28 +
 .../interop/InteropNoCallbackException.java     |   50 +
 .../internal/interop/InteropProcessor.java      |   36 +
 .../internal/managers/GridManagerAdapter.java   |   63 +-
 .../managers/communication/GridIoManager.java   |   71 +-
 .../communication/GridIoMessageFactory.java     |   12 +-
 .../GridLifecycleAwareMessageFilter.java        |   38 +
 .../deployment/GridDeploymentClassLoader.java   |    2 +-
 .../deployment/GridDeploymentManager.java       |    2 +-
 .../GridDeploymentPerVersionStore.java          |    3 +-
 .../managers/discovery/CustomEventListener.java |   31 +
 .../discovery/CustomMessageWrapper.java         |   63 +
 .../discovery/DiscoveryCustomMessage.java       |   48 +
 .../discovery/GridDiscoveryManager.java         |  289 +-
 .../eventstorage/GridEventStorageManager.java   |   35 +-
 .../managers/indexing/GridIndexingManager.java  |   14 +-
 .../affinity/GridAffinityAssignmentCache.java   |   43 +-
 .../processors/cache/CacheEntryImpl.java        |   29 +-
 .../cache/CacheEvictableEntryImpl.java          |   31 +
 .../processors/cache/CacheInvokeResult.java     |   24 +-
 .../processors/cache/CacheLockImpl.java         |   20 +-
 .../processors/cache/CacheMetricsImpl.java      |  367 +-
 .../cache/CacheMetricsMXBeanImpl.java           |  100 +
 .../processors/cache/CacheMetricsSnapshot.java  |  380 +-
 .../processors/cache/CacheObjectImpl.java       |    2 +-
 .../processors/cache/CacheOperationContext.java |  170 +
 .../processors/cache/CacheProjection.java       | 1386 ----
 .../cache/CacheStoreBalancingWrapper.java       |    6 +
 .../cache/CacheVersionedEntryImpl.java          |   29 +-
 .../cache/DynamicCacheChangeBatch.java          |   20 +-
 .../cache/DynamicCacheDescriptor.java           |   18 +-
 .../internal/processors/cache/GridCache.java    |  223 -
 .../processors/cache/GridCacheAdapter.java      |  821 +-
 .../cache/GridCacheAffinityManager.java         |   26 +-
 .../processors/cache/GridCacheAtomicFuture.java |    7 -
 .../cache/GridCacheConcurrentMap.java           |   45 +-
 .../processors/cache/GridCacheContext.java      |   82 +-
 .../processors/cache/GridCacheEntryEx.java      |   10 +
 .../cache/GridCacheEvictionManager.java         |   13 +-
 .../processors/cache/GridCacheGateway.java      |  121 +-
 .../processors/cache/GridCacheIoManager.java    |  330 +-
 .../processors/cache/GridCacheMapEntry.java     |  223 +-
 .../processors/cache/GridCacheMessage.java      |    8 +-
 .../processors/cache/GridCacheMvccManager.java  |   38 +-
 .../GridCachePartitionExchangeManager.java      |   83 +-
 .../processors/cache/GridCachePreloader.java    |    6 +-
 .../cache/GridCachePreloaderAdapter.java        |   11 +-
 .../processors/cache/GridCacheProcessor.java    |  289 +-
 .../processors/cache/GridCacheProjectionEx.java |  351 -
 .../cache/GridCacheProjectionImpl.java          |  766 --
 .../processors/cache/GridCacheProxy.java        |   27 -
 .../processors/cache/GridCacheProxyImpl.java    |  424 +-
 .../processors/cache/GridCacheReturn.java       |    5 +-
 .../cache/GridCacheSharedContext.java           |   50 +-
 .../processors/cache/GridCacheSwapManager.java  |  364 +-
 .../processors/cache/GridCacheTtlManager.java   |  156 +-
 .../processors/cache/GridCacheUtils.java        |  353 +-
 .../processors/cache/IgniteCacheProxy.java      |  465 +-
 .../processors/cache/IgniteInternalCache.java   | 1794 +++++
 .../cache/affinity/GridCacheAffinityImpl.java   |   12 +-
 .../cache/affinity/GridCacheAffinityProxy.java  |   30 +-
 .../CacheDataStructuresManager.java             |   10 +-
 ...ridCacheOptimisticCheckPreparedTxFuture.java |  383 -
 ...idCacheOptimisticCheckPreparedTxRequest.java |  232 -
 ...dCacheOptimisticCheckPreparedTxResponse.java |  179 -
 .../distributed/GridCacheTxRecoveryFuture.java  |  506 ++
 .../distributed/GridCacheTxRecoveryRequest.java |  261 +
 .../GridCacheTxRecoveryResponse.java            |  182 +
 .../GridDistributedCacheAdapter.java            |  210 +-
 .../distributed/GridDistributedCacheEntry.java  |    7 -
 .../distributed/GridDistributedLockRequest.java |  104 +-
 .../GridDistributedTxFinishRequest.java         |   70 +-
 .../distributed/GridDistributedTxMapping.java   |   22 +-
 .../GridDistributedTxPrepareRequest.java        |  112 +-
 .../GridDistributedTxRemoteAdapter.java         |   35 +-
 .../dht/GridClientPartitionTopology.java        |    8 +-
 .../dht/GridDhtAffinityAssignmentResponse.java  |   21 +-
 .../dht/GridDhtAssignmentFetchFuture.java       |    4 +-
 .../distributed/dht/GridDhtCacheAdapter.java    |   57 +-
 .../distributed/dht/GridDhtCacheEntry.java      |    6 +-
 .../cache/distributed/dht/GridDhtGetFuture.java |   20 +-
 .../distributed/dht/GridDhtLocalPartition.java  |    2 +-
 .../distributed/dht/GridDhtLockFuture.java      |   50 +-
 .../distributed/dht/GridDhtLockRequest.java     |   50 +-
 .../dht/GridDhtOffHeapCacheEntry.java           |   63 +
 .../dht/GridDhtPartitionTopologyImpl.java       |   30 +-
 .../distributed/dht/GridDhtTopologyFuture.java  |    8 +
 .../dht/GridDhtTransactionalCacheAdapter.java   |  256 +-
 .../distributed/dht/GridDhtTxFinishFuture.java  |  105 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |   43 +-
 .../cache/distributed/dht/GridDhtTxLocal.java   |   45 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |  152 +-
 .../cache/distributed/dht/GridDhtTxMapping.java |    2 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |  115 +-
 .../dht/GridDhtTxPrepareRequest.java            |   60 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |   22 +-
 .../distributed/dht/GridNoStorageCacheMap.java  |    4 +-
 .../dht/GridPartitionedGetFuture.java           |   29 +-
 .../dht/atomic/GridDhtAtomicCache.java          |  151 +-
 .../atomic/GridDhtAtomicOffHeapCacheEntry.java  |   63 +
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |   27 +-
 .../dht/atomic/GridDhtAtomicUpdateResponse.java |    8 +
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |  165 +-
 .../dht/atomic/GridNearAtomicUpdateRequest.java |  157 +-
 .../atomic/GridNearAtomicUpdateResponse.java    |   18 +-
 .../dht/colocated/GridDhtColocatedCache.java    |   78 +-
 .../colocated/GridDhtColocatedLockFuture.java   |  250 +-
 .../GridDhtColocatedOffHeapCacheEntry.java      |   63 +
 .../colocated/GridDhtDetachedCacheEntry.java    |    4 +-
 .../dht/preloader/GridDhtForceKeysFuture.java   |   10 +-
 .../dht/preloader/GridDhtForceKeysResponse.java |   54 +-
 .../preloader/GridDhtPartitionDemandPool.java   |   26 +-
 .../dht/preloader/GridDhtPartitionMap.java      |    2 +-
 .../preloader/GridDhtPartitionSupplyPool.java   |   31 +-
 .../GridDhtPartitionsExchangeFuture.java        |  390 +-
 .../preloader/GridDhtPartitionsFullMessage.java |    4 +-
 .../GridDhtPartitionsSingleMessage.java         |   33 +-
 .../dht/preloader/GridDhtPreloader.java         |   39 +-
 .../preloader/GridDhtPreloaderAssignments.java  |    3 +-
 .../distributed/near/GridNearAtomicCache.java   |   18 +-
 .../distributed/near/GridNearCacheAdapter.java  |   25 +-
 .../distributed/near/GridNearCacheEntry.java    |   22 +-
 .../distributed/near/GridNearGetFuture.java     |   39 +-
 .../distributed/near/GridNearGetResponse.java   |    8 +-
 .../distributed/near/GridNearLockFuture.java    |  319 +-
 .../distributed/near/GridNearLockRequest.java   |   52 +-
 .../distributed/near/GridNearLockResponse.java  |   48 +-
 .../near/GridNearOffHeapCacheEntry.java         |   60 +
 .../near/GridNearOptimisticTxPrepareFuture.java |  815 ++
 .../GridNearPessimisticTxPrepareFuture.java     |  350 +
 .../near/GridNearTransactionalCache.java        |   57 +-
 .../near/GridNearTxFinishFuture.java            |    3 +
 .../near/GridNearTxFinishRequest.java           |   28 +-
 .../cache/distributed/near/GridNearTxLocal.java |  163 +-
 .../near/GridNearTxPrepareFuture.java           | 1030 ---
 .../near/GridNearTxPrepareFutureAdapter.java    |  231 +
 .../near/GridNearTxPrepareRequest.java          |   86 +-
 .../near/GridNearTxPrepareResponse.java         |   92 +-
 .../distributed/near/GridNearTxRemote.java      |   31 +-
 .../processors/cache/local/GridLocalCache.java  |   14 +-
 .../cache/local/GridLocalCacheEntry.java        |   18 +
 .../local/atomic/GridLocalAtomicCache.java      |  133 +-
 .../processors/cache/query/CacheQueries.java    |  143 -
 .../processors/cache/query/CacheQuery.java      |   12 +-
 .../query/GridCacheDistributedQueryManager.java |    3 +
 .../cache/query/GridCacheLocalQueryFuture.java  |    3 +
 .../cache/query/GridCacheQueriesEx.java         |   68 -
 .../cache/query/GridCacheQueriesImpl.java       |  217 -
 .../cache/query/GridCacheQueriesProxy.java      |  285 -
 .../cache/query/GridCacheQueryAdapter.java      |   24 +-
 .../cache/query/GridCacheQueryErrorFuture.java  |    2 +
 .../query/GridCacheQueryFutureAdapter.java      |    3 +
 .../cache/query/GridCacheQueryManager.java      |  173 +-
 .../cache/query/GridCacheSqlQuery.java          |  137 +-
 .../cache/query/GridCacheTwoStepQuery.java      |   25 +-
 .../continuous/CacheContinuousQueryManager.java |   28 +-
 .../jdbc/GridCacheQueryJdbcMetadataTask.java    |    7 +-
 .../cache/store/CacheOsStoreManager.java        |    1 -
 .../cache/store/CacheStoreManager.java          |    7 +-
 .../store/GridCacheStoreManagerAdapter.java     |  202 +-
 .../cache/transactions/IgniteInternalTx.java    |   27 +-
 .../transactions/IgniteTransactionsImpl.java    |    4 +-
 .../cache/transactions/IgniteTxAdapter.java     |  135 +-
 .../cache/transactions/IgniteTxEntry.java       |   66 +-
 .../cache/transactions/IgniteTxHandler.java     |  330 +-
 .../transactions/IgniteTxLocalAdapter.java      |  439 +-
 .../cache/transactions/IgniteTxLocalEx.java     |   25 +-
 .../cache/transactions/IgniteTxManager.java     |  416 +-
 .../cacheobject/IgniteCacheObjectProcessor.java |    5 +-
 .../IgniteCacheObjectProcessorImpl.java         |    4 +-
 .../closure/GridClosureProcessor.java           |   16 +-
 .../continuous/AbstractContinuousMessage.java   |   54 +
 .../continuous/GridContinuousMessageType.java   |   12 -
 .../continuous/GridContinuousProcessor.java     |  836 +-
 .../processors/continuous/StartRequestData.java |  267 +
 .../StartRoutineAckDiscoveryMessage.java        |   63 +
 .../StartRoutineDiscoveryMessage.java           |   85 +
 .../StopRoutineAckDiscoveryMessage.java         |   49 +
 .../continuous/StopRoutineDiscoveryMessage.java |   49 +
 .../datastreamer/DataStreamProcessor.java       |   28 +-
 .../datastreamer/DataStreamerCacheUpdaters.java |   15 +-
 .../datastreamer/DataStreamerImpl.java          |   86 +-
 .../datastreamer/DataStreamerRequest.java       |   38 +-
 .../datastreamer/DataStreamerUpdateJob.java     |   16 +-
 .../datastructures/DataStructuresProcessor.java |   24 +-
 .../datastructures/GridCacheAtomicLongImpl.java |    4 +-
 .../GridCacheAtomicReferenceImpl.java           |    4 +-
 .../GridCacheAtomicSequenceImpl.java            |    4 +-
 .../GridCacheAtomicStampedImpl.java             |    4 +-
 .../GridCacheCountDownLatchImpl.java            |    4 +-
 .../datastructures/GridCacheSetImpl.java        |    2 +-
 .../dr/IgniteDrDataStreamerCacheUpdater.java    |    2 -
 .../internal/processors/hadoop/HadoopJob.java   |    2 +-
 .../processors/igfs/IgfsDataManager.java        |    9 +-
 .../processors/igfs/IgfsDeleteWorker.java       |    4 +
 .../ignite/internal/processors/igfs/IgfsEx.java |    8 +-
 .../processors/igfs/IgfsFileWorkerBatch.java    |    3 +
 .../internal/processors/igfs/IgfsImpl.java      |    8 +-
 .../processors/igfs/IgfsIpcHandler.java         |  184 +-
 .../processors/igfs/IgfsMetaManager.java        |   10 +-
 .../igfs/IgfsSecondaryFileSystemImpl.java       |    9 +-
 .../internal/processors/igfs/IgfsServer.java    |    4 +-
 .../internal/processors/igfs/IgfsThread.java    |    8 +-
 .../internal/processors/igfs/IgfsUtils.java     |   27 +-
 .../processors/job/GridJobHoldListener.java     |    6 +-
 .../processors/job/GridJobProcessor.java        |   28 +-
 .../internal/processors/job/GridJobWorker.java  |   32 +-
 .../offheap/GridOffHeapProcessor.java           |   17 +
 .../portable/GridPortableInputStream.java       |   26 -
 .../processors/query/GridQueryIndexing.java     |   39 +-
 .../processors/query/GridQueryProcessor.java    |  418 +-
 .../messages/GridQueryNextPageResponse.java     |   68 +-
 .../h2/twostep/messages/GridQueryRequest.java   |   21 +-
 .../processors/resource/GridResourceField.java  |   16 +-
 .../processors/resource/GridResourceIoc.java    |  389 +-
 .../processors/resource/GridResourceMethod.java |   13 +
 .../resource/GridResourceProcessor.java         |   20 +-
 .../processors/rest/GridRestCommand.java        |   11 +-
 .../processors/rest/GridRestProcessor.java      |   12 +-
 .../message/GridClientCacheQueryRequest.java    |  366 -
 .../cache/GridCacheClientQueryResult.java       |   97 -
 .../handlers/cache/GridCacheCommandHandler.java |   64 +-
 .../cache/GridCacheQueryCommandHandler.java     |  480 --
 .../top/GridTopologyCommandHandler.java         |    3 +-
 .../protocols/tcp/GridTcpRestNioListener.java   |   24 -
 .../rest/request/GridRestCacheQueryRequest.java |  143 -
 .../service/GridServiceProcessor.java           |  132 +-
 .../processors/task/GridTaskProcessor.java      |    6 +-
 .../processors/task/GridTaskWorker.java         |   12 +
 .../timeout/GridTimeoutProcessor.java           |    3 +
 .../ignite/internal/util/GridJavaProcess.java   |   26 +-
 .../ignite/internal/util/IgniteUtils.java       |   50 +-
 .../internal/util/future/GridFutureAdapter.java |    4 +-
 .../util/ipc/loopback/IpcServerTcpEndpoint.java |    2 +-
 .../shmem/IpcSharedMemoryServerEndpoint.java    |    4 +-
 .../util/lang/GridComputeJobWrapper.java        |   96 -
 .../util/lang/GridFilteredIterator.java         |    2 +-
 .../ignite/internal/util/lang/GridFunc.java     | 7218 +++++-------------
 .../internal/util/nio/GridBufferedParser.java   |    4 -
 .../internal/util/nio/GridDelimitedParser.java  |   91 +
 .../util/nio/GridNioDelimitedBuffer.java        |  106 +
 .../ignite/internal/util/nio/GridNioServer.java |    6 +
 .../util/offheap/GridOffHeapPartitionedMap.java |    9 +
 .../unsafe/GridUnsafePartitionedMap.java        |  155 +-
 .../util/spring/IgniteSpringHelper.java         |   56 +-
 .../util/tostring/GridToStringBuilder.java      |    2 +-
 .../apache/ignite/internal/util/typedef/X.java  |    2 +-
 .../ignite/internal/util/worker/GridWorker.java |    3 +
 .../ignite/internal/visor/cache/VisorCache.java |   92 +-
 .../visor/cache/VisorCacheConfiguration.java    |    7 -
 .../visor/cache/VisorCacheMetadataTask.java     |    9 +-
 .../internal/visor/cache/VisorCacheMetrics.java |   53 +-
 .../cache/VisorCacheNearConfiguration.java      |    4 +-
 .../visor/cache/VisorCacheNodesTask.java        |   74 +
 .../visor/cache/VisorCacheRebalanceTask.java    |    4 +-
 .../visor/cache/VisorCacheResetMetricsTask.java |    2 +-
 .../visor/cache/VisorCacheStartTask.java        |  155 +
 .../cache/VisorCacheStoreConfiguration.java     |   35 -
 .../visor/cache/VisorCacheSwapBackupsTask.java  |    2 +-
 .../cache/VisorCacheTypeFieldMetadata.java      |   36 +-
 .../visor/cache/VisorCacheTypeMetadata.java     |   99 +-
 .../internal/visor/igfs/VisorIgfsMetrics.java   |  128 +-
 .../visor/misc/VisorResolveHostNameTask.java    |    2 +-
 .../visor/node/VisorBasicConfiguration.java     |   11 +
 .../visor/node/VisorNodeDataCollectorJob.java   |    8 +-
 .../node/VisorNodeEventsCollectorTask.java      |   58 +-
 .../internal/visor/query/VisorQueryArg.java     |   31 +-
 .../internal/visor/query/VisorQueryCursor.java  |    1 -
 .../internal/visor/query/VisorQueryJob.java     |   13 +-
 .../internal/visor/query/VisorQueryTask.java    |   41 -
 .../internal/visor/util/VisorEventMapper.java   |   13 +
 .../internal/visor/util/VisorTaskUtils.java     |   12 +-
 .../apache/ignite/lang/IgniteAsyncSupport.java  |    4 +-
 .../apache/ignite/logger/java/JavaLogger.java   |   12 +-
 .../apache/ignite/marshaller/Marshaller.java    |   14 +-
 .../ignite/marshaller/jdk/JdkMarshaller.java    |   10 +-
 .../optimized/OptimizedMarshaller.java          |    8 +-
 .../ignite/messaging/MessagingListenActor.java  |    3 +
 .../ignite/mxbean/CacheMetricsMXBean.java       |   80 +
 .../apache/ignite/plugin/PluginProvider.java    |   26 +-
 .../apache/ignite/resources/LoggerResource.java |    2 +-
 .../apache/ignite/resources/SpringResource.java |    2 +-
 .../org/apache/ignite/services/Service.java     |    7 +-
 .../ignite/services/ServiceConfiguration.java   |    2 +-
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |   61 +-
 .../org/apache/ignite/spi/IgniteSpiContext.java |   53 +-
 .../org/apache/ignite/spi/IgniteSpiThread.java  |    3 +
 .../checkpoint/cache/CacheCheckpointSpi.java    |    2 +-
 .../spi/checkpoint/jdbc/JdbcCheckpointSpi.java  |    2 +-
 .../sharedfs/SharedFsCheckpointSpi.java         |    4 +-
 .../fifoqueue/FifoQueueCollisionSpi.java        |   10 +-
 .../jobstealing/JobStealingCollisionSpi.java    |   14 +-
 .../PriorityQueueCollisionSpi.java              |    6 +-
 .../communication/tcp/TcpCommunicationSpi.java  |   86 +-
 .../tcp/TcpCommunicationSpiMBean.java           |    9 -
 .../ignite/spi/discovery/DiscoverySpi.java      |   27 +-
 .../discovery/DiscoverySpiCustomMessage.java    |   40 +
 .../spi/discovery/DiscoverySpiListener.java     |    5 +-
 .../ignite/spi/discovery/tcp/ClientImpl.java    | 1481 ++++
 .../ignite/spi/discovery/tcp/ServerImpl.java    | 4735 ++++++++++++
 .../discovery/tcp/TcpClientDiscoverySpi.java    | 1256 ---
 .../tcp/TcpClientDiscoverySpiMBean.java         |  164 -
 .../spi/discovery/tcp/TcpDiscoveryImpl.java     |  212 +
 .../spi/discovery/tcp/TcpDiscoverySpi.java      | 5792 +++-----------
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   | 1156 ---
 .../spi/discovery/tcp/TcpDiscoverySpiMBean.java |    9 +
 .../tcp/internal/TcpDiscoveryNode.java          |    7 +-
 .../tcp/internal/TcpDiscoveryNodesRing.java     |    2 +-
 .../tcp/ipfinder/TcpDiscoveryIpFinder.java      |   10 +-
 .../TcpDiscoveryMulticastIpFinder.java          |   57 +-
 .../messages/TcpDiscoveryAbstractMessage.java   |   24 +-
 .../TcpDiscoveryClientHeartbeatMessage.java     |   67 +
 .../messages/TcpDiscoveryClientPingRequest.java |   56 +
 .../TcpDiscoveryClientPingResponse.java         |   67 +
 .../TcpDiscoveryCustomEventMessage.java         |   41 +-
 .../messages/TcpDiscoveryHeartbeatMessage.java  |   28 +-
 .../TcpDiscoveryNodeAddFinishedMessage.java     |   43 +
 .../messages/TcpDiscoveryNodeAddedMessage.java  |    2 +-
 .../tcp/messages/TcpDiscoveryPingRequest.java   |    6 +
 .../tcp/messages/TcpDiscoveryPingResponse.java  |   15 +-
 .../memory/MemoryEventStorageSpi.java           |   10 +-
 .../spi/failover/always/AlwaysFailoverSpi.java  |   10 +-
 .../jobstealing/JobStealingFailoverSpi.java     |    6 +-
 .../spi/failover/never/NeverFailoverSpi.java    |    8 +-
 .../apache/ignite/spi/indexing/IndexingSpi.java |    4 +-
 .../adaptive/AdaptiveLoadBalancingSpi.java      |   12 +-
 .../roundrobin/RoundRobinLoadBalancingSpi.java  |   10 +-
 .../WeightedRandomLoadBalancingSpi.java         |   10 +-
 .../spi/swapspace/file/FileSwapSpaceSpi.java    |   18 +-
 .../ignite/startup/BasicWarmupClosure.java      |   20 +-
 .../startup/cmdline/CommandLineStartup.java     |    5 +-
 .../startup/cmdline/CommandLineTransformer.java |    3 +
 .../org/apache/ignite/stream/StreamAdapter.java |  111 +
 .../ignite/stream/StreamTupleExtractor.java     |   33 +
 .../stream/socket/SocketMessageConverter.java   |   31 +
 .../ignite/stream/socket/SocketStreamer.java    |  218 +
 .../ignite/stream/socket/package-info.java      |   21 +
 .../TransactionSynchronization.java             |   45 -
 .../resources/META-INF/classnames.properties    |   65 +-
 .../core/src/main/resources/ignite.properties   |    2 +-
 .../src/test/config/load/merge-sort-base.xml    |    2 +-
 .../affinity/IgniteClientNodeAffinityTest.java  |  182 +
 ...cheStoreSessionListenerAbstractSelfTest.java |  315 +
 ...heStoreSessionListenerLifecycleSelfTest.java |  395 +
 .../CacheJdbcStoreSessionListenerSelfTest.java  |  175 +
 .../ignite/internal/GridAffinitySelfTest.java   |    1 +
 .../internal/GridCacheProjectionRemoveTest.java |   41 -
 .../internal/GridContinuousTaskSelfTest.java    |  114 +
 .../internal/GridDiscoveryEventSelfTest.java    |   35 +-
 ...ridFailFastNodeFailureDetectionSelfTest.java |  120 +
 .../internal/GridLifecycleBeanSelfTest.java     |   36 +
 .../internal/GridProjectionAbstractTest.java    |   16 +
 .../GridProjectionForCachesSelfTest.java        |   11 +-
 .../internal/GridReleaseTypeSelfTest.java       |   77 +-
 .../apache/ignite/internal/GridSelfTest.java    |    4 +-
 .../internal/GridUpdateNotifierSelfTest.java    |   30 +-
 .../internal/IgniteInternalCacheRemoveTest.java |   41 +
 .../GridDiscoveryManagerAliveCacheSelfTest.java |   66 +-
 .../GridDiscoveryManagerAttributesSelfTest.java |  122 +-
 .../discovery/GridDiscoveryManagerSelfTest.java |   46 +-
 .../GridAffinityProcessorAbstractSelfTest.java  |    1 +
 .../processors/cache/CacheGetFromJobTest.java   |  110 +
 .../cache/CacheOffheapMapEntrySelfTest.java     |  168 +
 .../cache/CacheRemoveAllSelfTest.java           |   81 +
 .../GridCacheAbstractFailoverSelfTest.java      |   56 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  761 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java |   48 +-
 .../GridCacheAbstractRemoveFailureTest.java     |   23 +
 .../cache/GridCacheAbstractSelfTest.java        |    6 +-
 .../GridCacheAtomicMessageCountSelfTest.java    |    1 +
 .../GridCacheConcurrentTxMultiNodeTest.java     |   10 +-
 ...idCacheConfigurationConsistencySelfTest.java |   14 +-
 ...CacheFullTextQueryMultithreadedSelfTest.java |    4 +-
 .../cache/GridCacheMemoryModeSelfTest.java      |   23 +-
 ...GridCacheMixedPartitionExchangeSelfTest.java |    2 +-
 .../processors/cache/GridCacheOffHeapTest.java  |    5 +-
 .../GridCachePreloadingEvictionsSelfTest.java   |    4 +-
 .../cache/GridCachePutAllFailoverSelfTest.java  |    3 +-
 .../processors/cache/GridCachePutAllTask.java   |   56 +-
 .../cache/GridCacheReloadSelfTest.java          |    6 +-
 .../GridCacheReturnValueTransferSelfTest.java   |    3 +
 .../cache/GridCacheSwapReloadSelfTest.java      |   20 +-
 ...acheTcpClientDiscoveryMultiThreadedTest.java |  190 +
 .../processors/cache/GridCacheTestEntryEx.java  |    6 +
 .../GridCacheVariableTopologySelfTest.java      |   12 +-
 ...ProjectionForCachesOnDaemonNodeSelfTest.java |  147 +
 .../IgniteCacheAbstractStopBusySelfTest.java    |    6 +-
 .../cache/IgniteCacheAbstractTest.java          |    2 +-
 .../IgniteCacheConfigurationTemplateTest.java   |    2 +-
 .../IgniteCacheEntryListenerAbstractTest.java   |    4 +-
 .../cache/IgniteCacheNearLockValueSelfTest.java |  148 +
 .../IgniteCacheP2pUnmarshallingErrorTest.java   |  200 +
 ...gniteCacheP2pUnmarshallingNearErrorTest.java |   59 +
 ...CacheP2pUnmarshallingRebalanceErrorTest.java |   80 +
 .../IgniteCacheP2pUnmarshallingTxErrorTest.java |  109 +
 .../IgniteCachePartitionMapUpdateTest.java      |  226 +
 .../cache/IgniteCachePeekModesAbstractTest.java |   20 +-
 .../cache/IgniteCachePutAllRestartTest.java     |  203 +
 .../cache/IgniteCacheTxPreloadNoWriteTest.java  |   29 +-
 .../cache/IgniteDynamicCacheStartSelfTest.java  |   86 +-
 .../IgniteDynamicClientCacheStartSelfTest.java  |  283 +
 .../cache/IgniteExchangeFutureHistoryTest.java  |   77 +
 .../cache/IgniteSystemCacheOnClientTest.java    |   97 +
 ...gniteTopologyValidatorAbstractCacheTest.java |  183 +
 ...iteTopologyValidatorAbstractTxCacheTest.java |  125 +
 ...ValidatorNearPartitionedAtomicCacheTest.java |   30 +
 ...logyValidatorNearPartitionedTxCacheTest.java |   30 +
 ...logyValidatorPartitionedAtomicCacheTest.java |   49 +
 ...TopologyValidatorPartitionedTxCacheTest.java |   30 +
 ...ologyValidatorReplicatedAtomicCacheTest.java |   49 +
 ...eTopologyValidatorReplicatedTxCacheTest.java |   30 +
 .../cache/IgniteTxMultiNodeAbstractTest.java    |   31 +-
 .../cache/OffHeapTieredTransactionSelfTest.java |  127 +
 .../GridCacheQueueApiSelfAbstractTest.java      |    4 +-
 .../IgniteClientDataStructuresAbstractTest.java |  283 +
 .../IgniteClientDataStructuresTest.java         |   28 +
 ...IgniteClientDiscoveryDataStructuresTest.java |   28 +
 ...CacheLoadingConcurrentGridStartSelfTest.java |  163 +
 .../CacheNoValueClassOnServerNodeTest.java      |  129 +
 .../GridCacheAbstractNodeRestartSelfTest.java   |  101 +-
 .../GridCacheAtomicTimeoutSelfTest.java         |  314 -
 .../GridCacheClientModesAbstractSelfTest.java   |   94 +-
 ...ientModesTcpClientDiscoveryAbstractTest.java |  168 +
 ...GridCacheLoadingConcurrentGridStartTest.java |  154 -
 .../distributed/GridCacheLockAbstractTest.java  |   73 +
 .../distributed/GridCacheMixedModeSelfTest.java |    3 +
 ...ridCachePartitionNotLoadedEventSelfTest.java |   22 +-
 .../IgniteCacheAtomicMessageRecoveryTest.java   |   32 +
 ...niteCacheClientNodeChangingTopologyTest.java | 1803 +++++
 .../IgniteCacheClientNodeConcurrentStart.java   |  105 +
 ...teCacheClientNodePartitionsExchangeTest.java |  632 ++
 .../IgniteCacheMessageRecoveryAbstractTest.java |  175 +
 .../IgniteCachePutGetRestartAbstractTest.java   |  234 +
 .../IgniteCacheTxFairAffinityNodeJoinTest.java  |   35 +
 .../IgniteCacheTxMessageRecoveryTest.java       |   32 +
 ...arDisabledFairAffinityPutGetRestartTest.java |   35 +
 ...iteCacheTxNearDisabledPutGetRestartTest.java |   30 +
 .../IgniteCrossCacheTxStoreSelfTest.java        |  147 +-
 .../distributed/IgniteTxGetAfterStopTest.java   |  131 +
 ...xOriginatingNodeFailureAbstractSelfTest.java |    8 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |    7 +-
 .../dht/GridCacheClientOnlySelfTest.java        |   60 +-
 .../GridCacheDhtClientRemoveFailureTest.java    |   28 +
 ...GridCacheDhtEvictionNearReadersSelfTest.java |   11 +-
 .../dht/GridCacheDhtEvictionSelfTest.java       |   11 +-
 .../dht/GridCacheDhtPreloadSelfTest.java        |    6 +-
 ...icOffHeapTieredMultiNodeFullApiSelfTest.java |   43 +
 ...ledFairAffinityMultiNodeFullApiSelfTest.java |   36 +
 ...achePartitionedNearDisabledLockSelfTest.java |   47 +
 ...ionedNearDisabledOffHeapFullApiSelfTest.java |    8 +-
 ...DisabledOffHeapMultiNodeFullApiSelfTest.java |    8 +-
 ...abledOffHeapTieredAtomicFullApiSelfTest.java |   56 +
 ...earDisabledOffHeapTieredFullApiSelfTest.java |   33 +
 ...edOffHeapTieredMultiNodeFullApiSelfTest.java |   33 +
 ...itionedTxOriginatingNodeFailureSelfTest.java |    2 -
 .../dht/IgniteCacheMultiTxLockSelfTest.java     |   55 +-
 ...rDisabledPrimaryNodeFailureRecoveryTest.java |   31 +
 ...rtitionedPrimaryNodeFailureRecoveryTest.java |   31 +
 ...woBackupsPrimaryNodeFailureRecoveryTest.java |   37 +
 ...ePrimaryNodeFailureRecoveryAbstractTest.java |  533 ++
 ...cClientInvalidPartitionHandlingSelfTest.java |   29 +
 .../GridCacheAtomicClientRemoveFailureTest.java |   28 +
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   37 +-
 ...idCacheAtomicReplicatedFailoverSelfTest.java |    6 +
 ...unctionExcludeNeighborsAbstractSelfTest.java |    3 +-
 ...nlyFairAffinityMultiNodeFullApiSelfTest.java |   36 +
 ...micFairAffinityMultiNodeFullApiSelfTest.java |   35 +
 ...ledFairAffinityMultiNodeFullApiSelfTest.java |   36 +
 .../near/GridCacheAtomicNearOnlySelfTest.java   |   32 -
 ...CacheAtomicOffHeapTieredFullApiSelfTest.java |   32 +
 ...icOffHeapTieredMultiNodeFullApiSelfTest.java |   33 +
 ...derFairAffinityMultiNodeFullApiSelfTest.java |   36 +
 ...yWriteOrderOffHeapTieredFullApiSelfTest.java |   33 +
 ...erOffHeapTieredMultiNodeFullApiSelfTest.java |   33 +
 ...nlyFairAffinityMultiNodeFullApiSelfTest.java |   35 +
 ...idCacheNearOnlyMultiNodeFullApiSelfTest.java |    3 +
 .../near/GridCacheNearOnlySelfTest.java         |   63 +-
 .../near/GridCacheNearOnlyTopologySelfTest.java |    1 +
 ...ionedClientOnlyNoPrimaryFullApiSelfTest.java |    5 +-
 .../GridCachePartitionedEvictionSelfTest.java   |   11 +-
 .../GridCachePartitionedFullApiSelfTest.java    |   32 +
 ...achePartitionedMultiNodeFullApiSelfTest.java |   15 +-
 ...ePartitionedMultiThreadedPutGetSelfTest.java |    6 +-
 .../GridCachePartitionedNodeRestartTest.java    |    4 +-
 ...dCachePartitionedOffHeapFullApiSelfTest.java |    8 +-
 ...titionedOffHeapMultiNodeFullApiSelfTest.java |    8 +-
 ...PartitionedOffHeapTieredFullApiSelfTest.java |   32 +
 ...edOffHeapTieredMultiNodeFullApiSelfTest.java |   72 +
 ...ePartitionedOptimisticTxNodeRestartTest.java |    4 +-
 ...achePartitionedPreloadLifecycleSelfTest.java |    2 +-
 .../GridCachePartitionedTxSalvageSelfTest.java  |   25 +-
 ...idCacheRendezvousAffinityClientSelfTest.java |    4 +
 .../near/IgniteCacheNearOnlyTxTest.java         |  190 +
 .../near/IgniteCacheNearTxRollbackTest.java     |  133 +
 .../near/NoneRebalanceModeSelfTest.java         |   67 +
 ...nedFairAffinityMultiNodeFullApiSelfTest.java |   37 +
 .../GridCacheReplicatedClientOnlySelfTest.java  |   43 -
 .../GridCacheReplicatedFailoverSelfTest.java    |    6 +
 .../GridCacheReplicatedLockSelfTest.java        |    5 +
 .../GridCacheReplicatedNearOnlySelfTest.java    |   43 -
 .../GridCacheReplicatedNodeRestartSelfTest.java |   82 +
 ...idCacheReplicatedOffHeapFullApiSelfTest.java |    8 +-
 ...plicatedOffHeapMultiNodeFullApiSelfTest.java |    8 +-
 ...eReplicatedOffHeapTieredFullApiSelfTest.java |   33 +
 ...edOffHeapTieredMultiNodeFullApiSelfTest.java |   33 +
 ...dezvousAffinityMultiNodeFullApiSelfTest.java |   35 -
 .../GridCacheSyncReplicatedPreloadSelfTest.java |    1 -
 ...CacheReplicatedPreloadLifecycleSelfTest.java |    2 +-
 .../cache/eviction/EvictionAbstractTest.java    | 1056 +++
 .../GridCacheBatchEvictUnswapSelfTest.java      |    5 +-
 ...heConcurrentEvictionConsistencySelfTest.java |   82 +-
 .../GridCacheConcurrentEvictionsSelfTest.java   |   29 +-
 .../GridCacheDistributedEvictionsSelfTest.java  |    5 +-
 .../GridCacheEmptyEntriesAbstractSelfTest.java  |   11 +-
 .../eviction/GridCacheEvictionAbstractTest.java |  484 --
 .../GridCacheEvictionTouchSelfTest.java         |   22 +-
 .../cache/eviction/GridCacheMockEntry.java      |    5 +
 .../fifo/FifoEvictionPolicySelfTest.java        |  262 +
 ...ridCacheFifoBatchEvictionPolicySelfTest.java |  384 -
 .../GridCacheFifoEvictionPolicySelfTest.java    |  372 -
 .../lru/GridCacheLruEvictionPolicySelfTest.java |  417 -
 .../GridCacheLruNearEvictionPolicySelfTest.java |  136 -
 ...heNearOnlyLruNearEvictionPolicySelfTest.java |  171 -
 .../eviction/lru/LruEvictionPolicySelfTest.java |  353 +
 .../lru/LruNearEvictionPolicySelfTest.java      |  140 +
 .../LruNearOnlyNearEvictionPolicySelfTest.java  |  172 +
 .../GridCacheRandomEvictionPolicySelfTest.java  |  258 -
 .../RandomEvictionPolicyCacheSizeSelfTest.java  |   78 +
 .../random/RandomEvictionPolicySelfTest.java    |  357 +
 .../SortedEvictionPolicyPerformanceTest.java    |  134 +
 .../sorted/SortedEvictionPolicySelfTest.java    |  266 +
 .../IgniteCacheExpiryPolicyAbstractTest.java    |    2 +-
 .../IgniteCacheExpiryPolicyTestSuite.java       |    2 +
 .../expiry/IgniteCacheTtlCleanupSelfTest.java   |   85 +
 ...CacheLocalOffHeapAndSwapMetricsSelfTest.java |  412 +
 ...LocalAtomicOffHeapTieredFullApiSelfTest.java |   32 +
 .../GridCacheLocalIsolatedNodesSelfTest.java    |  118 +
 .../GridCacheLocalOffHeapFullApiSelfTest.java   |    6 +-
 ...dCacheLocalOffHeapTieredFullApiSelfTest.java |   32 +
 .../GridCacheSwapScanQueryAbstractSelfTest.java |   26 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |    6 +-
 .../continuous/GridEventConsumeSelfTest.java    |   93 +-
 .../DataStreamProcessorSelfTest.java            |    1 +
 .../DataStreamerMultiThreadedSelfTest.java      |  110 +
 .../igfs/IgfsClientCacheSelfTest.java           |  133 +
 .../processors/igfs/IgfsCommonAbstractTest.java |   10 -
 .../processors/igfs/IgfsOneClientNodeTest.java  |  131 +
 .../processors/igfs/IgfsSizeSelfTest.java       |    2 +-
 .../processors/igfs/IgfsStreamsSelfTest.java    |    4 +-
 .../cache/GridCacheCommandHandlerSelfTest.java  |   10 +-
 .../service/ClosureServiceClientsNodesTest.java |  251 +
 .../service/GridServiceClientNodeTest.java      |   81 +
 .../GridServiceReassignmentSelfTest.java        |    2 +-
 .../util/nio/GridNioDelimitedBufferTest.java    |  112 +
 ...idFileSwapSpaceSpiMultithreadedLoadTest.java |    4 +-
 .../loadtests/GridCacheMultiNodeLoadTest.java   |    5 +-
 .../GridContinuousOperationsLoadTest.java       |    3 +-
 .../GridCachePartitionedAtomicLongLoadTest.java |    6 +-
 .../loadtests/hashmap/GridCacheTestContext.java |    3 +-
 .../swap/GridSwapEvictAllBenchmark.java         |    6 +-
 .../logger/java/IgniteJavaLoggerTest.java       |   65 -
 .../ignite/logger/java/JavaLoggerTest.java      |   65 +
 .../OptimizedMarshallerNodeFailoverTest.java    |    4 +-
 ...GridMessagingNoPeerClassLoadingSelfTest.java |    7 +-
 .../ignite/messaging/GridMessagingSelfTest.java |   13 +-
 .../GridTcpCommunicationSpiConfigSelfTest.java  |    1 -
 .../discovery/AbstractDiscoverySelfTest.java    |    8 +-
 ...pClientDiscoveryMarshallerCheckSelfTest.java |   76 +
 .../tcp/TcpClientDiscoverySelfTest.java         |  692 --
 .../tcp/TcpClientDiscoverySpiMulticastTest.java |  129 +
 .../tcp/TcpClientDiscoverySpiSelfTest.java      | 1171 +++
 .../tcp/TcpDiscoveryConcurrentStartTest.java    |   61 +-
 .../tcp/TcpDiscoveryMultiThreadedTest.java      |   18 +-
 .../discovery/tcp/TcpDiscoveryRestartTest.java  |  199 +
 .../spi/discovery/tcp/TcpDiscoverySelfTest.java |   72 +-
 .../GridSwapSpaceSpiAbstractSelfTest.java       |    2 +-
 .../stream/socket/SocketStreamerSelfTest.java   |  315 +
 .../ignite/stream/socket/package-info.java      |   21 +
 .../testframework/GridSpiTestContext.java       |   30 +-
 .../ignite/testframework/GridTestUtils.java     |   15 +
 .../testframework/junits/GridAbstractTest.java  |   67 +-
 .../junits/cache/TestCacheSession.java          |   18 +
 .../cache/TestThreadLocalCacheSession.java      |   15 +
 .../junits/common/GridCommonAbstractTest.java   |  119 +-
 .../junits/logger/GridTestLog4jLogger.java      |   10 +-
 .../ignite/testsuites/IgniteBasicTestSuite.java |    7 +
 .../IgniteCacheDataStructuresSelfTestSuite.java |    3 +
 .../IgniteCacheEvictionSelfTestSuite.java       |   14 +-
 .../IgniteCacheFailoverTestSuite.java           |   18 +-
 .../IgniteCacheFullApiSelfTestSuite.java        |   27 +-
 .../IgniteCacheMetricsSelfTestSuite.java        |    1 +
 .../IgniteCacheNearOnlySelfTestSuite.java       |   16 +-
 ...niteCacheP2pUnmarshallingErrorTestSuite.java |   41 +
 .../testsuites/IgniteCacheRestartTestSuite.java |   16 +-
 .../IgniteCacheTcpClientDiscoveryTestSuite.java |   47 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |  296 +-
 .../testsuites/IgniteCacheTestSuite2.java       |  143 +
 .../testsuites/IgniteCacheTestSuite3.java       |  142 +
 .../testsuites/IgniteCacheTestSuite4.java       |  140 +
 .../IgniteCacheTxRecoverySelfTestSuite.java     |    4 +
 .../ignite/testsuites/IgniteIgfsTestSuite.java  |    3 +
 .../testsuites/IgniteKernalSelfTestSuite.java   |    7 +-
 .../testsuites/IgniteLoggingSelfTestSuite.java  |    2 +-
 .../IgniteSpiDiscoverySelfTestSuite.java        |    4 +-
 .../testsuites/IgniteStreamTestSuite.java       |   39 +
 .../IgniteTopologyValidatorTestSuit.java        |   43 +
 .../testsuites/IgniteUtilSelfTestSuite.java     |    1 +
 .../ignite/util/TestTcpCommunicationSpi.java    |   54 +
 modules/extdata/p2p/pom.xml                     |    2 +-
 .../CacheNoValueClassOnServerTestClient.java    |   88 +
 .../apache/ignite/tests/p2p/cache/Person.java   |   42 +
 .../CacheConfigurationP2PTestClient.java        |    1 -
 modules/extdata/uri/pom.xml                     |    2 +-
 modules/gce/README.txt                          |   32 +
 modules/gce/licenses/apache-2.0.txt             |  202 +
 modules/gce/pom.xml                             |   92 +
 .../gce/TcpDiscoveryGoogleStorageIpFinder.java  |  383 +
 .../tcp/ipfinder/gce/package-info.java          |   22 +
 ...pDiscoveryGoogleStorageIpFinderSelfTest.java |   73 +
 .../tcp/ipfinder/gce/package-info.java          |   22 +
 .../ignite/testsuites/IgniteGCETestSuite.java   |   71 +
 modules/geospatial/pom.xml                      |    2 +-
 .../query/h2/GridH2IndexingGeoSelfTest.java     |   72 +-
 modules/hadoop/pom.xml                          |    2 +-
 .../fs/IgniteHadoopIgfsSecondaryFileSystem.java |  165 +-
 .../hadoop/fs/v1/IgniteHadoopFileSystem.java    |  107 +-
 .../hadoop/fs/v2/IgniteHadoopFileSystem.java    |   32 +-
 .../processors/hadoop/HadoopDefaultJobInfo.java |    3 +
 .../processors/hadoop/HadoopProcessor.java      |    2 +-
 .../internal/processors/hadoop/HadoopUtils.java |   10 +-
 .../hadoop/SecondaryFileSystemProvider.java     |   53 +-
 .../hadoop/fs/HadoopDistributedFileSystem.java  |   91 -
 .../hadoop/fs/HadoopFileSystemsUtils.java       |   17 -
 .../hadoop/fs/HadoopLazyConcurrentMap.java      |  204 +
 .../processors/hadoop/igfs/HadoopIgfsEx.java    |    6 +
 .../hadoop/igfs/HadoopIgfsInProc.java           |  170 +-
 .../processors/hadoop/igfs/HadoopIgfsIpcIo.java |    5 +-
 .../hadoop/igfs/HadoopIgfsOutProc.java          |   33 +-
 .../hadoop/igfs/HadoopIgfsWrapper.java          |   19 +-
 .../hadoop/jobtracker/HadoopJobTracker.java     |   19 +-
 .../hadoop/taskexecutor/HadoopRunnableTask.java |    3 +
 .../external/HadoopExternalTaskExecutor.java    |    3 +
 .../processors/hadoop/v2/HadoopV2Context.java   |   10 +-
 .../processors/hadoop/v2/HadoopV2Job.java       |   11 +-
 .../hadoop/v2/HadoopV2TaskContext.java          |   13 +-
 .../HadoopIgfs20FileSystemAbstractSelfTest.java |   56 +-
 ...oopSecondaryFileSystemConfigurationTest.java |    4 +-
 .../igfs/IgfsNearOnlyMultiNodeSelfTest.java     |    5 +-
 .../IgniteHadoopFileSystemAbstractSelfTest.java |   63 +-
 .../IgniteHadoopFileSystemClientSelfTest.java   |    2 +-
 .../IgniteHadoopFileSystemIpcCacheSelfTest.java |    2 +
 .../HadoopDefaultMapReducePlannerSelfTest.java  |    8 +-
 .../hadoop/HadoopFileSystemsTest.java           |   23 +-
 .../collections/HadoopSkipListSelfTest.java     |    4 +-
 .../testsuites/IgniteHadoopTestSuite.java       |    2 +-
 modules/hibernate/pom.xml                       |    2 +-
 .../HibernateAccessStrategyAdapter.java         |   10 +-
 .../hibernate/HibernateCollectionRegion.java    |    2 +-
 .../cache/hibernate/HibernateEntityRegion.java  |    2 +-
 .../hibernate/HibernateGeneralDataRegion.java   |    2 +-
 .../hibernate/HibernateNaturalIdRegion.java     |    2 +-
 .../HibernateNonStrictAccessStrategy.java       |    4 +-
 .../hibernate/HibernateQueryResultsRegion.java  |    2 +-
 .../HibernateReadOnlyAccessStrategy.java        |    2 +-
 .../HibernateReadWriteAccessStrategy.java       |    2 +-
 .../ignite/cache/hibernate/HibernateRegion.java |    4 +-
 .../cache/hibernate/HibernateRegionFactory.java |   10 +-
 .../hibernate/HibernateTimestampsRegion.java    |    2 +-
 .../HibernateTransactionalAccessStrategy.java   |    4 +-
 .../HibernateTransactionalDataRegion.java       |    2 +-
 .../CacheHibernateStoreSessionListener.java     |  216 +
 .../HibernateL2CacheConfigurationSelfTest.java  |    2 +-
 .../hibernate/HibernateL2CacheSelfTest.java     |    2 +-
 ...heHibernateStoreSessionListenerSelfTest.java |  228 +
 .../testsuites/IgniteHibernateTestSuite.java    |    2 +
 modules/indexing/pom.xml                        |    2 +-
 .../processors/query/h2/IgniteH2Indexing.java   |  203 +-
 .../query/h2/opt/GridH2AbstractKeyValueRow.java |  110 +-
 .../query/h2/opt/GridH2KeyValueRowOffheap.java  |   11 +-
 .../query/h2/opt/GridH2KeyValueRowOnheap.java   |    6 +-
 .../query/h2/opt/GridH2RowDescriptor.java       |   14 +-
 .../processors/query/h2/opt/GridH2Table.java    |   10 +-
 .../query/h2/opt/GridH2ValueCacheObject.java    |  191 +
 .../query/h2/opt/GridLuceneIndex.java           |   84 +-
 .../query/h2/sql/GridSqlFunction.java           |    6 +-
 .../query/h2/sql/GridSqlOperationType.java      |    2 +-
 .../query/h2/sql/GridSqlPlaceholder.java        |   51 +
 .../processors/query/h2/sql/GridSqlQuery.java   |   20 +
 .../query/h2/sql/GridSqlQueryParser.java        |   16 +-
 .../query/h2/sql/GridSqlQuerySplitter.java      |   15 +-
 .../processors/query/h2/sql/GridSqlSelect.java  |    2 +-
 .../processors/query/h2/sql/GridSqlUnion.java   |    2 +-
 .../query/h2/twostep/GridMapQueryExecutor.java  |   61 +-
 .../query/h2/twostep/GridMergeIndex.java        |    6 +-
 .../h2/twostep/GridMergeIndexUnsorted.java      |    4 +-
 .../h2/twostep/GridReduceQueryExecutor.java     |  164 +-
 .../query/h2/twostep/GridResultPage.java        |   80 +-
 .../query/h2/twostep/msg/GridH2Array.java       |  124 +
 .../query/h2/twostep/msg/GridH2Boolean.java     |  112 +
 .../query/h2/twostep/msg/GridH2Byte.java        |  113 +
 .../query/h2/twostep/msg/GridH2Bytes.java       |  113 +
 .../query/h2/twostep/msg/GridH2CacheObject.java |  148 +
 .../query/h2/twostep/msg/GridH2Date.java        |  115 +
 .../query/h2/twostep/msg/GridH2Decimal.java     |  134 +
 .../query/h2/twostep/msg/GridH2Double.java      |  113 +
 .../query/h2/twostep/msg/GridH2Float.java       |  113 +
 .../query/h2/twostep/msg/GridH2Geometry.java    |  134 +
 .../query/h2/twostep/msg/GridH2Integer.java     |  113 +
 .../query/h2/twostep/msg/GridH2JavaObject.java  |  113 +
 .../query/h2/twostep/msg/GridH2Long.java        |  113 +
 .../query/h2/twostep/msg/GridH2Null.java        |   78 +
 .../query/h2/twostep/msg/GridH2Short.java       |  113 +
 .../query/h2/twostep/msg/GridH2String.java      |  115 +
 .../query/h2/twostep/msg/GridH2Time.java        |  116 +
 .../query/h2/twostep/msg/GridH2Timestamp.java   |  133 +
 .../query/h2/twostep/msg/GridH2Uuid.java        |  133 +
 .../h2/twostep/msg/GridH2ValueMessage.java      |   49 +
 .../twostep/msg/GridH2ValueMessageFactory.java  |  201 +
 .../GridCacheAbstractFieldsQuerySelfTest.java   | 1282 ----
 .../cache/GridCacheCrossCacheQuerySelfTest.java |   68 +-
 .../cache/GridCacheOffHeapAndSwapSelfTest.java  |   11 +-
 .../cache/GridCacheOffHeapSelfTest.java         |   11 +-
 .../GridCacheOffheapIndexEntryEvictTest.java    |  200 +
 .../cache/GridCacheOffheapIndexGetSelfTest.java |  123 +
 .../cache/GridCacheQueryMetricsSelfTest.java    |  106 +-
 .../GridCacheQuerySerializationSelfTest.java    |  144 +
 ...idCacheReduceQueryMultithreadedSelfTest.java |   10 +-
 .../cache/GridIndexingWithNoopSwapSelfTest.java |   23 +-
 .../IgniteCacheAbstractFieldsQuerySelfTest.java |  256 +-
 .../cache/IgniteCacheAbstractQuerySelfTest.java |    6 +-
 ...acheConfigurationPrimitiveTypesSelfTest.java |  104 +
 ...niteCacheP2pUnmarshallingQueryErrorTest.java |   57 +
 ...QueryMultiThreadedOffHeapTieredSelfTest.java |   37 +
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |   52 +-
 ...artitionedFieldsQueryP2PEnabledSelfTest.java |   34 -
 ...GridCachePartitionedFieldsQuerySelfTest.java |  115 -
 ...rtitionedFieldsQueryP2PDisabledSelfTest.java |   34 -
 ...artitionedFieldsQueryP2PEnabledSelfTest.java |   34 +
 ...eReplicatedFieldsQueryP2PEnableSelfTest.java |   34 -
 .../GridCacheReplicatedFieldsQuerySelfTest.java |  157 -
 ...eplicatedFieldsQueryP2PDisabledSelfTest.java |   34 -
 ...ReplicatedFieldsQueryP2PEnabledSelfTest.java |   34 +
 .../local/IgniteCacheLocalQuerySelfTest.java    |    6 +
 ...dCacheAbstractReduceFieldsQuerySelfTest.java |   11 +-
 ...cheReduceFieldsQueryPartitionedSelfTest.java |    5 +-
 .../cache/ttl/CacheTtlAbstractSelfTest.java     |    6 +-
 .../query/h2/GridH2IndexRebuildTest.java        |   18 +-
 .../h2/GridIndexingSpiAbstractSelfTest.java     |  132 +-
 .../h2/sql/AbstractH2CompareQueryTest.java      |   49 +-
 .../query/h2/sql/BaseH2CompareQueryTest.java    |   48 +-
 .../query/h2/sql/GridQueryParsingTest.java      |    9 +
 .../query/h2/sql/H2CompareBigQueryTest.java     |    2 +-
 .../IgniteCacheQuerySelfTestSuite.java          |   14 +-
 .../IgniteCacheWithIndexingTestSuite.java       |    5 +
 .../processors/query/h2/sql/bigQuery.sql        |    2 +-
 modules/jcl/pom.xml                             |    2 +-
 .../ignite/logger/jcl/IgniteJclLogger.java      |  167 -
 .../org/apache/ignite/logger/jcl/JclLogger.java |  167 +
 .../ignite/logger/jcl/IgniteJclLoggerTest.java  |   48 -
 .../apache/ignite/logger/jcl/JclLoggerTest.java |   48 +
 .../ignite/testsuites/IgniteJclTestSuite.java   |    2 +-
 modules/jta/pom.xml                             |    2 +-
 .../processors/cache/jta/CacheJtaManager.java   |    4 +-
 modules/log4j/pom.xml                           |    2 +-
 .../apache/ignite/logger/log4j/Log4JLogger.java |    8 +-
 modules/mesos/README.txt                        |   28 +
 modules/mesos/licenses/apache-2.0.txt           |  202 +
 modules/mesos/licenses/jetty-epl-license.txt    |   69 +
 modules/mesos/pom.xml                           |  101 +
 .../apache/ignite/mesos/ClusterProperties.java  |  519 ++
 .../apache/ignite/mesos/IgniteFramework.java    |  119 +
 .../apache/ignite/mesos/IgniteScheduler.java    |  361 +
 .../org/apache/ignite/mesos/IgniteTask.java     |   86 +
 .../org/apache/ignite/mesos/package-info.java   |   22 +
 .../ignite/mesos/resource/IgniteProvider.java   |  234 +
 .../ignite/mesos/resource/JettyServer.java      |   61 +
 .../ignite/mesos/resource/ResourceHandler.java  |  142 +
 .../ignite/mesos/resource/ResourceProvider.java |  120 +
 .../ignite/mesos/resource/package-info.java     |   22 +
 .../main/resources/ignite-default-config.xml    |   35 +
 .../org/apache/ignite/IgniteMesosTestSuite.java |   38 +
 .../ignite/mesos/IgniteSchedulerSelfTest.java   |  464 ++
 modules/rest-http/pom.xml                       |    2 +-
 .../http/jetty/GridJettyRestHandler.java        |    3 +
 modules/scalar/pom.xml                          |    2 +-
 .../ignite/scalar/ScalarConversions.scala       |    8 -
 .../scalar/tests/ScalarCacheQueriesSpec.scala   |  154 +-
 .../ignite/scalar/tests/ScalarCacheSpec.scala   |   23 +-
 .../scalar/tests/ScalarConversionsSpec.scala    |   43 +-
 .../scalar/tests/ScalarProjectionSpec.scala     |  128 +-
 .../scalar/tests/ScalarReturnableSpec.scala     |   41 +-
 modules/schedule/pom.xml                        |    2 +-
 modules/schema-import/pom.xml                   |    8 +-
 .../ignite/schema/generator/CodeGenerator.java  |  105 +-
 .../ignite/schema/ui/SchemaImportApp.java       |    8 +-
 modules/slf4j/pom.xml                           |    2 +-
 .../ignite/logger/slf4j/GridSlf4jLogger.java    |  138 -
 .../apache/ignite/logger/slf4j/Slf4jLogger.java |  138 +
 modules/spring/pom.xml                          |   16 +-
 .../spring/CacheSpringStoreSessionListener.java |  207 +
 .../util/spring/IgniteSpringHelperImpl.java     |  217 +-
 ...CacheSpringStoreSessionListenerSelfTest.java |  197 +
 .../ignite/internal/GridFactorySelfTest.java    |    3 +-
 .../IgniteStartFromStreamConfigurationTest.java |   50 +
 .../testsuites/IgniteSpringTestSuite.java       |    5 +
 modules/ssh/pom.xml                             |    2 +-
 ...gniteProjectionStartStopRestartSelfTest.java |   26 +-
 modules/tools/pom.xml                           |    2 +-
 modules/urideploy/pom.xml                       |    2 +-
 .../uri/GridUriDeploymentClassLoader.java       |    4 +-
 .../spi/deployment/uri/UriDeploymentSpi.java    |    2 +-
 .../licenses/jcraft-revised-bsd.txt             |   28 -
 modules/visor-console/pom.xml                   |    8 +-
 .../ignite/visor/commands/VisorConsole.scala    |  316 +-
 .../visor/commands/VisorConsoleCommand.scala    |   77 -
 .../ignite/visor/commands/VisorTextTable.scala  |  539 --
 .../visor/commands/ack/VisorAckCommand.scala    |   42 +-
 .../commands/alert/VisorAlertCommand.scala      |   35 +-
 .../commands/cache/VisorCacheClearCommand.scala |   51 +-
 .../commands/cache/VisorCacheCommand.scala      |   36 +-
 .../commands/cache/VisorCacheScanCommand.scala  |   60 +-
 .../commands/cache/VisorCacheStopCommand.scala  |   30 +-
 .../commands/cache/VisorCacheSwapCommand.scala  |   66 +-
 .../commands/common/VisorConsoleCommand.scala   |   90 +
 .../visor/commands/common/VisorTextTable.scala  |  543 ++
 .../config/VisorConfigurationCommand.scala      |  438 +-
 .../commands/deploy/VisorDeployCommand.scala    |   47 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |   58 +-
 .../commands/events/VisorEventsCommand.scala    |  338 +-
 .../visor/commands/gc/VisorGcCommand.scala      |  130 +-
 .../visor/commands/kill/VisorKillCommand.scala  |   53 +-
 .../visor/commands/node/VisorNodeCommand.scala  |   49 +-
 .../visor/commands/ping/VisorPingCommand.scala  |   41 +-
 .../commands/start/VisorStartCommand.scala      |   34 +-
 .../commands/tasks/VisorTasksCommand.scala      |   78 +-
 .../commands/top/VisorTopologyCommand.scala     |   36 +-
 .../visor/commands/vvm/VisorVvmCommand.scala    |   32 +-
 .../scala/org/apache/ignite/visor/visor.scala   |  349 +-
 .../ignite/visor/VisorRuntimeBaseSpec.scala     |    2 +-
 .../ignite/visor/VisorTextTableSpec.scala       |    3 +-
 .../visor/commands/VisorArgListSpec.scala       |   60 +-
 .../commands/VisorFileNameCompleterSpec.scala   |   34 +-
 .../commands/ack/VisorAckCommandSpec.scala      |   20 +-
 .../commands/alert/VisorAlertCommandSpec.scala  |   68 +-
 .../cache/VisorCacheClearCommandSpec.scala      |   48 +-
 .../commands/cache/VisorCacheCommandSpec.scala  |   66 +-
 .../config/VisorConfigurationCommandSpec.scala  |    8 +-
 .../cswap/VisorCacheSwapCommandSpec.scala       |   24 +-
 .../deploy/VisorDeployCommandSpec.scala         |   10 +-
 .../disco/VisorDiscoveryCommandSpec.scala       |   46 +-
 .../events/VisorEventsCommandSpec.scala         |   28 +-
 .../visor/commands/gc/VisorGcCommandSpec.scala  |   30 +-
 .../commands/help/VisorHelpCommandSpec.scala    |   57 +-
 .../commands/kill/VisorKillCommandSpec.scala    |   58 +-
 .../commands/log/VisorLogCommandSpec.scala      |   10 +-
 .../commands/mem/VisorMemoryCommandSpec.scala   |   77 +-
 .../commands/node/VisorNodeCommandSpec.scala    |   22 +-
 .../commands/open/VisorOpenCommandSpec.scala    |   16 +-
 .../commands/ping/VisorPingCommandSpec.scala    |   16 +-
 .../commands/start/VisorStartCommandSpec.scala  |  126 +-
 .../commands/tasks/VisorTasksCommandSpec.scala  |  112 +-
 .../commands/top/VisorTopologyCommandSpec.scala |   52 +-
 .../commands/vvm/VisorVvmCommandSpec.scala      |   30 +-
 modules/visor-plugins/pom.xml                   |    2 +-
 modules/web/pom.xml                             |    2 +-
 .../config/benchmark-client-mode.properties     |   89 +
 modules/yardstick/pom.xml                       |    2 +-
 .../cache/IgniteCacheAbstractBenchmark.java     |    2 +-
 .../jdbc/IgniteJdbcStoreAbstractBenchmark.java  |    4 +-
 parent/pom.xml                                  |    9 +
 pom.xml                                         |  362 +-
 scripts/git-apply-patch.sh                      |    8 +-
 scripts/git-format-patch.sh                     |   16 +-
 scripts/git-patch-functions.sh                  |   36 +-
 scripts/git-patch-prop.sh                       |    2 +-
 1021 files changed, 65871 insertions(+), 37944 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1f516a25/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
index 65a7f1b,30be424..c5d70a5
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
@@@ -212,14 -202,13 +205,13 @@@ public class VisorCacheMetrics implemen
          cm.avgPutTime = m.getAveragePutTime();
          cm.avgRemovalTime = m.getAverageRemoveTime();
  
-         cm.readsPerSec = (int)(MICROSECONDS_IN_SECOND * 1.f / m.getAverageGetTime());
-         cm.writesPerSec = (int)(MICROSECONDS_IN_SECOND * 1.f / m.getAveragePutTime());
-         cm.hitsPerSec = -1;
-         cm.missesPerSec = (int)(MICROSECONDS_IN_SECOND * 1.f / m.getAverageRemoveTime());
-         cm.commitsPerSec = (int)(MICROSECONDS_IN_SECOND * 1.f / m.getAverageTxCommitTime());
-         cm.rollbacksPerSec = (int)(MICROSECONDS_IN_SECOND * 1.f / m.getAverageTxRollbackTime());
+         cm.readsPerSec = perSecond(m.getAverageGetTime());
+         cm.putsPerSec = perSecond(m.getAveragePutTime());
+         cm.removalsPerSec = perSecond(m.getAverageRemoveTime());
+         cm.commitsPerSec = perSecond(m.getAverageTxCommitTime());
+         cm.rollbacksPerSec = perSecond(m.getAverageTxRollbackTime());
  
 -        cm.qryMetrics = VisorCacheQueryMetrics.from(c.context().queries().metrics());
 +        cm.qryMetrics = VisorCacheQueryMetrics.from(c.queryMetrics());
  
          cm.dhtEvictQueueCurrSize = m.getDhtEvictQueueCurrentSize();
          cm.txThreadMapSize = m.getTxThreadMapSize();

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


[07/17] incubator-ignite git commit: IGNITE-941 - Read-only mode for transactional cache

Posted by sb...@apache.org.
IGNITE-941 - Read-only mode for transactional cache


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

Branch: refs/heads/ignite-gg-10299
Commit: b4d19159a76559152435946d1fff421679712599
Parents: b58c892
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Thu Jun 4 18:08:35 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Thu Jun 4 18:08:35 2015 -0700

----------------------------------------------------------------------
 .../apache/ignite/internal/IgniteKernal.java    |  2 +
 .../ignite/internal/IgniteNodeAttributes.java   |  5 +-
 .../processors/cache/GridCacheProcessor.java    |  2 +-
 .../transactions/IgniteTxLocalAdapter.java      | 29 +++++++--
 .../IgniteTxRollbackCheckedException.java       |  9 +++
 ...acheReadOnlyTransactionalClientSelfTest.java | 68 +++++++++++++++-----
 6 files changed, 94 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b4d19159/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 a0d97c7..9bc6cce 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
@@ -1168,6 +1168,8 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
 
         add(ATTR_CLIENT_MODE, cfg.isClientMode());
 
+        add(ATTR_CONSISTENCY_CHECK_SKIPPED, getBoolean(IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK));
+
         // Build a string from JVM arguments, because parameters with spaces are split.
         SB jvmArgs = new SB(512);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b4d19159/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
index 98cc3a7..928db5e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
@@ -126,9 +126,12 @@ public final class IgniteNodeAttributes {
     /** Security subject for authenticated node. */
     public static final String ATTR_SECURITY_SUBJECT = ATTR_PREFIX + ".security.subject";
 
-    /** Cache interceptors. */
+    /** Client mode flag. */
     public static final String ATTR_CLIENT_MODE = ATTR_PREFIX + ".cache.client";
 
+    /** Configuration consistency check disabled flag. */
+    public static final String ATTR_CONSISTENCY_CHECK_SKIPPED = ATTR_PREFIX + ".consistency.check.skipped";
+
     /**
      * Enforces singleton.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b4d19159/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 bbd5fe9..871cd77 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
@@ -674,7 +674,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
             if (!getBoolean(IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK)) {
                 for (ClusterNode n : ctx.discovery().remoteNodes()) {
-                    if (Boolean.valueOf(n.<String>attribute(IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK)))
+                    if (n.attribute(ATTR_CONSISTENCY_CHECK_SKIPPED))
                         continue;
 
                     checkTransactionConfiguration(n);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b4d19159/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 4063be2..8b5eaec 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -2535,6 +2535,19 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
     }
 
     /**
+     * @param cacheCtx Cache context.
+     * @throws IgniteCheckedException If updates are not allowed.
+     */
+    private void checkUpdatesAllowed(GridCacheContext cacheCtx) throws IgniteCheckedException {
+        if (!cacheCtx.updatesAllowed()) {
+            throw new IgniteTxRollbackCheckedException(new CacheException(
+                "Updates are not allowed for transactional cache: " + cacheCtx.name() + ". Configure " +
+                "persistence store on client or use remote closure execution to start transactions " +
+                "from server nodes."));
+        }
+    }
+
+    /**
      * Internal method for all put and transform operations. Only one of {@code map}, {@code transformMap}
      * maps must be non-null.
      *
@@ -2561,8 +2574,12 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
     ) {
         assert filter == null || invokeMap == null;
 
-        if (!cacheCtx.updatesAllowed())
-            throw new CacheException("Updates are not allowed for cache: " + cacheCtx.name());
+        try {
+            checkUpdatesAllowed(cacheCtx);
+        }
+        catch (IgniteCheckedException e) {
+            return new GridFinishedFuture(e);
+        }
 
         cacheCtx.checkSecurity(SecurityPermission.CACHE_PUT);
 
@@ -2784,8 +2801,12 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
         @Nullable GridCacheEntryEx cached,
         final boolean retval,
         @Nullable final CacheEntryPredicate[] filter) {
-        if (!cacheCtx.updatesAllowed())
-            throw new CacheException("Updates are not allowed for cache: " + cacheCtx.name());
+        try {
+            checkUpdatesAllowed(cacheCtx);
+        }
+        catch (IgniteCheckedException e) {
+            return new GridFinishedFuture(e);
+        }
 
         cacheCtx.checkSecurity(SecurityPermission.CACHE_REMOVE);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b4d19159/modules/core/src/main/java/org/apache/ignite/internal/transactions/IgniteTxRollbackCheckedException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/transactions/IgniteTxRollbackCheckedException.java b/modules/core/src/main/java/org/apache/ignite/internal/transactions/IgniteTxRollbackCheckedException.java
index 1d1e022..f8ee265 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/transactions/IgniteTxRollbackCheckedException.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/transactions/IgniteTxRollbackCheckedException.java
@@ -36,6 +36,15 @@ public class IgniteTxRollbackCheckedException extends IgniteCheckedException {
     }
 
     /**
+     * Creates new exception with given nested exception.
+     *
+     * @param cause Nested exception.
+     */
+    public IgniteTxRollbackCheckedException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
      * Creates new rollback exception with given error message and optional nested exception.
      *
      * @param msg Error message.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b4d19159/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadOnlyTransactionalClientSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadOnlyTransactionalClientSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadOnlyTransactionalClientSelfTest.java
index e2a1def..f2c38e1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadOnlyTransactionalClientSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadOnlyTransactionalClientSelfTest.java
@@ -31,6 +31,8 @@ import javax.cache.*;
 import javax.cache.configuration.*;
 import javax.cache.processor.*;
 
+import static org.apache.ignite.IgniteSystemProperties.*;
+
 /**
  * Tests for read-only transactional cache client.
  */
@@ -39,6 +41,9 @@ public class CacheReadOnlyTransactionalClientSelfTest extends GridCommonAbstract
     private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
 
     /** */
+    private static final String CACHE_NAME = "test-cache";
+
+    /** */
     private boolean client;
 
     /** */
@@ -55,6 +60,7 @@ public class CacheReadOnlyTransactionalClientSelfTest extends GridCommonAbstract
 
         CacheConfiguration cc = new CacheConfiguration();
 
+        cc.setName(CACHE_NAME);
         cc.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
         cc.setCacheStoreFactory(factory);
 
@@ -100,7 +106,7 @@ public class CacheReadOnlyTransactionalClientSelfTest extends GridCommonAbstract
 
         Ignite ignite = startGrid();
 
-        IgniteCache cache = ignite.cache(null);
+        IgniteCache cache = ignite.cache(CACHE_NAME);
 
         cache.get(0);
         cache.getAll(F.asSet(0, 1));
@@ -140,6 +146,25 @@ public class CacheReadOnlyTransactionalClientSelfTest extends GridCommonAbstract
     /**
      * @throws Exception If failed.
      */
+    public void testDisabledConsistencyCheck() throws Exception {
+        client = false;
+        nearEnabled = false;
+        factory = new Factory2();
+
+        System.setProperty(IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK, "true");
+
+        startGrid("client-1");
+
+        factory = new Factory1();
+
+        System.clearProperty(IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK);
+
+        startGrid("client-2");
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testNoStoreNearDisabled() throws Exception {
         nearEnabled = false;
 
@@ -164,7 +189,7 @@ public class CacheReadOnlyTransactionalClientSelfTest extends GridCommonAbstract
 
         Ignite ignite = startGrid();
 
-        IgniteCache cache = ignite.cache(null);
+        IgniteCache cache = ignite.cache(CACHE_NAME);
 
         cache.get(0);
         cache.getAll(F.asSet(0, 1));
@@ -173,91 +198,104 @@ public class CacheReadOnlyTransactionalClientSelfTest extends GridCommonAbstract
             cache.getAndPut(0, 0);
         }
         catch (CacheException e) {
-            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+            assert e.getMessage().startsWith("Updates are not allowed for transactional cache: " + CACHE_NAME + ".") :
+                e.getMessage();
         }
 
         try {
             cache.getAndPutIfAbsent(0, 0);
         }
         catch (CacheException e) {
-            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+            assert e.getMessage().startsWith("Updates are not allowed for transactional cache: " + CACHE_NAME + ".") :
+                e.getMessage();
         }
 
         try {
             cache.getAndRemove(0);
         }
         catch (CacheException e) {
-            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+            assert e.getMessage().startsWith("Updates are not allowed for transactional cache: " + CACHE_NAME + ".") :
+                e.getMessage();
         }
 
         try {
             cache.getAndReplace(0, 0);
         }
         catch (CacheException e) {
-            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+            assert e.getMessage().startsWith("Updates are not allowed for transactional cache: " + CACHE_NAME + ".") :
+                e.getMessage();
         }
 
         try {
             cache.put(0, 0);
         }
         catch (CacheException e) {
-            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+            assert e.getMessage().startsWith("Updates are not allowed for transactional cache: " + CACHE_NAME + ".") :
+                e.getMessage();
         }
 
         try {
             cache.putAll(F.asMap(0, 0, 1, 1));
         }
         catch (CacheException e) {
-            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+            assert e.getMessage().startsWith("Updates are not allowed for transactional cache: " + CACHE_NAME + ".") :
+                e.getMessage();
         }
 
         try {
             cache.putIfAbsent(0, 0);
         }
         catch (CacheException e) {
-            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+            assert e.getMessage().startsWith("Updates are not allowed for transactional cache: " + CACHE_NAME + ".") :
+                e.getMessage();
         }
 
         try {
             cache.remove(0);
         }
         catch (CacheException e) {
-            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+            assert e.getMessage().startsWith("Updates are not allowed for transactional cache: " + CACHE_NAME + ".") :
+                e.getMessage();
         }
 
         try {
             cache.remove(0, 0);
         }
         catch (CacheException e) {
-            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+            assert e.getMessage().startsWith("Updates are not allowed for transactional cache: " + CACHE_NAME + ".") :
+                e.getMessage();
         }
 
         try {
             cache.removeAll(F.asSet(0, 1));
         }
         catch (CacheException e) {
-            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+            assert e.getMessage().startsWith("Updates are not allowed for transactional cache: " + CACHE_NAME + ".") :
+                e.getMessage();
         }
 
         try {
             cache.removeAll();
         }
         catch (CacheException e) {
-            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+            assert e.getMessage().startsWith("Updates are not allowed for transactional cache: " + CACHE_NAME + ".") :
+                e.getMessage();
         }
 
         try {
             cache.invoke(0, new EP());
         }
         catch (CacheException e) {
-            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+            assert e.getMessage().startsWith("Updates are not allowed for transactional cache: " + CACHE_NAME + ".") :
+                e.getMessage();
         }
 
         try {
             cache.invokeAll(F.asSet(0, 1), new EP());
         }
         catch (CacheException e) {
-            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+            assert e.getMessage().startsWith("Updates are not allowed for transactional cache: " + CACHE_NAME + ".") :
+                e.getMessage();
         }
     }
 


[09/17] incubator-ignite git commit: # ignite-sprint-5 use consistent topology version in streamer

Posted by sb...@apache.org.
# ignite-sprint-5 use consistent topology version in streamer


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

Branch: refs/heads/ignite-gg-10299
Commit: dc1d427fa2f5235a5779058a444e3845946a7e07
Parents: 20e5677
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jun 5 09:54:37 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jun 5 11:21:36 2015 +0300

----------------------------------------------------------------------
 .../affinity/GridAffinityProcessor.java         | 23 ++++-
 .../datastreamer/DataStreamerImpl.java          | 92 ++++++++++++++------
 .../DataStreamerMultiThreadedSelfTest.java      | 59 +++++++++----
 3 files changed, 129 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc1d427f/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
index daa2bc2..aac63c8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityProcessor.java
@@ -164,14 +164,17 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
      *
      * @param cacheName Cache name.
      * @param key Key to map.
+     * @param topVer Topology version.
      * @return Affinity nodes, primary first.
      * @throws IgniteCheckedException If failed.
      */
-    public <K> List<ClusterNode> mapKeyToPrimaryAndBackups(@Nullable String cacheName, K key) throws IgniteCheckedException {
+    public <K> List<ClusterNode> mapKeyToPrimaryAndBackups(@Nullable String cacheName,
+        K key,
+        AffinityTopologyVersion topVer)
+        throws IgniteCheckedException
+    {
         A.notNull(key, "key");
 
-        AffinityTopologyVersion topVer = ctx.discovery().topologyVersionEx();
-
         AffinityInfo affInfo = affinityCache(cacheName, topVer);
 
         if (affInfo == null)
@@ -181,6 +184,20 @@ public class GridAffinityProcessor extends GridProcessorAdapter {
     }
 
     /**
+     * Map single key to primary and backup nodes.
+     *
+     * @param cacheName Cache name.
+     * @param key Key to map.
+     * @return Affinity nodes, primary first.
+     * @throws IgniteCheckedException If failed.
+     */
+    public <K> List<ClusterNode> mapKeyToPrimaryAndBackups(@Nullable String cacheName, K key)
+        throws IgniteCheckedException
+    {
+        return mapKeyToPrimaryAndBackups(cacheName, key, ctx.discovery().topologyVersionEx());
+    }
+
+    /**
      * Gets affinity key for cache key.
      *
      * @param cacheName Cache name.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc1d427f/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
index d16167a..ed8e573 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
@@ -198,19 +198,14 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
                 // Remap regular mappings.
                 final Buffer buf = bufMappings.remove(id);
 
+                // Only async notification is possible since
+                // discovery thread may be trapped otherwise.
                 if (buf != null) {
-                    // Only async notification is possible since
-                    // discovery thread may be trapped otherwise.
-                    ctx.closure().callLocalSafe(
-                        new Callable<Object>() {
-                            @Override public Object call() throws Exception {
-                                buf.onNodeLeft();
-
-                                return null;
-                            }
-                        },
-                        true /* system pool */
-                    );
+                    waitAffinityAndRun(new Runnable() {
+                        @Override public void run() {
+                            buf.onNodeLeft();
+                        }
+                    }, discoEvt.topologyVersion(), true);
                 }
             }
         };
@@ -248,6 +243,31 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
     }
 
     /**
+     * @param c Closure to run.
+     * @param topVer Topology version to wait for.
+     * @param async Async flag.
+     */
+    private void waitAffinityAndRun(final Runnable c, long topVer, boolean async) {
+        AffinityTopologyVersion topVer0 = new AffinityTopologyVersion(topVer, 0);
+
+        IgniteInternalFuture<?> fut = ctx.cache().context().exchange().affinityReadyFuture(topVer0);
+
+        if (fut != null && !fut.isDone()) {
+            fut.listen(new CI1<IgniteInternalFuture<?>>() {
+                @Override public void apply(IgniteInternalFuture<?> fut) {
+                    ctx.closure().runLocalSafe(c, true);
+                }
+            });
+        }
+        else {
+            if (async)
+                ctx.closure().runLocalSafe(c, true);
+            else
+                c.run();
+        }
+    }
+
+    /**
      * @return Cache object context.
      */
     public CacheObjectContext cacheObjectContext() {
@@ -527,6 +547,8 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
 
         boolean initPda = ctx.deploy().enabled() && jobPda == null;
 
+        AffinityTopologyVersion topVer = ctx.cache().context().exchange().readyAffinityVersion();
+
         for (DataStreamerEntry entry : entries) {
             List<ClusterNode> nodes;
 
@@ -543,7 +565,7 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
                     initPda = false;
                 }
 
-                nodes = nodes(key);
+                nodes = nodes(key, topVer);
             }
             catch (IgniteCheckedException e) {
                 resFut.onDone(e);
@@ -621,10 +643,10 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
                 }
             };
 
-            GridFutureAdapter<?> f;
+            final GridFutureAdapter<?> f;
 
             try {
-                f = buf.update(entriesForNode, lsnr);
+                f = buf.update(entriesForNode, topVer, lsnr);
             }
             catch (IgniteInterruptedCheckedException e1) {
                 resFut.onDone(e1);
@@ -633,30 +655,38 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
             }
 
             if (ctx.discovery().node(nodeId) == null) {
-                if (bufMappings.remove(nodeId, buf))
-                    buf.onNodeLeft();
+                if (bufMappings.remove(nodeId, buf)) {
+                    final Buffer buf0 = buf;
 
-                if (f != null)
-                    f.onDone(new ClusterTopologyCheckedException("Failed to wait for request completion " +
-                        "(node has left): " + nodeId));
+                    waitAffinityAndRun(new Runnable() {
+                        @Override public void run() {
+                            buf0.onNodeLeft();
+
+                            if (f != null)
+                                f.onDone(new ClusterTopologyCheckedException("Failed to wait for request completion " +
+                                    "(node has left): " + nodeId));
+                        }
+                    }, ctx.discovery().topologyVersion(), false);
+                }
             }
         }
     }
 
     /**
      * @param key Key to map.
+     * @param topVer Topology version.
      * @return Nodes to send requests to.
      * @throws IgniteCheckedException If failed.
      */
-    private List<ClusterNode> nodes(KeyCacheObject key) throws IgniteCheckedException {
+    private List<ClusterNode> nodes(KeyCacheObject key, AffinityTopologyVersion topVer) throws IgniteCheckedException {
         GridAffinityProcessor aff = ctx.affinity();
 
         List<ClusterNode> res = null;
 
         if (!allowOverwrite())
-            res = aff.mapKeyToPrimaryAndBackups(cacheName, key);
+            res = aff.mapKeyToPrimaryAndBackups(cacheName, key, topVer);
         else {
-            ClusterNode node = aff.mapKeyToNode(cacheName, key);
+            ClusterNode node = aff.mapKeyToNode(cacheName, key, topVer);
 
             if (node != null)
                 res = Collections.singletonList(node);
@@ -959,11 +989,13 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
 
         /**
          * @param newEntries Infos.
+         * @param topVer Topology version.
          * @param lsnr Listener for the operation future.
          * @throws IgniteInterruptedCheckedException If failed.
          * @return Future for operation.
          */
         @Nullable GridFutureAdapter<?> update(Iterable<DataStreamerEntry> newEntries,
+            AffinityTopologyVersion topVer,
             IgniteInClosure<IgniteInternalFuture<?>> lsnr) throws IgniteInterruptedCheckedException {
             List<DataStreamerEntry> entries0 = null;
             GridFutureAdapter<Object> curFut0;
@@ -986,7 +1018,7 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
             }
 
             if (entries0 != null) {
-                submit(entries0, curFut0);
+                submit(entries0, topVer, curFut0);
 
                 if (cancelled)
                     curFut0.onDone(new IgniteCheckedException("Data streamer has been cancelled: " + DataStreamerImpl.this));
@@ -1023,7 +1055,7 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
             }
 
             if (entries0 != null)
-                submit(entries0, curFut0);
+                submit(entries0, null, curFut0);
 
             // Create compound future for this flush.
             GridCompoundFuture<Object, Object> res = null;
@@ -1068,10 +1100,13 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
 
         /**
          * @param entries Entries to submit.
+         * @param topVer Topology version.
          * @param curFut Current future.
          * @throws IgniteInterruptedCheckedException If interrupted.
          */
-        private void submit(final Collection<DataStreamerEntry> entries, final GridFutureAdapter<Object> curFut)
+        private void submit(final Collection<DataStreamerEntry> entries,
+            @Nullable AffinityTopologyVersion topVer,
+            final GridFutureAdapter<Object> curFut)
             throws IgniteInterruptedCheckedException {
             assert entries != null;
             assert !entries.isEmpty();
@@ -1160,6 +1195,9 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
 
                 reqs.put(reqId, (GridFutureAdapter<Object>)fut);
 
+                if (topVer == null)
+                    topVer = ctx.cache().context().exchange().readyAffinityVersion();
+
                 DataStreamerRequest req = new DataStreamerRequest(
                     reqId,
                     topicBytes,
@@ -1174,7 +1212,7 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K, V>, Delayed
                     dep != null ? dep.participants() : null,
                     dep != null ? dep.classLoaderId() : null,
                     dep == null,
-                    ctx.cache().context().exchange().readyAffinityVersion());
+                    topVer);
 
                 try {
                     ctx.io().send(node, TOPIC_DATASTREAM, req, PUBLIC_POOL);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc1d427f/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java
index 2382a66..e0092d4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java
@@ -41,6 +41,9 @@ public class DataStreamerMultiThreadedSelfTest extends GridCommonAbstractTest {
     /** IP finder. */
     private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
 
+    /** */
+    private boolean dynamicCache;
+
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
@@ -50,13 +53,22 @@ public class DataStreamerMultiThreadedSelfTest extends GridCommonAbstractTest {
 
         cfg.setDiscoverySpi(discoSpi);
 
+        if (!dynamicCache)
+            cfg.setCacheConfiguration(cacheConfiguration());
+
+        return cfg;
+    }
+
+    /**
+     * @return Cache configuration.
+     */
+    private CacheConfiguration cacheConfiguration() {
         CacheConfiguration ccfg = defaultCacheConfiguration();
 
         ccfg.setCacheMode(PARTITIONED);
         ccfg.setBackups(1);
-        cfg.setCacheConfiguration(ccfg);
 
-        return cfg;
+        return ccfg;
     }
 
     /** {@inheritDoc} */
@@ -68,6 +80,22 @@ public class DataStreamerMultiThreadedSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testStartStopIgnites() throws Exception {
+        startStopIgnites();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testStartStopIgnitesDynamicCache() throws Exception {
+        dynamicCache = true;
+
+        startStopIgnites();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    private void startStopIgnites() throws Exception {
         for (int attempt = 0; attempt < 3; ++attempt) {
             log.info("Iteration: " + attempt);
             
@@ -75,28 +103,29 @@ public class DataStreamerMultiThreadedSelfTest extends GridCommonAbstractTest {
 
             Set<IgniteFuture> futs = new HashSet<>();
 
-            IgniteInternalFuture<?> fut;
+            final AtomicInteger igniteId = new AtomicInteger(1);
 
-            try (final DataStreamerImpl dataLdr = (DataStreamerImpl)ignite.dataStreamer(null)) {
-                dataLdr.maxRemapCount(0);
+            IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+                @Override public Object call() throws Exception {
+                    for (int i = 1; i < 5; ++i)
+                        startGrid(igniteId.incrementAndGet());
 
-                final AtomicInteger igniteId = new AtomicInteger(1);
+                    return true;
+                }
+            }, 2, "start-node-thread");
 
-                fut = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
-                    @Override public Object call() throws Exception {
-                        for (int i = 1; i < 5; ++i)
-                            startGrid(igniteId.incrementAndGet());
+            if (dynamicCache)
+                ignite.getOrCreateCache(cacheConfiguration());
 
-                        return true;
-                    }
-                }, 2, "start-node-thread");
+            try (final DataStreamerImpl dataLdr = (DataStreamerImpl)ignite.dataStreamer(null)) {
+                dataLdr.maxRemapCount(0);
 
-                Random random = new Random();
+                Random rnd = new Random();
 
                 long endTime = U.currentTimeMillis() + 15_000;
 
                 while (!fut.isDone() && U.currentTimeMillis() < endTime)
-                    futs.add(dataLdr.addData(random.nextInt(100_000), random.nextInt(100_000)));
+                    futs.add(dataLdr.addData(rnd.nextInt(100_000), String.valueOf(rnd.nextInt(100_000))));
             }
 
             for (IgniteFuture f : futs)


[06/17] incubator-ignite git commit: Merge branches 'ignite-941' and 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-941

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


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

Branch: refs/heads/ignite-gg-10299
Commit: b58c892e149567b3ca8d6746cb87cc11a4808dec
Parents: e9cea3a c9f7291
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Thu Jun 4 16:28:19 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Thu Jun 4 16:28:19 2015 -0700

----------------------------------------------------------------------
 .../configuration/CacheConfiguration.java       |  13 +-
 .../apache/ignite/internal/IgniteKernal.java    |   3 +
 .../managers/communication/GridIoManager.java   | 117 ++++----
 .../dht/GridClientPartitionTopology.java        |   2 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |  16 +-
 .../GridDhtPartitionsExchangeFuture.java        |  29 +-
 .../dht/preloader/GridDhtPreloader.java         |   2 +-
 .../processors/hadoop/HadoopTaskContext.java    |  14 +-
 .../igfs/IgfsSecondaryFileSystemImpl.java       |   2 +-
 .../internal/visor/query/VisorQueryJob.java     |   2 +-
 .../ignite/spi/discovery/tcp/ClientImpl.java    |   3 +
 .../ignite/spi/discovery/tcp/ServerImpl.java    |  31 --
 .../spi/discovery/tcp/TcpDiscoveryImpl.java     |  56 +++-
 .../tcp/ipfinder/TcpDiscoveryIpFinder.java      |  10 +-
 .../TcpDiscoveryMulticastIpFinder.java          |  47 +++-
 .../cache/IgniteDynamicCacheStartSelfTest.java  |  62 ++++
 ...niteDynamicCacheWithConfigStartSelfTest.java |  97 +++++++
 .../igfs/IgfsClientCacheSelfTest.java           |   9 +-
 .../IgniteMessagingWithClientTest.java          | 164 +++++++++++
 .../tcp/TcpClientDiscoverySpiMulticastTest.java | 129 +++++++++
 .../ignite/testsuites/IgniteBasicTestSuite.java |   1 +
 .../testsuites/IgniteCacheTestSuite4.java       |   1 +
 .../IgniteSpiDiscoverySelfTestSuite.java        |   1 +
 .../gce/TcpDiscoveryGoogleStorageIpFinder.java  |  43 +--
 .../fs/IgniteHadoopFileSystemCounterWriter.java |  14 +-
 .../hadoop/fs/v1/IgniteHadoopFileSystem.java    |  70 ++---
 .../hadoop/fs/v2/IgniteHadoopFileSystem.java    |   2 +-
 .../processors/hadoop/HadoopDefaultJobInfo.java |   2 +-
 .../internal/processors/hadoop/HadoopUtils.java | 282 ++++++++++++++++++-
 .../hadoop/SecondaryFileSystemProvider.java     |   4 +-
 .../hadoop/taskexecutor/HadoopRunnableTask.java |  20 +-
 .../processors/hadoop/v2/HadoopV2Job.java       |  31 +-
 .../hadoop/v2/HadoopV2JobResourceManager.java   |  26 +-
 .../hadoop/v2/HadoopV2TaskContext.java          |  48 +++-
 .../hadoop/HadoopClientProtocolSelfTest.java    |   6 +-
 .../hadoop/HadoopAbstractSelfTest.java          |  14 +-
 .../hadoop/HadoopCommandLineTest.java           |  14 +-
 .../processors/hadoop/HadoopMapReduceTest.java  | 176 +++++++++++-
 .../hadoop/HadoopTaskExecutionSelfTest.java     |   2 +-
 .../hadoop/HadoopTasksAllVersionsTest.java      |  15 +-
 .../processors/hadoop/HadoopTasksV1Test.java    |   5 +-
 .../processors/hadoop/HadoopTasksV2Test.java    |   5 +-
 .../processors/hadoop/HadoopV2JobSelfTest.java  |   6 +-
 .../collections/HadoopAbstractMapTest.java      |  12 +
 ...acheConfigurationPrimitiveTypesSelfTest.java | 104 +++++++
 .../IgniteCacheWithIndexingTestSuite.java       |   2 +
 .../commands/cache/VisorCacheScanCommand.scala  |   2 +-
 47 files changed, 1443 insertions(+), 273 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b58c892e/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
----------------------------------------------------------------------


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

Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5


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

Branch: refs/heads/ignite-gg-10299
Commit: e87969c1023786e8b5fb7d19057bf715f4d3ecac
Parents: dc1d427 ead66e7
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jun 5 11:34:48 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jun 5 11:34:48 2015 +0300

----------------------------------------------------------------------
 .../processors/hadoop/HadoopTaskContext.java    |  14 +-
 .../igfs/IgfsSecondaryFileSystemImpl.java       |   2 +-
 .../ignite/internal/visor/cache/VisorCache.java |   2 +-
 .../VisorCacheConfigurationCollectorJob.java    |   6 +-
 .../internal/visor/cache/VisorCacheMetrics.java |  19 +-
 .../cache/VisorCacheMetricsCollectorTask.java   |  10 +-
 .../cache/VisorCacheStoreConfiguration.java     |   5 +-
 .../fs/IgniteHadoopFileSystemCounterWriter.java |  14 +-
 .../hadoop/fs/v1/IgniteHadoopFileSystem.java    |  70 ++---
 .../hadoop/fs/v2/IgniteHadoopFileSystem.java    |   2 +-
 .../processors/hadoop/HadoopDefaultJobInfo.java |   2 +-
 .../internal/processors/hadoop/HadoopUtils.java | 282 ++++++++++++++++++-
 .../hadoop/SecondaryFileSystemProvider.java     |   4 +-
 .../hadoop/taskexecutor/HadoopRunnableTask.java |  20 +-
 .../processors/hadoop/v2/HadoopV2Job.java       |  31 +-
 .../hadoop/v2/HadoopV2JobResourceManager.java   |  26 +-
 .../hadoop/v2/HadoopV2TaskContext.java          |  48 +++-
 .../hadoop/HadoopClientProtocolSelfTest.java    |   6 +-
 .../hadoop/HadoopAbstractSelfTest.java          |  14 +-
 .../hadoop/HadoopCommandLineTest.java           |  14 +-
 .../processors/hadoop/HadoopMapReduceTest.java  | 176 +++++++++++-
 .../hadoop/HadoopTaskExecutionSelfTest.java     |   2 +-
 .../hadoop/HadoopTasksAllVersionsTest.java      |  15 +-
 .../processors/hadoop/HadoopTasksV1Test.java    |   5 +-
 .../processors/hadoop/HadoopTasksV2Test.java    |   5 +-
 .../processors/hadoop/HadoopV2JobSelfTest.java  |   6 +-
 .../collections/HadoopAbstractMapTest.java      |  12 +
 27 files changed, 666 insertions(+), 146 deletions(-)
----------------------------------------------------------------------



[16/17] incubator-ignite git commit: # ignite-sprint-5 sanity check for classname.properies load

Posted by sb...@apache.org.
# ignite-sprint-5 sanity check for classname.properies load


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

Branch: refs/heads/ignite-gg-10299
Commit: 8467a3c36414192268b8d852715fc501f53b4772
Parents: a5b5ec7
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 8 12:42:36 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 8 12:42:36 2015 +0300

----------------------------------------------------------------------
 .../internal/MarshallerContextAdapter.java      | 36 ++++++++++++++++++--
 1 file changed, 34 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8467a3c3/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
index 5dca2f2..21f2264 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal;
 
 import org.apache.ignite.*;
+import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.marshaller.*;
 import org.jsr166.*;
@@ -49,10 +50,29 @@ public abstract class MarshallerContextAdapter implements MarshallerContext {
 
             Enumeration<URL> urls = ldr.getResources(CLS_NAMES_FILE);
 
-            while (urls.hasMoreElements())
+            boolean foundClsNames = false;
+
+            while (urls.hasMoreElements()) {
                 processResource(urls.nextElement());
 
-            processResource(ldr.getResource(JDK_CLS_NAMES_FILE));
+                foundClsNames = true;
+            }
+
+            if (!foundClsNames)
+                throw new IgniteException("Failed to load class names properties file packaged with ignite binaries " +
+                    "[file=" + CLS_NAMES_FILE + ", ldr=" + ldr + ']');
+
+            URL jdkClsNames = ldr.getResource(JDK_CLS_NAMES_FILE);
+
+            if (jdkClsNames == null)
+                throw new IgniteException("Failed to load class names properties file packaged with ignite binaries " +
+                    "[file=" + JDK_CLS_NAMES_FILE + ", ldr=" + ldr + ']');
+
+            processResource(jdkClsNames);
+
+            checkHasClassName(GridDhtPartitionFullMap.class.getName(), ldr, CLS_NAMES_FILE);
+            checkHasClassName(GridDhtPartitionMap.class.getName(), ldr, CLS_NAMES_FILE);
+            checkHasClassName(HashMap.class.getName(), ldr, JDK_CLS_NAMES_FILE);
         }
         catch (IOException e) {
             throw new IllegalStateException("Failed to initialize marshaller context.", e);
@@ -60,6 +80,18 @@ public abstract class MarshallerContextAdapter implements MarshallerContext {
     }
 
     /**
+     * @param clsName Class name.
+     * @param ldr Class loader used to get properties file.
+     * @param fileName File name.
+     */
+    private void checkHasClassName(String clsName, ClassLoader ldr, String fileName) {
+        if (!map.containsKey(clsName.hashCode()))
+            throw new IgniteException("Failed to read class name from class names properties file. " +
+                "Make sure class names properties file packaged with ignite binaries is not corrupted " +
+                "[clsName=" + clsName + ", fileName=" + fileName + ", ldr=" + ldr + ']');
+    }
+
+    /**
      * @param url Resource URL.
      * @throws IOException In case of error.
      */


[13/17] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-gg-10299

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-gg-10299


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

Branch: refs/heads/ignite-gg-10299
Commit: 0fc2d7384966fc13b7ba6f3e6adfc91068c489c9
Parents: 98176fe ab20fd9
Author: avinogradov <av...@gridgain.com>
Authored: Fri Jun 5 21:38:02 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri Jun 5 21:38:02 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCache.java     |  11 ++
 .../affinity/GridAffinityProcessor.java         |  23 ++++-
 .../processors/cache/GridCacheAdapter.java      |  17 ++-
 .../processors/cache/GridCacheProxyImpl.java    |  14 ++-
 .../processors/cache/IgniteCacheProxy.java      |  23 +++++
 .../processors/cache/IgniteInternalCache.java   |  11 +-
 .../datastreamer/DataStreamerImpl.java          |  92 ++++++++++++-----
 .../processors/igfs/IgfsMetaManager.java        |   2 +-
 .../ignite/internal/visor/cache/VisorCache.java |   2 +-
 .../VisorCacheConfigurationCollectorJob.java    |   6 +-
 .../internal/visor/cache/VisorCacheMetrics.java |  19 ++--
 .../cache/VisorCacheMetricsCollectorTask.java   |  10 +-
 .../cache/VisorCacheStoreConfiguration.java     |   5 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  83 +++++++++++++++
 .../GridCacheExAbstractFullApiSelfTest.java     | 103 -------------------
 .../GridCacheExColocatedFullApiSelfTest.java    |  33 ------
 .../near/GridCacheExNearFullApiSelfTest.java    |  39 -------
 .../GridCacheExReplicatedFullApiSelfTest.java   |  33 ------
 .../local/GridCacheExLocalFullApiSelfTest.java  |  30 ------
 .../DataStreamerMultiThreadedSelfTest.java      |  59 ++++++++---
 .../IgniteMessagingWithClientTest.java          |   2 +
 .../IgniteCacheFullApiSelfTestSuite.java        |   6 --
 22 files changed, 309 insertions(+), 314 deletions(-)
----------------------------------------------------------------------



[05/17] incubator-ignite git commit: Merge branches 'ignite-gg-9621' and 'ignite-sprint-5'

Posted by sb...@apache.org.
Merge branches 'ignite-gg-9621' and 'ignite-sprint-5'


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

Branch: refs/heads/ignite-gg-10299
Commit: 2b443d9096c4bc434bd99b2c675bbcbf7e65f236
Parents: 1f516a2
Author: AKuznetsov <ak...@gridgain.com>
Authored: Thu Jun 4 17:12:15 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Thu Jun 4 17:12:15 2015 +0700

----------------------------------------------------------------------
 .../java/org/apache/ignite/internal/visor/cache/VisorCache.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2b443d90/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
index bd24ecf..9e15d2d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
@@ -202,7 +202,7 @@ public class VisorCache implements Serializable {
         offHeapAllocatedSize = ca.offHeapAllocatedSize();
         offHeapEntriesCnt = ca.offHeapEntriesCount();
         partitions = ca.affinity().partitions();
-        metrics = VisorCacheMetrics.from(ignite, ca);
+        metrics = VisorCacheMetrics.from(ignite, cacheName);
 
         estimateMemorySize(ignite, ca, sample);
 


[02/17] incubator-ignite git commit: IGNITE-941 - Read-only mode for transactional cache

Posted by sb...@apache.org.
IGNITE-941 - Read-only mode for transactional cache


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

Branch: refs/heads/ignite-gg-10299
Commit: 54c72c3e7fb89a3f9e6457dd82aa83af1af4ba1c
Parents: 97d0bc1
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Wed Jun 3 20:06:33 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Wed Jun 3 20:06:33 2015 -0700

----------------------------------------------------------------------
 .../cache/DynamicCacheDescriptor.java           |  17 ++
 .../processors/cache/GridCacheContext.java      |  16 +-
 .../processors/cache/GridCacheProcessor.java    |  37 ++-
 .../dht/atomic/GridDhtAtomicCache.java          |   4 +
 .../transactions/IgniteTxLocalAdapter.java      |   7 +
 ...acheReadOnlyTransactionalClientSelfTest.java | 289 +++++++++++++++++++
 .../loadtests/hashmap/GridCacheTestContext.java |   1 +
 .../testsuites/IgniteCacheTestSuite4.java       |   2 +
 8 files changed, 362 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/54c72c3e/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
index a27ebd4..9c6cc43 100644
--- 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
@@ -61,6 +61,9 @@ public class DynamicCacheDescriptor {
     /** Cache plugin manager. */
     private final CachePluginManager pluginMgr;
 
+    /** */
+    private boolean updatesAllowed = true;
+
     /**
      * @param ctx Context.
      * @param cacheCfg Cache configuration.
@@ -208,6 +211,20 @@ public class DynamicCacheDescriptor {
         rmtCfgs = null;
     }
 
+    /**
+     * @return Updates allowed flag.
+     */
+    public boolean updatesAllowed() {
+        return updatesAllowed;
+    }
+
+    /**
+     * @param updatesAllowed Updates allowed flag.
+     */
+    public void updatesAllowed(boolean updatesAllowed) {
+        this.updatesAllowed = updatesAllowed;
+    }
+
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(DynamicCacheDescriptor.class, this, "cacheName", U.maskName(cacheCfg.getName()));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/54c72c3e/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 b20e59d..8a4e3b9 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
@@ -196,6 +196,9 @@ public class GridCacheContext<K, V> implements Externalizable {
     /** Dynamic cache deployment ID. */
     private IgniteUuid dynamicDeploymentId;
 
+    /** Updates allowed flag. */
+    private boolean updatesAllowed;
+
     /**
      * Empty constructor required for {@link Externalizable}.
      */
@@ -209,6 +212,7 @@ public class GridCacheContext<K, V> implements Externalizable {
      * @param cacheCfg Cache configuration.
      * @param cacheType Cache type.
      * @param affNode {@code True} if local node is affinity node.
+     * @param updatesAllowed Updates allowed flag.
      * @param evtMgr Cache event manager.
      * @param swapMgr Cache swap manager.
      * @param storeMgr Store manager.
@@ -230,6 +234,7 @@ public class GridCacheContext<K, V> implements Externalizable {
         CacheConfiguration cacheCfg,
         CacheType cacheType,
         boolean affNode,
+        boolean updatesAllowed,
 
         /*
          * Managers in starting order!
@@ -271,6 +276,7 @@ public class GridCacheContext<K, V> implements Externalizable {
         this.cacheCfg = cacheCfg;
         this.cacheType = cacheType;
         this.affNode = affNode;
+        this.updatesAllowed = updatesAllowed;
 
         /*
          * Managers in starting order!
@@ -1469,9 +1475,6 @@ public class GridCacheContext<K, V> implements Externalizable {
             Collection<ClusterNode> dhtNodeIds = new ArrayList<>(dhtRemoteNodes);
             Collection<ClusterNode> nearNodeIds = F.isEmpty(nearRemoteNodes) ? null : new ArrayList<>(nearRemoteNodes);
 
-            if (!F.isEmpty(nearNodeIds))
-                U.dumpStack("Added near mapped nodes: " + entry + ", " + nearNodeIds);
-
             entry.mappings(explicitLockVer, dhtNodeIds, nearNodeIds);
         }
 
@@ -1809,6 +1812,13 @@ public class GridCacheContext<K, V> implements Externalizable {
     }
 
     /**
+     * @return Updates allowed.
+     */
+    public boolean updatesAllowed() {
+        return updatesAllowed;
+    }
+
+    /**
      * Nulling references to potentially leak-prone objects.
      */
     public void cleanup() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/54c72c3e/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 24e2439..bbd5fe9 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
@@ -674,6 +674,9 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
             if (!getBoolean(IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK)) {
                 for (ClusterNode n : ctx.discovery().remoteNodes()) {
+                    if (Boolean.valueOf(n.<String>attribute(IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK)))
+                        continue;
+
                     checkTransactionConfiguration(n);
 
                     DeploymentMode locDepMode = ctx.config().getDeploymentMode();
@@ -688,7 +691,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                         if (rmtCfg != null) {
                             CacheConfiguration locCfg = desc.cacheConfiguration();
 
-                            checkCache(locCfg, rmtCfg, n);
+                            checkCache(locCfg, rmtCfg, n, desc);
 
                             // Check plugin cache configurations.
                             CachePluginManager pluginMgr = desc.pluginManager();
@@ -718,7 +721,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
                     CachePluginManager pluginMgr = desc.pluginManager();
 
-                    GridCacheContext ctx = createCache(ccfg, pluginMgr, desc.cacheType(), cacheObjCtx);
+                    GridCacheContext ctx = createCache(
+                        ccfg, pluginMgr, desc.cacheType(), cacheObjCtx, desc.updatesAllowed());
 
                     ctx.dynamicDeploymentId(desc.deploymentId());
 
@@ -1068,7 +1072,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     private GridCacheContext createCache(CacheConfiguration<?, ?> cfg,
         @Nullable CachePluginManager pluginMgr,
         CacheType cacheType,
-        CacheObjectContext cacheObjCtx)
+        CacheObjectContext cacheObjCtx,
+        boolean updatesAllowed)
         throws IgniteCheckedException
     {
         assert cfg != null;
@@ -1126,6 +1131,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             cfg,
             cacheType,
             ctx.discovery().cacheAffinityNode(ctx.discovery().localNode(), cfg.getName()),
+            updatesAllowed,
 
             /*
              * Managers in starting order!
@@ -1255,6 +1261,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                 cfg,
                 cacheType,
                 ctx.discovery().cacheAffinityNode(ctx.discovery().localNode(), cfg.getName()),
+                true,
 
                 /*
                  * Managers in starting order!
@@ -1458,7 +1465,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
             CacheObjectContext cacheObjCtx = ctx.cacheObjects().contextForCache(ccfg);
 
-            GridCacheContext cacheCtx = createCache(ccfg, null, cacheType, cacheObjCtx);
+            GridCacheContext cacheCtx = createCache(ccfg, null, cacheType, cacheObjCtx, true);
 
             cacheCtx.startTopologyVersion(topVer);
 
@@ -2229,10 +2236,11 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @param locCfg Local configuration.
      * @param rmtCfg Remote configuration.
      * @param rmtNode Remote node.
+     * @param desc Cache descriptor.
      * @throws IgniteCheckedException If check failed.
      */
-    private void checkCache(CacheConfiguration locCfg, CacheConfiguration rmtCfg, ClusterNode rmtNode)
-        throws IgniteCheckedException {
+    private void checkCache(CacheConfiguration locCfg, CacheConfiguration rmtCfg, ClusterNode rmtNode,
+        DynamicCacheDescriptor desc) throws IgniteCheckedException {
         ClusterNode locNode = ctx.discovery().localNode();
 
         UUID rmt = rmtNode.id();
@@ -2240,6 +2248,9 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         GridCacheAttributes rmtAttr = new GridCacheAttributes(rmtCfg);
         GridCacheAttributes locAttr = new GridCacheAttributes(locCfg);
 
+        boolean isLocAff = CU.affinityNode(locNode, locCfg.getNodeFilter());
+        boolean isRmtAff = CU.affinityNode(rmtNode, rmtCfg.getNodeFilter());
+
         CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "cacheMode", "Cache mode",
             locAttr.cacheMode(), rmtAttr.cacheMode(), true);
 
@@ -2253,8 +2264,18 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "cachePreloadMode",
                 "Cache preload mode", locAttr.cacheRebalanceMode(), rmtAttr.cacheRebalanceMode(), true);
 
-            if (locCfg.getAtomicityMode() == TRANSACTIONAL ||
-                (CU.affinityNode(rmtNode, rmtCfg.getNodeFilter()) && CU.affinityNode(locNode, locCfg.getNodeFilter())))
+            boolean checkStore;
+
+            if (!isLocAff && isRmtAff && locCfg.getAtomicityMode() == TRANSACTIONAL) {
+                checkStore = locAttr.storeFactoryClassName() != null;
+
+                if (locAttr.storeFactoryClassName() == null && rmtAttr.storeFactoryClassName() != null)
+                    desc.updatesAllowed(false);
+            }
+            else
+                checkStore = isLocAff && isRmtAff;
+
+            if (checkStore)
                 CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "storeFactory", "Store factory",
                     locAttr.storeFactoryClassName(), rmtAttr.storeFactoryClassName(), true);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/54c72c3e/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 9ca80f9..3208aeb 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
@@ -737,6 +737,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         @Nullable final CacheEntryPredicate[] filter,
         final boolean waitTopFut
     ) {
+        assert ctx.updatesAllowed();
+
         if (map != null && keyCheck)
             validateCacheKeys(map.keySet());
 
@@ -793,6 +795,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
         boolean rawRetval,
         @Nullable final CacheEntryPredicate[] filter
     ) {
+        assert ctx.updatesAllowed();
+
         final boolean statsEnabled = ctx.config().isStatisticsEnabled();
 
         final long start = statsEnabled ? System.nanoTime() : 0L;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/54c72c3e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 3e5a63c..4063be2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -40,6 +40,7 @@ import org.apache.ignite.plugin.security.*;
 import org.apache.ignite.transactions.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.*;
 import javax.cache.expiry.*;
 import javax.cache.processor.*;
 import java.io.*;
@@ -2560,6 +2561,9 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
     ) {
         assert filter == null || invokeMap == null;
 
+        if (!cacheCtx.updatesAllowed())
+            throw new CacheException("Updates are not allowed for cache: " + cacheCtx.name());
+
         cacheCtx.checkSecurity(SecurityPermission.CACHE_PUT);
 
         if (retval)
@@ -2780,6 +2784,9 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
         @Nullable GridCacheEntryEx cached,
         final boolean retval,
         @Nullable final CacheEntryPredicate[] filter) {
+        if (!cacheCtx.updatesAllowed())
+            throw new CacheException("Updates are not allowed for cache: " + cacheCtx.name());
+
         cacheCtx.checkSecurity(SecurityPermission.CACHE_REMOVE);
 
         if (retval)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/54c72c3e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadOnlyTransactionalClientSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadOnlyTransactionalClientSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadOnlyTransactionalClientSelfTest.java
new file mode 100644
index 0000000..e2a1def
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadOnlyTransactionalClientSelfTest.java
@@ -0,0 +1,289 @@
+/*
+ * 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.store.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.typedef.*;
+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 javax.cache.*;
+import javax.cache.configuration.*;
+import javax.cache.processor.*;
+
+/**
+ * Tests for read-only transactional cache client.
+ */
+public class CacheReadOnlyTransactionalClientSelfTest extends GridCommonAbstractTest {
+    /** */
+    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /** */
+    private boolean client;
+
+    /** */
+    private boolean nearEnabled;
+
+    /** */
+    private Factory<CacheStore> factory;
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        cfg.setClientMode(client);
+
+        CacheConfiguration cc = new CacheConfiguration();
+
+        cc.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
+        cc.setCacheStoreFactory(factory);
+
+        if (client && nearEnabled)
+            cc.setNearConfiguration(new NearCacheConfiguration());
+
+        cfg.setCacheConfiguration(cc);
+
+        TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+        disco.setIpFinder(IP_FINDER);
+
+        cfg.setDiscoverySpi(disco);
+
+        return cfg;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTestsStarted() throws Exception {
+        client = false;
+        factory = new Factory1();
+
+        startGrids(2);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTestsStopped() throws Exception {
+        stopAllGrids();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        stopGrid();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testCorrectStore() throws Exception {
+        client = true;
+        nearEnabled = false;
+        factory = new Factory1();
+
+        Ignite ignite = startGrid();
+
+        IgniteCache cache = ignite.cache(null);
+
+        cache.get(0);
+        cache.getAll(F.asSet(0, 1));
+        cache.getAndPut(0, 0);
+        cache.getAndPutIfAbsent(0, 0);
+        cache.getAndRemove(0);
+        cache.getAndReplace(0, 0);
+        cache.put(0, 0);
+        cache.putAll(F.asMap(0, 0, 1, 1));
+        cache.putIfAbsent(0, 0);
+        cache.remove(0);
+        cache.remove(0, 0);
+        cache.removeAll(F.asSet(0, 1));
+        cache.removeAll();
+        cache.invoke(0, new EP());
+        cache.invokeAll(F.asSet(0, 1), new EP());
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testInvalidStore() throws Exception {
+        client = true;
+        nearEnabled = false;
+        factory = new Factory2();
+
+        try {
+            startGrid();
+
+            assert false : "Exception was not thrown.";
+        }
+        catch (Exception e) {
+            assert e.getMessage().startsWith("Store factory mismatch") : e.getMessage();
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testNoStoreNearDisabled() throws Exception {
+        nearEnabled = false;
+
+        doTestNoStore();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testNoStoreNearEnabled() throws Exception {
+        nearEnabled = true;
+
+        doTestNoStore();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    private void doTestNoStore() throws Exception {
+        client = true;
+        factory = null;
+
+        Ignite ignite = startGrid();
+
+        IgniteCache cache = ignite.cache(null);
+
+        cache.get(0);
+        cache.getAll(F.asSet(0, 1));
+
+        try {
+            cache.getAndPut(0, 0);
+        }
+        catch (CacheException e) {
+            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+        }
+
+        try {
+            cache.getAndPutIfAbsent(0, 0);
+        }
+        catch (CacheException e) {
+            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+        }
+
+        try {
+            cache.getAndRemove(0);
+        }
+        catch (CacheException e) {
+            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+        }
+
+        try {
+            cache.getAndReplace(0, 0);
+        }
+        catch (CacheException e) {
+            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+        }
+
+        try {
+            cache.put(0, 0);
+        }
+        catch (CacheException e) {
+            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+        }
+
+        try {
+            cache.putAll(F.asMap(0, 0, 1, 1));
+        }
+        catch (CacheException e) {
+            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+        }
+
+        try {
+            cache.putIfAbsent(0, 0);
+        }
+        catch (CacheException e) {
+            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+        }
+
+        try {
+            cache.remove(0);
+        }
+        catch (CacheException e) {
+            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+        }
+
+        try {
+            cache.remove(0, 0);
+        }
+        catch (CacheException e) {
+            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+        }
+
+        try {
+            cache.removeAll(F.asSet(0, 1));
+        }
+        catch (CacheException e) {
+            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+        }
+
+        try {
+            cache.removeAll();
+        }
+        catch (CacheException e) {
+            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+        }
+
+        try {
+            cache.invoke(0, new EP());
+        }
+        catch (CacheException e) {
+            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+        }
+
+        try {
+            cache.invokeAll(F.asSet(0, 1), new EP());
+        }
+        catch (CacheException e) {
+            assertEquals("Updates are not allowed for cache: null", e.getMessage());
+        }
+    }
+
+    /**
+     */
+    private static class Factory1 implements Factory<CacheStore> {
+        /** {@inheritDoc} */
+        @Override public CacheStore create() {
+            return null;
+        }
+    }
+
+    /**
+     */
+    private static class Factory2 implements Factory<CacheStore> {
+        /** {@inheritDoc} */
+        @Override public CacheStore create() {
+            return null;
+        }
+    }
+
+    /**
+     */
+    private static class EP implements CacheEntryProcessor {
+        @Override public Object process(MutableEntry entry, Object... arguments) {
+            return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/54c72c3e/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
index 1c85ed3..77d3905 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
@@ -60,6 +60,7 @@ public class GridCacheTestContext<K, V> extends GridCacheContext<K, V> {
             defaultCacheConfiguration(),
             CacheType.USER,
             true,
+            true,
             new GridCacheEventManager(),
             new GridCacheSwapManager(false),
             new CacheOsStoreManager(null, new CacheConfiguration()),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/54c72c3e/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
index a8019d2..ab304fb 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
@@ -135,6 +135,8 @@ public class IgniteCacheTestSuite4 extends TestSuite {
 
         suite.addTestSuite(CacheJdbcStoreSessionListenerSelfTest.class);
 
+        suite.addTestSuite(CacheReadOnlyTransactionalClientSelfTest.class);
+
         return suite;
     }
 }


[14/17] incubator-ignite git commit: Merge branches 'ignite-941' and 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-941

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


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

Branch: refs/heads/ignite-gg-10299
Commit: 59db4a5e0f1dd83d56cb95f0a4184451f0a387fd
Parents: b4d1915 ab20fd9
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Fri Jun 5 13:55:21 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Fri Jun 5 13:55:21 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCache.java     |  11 ++
 .../affinity/GridAffinityProcessor.java         |  23 ++++-
 .../processors/cache/GridCacheAdapter.java      |  17 ++-
 .../processors/cache/GridCacheProxyImpl.java    |  14 ++-
 .../processors/cache/IgniteCacheProxy.java      |  23 +++++
 .../processors/cache/IgniteInternalCache.java   |  11 +-
 .../datastreamer/DataStreamerImpl.java          |  92 ++++++++++++-----
 .../processors/igfs/IgfsMetaManager.java        |   2 +-
 .../ignite/internal/visor/cache/VisorCache.java |   2 +-
 .../VisorCacheConfigurationCollectorJob.java    |   6 +-
 .../internal/visor/cache/VisorCacheMetrics.java |  19 ++--
 .../cache/VisorCacheMetricsCollectorTask.java   |  10 +-
 .../cache/VisorCacheStoreConfiguration.java     |   5 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  83 +++++++++++++++
 .../GridCacheExAbstractFullApiSelfTest.java     | 103 -------------------
 .../GridCacheExColocatedFullApiSelfTest.java    |  33 ------
 .../near/GridCacheExNearFullApiSelfTest.java    |  39 -------
 .../GridCacheExReplicatedFullApiSelfTest.java   |  33 ------
 .../local/GridCacheExLocalFullApiSelfTest.java  |  30 ------
 .../DataStreamerMultiThreadedSelfTest.java      |  59 ++++++++---
 .../IgniteMessagingWithClientTest.java          |   2 +
 .../IgniteCacheFullApiSelfTestSuite.java        |   6 --
 22 files changed, 309 insertions(+), 314 deletions(-)
----------------------------------------------------------------------