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/07/10 12:46:52 UTC

[01/50] [abbrv] incubator-ignite git commit: Merge branches 'ignite-1026' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-1026

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1056 29f0f1419 -> 407db1692


Merge branches 'ignite-1026' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-1026


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

Branch: refs/heads/ignite-1056
Commit: fe92bfec6ee1eaf55df5d1654f51b9b143518a09
Parents: 9adc180 b29ff1c
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Wed Jun 24 15:49:23 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Wed Jun 24 15:49:23 2015 -0700

----------------------------------------------------------------------
 examples/pom.xml                                |   2 +-
 modules/aop/pom.xml                             |   2 +-
 modules/aws/pom.xml                             |   2 +-
 modules/clients/pom.xml                         |   2 +-
 modules/cloud/pom.xml                           |   2 +-
 modules/codegen/pom.xml                         |   2 +-
 modules/core/pom.xml                            |   2 +-
 .../apache/ignite/IgniteSystemProperties.java   |   3 +
 .../configuration/IgniteReflectionFactory.java  |  81 +++-
 .../ignite/internal/MarshallerContextImpl.java  |  12 +-
 .../processors/cache/GridCacheContext.java      |   2 +-
 .../processors/cache/GridCacheIoManager.java    |  64 ++-
 .../GridCachePartitionExchangeManager.java      |  70 ++-
 .../processors/cache/GridCacheSwapManager.java  |  12 +-
 .../distributed/dht/GridDhtLocalPartition.java  |   3 +-
 .../distributed/dht/GridDhtLockFuture.java      |   2 +-
 .../dht/atomic/GridDhtAtomicCache.java          |   9 +-
 .../GridDhtPartitionsExchangeFuture.java        |  95 +++-
 .../datastructures/DataStructuresProcessor.java |  64 +--
 .../processors/hadoop/HadoopJobInfo.java        |   4 +-
 .../hadoop/counter/HadoopCounterWriter.java     |   5 +-
 .../offheap/GridOffHeapProcessor.java           |  19 +-
 .../processors/task/GridTaskProcessor.java      |  23 +-
 .../apache/ignite/internal/util/GridDebug.java  |  37 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  61 ++-
 .../tcp/TcpCommunicationSpiMBean.java           |   8 +
 .../ignite/spi/discovery/tcp/ClientImpl.java    |  68 ++-
 .../core/src/main/resources/ignite.properties   |   2 +-
 .../GridTaskFailoverAffinityRunTest.java        | 170 +++++++
 .../CacheReadThroughAtomicRestartSelfTest.java  |  32 ++
 ...heReadThroughLocalAtomicRestartSelfTest.java |  32 ++
 .../CacheReadThroughLocalRestartSelfTest.java   |  32 ++
 ...dThroughReplicatedAtomicRestartSelfTest.java |  32 ++
 ...cheReadThroughReplicatedRestartSelfTest.java |  32 ++
 .../cache/CacheReadThroughRestartSelfTest.java  | 133 ++++++
 .../GridCacheAbstractFailoverSelfTest.java      |   6 +-
 .../cache/GridCacheAbstractSelfTest.java        |   2 +-
 .../cache/GridCacheDaemonNodeStopSelfTest.java  | 119 +++++
 ...eDynamicCacheStartNoExchangeTimeoutTest.java | 466 +++++++++++++++++++
 .../cache/IgniteDynamicCacheStartSelfTest.java  |  37 ++
 ...GridCacheQueueMultiNodeAbstractSelfTest.java |   4 +-
 .../GridCacheSetAbstractSelfTest.java           |  22 +-
 .../IgniteDataStructureWithJobTest.java         | 111 +++++
 ...ridCachePartitionNotLoadedEventSelfTest.java |  82 ++++
 .../distributed/IgniteCache150ClientsTest.java  | 189 ++++++++
 ...teCacheClientNodePartitionsExchangeTest.java |   1 +
 .../distributed/IgniteCacheManyClientsTest.java |   2 +
 .../IgniteCacheTxMessageRecoveryTest.java       |   5 +
 ...idCacheNearOnlyMultiNodeFullApiSelfTest.java |   5 -
 ...achePartitionedMultiNodeFullApiSelfTest.java |  49 +-
 .../GridCacheReplicatedFailoverSelfTest.java    |   5 +
 .../IgniteCacheTxStoreSessionTest.java          |   4 +
 .../GridTcpCommunicationSpiConfigSelfTest.java  |   1 -
 .../testframework/junits/GridAbstractTest.java  |   2 +-
 .../IgniteCacheDataStructuresSelfTestSuite.java |   1 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |   4 +-
 .../testsuites/IgniteCacheTestSuite3.java       |   1 +
 .../testsuites/IgniteCacheTestSuite4.java       |   8 +
 .../testsuites/IgniteClientTestSuite.java       |  38 ++
 .../testsuites/IgniteComputeGridTestSuite.java  |   1 +
 .../ignite/util/TestTcpCommunicationSpi.java    |  21 +
 modules/extdata/p2p/pom.xml                     |   2 +-
 modules/extdata/uri/pom.xml                     |   2 +-
 modules/gce/pom.xml                             |   2 +-
 modules/geospatial/pom.xml                      |   2 +-
 modules/hadoop/pom.xml                          |  80 +---
 .../fs/IgniteHadoopFileSystemCounterWriter.java |   9 +-
 .../processors/hadoop/HadoopClassLoader.java    |  29 ++
 .../processors/hadoop/HadoopDefaultJobInfo.java |  27 +-
 .../internal/processors/hadoop/HadoopUtils.java | 237 ----------
 .../hadoop/SecondaryFileSystemProvider.java     |   3 +-
 .../hadoop/fs/HadoopFileSystemCacheUtils.java   | 241 ++++++++++
 .../hadoop/fs/HadoopFileSystemsUtils.java       |  11 +
 .../hadoop/fs/HadoopLazyConcurrentMap.java      |   5 +
 .../hadoop/jobtracker/HadoopJobTracker.java     |  25 +-
 .../child/HadoopChildProcessRunner.java         |   3 +-
 .../processors/hadoop/v2/HadoopV2Job.java       |  84 +++-
 .../hadoop/v2/HadoopV2JobResourceManager.java   |  22 +-
 .../hadoop/v2/HadoopV2TaskContext.java          |  37 +-
 .../apache/ignite/igfs/IgfsEventsTestSuite.java |   5 +-
 .../processors/hadoop/HadoopMapReduceTest.java  |   2 +-
 .../processors/hadoop/HadoopTasksV1Test.java    |   7 +-
 .../processors/hadoop/HadoopTasksV2Test.java    |   7 +-
 .../processors/hadoop/HadoopV2JobSelfTest.java  |   6 +-
 .../collections/HadoopAbstractMapTest.java      |   3 +-
 .../testsuites/IgniteHadoopTestSuite.java       |   2 +-
 .../IgniteIgfsLinuxAndMacOSTestSuite.java       |   3 +-
 modules/hibernate/pom.xml                       |   2 +-
 modules/indexing/pom.xml                        |   2 +-
 .../processors/query/h2/IgniteH2Indexing.java   |   2 +
 .../query/h2/twostep/GridMapQueryExecutor.java  |  23 +-
 .../cache/IgniteCacheOffheapEvictQueryTest.java | 196 ++++++++
 ...QueryOffheapEvictsMultiThreadedSelfTest.java |   5 +
 .../IgniteCacheQuerySelfTestSuite.java          |   3 +-
 modules/jcl/pom.xml                             |   2 +-
 modules/jta/pom.xml                             |   2 +-
 modules/log4j/pom.xml                           |   2 +-
 modules/mesos/pom.xml                           |   2 +-
 modules/rest-http/pom.xml                       |   2 +-
 modules/scalar-2.10/pom.xml                     |   2 +-
 modules/scalar/pom.xml                          |   2 +-
 modules/schedule/pom.xml                        |   2 +-
 modules/schema-import/pom.xml                   |   2 +-
 modules/slf4j/pom.xml                           |   2 +-
 modules/spark-2.10/pom.xml                      |   2 +-
 modules/spark/pom.xml                           |   2 +-
 modules/spring/pom.xml                          |   2 +-
 modules/ssh/pom.xml                             |   2 +-
 modules/tools/pom.xml                           |   2 +-
 modules/urideploy/pom.xml                       |   2 +-
 modules/visor-console-2.10/pom.xml              |   2 +-
 modules/visor-console/pom.xml                   |   2 +-
 modules/visor-plugins/pom.xml                   |   2 +-
 modules/web/pom.xml                             |   2 +-
 .../IgniteWebSessionSelfTestSuite.java          |   2 +-
 modules/yardstick/pom.xml                       |   2 +-
 pom.xml                                         |   2 +-
 117 files changed, 2759 insertions(+), 683 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe92bfec/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe92bfec/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
----------------------------------------------------------------------


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

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


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

Branch: refs/heads/ignite-1056
Commit: d38ad8ce2fe85ac61bd050fa696348f1e6cc29fa
Parents: 6f50ad9 ea90d86
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Thu Jul 2 16:05:12 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Thu Jul 2 16:05:12 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCache.java     |   5 +
 .../apache/ignite/IgniteSystemProperties.java   |   3 +
 .../managers/communication/GridIoManager.java   | 124 +++++++--
 .../managers/communication/GridIoMessage.java   |  15 +-
 .../managers/communication/GridIoPolicy.java    |  32 +--
 .../eventstorage/GridEventStorageManager.java   |   2 +-
 .../processors/cache/CacheOperationContext.java |  44 +++-
 .../internal/processors/cache/CacheType.java    |   8 +-
 .../processors/cache/GridCacheAdapter.java      |  91 ++++---
 .../processors/cache/GridCacheAtomicFuture.java |  12 +-
 .../processors/cache/GridCacheContext.java      |   4 +-
 .../processors/cache/GridCacheIoManager.java    |  12 +-
 .../processors/cache/GridCacheMvccManager.java  |   8 +-
 .../processors/cache/GridCacheProxyImpl.java    |  10 +-
 .../processors/cache/GridCacheSwapManager.java  | 257 ++++++++++++-------
 .../processors/cache/GridCacheUtils.java        |  42 +++
 .../processors/cache/IgniteCacheProxy.java      |  36 ++-
 .../GridDistributedTxFinishRequest.java         |  11 +-
 .../GridDistributedTxPrepareRequest.java        |   9 +-
 .../GridDistributedTxRemoteAdapter.java         |   3 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |   3 +-
 .../cache/distributed/dht/GridDhtTxLocal.java   |   3 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   3 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |   5 +-
 .../dht/atomic/GridDhtAtomicCache.java          |  18 +-
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |  15 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  | 177 +++++++++++--
 .../near/GridNearTxFinishRequest.java           |   3 +-
 .../cache/distributed/near/GridNearTxLocal.java |   3 +-
 .../distributed/near/GridNearTxRemote.java      |   5 +-
 .../cache/transactions/IgniteInternalTx.java    |   3 +-
 .../cache/transactions/IgniteTxAdapter.java     |  11 +-
 .../transactions/IgniteTxLocalAdapter.java      |   3 +-
 .../datastructures/GridCacheAtomicLongImpl.java |  25 +-
 .../GridCacheAtomicSequenceImpl.java            |  11 +-
 .../GridCacheAtomicStampedImpl.java             |  21 +-
 .../GridCacheCountDownLatchImpl.java            |  16 +-
 .../internal/processors/igfs/IgfsContext.java   |   5 +-
 .../plugin/IgnitePluginProcessor.java           |   3 +-
 .../plugin/extensions/communication/IoPool.java |  42 +++
 .../communication/tcp/TcpCommunicationSpi.java  |   2 +-
 .../ignite/spi/discovery/tcp/ClientImpl.java    |   5 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   5 +-
 .../TcpDiscoveryMulticastIpFinder.java          |   2 +-
 .../communication/GridIoManagerSelfTest.java    |   2 +-
 .../cache/IgniteInternalCacheTypesTest.java     |   3 +-
 .../IgniteCachePutRetryAbstractSelfTest.java    | 147 +++++++++++
 .../dht/IgniteCachePutRetryAtomicSelfTest.java  |  34 +++
 ...gniteCachePutRetryTransactionalSelfTest.java |  74 ++++++
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +-
 .../GridCacheEvictionFilterSelfTest.java        |   2 -
 .../inmemory/GridTestSwapSpaceSpi.java          |   3 +-
 .../IgniteCacheFailoverTestSuite.java           |   3 +
 .../query/h2/opt/GridH2KeyValueRowOffheap.java  |   8 +-
 .../processors/query/h2/opt/GridH2Table.java    |   2 +-
 .../cache/IgniteCacheOffheapEvictQueryTest.java |   2 +-
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |   4 +-
 ...QueryOffheapEvictsMultiThreadedSelfTest.java |   5 -
 .../IgniteCacheQueryNodeRestartSelfTest2.java   |   5 +
 modules/urideploy/pom.xml                       |  14 -
 60 files changed, 1053 insertions(+), 377 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d38ad8ce/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
----------------------------------------------------------------------


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

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


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

Branch: refs/heads/ignite-1056
Commit: fa5cb918dcb0fe4253332fd9be859803ad014ddb
Parents: 459d702 4c9d8c2
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Jul 8 19:39:36 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Jul 8 19:39:36 2015 +0300

----------------------------------------------------------------------
 .../configuration/CacheConfiguration.java       |   4 +
 .../configuration/TransactionConfiguration.java |  23 +++
 .../processors/cache/GridCacheAttributes.java   |   3 +
 .../processors/cache/GridCacheContext.java      |   8 +-
 .../processors/cache/GridCacheIoManager.java    |   8 +-
 .../processors/cache/GridCacheProcessor.java    |  21 +-
 .../cache/GridCacheSharedContext.java           |  15 +-
 .../distributed/near/GridNearGetFuture.java     |   4 +-
 .../cache/jta/CacheJtaManagerAdapter.java       |  17 +-
 .../cache/jta/CacheNoopJtaManager.java          |   2 +-
 .../visor/cache/VisorCacheConfiguration.java    |  11 -
 .../cache/CacheFutureExceptionSelfTest.java     | 161 +++++++--------
 .../loadtests/hashmap/GridCacheTestContext.java |   4 +-
 .../HibernateTransactionalDataRegion.java       |  12 +-
 .../hibernate/HibernateL2CacheSelfTest.java     |   7 +-
 .../HibernateL2CacheTransactionalSelfTest.java  |   5 -
 .../apache/ignite/cache/jta/CacheTmLookup.java  |   3 +-
 .../processors/cache/jta/CacheJtaManager.java   |  72 ++++++-
 .../cache/jta/GridCacheXAResource.java          |  16 +-
 .../processors/cache/GridCacheJtaSelfTest.java  |  52 +++--
 .../GridTmLookupLifecycleAwareSelfTest.java     |  29 ++-
 modules/kafka/licenses/apache-2.0.txt           | 202 +++++++++++++++++++
 modules/kafka/pom.xml                           |  11 -
 .../commands/cache/VisorCacheCommand.scala      |   2 -
 .../config/benchmark-index-put.properties       |  64 ------
 .../config/benchmark-put-indexed-val.properties |  64 ++++++
 .../cache/IgnitePutIndex1Benchmark.java         |  42 ----
 .../cache/IgnitePutIndex2Benchmark.java         |  42 ----
 .../cache/IgnitePutIndexedValue1Benchmark.java  |  42 ++++
 .../cache/IgnitePutIndexedValue2Benchmark.java  |  42 ++++
 .../cache/IgnitePutIndexedValue8Benchmark.java  |   2 +-
 .../ignite/yardstick/cache/model/Person1.java   |  29 +--
 .../ignite/yardstick/cache/model/Person2.java   |  45 +----
 .../ignite/yardstick/cache/model/Person8.java   | 155 +-------------
 34 files changed, 661 insertions(+), 558 deletions(-)
----------------------------------------------------------------------



[13/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-sprint-7' into ignite-591

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


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

Branch: refs/heads/ignite-1056
Commit: b84fdaa508592ad9950fd17718301ae4be22953f
Parents: bb8dcf9 f72b291
Author: sevdokimov <se...@jetbrains.com>
Authored: Sat Jul 4 16:07:19 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Sat Jul 4 16:07:19 2015 +0300

----------------------------------------------------------------------
 assembly/dependencies-fabric.xml                |   1 +
 bin/ignite.bat                                  |   8 +-
 bin/ignite.sh                                   |   6 +-
 bin/include/parseargs.bat                       |   1 +
 bin/include/parseargs.sh                        |   3 +
 examples/pom.xml                                |   2 +-
 modules/aop/pom.xml                             |   2 +-
 modules/aws/pom.xml                             |   2 +-
 modules/clients/pom.xml                         |   2 +-
 modules/cloud/pom.xml                           |   2 +-
 modules/codegen/pom.xml                         |   2 +-
 modules/core/pom.xml                            |   2 +-
 .../java/org/apache/ignite/IgniteCache.java     |   5 +
 .../apache/ignite/IgniteSystemProperties.java   |   3 +
 .../ignite/compute/ComputeTaskSplitAdapter.java |   2 +-
 .../configuration/CacheConfiguration.java       | 105 +++---
 .../configuration/NearCacheConfiguration.java   |  10 +-
 .../ignite/internal/GridKernalContextImpl.java  |   2 +-
 .../apache/ignite/internal/IgniteKernal.java    |   1 -
 .../managers/communication/GridIoManager.java   | 173 ++++++---
 .../managers/communication/GridIoMessage.java   |  15 +-
 .../managers/communication/GridIoPolicy.java    |  32 +-
 .../discovery/GridDiscoveryManager.java         |  32 +-
 .../eventstorage/GridEventStorageManager.java   |   2 +-
 .../processors/cache/CacheOperationContext.java |  44 ++-
 .../internal/processors/cache/CacheType.java    |   8 +-
 .../processors/cache/GridCacheAdapter.java      |  91 +++--
 .../processors/cache/GridCacheAtomicFuture.java |  12 +-
 .../processors/cache/GridCacheContext.java      |   4 +-
 .../cache/GridCacheDeploymentManager.java       |  10 +-
 .../processors/cache/GridCacheIoManager.java    |  12 +-
 .../processors/cache/GridCacheMvccManager.java  |   8 +-
 .../processors/cache/GridCacheProcessor.java    |  62 ++-
 .../processors/cache/GridCacheProxyImpl.java    |  10 +-
 .../processors/cache/GridCacheSwapManager.java  | 257 ++++++++-----
 .../processors/cache/GridCacheUtils.java        |  42 +++
 .../processors/cache/IgniteCacheFutureImpl.java |  42 +++
 .../processors/cache/IgniteCacheProxy.java      |  38 +-
 .../GridDistributedTxFinishRequest.java         |  11 +-
 .../GridDistributedTxPrepareRequest.java        |   9 +-
 .../GridDistributedTxRemoteAdapter.java         |   3 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |   3 +-
 .../cache/distributed/dht/GridDhtTxLocal.java   |   3 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   3 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |   5 +-
 .../dht/atomic/GridDhtAtomicCache.java          |  18 +-
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |  15 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  | 177 ++++++++-
 .../near/GridNearTxFinishRequest.java           |   3 +-
 .../cache/distributed/near/GridNearTxLocal.java |   3 +-
 .../distributed/near/GridNearTxRemote.java      |   5 +-
 .../cache/transactions/IgniteInternalTx.java    |   3 +-
 .../cache/transactions/IgniteTxAdapter.java     |  11 +-
 .../transactions/IgniteTxLocalAdapter.java      |   3 +-
 .../processors/clock/GridClockServer.java       |  21 +-
 .../datastructures/GridCacheAtomicLongImpl.java |  25 +-
 .../GridCacheAtomicSequenceImpl.java            |  11 +-
 .../GridCacheAtomicStampedImpl.java             |  21 +-
 .../GridCacheCountDownLatchImpl.java            |  16 +-
 .../internal/processors/igfs/IgfsContext.java   |   5 +-
 .../plugin/IgnitePluginProcessor.java           |   3 +-
 .../internal/util/future/IgniteFutureImpl.java  |  18 +-
 .../shmem/IpcSharedMemoryServerEndpoint.java    |  10 +-
 .../util/nio/GridNioMessageTracker.java         |  23 +-
 .../plugin/extensions/communication/IoPool.java |  42 +++
 .../communication/tcp/TcpCommunicationSpi.java  |   2 +-
 .../ignite/spi/discovery/tcp/ClientImpl.java    |   5 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |   7 +-
 .../TcpDiscoveryMulticastIpFinder.java          |  76 +++-
 .../startup/cmdline/CommandLineStartup.java     |   3 +-
 .../startup/cmdline/CommandLineTransformer.java |   9 +
 .../core/src/main/resources/ignite.properties   |   2 +-
 .../core/src/test/config/spark/spark-config.xml |  46 +++
 modules/core/src/test/config/tests.properties   |   6 +-
 .../communication/GridIoManagerSelfTest.java    |   2 +-
 .../IgniteTopologyPrintFormatSelfTest.java      | 289 ++++++++++++++
 .../cache/GridCacheDaemonNodeStopSelfTest.java  | 119 ------
 .../IgniteDaemonNodeMarshallerCacheTest.java    | 192 ++++++++++
 .../cache/IgniteInternalCacheTypesTest.java     |   3 +-
 .../IgniteCachePutRetryAbstractSelfTest.java    | 147 ++++++++
 .../dht/IgniteCachePutRetryAtomicSelfTest.java  |  34 ++
 ...gniteCachePutRetryTransactionalSelfTest.java |  74 ++++
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +-
 .../GridCachePartitionedFailoverSelfTest.java   |   5 +
 .../GridCacheEvictionFilterSelfTest.java        |   2 -
 .../GridP2PContinuousDeploymentSelfTest.java    |   2 -
 .../inmemory/GridTestSwapSpaceSpi.java          |   3 +-
 .../ignite/testsuites/IgniteBasicTestSuite.java |   1 +
 .../IgniteCacheFailoverTestSuite.java           |   3 +
 .../testsuites/IgniteCacheTestSuite3.java       |   1 -
 .../testsuites/IgniteKernalSelfTestSuite.java   |   1 +
 modules/core/src/test/resources/helloworld.gar  | Bin 6092 -> 0 bytes
 modules/core/src/test/resources/helloworld1.gar | Bin 6092 -> 0 bytes
 modules/core/src/test/resources/readme.txt      |   6 -
 modules/docker/Dockerfile                       |  55 +++
 modules/docker/README.txt                       |  11 +
 modules/docker/build_users_libs.sh              |  39 ++
 modules/docker/download_ignite.sh               |  49 +++
 modules/docker/execute.sh                       |  62 +++
 modules/docker/run.sh                           |  34 ++
 modules/extdata/p2p/pom.xml                     |   4 +-
 modules/extdata/uri/META-INF/ignite.xml         |  38 ++
 .../extdata/uri/modules/uri-dependency/pom.xml  |  42 +++
 .../deployment/uri/tasks/GarHelloWorldBean.java |  60 +++
 .../src/main/resources/gar-example.properties   |  18 +
 modules/extdata/uri/pom.xml                     |  62 ++-
 .../deployment/uri/tasks/GarHelloWorldTask.java |  81 ++++
 .../deployment/uri/tasks/gar-spring-bean.xml    |  29 ++
 modules/gce/pom.xml                             |   2 +-
 modules/geospatial/pom.xml                      |   2 +-
 modules/hadoop/pom.xml                          |   2 +-
 modules/hibernate/pom.xml                       |   2 +-
 modules/indexing/pom.xml                        |   2 +-
 .../query/h2/opt/GridH2KeyValueRowOffheap.java  |   8 +-
 .../processors/query/h2/opt/GridH2Table.java    |   2 +-
 .../cache/IgniteCacheOffheapEvictQueryTest.java |   2 +-
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |   4 +-
 ...QueryOffheapEvictsMultiThreadedSelfTest.java |   5 -
 .../IgniteCacheQueryNodeRestartSelfTest2.java   |   5 +
 modules/jcl/pom.xml                             |   2 +-
 modules/jta/pom.xml                             |   2 +-
 modules/kafka/pom.xml                           | 116 ++++++
 .../ignite/stream/kafka/KafkaStreamer.java      | 220 +++++++++++
 .../kafka/IgniteKafkaStreamerSelfTestSuite.java |  37 ++
 .../stream/kafka/KafkaEmbeddedBroker.java       | 378 +++++++++++++++++++
 .../kafka/KafkaIgniteStreamerSelfTest.java      | 227 +++++++++++
 .../ignite/stream/kafka/SimplePartitioner.java  |  53 +++
 modules/log4j/pom.xml                           |   2 +-
 modules/mesos/pom.xml                           |   2 +-
 modules/rest-http/pom.xml                       |   2 +-
 modules/scalar-2.10/pom.xml                     |   2 +-
 modules/scalar/pom.xml                          |   2 +-
 modules/schedule/pom.xml                        |   2 +-
 modules/schema-import/pom.xml                   |   2 +-
 .../ignite/schema/model/PojoDescriptor.java     |   2 +
 .../apache/ignite/schema/model/PojoField.java   |   1 +
 .../parser/dialect/OracleMetadataDialect.java   |   2 +-
 modules/slf4j/pom.xml                           |   2 +-
 modules/spark-2.10/pom.xml                      |   2 +-
 modules/spark/pom.xml                           |   2 +-
 .../org/apache/ignite/spark/IgniteContext.scala |  50 ++-
 .../org/apache/ignite/spark/IgniteRddSpec.scala |  18 +
 modules/spring/pom.xml                          |   2 +-
 .../util/spring/IgniteSpringHelperImpl.java     |  72 +++-
 .../IgniteExcludeInConfigurationTest.java       |  78 ++++
 .../org/apache/ignite/spring/sprint-exclude.xml |  57 +++
 .../testsuites/IgniteSpringTestSuite.java       |   2 +
 modules/ssh/pom.xml                             |   2 +-
 modules/tools/pom.xml                           |   2 +-
 modules/urideploy/pom.xml                       |   2 +-
 .../GridTaskUriDeploymentDeadlockSelfTest.java  |  13 +-
 .../ignite/p2p/GridP2PDisabledSelfTest.java     |   2 +-
 modules/visor-console-2.10/pom.xml              |   2 +-
 modules/visor-console/pom.xml                   |   2 +-
 .../ignite/visor/commands/VisorConsole.scala    |   3 +-
 .../visor/commands/open/VisorOpenCommand.scala  | 319 ++++++++++++++++
 .../scala/org/apache/ignite/visor/visor.scala   | 230 +----------
 .../ignite/visor/VisorRuntimeBaseSpec.scala     |   2 +
 .../commands/kill/VisorKillCommandSpec.scala    |   1 +
 .../commands/start/VisorStartCommandSpec.scala  |   1 +
 .../commands/tasks/VisorTasksCommandSpec.scala  |   1 +
 .../commands/vvm/VisorVvmCommandSpec.scala      |   1 +
 modules/visor-plugins/pom.xml                   |   2 +-
 modules/web/pom.xml                             |   2 +-
 modules/yardstick/pom.xml                       |   2 +-
 pom.xml                                         |  15 +-
 166 files changed, 4204 insertions(+), 929 deletions(-)
----------------------------------------------------------------------



[48/50] [abbrv] incubator-ignite git commit: # ignite-929 close does not destroy cache (cherry picked from commit e3fba88)

Posted by sb...@apache.org.
# ignite-929 close does not destroy cache (cherry picked from commit e3fba88)


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

Branch: refs/heads/ignite-1056
Commit: a233fa00fcfb1266acdecfec45b7ac6024cc9791
Parents: 3dcf891
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jul 10 10:20:11 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jul 10 10:48:44 2015 +0300

----------------------------------------------------------------------
 .../examples/ScalarCacheAffinityExample.scala   |   2 +-
 .../scalar/examples/ScalarCacheExample.scala    |   2 +-
 .../ScalarCachePopularNumbersExample.scala      |   2 +-
 .../examples/ScalarCacheQueryExample.scala      |   2 +-
 .../examples/ScalarSnowflakeSchemaExample.scala |   4 +-
 .../java/org/apache/ignite/IgniteCache.java     |  14 +-
 .../org/apache/ignite/cache/CacheManager.java   |  13 +-
 .../apache/ignite/internal/IgniteKernal.java    |   2 +-
 .../discovery/GridDiscoveryManager.java         |  23 +-
 .../cache/DynamicCacheChangeRequest.java        |  39 +-
 .../processors/cache/GridCacheGateway.java      |   4 +-
 .../GridCachePartitionExchangeManager.java      |   6 +-
 .../processors/cache/GridCacheProcessor.java    | 102 ++-
 .../processors/cache/IgniteCacheProxy.java      | 448 +++++++---
 .../distributed/dht/GridDhtCacheEntry.java      |   4 +-
 .../GridDhtPartitionsExchangeFuture.java        |  30 +-
 .../visor/cache/VisorCacheStopTask.java         |   2 +-
 .../affinity/IgniteClientNodeAffinityTest.java  |  14 +-
 .../IgniteFairAffinityDynamicCacheSelfTest.java |   3 +-
 ...cheStoreSessionListenerAbstractSelfTest.java | 111 ++-
 .../GridCacheTxLoadFromStoreOnLockSelfTest.java |  34 +-
 .../CacheMetricsForClusterGroupSelfTest.java    |  10 +-
 .../cache/CacheOffheapMapEntrySelfTest.java     |   7 +-
 .../cache/CacheStopAndDestroySelfTest.java      | 859 +++++++++++++++++++
 ...eUsageMultinodeDynamicStartAbstractTest.java |   2 +-
 ...ProjectionForCachesOnDaemonNodeSelfTest.java |   2 +-
 .../cache/IgniteDynamicCacheStartSelfTest.java  | 140 +--
 ...teCacheClientNodePartitionsExchangeTest.java |  29 +-
 ...CacheLocalOffHeapAndSwapMetricsSelfTest.java |   2 +-
 .../DataStreamerMultinodeCreateCacheTest.java   |  14 +-
 .../testsuites/IgniteCacheTestSuite4.java       |   2 +
 .../CacheConfigurationP2PTestClient.java        |   4 +-
 32 files changed, 1593 insertions(+), 339 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample.scala
index fbf66bc..40b947d 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample.scala
@@ -62,7 +62,7 @@ object ScalarCacheAffinityExample extends App {
             visitUsingMapKeysToNodes(cache)
         }
         finally {
-            cache.close()
+            cache.destroy()
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
index 42e8ca4..0bf8d6f 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheExample.scala
@@ -50,7 +50,7 @@ object ScalarCacheExample extends App {
             basicOperations()
         }
         finally {
-            cache.close()
+            cache.destroy()
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
index 828c5a3..d113297 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
@@ -93,7 +93,7 @@ object ScalarCachePopularNumbersExample extends App {
             }
         }
         finally {
-            cache.close()
+            cache.destroy()
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
index b8054eb..1a42947 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
@@ -55,7 +55,7 @@ object ScalarCacheQueryExample {
                 example(ignite$)
             }
             finally {
-                cache.close()
+                cache.destroy()
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
index 2656f44..33b2fcc 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
@@ -86,11 +86,11 @@ object ScalarSnowflakeSchemaExample {
                     queryProductPurchases()
                 }
                 finally {
-                    factCache.close()
+                    factCache.destroy()
                 }
             }
             finally {
-                dimCache.close()
+                dimCache.destroy()
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/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 c8d6d7a..4938ab1 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -543,9 +543,21 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
         CacheEntryProcessor<K, V, T> entryProcessor, Object... args);
 
     /**
+     * Closes this cache instance.
+     * <p>
+     * For local cache equivalent to {@link #destroy()}.
+     * For distributed caches, if called on clients, stops client cache, if called on a server node,
+     * just closes this cache instance and does not destroy cache data.
+     * <p>
+     * After cache instance is closed another {@link IgniteCache} instance for the same
+     * cache can be created using {@link Ignite#cache(String)} method.
+     */
+    @Override public void close();
+
+    /**
      * Completely deletes the cache with all its data from the system on all cluster nodes.
      */
-    @Override void close();
+    public void destroy();
 
     /**
      * This cache node to re-balance its partitions. This method is usually used when

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
index 9ba50d1..bc6df76 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheManager.java
@@ -130,6 +130,7 @@ public class CacheManager implements javax.cache.CacheManager {
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
     @Override public <K, V, C extends Configuration<K, V>> Cache<K, V> createCache(String cacheName, C cacheCfg)
         throws IllegalArgumentException {
         kernalGateway.readLock();
@@ -155,11 +156,11 @@ public class CacheManager implements javax.cache.CacheManager {
 
             IgniteCache<K, V> res = ignite.createCache(igniteCacheCfg);
 
-            ((IgniteCacheProxy<K, V>)res).setCacheManager(this);
-
             if (res == null)
                 throw new CacheException();
 
+            ((IgniteCacheProxy<K, V>)res).setCacheManager(this);
+
             if (igniteCacheCfg.isManagementEnabled())
                 enableManagement(cacheName, true);
 
@@ -219,6 +220,7 @@ public class CacheManager implements javax.cache.CacheManager {
 
     /**
      * @param cacheName Cache name.
+     * @return Cache.
      */
     @Nullable private <K, V> IgniteCache<K, V> getCache0(String cacheName) {
         if (cacheName == null)
@@ -272,11 +274,13 @@ public class CacheManager implements javax.cache.CacheManager {
         }
 
         if (cache != null)
-            cache.close();
+            cache.destroy();
     }
 
     /**
      * @param cacheName Cache name.
+     * @param objName Object name.
+     * @return Object name instance.
      */
     private ObjectName getObjectName(String cacheName, String objName) {
         String mBeanName = "javax.cache:type=" + objName + ",CacheManager="
@@ -339,7 +343,8 @@ public class CacheManager implements javax.cache.CacheManager {
 
     /**
      * @param mxbean MXBean.
-     * @param name cache name.
+     * @param name Cache name.
+     * @param beanType Bean type.
      */
     private void registerCacheObject(Object mxbean, String name, String beanType) {
         MBeanServer mBeanSrv = ignite.configuration().getMBeanServer();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/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 d6ddf79..024dc7b 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
@@ -2436,7 +2436,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
         IgniteInternalFuture<?> stopFut;
 
         try {
-            stopFut = ctx.cache().dynamicStopCache(cacheName);
+            stopFut = ctx.cache().dynamicDestroyCache(cacheName);
         }
         finally {
             unguard();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index a8ce8ff..eae07ed 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -263,6 +263,19 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
     }
 
     /**
+     * Removes near node ID from cache filter.
+     *
+     * @param cacheName Cache name.
+     * @param clientNodeId Near node ID.
+     */
+    public void onClientCacheClose(String cacheName, UUID clientNodeId) {
+        CachePredicate predicate = registeredCaches.get(cacheName);
+
+        if (predicate != null)
+            predicate.onNodeLeft(clientNodeId);
+    }
+
+    /**
      * @return Client nodes map.
      */
     public Map<String, Map<UUID, Boolean>> clientNodesMap() {
@@ -1079,9 +1092,17 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
      * @return {@code True} if node for given ID is alive.
      */
     public boolean alive(UUID nodeId) {
+        return getAlive(nodeId) != null;
+    }
+
+    /**
+     * @param nodeId Node ID.
+     * @return Node if node is alive.
+     */
+    @Nullable public ClusterNode getAlive(UUID nodeId) {
         assert nodeId != null;
 
-        return getSpi().getNode(nodeId) != null; // Go directly to SPI without checking disco cache.
+        return getSpi().getNode(nodeId); // Go directly to SPI without checking disco cache.
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java
index c08a179..7af1572 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeRequest.java
@@ -57,6 +57,9 @@ public class DynamicCacheChangeRequest implements Serializable {
     /** Stop flag. */
     private boolean stop;
 
+    /** Close flag. */
+    private boolean close;
+
     /** Fail if exists flag. */
     private boolean failIfExists;
 
@@ -68,23 +71,10 @@ public class DynamicCacheChangeRequest implements Serializable {
      *
      * @param cacheName Cache stop name.
      * @param initiatingNodeId Initiating node ID.
-     * @param stop Stop flag.
      */
-    public DynamicCacheChangeRequest(String cacheName, UUID initiatingNodeId, boolean stop) {
+    public DynamicCacheChangeRequest(String cacheName, UUID initiatingNodeId) {
         this.cacheName = cacheName;
         this.initiatingNodeId = initiatingNodeId;
-
-        this.stop = stop;
-    }
-
-    /**
-     * Constructor means for start requests.
-     *
-     * @param cacheName Cache name.
-     * @param initiatingNodeId Initiating node ID.
-     */
-    public DynamicCacheChangeRequest(String cacheName, UUID initiatingNodeId) {
-        this(cacheName, initiatingNodeId, false);
     }
 
     /**
@@ -130,6 +120,13 @@ public class DynamicCacheChangeRequest implements Serializable {
     }
 
     /**
+     * @param stop New stop flag.
+     */
+    public void stop(boolean stop) {
+        this.stop = stop;
+    }
+
+    /**
      * @return Cache name.
      */
     public String cacheName() {
@@ -220,6 +217,20 @@ public class DynamicCacheChangeRequest implements Serializable {
         this.failIfExists = failIfExists;
     }
 
+    /**
+     * @return Close flag.
+     */
+    public boolean close() {
+        return close;
+    }
+
+    /**
+     * @param close New close flag.
+     */
+    public void close(boolean close) {
+        this.close = close;
+    }
+
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(DynamicCacheChangeRequest.class, this, "cacheName", cacheName());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
index d9d151c..f2beb0a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
@@ -68,7 +68,7 @@ public class GridCacheGateway<K, V> {
      *
      * @return {@code True} if enter successful, {@code false} if the cache or the node was stopped.
      */
-    public boolean enterIfNotClosed() {
+    public boolean enterIfNotStopped() {
         onEnter();
 
         // Must unlock in case of unexpected errors to avoid
@@ -89,7 +89,7 @@ public class GridCacheGateway<K, V> {
      *
      * @return {@code True} if enter successful, {@code false} if the cache or the node was stopped.
      */
-    public boolean enterIfNotClosedNoLock() {
+    public boolean enterIfNotStoppedNoLock() {
         onEnter();
 
         return !stopped;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index af87685..4398b4c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -156,16 +156,14 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
 
                         // Validate requests to check if event should trigger partition exchange.
                         for (DynamicCacheChangeRequest req : batch.requests()) {
-                            if (cctx.cache().dynamicCacheRegistered(req))
+                            if (cctx.cache().exchangeNeeded(req))
                                 valid.add(req);
                             else
                                 cctx.cache().completeStartFuture(req);
                         }
 
                         if (!F.isEmpty(valid)) {
-                            exchId = exchangeId(n.id(),
-                                affinityTopologyVersion(e),
-                                e.type());
+                            exchId = exchangeId(n.id(), affinityTopologyVersion(e), e.type());
 
                             exchFut = exchangeFuture(exchId, e, valid);
                         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/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 de1eac2..bb87a86 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
@@ -1390,10 +1390,16 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @return {@code True} if change request was registered to apply.
      */
     @SuppressWarnings("IfMayBeConditional")
-    public boolean dynamicCacheRegistered(DynamicCacheChangeRequest req) {
+    public boolean exchangeNeeded(DynamicCacheChangeRequest req) {
         DynamicCacheDescriptor desc = registeredCaches.get(maskNull(req.cacheName()));
 
         if (desc != null) {
+            if (req.close()) {
+                assert req.initiatingNodeId() != null : req;
+
+                return true;
+            }
+
             if (desc.deploymentId().equals(req.deploymentId())) {
                 if (req.start())
                     return !desc.cancelled();
@@ -1515,20 +1521,26 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @param req Stop request.
      */
     public void blockGateway(DynamicCacheChangeRequest req) {
-        assert req.stop();
+        assert req.stop() || req.close();
 
-        // Break the proxy before exchange future is done.
-        IgniteCacheProxy<?, ?> proxy = jCacheProxies.get(maskNull(req.cacheName()));
+        if (req.stop() || (req.close() && req.initiatingNodeId().equals(ctx.localNodeId()))) {
+            // Break the proxy before exchange future is done.
+            IgniteCacheProxy<?, ?> proxy = jCacheProxies.get(maskNull(req.cacheName()));
 
-        if (proxy != null)
-            proxy.gate().block();
+            if (proxy != null) {
+                if (req.stop())
+                    proxy.gate().block();
+                else
+                    proxy.closeProxy();
+            }
+        }
     }
 
     /**
      * @param req Request.
      */
     private void stopGateway(DynamicCacheChangeRequest req) {
-        assert req.stop();
+        assert req.stop() : req;
 
         // Break the proxy before exchange future is done.
         IgniteCacheProxy<?, ?> proxy = jCacheProxies.remove(maskNull(req.cacheName()));
@@ -1541,7 +1553,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @param req Stop request.
      */
     public void prepareCacheStop(DynamicCacheChangeRequest req) {
-        assert req.stop();
+        assert req.stop() || req.close() : req;
 
         GridCacheAdapter<?, ?> cache = caches.remove(maskNull(req.cacheName()));
 
@@ -1597,6 +1609,23 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                     if (desc != null && desc.cancelled() && desc.deploymentId().equals(req.deploymentId()))
                         registeredCaches.remove(masked, desc);
                 }
+                else if (req.close() && req.initiatingNodeId().equals(ctx.localNodeId())) {
+                    IgniteCacheProxy<?, ?> proxy = jCacheProxies.remove(masked);
+
+                    if (proxy != null) {
+                        if (proxy.context().affinityNode()) {
+                            GridCacheAdapter<?, ?> cache = caches.get(masked);
+
+                            if (cache != null)
+                                jCacheProxies.put(masked, new IgniteCacheProxy(cache.context(), cache, null, false));
+                        }
+                        else {
+                            proxy.context().gate().onStopped();
+
+                            prepareCacheStop(req);
+                        }
+                    }
+                }
 
                 completeStartFuture(req);
             }
@@ -2005,13 +2034,35 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     }
 
     /**
-     * @param cacheName Cache name to stop.
-     * @return Future that will be completed when cache is stopped.
+     * @param cacheName Cache name to destroy.
+     * @return Future that will be completed when cache is destroyed.
      */
-    public IgniteInternalFuture<?> dynamicStopCache(String cacheName) {
+    public IgniteInternalFuture<?> dynamicDestroyCache(String cacheName) {
         checkEmptyTransactions();
 
-        DynamicCacheChangeRequest t = new DynamicCacheChangeRequest(cacheName, ctx.localNodeId(), true);
+        DynamicCacheChangeRequest t = new DynamicCacheChangeRequest(cacheName, ctx.localNodeId());
+
+        t.stop(true);
+
+        return F.first(initiateCacheChanges(F.asList(t), false));
+    }
+
+
+    /**
+     * @param cacheName Cache name to close.
+     * @return Future that will be completed when cache is closed.
+     */
+    public IgniteInternalFuture<?> dynamicCloseCache(String cacheName) {
+        IgniteCacheProxy<?, ?> proxy = jCacheProxies.get(maskNull(cacheName));
+
+        if (proxy == null || proxy.proxyClosed())
+            return new GridFinishedFuture<>(); // No-op.
+
+        checkEmptyTransactions();
+
+        DynamicCacheChangeRequest t = new DynamicCacheChangeRequest(cacheName, ctx.localNodeId());
+
+        t.close(true);
 
         return F.first(initiateCacheChanges(F.asList(t), false));
     }
@@ -2031,16 +2082,24 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             DynamicCacheStartFuture fut = new DynamicCacheStartFuture(req.cacheName(), req.deploymentId(), req);
 
             try {
-                if (req.stop()) {
+                if (req.stop() || req.close()) {
                     DynamicCacheDescriptor desc = registeredCaches.get(maskNull(req.cacheName()));
 
                     if (desc == null)
                         // No-op.
                         fut.onDone();
                     else {
+                        assert desc.cacheConfiguration() != null : desc;
+
+                        if (req.close() && desc.cacheConfiguration().getCacheMode() == LOCAL) {
+                            req.close(false);
+
+                            req.stop(true);
+                        }
+
                         IgniteUuid dynamicDeploymentId = desc.deploymentId();
 
-                        assert dynamicDeploymentId != null;
+                        assert dynamicDeploymentId != null : desc;
 
                         // Save deployment ID to avoid concurrent stops.
                         req.deploymentId(dynamicDeploymentId);
@@ -2188,9 +2247,12 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                     req.nearCacheConfiguration() != null);
             }
             else {
+                assert req.stop() || req.close() : req;
+
                 if (desc == null) {
-                    // If local node initiated start, fail the start future.
-                    DynamicCacheStartFuture changeFut = (DynamicCacheStartFuture)pendingFuts.get(maskNull(req.cacheName()));
+                    // If local node initiated start, finish future.
+                    DynamicCacheStartFuture changeFut =
+                        (DynamicCacheStartFuture)pendingFuts.get(maskNull(req.cacheName()));
 
                     if (changeFut != null && changeFut.deploymentId().equals(req.deploymentId())) {
                         // No-op.
@@ -2200,9 +2262,13 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                     return;
                 }
 
-                desc.onCancelled();
+                if (req.stop()) {
+                    desc.onCancelled();
 
-                ctx.discovery().removeCacheFilter(req.cacheName());
+                    ctx.discovery().removeCacheFilter(req.cacheName());
+                }
+                else
+                    ctx.discovery().onClientCacheClose(req.cacheName(), req.initiatingNodeId());
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/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 b31b2e8..9767f49 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
@@ -18,8 +18,8 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.CacheManager;
 import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.CacheManager;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
@@ -171,19 +171,23 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public CacheMetrics metrics() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return ctx.cache().metrics();
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public CacheMetrics metrics(ClusterGroup grp) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             List<CacheMetrics> metrics = new ArrayList<>(grp.nodes().size());
@@ -202,19 +206,21 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             return new CacheMetricsSnapshot(ctx.cache().metrics(), metrics);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public CacheMetricsMXBean mxBean() {
-        CacheOperationContext prev = gate.enter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return ctx.cache().mxBean();
         }
         finally {
-            gate.leave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -230,19 +236,23 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Nullable @Override public Cache.Entry<K, V> randomEntry() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return ctx.cache().randomEntry();
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public IgniteCache<K, V> withExpiryPolicy(ExpiryPolicy plc) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             CacheOperationContext prj0 = opCtx != null ? opCtx.withExpiryPolicy(plc) :
@@ -251,7 +261,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             return new IgniteCacheProxy<>(ctx, delegate, prj0, isAsync(), lock);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -262,7 +272,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public IgniteCache<K, V> withNoRetries() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             boolean noRetries = opCtx != null && opCtx.noRetries();
@@ -280,14 +292,16 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 lock);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void loadCache(@Nullable IgniteBiPredicate<K, V> p, @Nullable Object... args) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync())
@@ -296,7 +310,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     ctx.cache().globalLoadCache(p, args);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -307,7 +321,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public void localLoadCache(@Nullable IgniteBiPredicate<K, V> p, @Nullable Object... args) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync())
@@ -316,7 +332,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     delegate.localLoadCache(p, args);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -327,7 +343,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Nullable @Override public V getAndPutIfAbsent(K key, V val) throws CacheException {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -339,7 +357,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.getAndPutIfAbsent(key, val);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -359,13 +377,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public boolean isLocalLocked(K key, boolean byCurrThread) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return byCurrThread ? delegate.isLockedByThread(key) : delegate.isLocked(key);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -379,7 +399,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
         final CacheQuery<Map.Entry<K,V>> qry;
         final CacheQueryFuture<Map.Entry<K,V>> fut;
 
-        boolean isKeepPortable = opCtx != null ? opCtx.isKeepPortable() : false;
+        boolean isKeepPortable = opCtx != null && opCtx.isKeepPortable();
 
         if (filter instanceof ScanQuery) {
             IgniteBiPredicate<K, V> p = ((ScanQuery)filter).getFilter();
@@ -444,11 +464,11 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     }
 
     /**
-     * @param local Enforce local.
+     * @param loc Enforce local.
      * @return Local node cluster group.
      */
-    private ClusterGroup projection(boolean local) {
-        if (local || ctx.isLocal() || isReplicatedDataNode())
+    private ClusterGroup projection(boolean loc) {
+        if (loc || ctx.isLocal() || isReplicatedDataNode())
             return ctx.kernalContext().grid().cluster().forLocal();
 
         if (ctx.isReplicated())
@@ -517,7 +537,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     @Override public <R> QueryCursor<R> query(Query<R> qry) {
         A.notNull(qry, "qry");
 
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             ctx.checkSecurity(SecurityPermission.CACHE_READ);
@@ -558,7 +580,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw new CacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -589,7 +611,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public Iterable<Cache.Entry<K, V>> localEntries(CachePeekMode... peekModes) throws CacheException {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return delegate.localEntries(peekModes);
@@ -598,37 +622,43 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public QueryMetrics queryMetrics() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return delegate.context().queries().metrics();
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void localEvict(Collection<? extends K> keys) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             delegate.evictAll(keys);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Nullable @Override public V localPeek(K key, CachePeekMode... peekModes) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return delegate.localPeek(key, peekModes, null);
@@ -637,20 +667,22 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void localPromote(Set<? extends K> keys) throws CacheException {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 delegate.promoteAll(keys);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -660,7 +692,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public int size(CachePeekMode... peekModes) throws CacheException {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             if (isAsync()) {
@@ -675,13 +709,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public int localSize(CachePeekMode... peekModes) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return delegate.localSize(peekModes);
@@ -690,14 +726,16 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public V get(K key) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -709,7 +747,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.get(key);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -720,7 +758,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public Map<K, V> getAll(Set<? extends K> keys) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -732,7 +772,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.getAll(keys);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -743,7 +783,9 @@ 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);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -755,7 +797,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.getAllOutTx(keys);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -769,7 +811,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
      */
     public Map<K, V> getAll(Collection<? extends K> keys) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -781,7 +825,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.getAll(keys);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -796,19 +840,23 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
      * @return Entry set.
      */
     public Set<Cache.Entry<K, V>> entrySetx(CacheEntryPredicate... filter) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return delegate.entrySetx(filter);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public boolean containsKey(K key) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             if (isAsync()) {
@@ -820,13 +868,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 return delegate.containsKey(key);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public boolean containsKeys(Set<? extends K> keys) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             if (isAsync()) {
@@ -838,7 +888,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 return delegate.containsKeys(keys);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -848,7 +898,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
         boolean replaceExisting,
         @Nullable final CompletionListener completionLsnr
     ) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             IgniteInternalFuture<?> fut = ctx.cache().loadAll(keys, replaceExisting);
@@ -869,14 +921,16 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             }
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void put(K key, V val) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -896,7 +950,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     delegate.put(key, val);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -907,7 +961,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public V getAndPut(K key, V val) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -919,7 +975,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.getAndPut(key, val);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -930,7 +986,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public void putAll(Map<? extends K, ? extends V> map) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync())
@@ -939,7 +997,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     delegate.putAll(map);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -950,7 +1008,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public boolean putIfAbsent(K key, V val) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -962,7 +1022,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.putIfAbsent(key, val);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -973,7 +1033,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public boolean remove(K key) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -985,7 +1047,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.remove(key);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -996,7 +1058,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public boolean remove(K key, V oldVal) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1008,7 +1072,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.remove(key, oldVal);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1019,7 +1083,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public V getAndRemove(K key) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1031,7 +1097,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.getAndRemove(key);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1042,7 +1108,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public boolean replace(K key, V oldVal, V newVal) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1054,7 +1122,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.replace(key, oldVal, newVal);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1065,7 +1133,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public boolean replace(K key, V val) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1077,7 +1147,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.replace(key, val);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1088,7 +1158,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public V getAndReplace(K key, V val) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1100,7 +1172,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.getAndReplace(key, val);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1111,7 +1183,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public void removeAll(Set<? extends K> keys) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync())
@@ -1120,7 +1194,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     delegate.removeAll(keys);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1130,7 +1204,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public void removeAll() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             if (isAsync())
@@ -1142,13 +1218,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void clear(K key) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             if (isAsync())
@@ -1160,13 +1238,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void clearAll(Set<? extends K> keys) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             if (isAsync())
@@ -1178,13 +1258,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void clear() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             if (isAsync())
@@ -1196,32 +1278,36 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void localClear(K key) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             delegate.clearLocally(key);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void localClearAll(Set<? extends K> keys) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             for (K key : keys)
                 delegate.clearLocally(key);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -1229,7 +1315,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     @Override public <T> T invoke(K key, EntryProcessor<K, V, T> entryProcessor, Object... args)
         throws EntryProcessorException {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1255,7 +1343,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 }
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1267,7 +1355,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     @Override public <T> T invoke(K key, CacheEntryProcessor<K, V, T> entryProcessor, Object... args)
         throws EntryProcessorException {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1293,7 +1383,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 }
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1303,10 +1393,12 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public <T> Map<K, EntryProcessorResult<T>> invokeAll(Set<? extends K> keys,
-                                                                   EntryProcessor<K, V, T> entryProcessor,
-                                                                   Object... args) {
+        EntryProcessor<K, V, T> entryProcessor,
+        Object... args) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1318,7 +1410,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.invokeAll(keys, entryProcessor, args);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1331,7 +1423,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
         CacheEntryProcessor<K, V, T> entryProcessor,
         Object... args) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1343,7 +1437,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.invokeAll(keys, entryProcessor, args);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1356,7 +1450,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
         Map<? extends K, ? extends EntryProcessor<K, V, T>> map,
         Object... args) {
         try {
-            CacheOperationContext prev = onEnter(opCtx);
+            GridCacheGateway<K, V> gate = this.gate;
+
+            CacheOperationContext prev = onEnter(gate, opCtx);
 
             try {
                 if (isAsync()) {
@@ -1368,7 +1464,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     return delegate.invokeAll(map, args);
             }
             finally {
-                onLeave(prev);
+                onLeave(gate, prev);
             }
         }
         catch (IgniteCheckedException e) {
@@ -1394,17 +1490,43 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     }
 
     /** {@inheritDoc} */
+    @Override public void destroy() {
+        GridCacheGateway<K, V> gate = this.gate;
+
+        if (!onEnterIfNoStop(gate))
+            return;
+
+        IgniteInternalFuture<?> fut;
+
+        try {
+            fut = ctx.kernalContext().cache().dynamicDestroyCache(ctx.name());
+        }
+        finally {
+            onLeave(gate);
+        }
+
+        try {
+            fut.get();
+        }
+        catch (IgniteCheckedException e) {
+            throw cacheException(e);
+        }
+    }
+
+    /** {@inheritDoc} */
     @Override public void close() {
-        if (!onEnterIfNoClose())
+        GridCacheGateway<K, V> gate = this.gate;
+
+        if (!onEnterIfNoStop(gate))
             return;
 
         IgniteInternalFuture<?> fut;
 
         try {
-            fut = ctx.kernalContext().cache().dynamicStopCache(ctx.name());
+            fut = ctx.kernalContext().cache().dynamicCloseCache(ctx.name());
         }
         finally {
-            onLeave();
+            onLeave(gate);
         }
 
         try {
@@ -1417,14 +1539,16 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public boolean isClosed() {
-        if (!onEnterIfNoClose())
+        GridCacheGateway<K, V> gate = this.gate;
+
+        if (!onEnterIfNoStop(gate))
             return true;
 
         try {
             return ctx.kernalContext().cache().context().closed(ctx);
         }
         finally {
-            onLeave();
+            onLeave(gate);
         }
     }
 
@@ -1448,7 +1572,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
     /** {@inheritDoc} */
     @Override public void registerCacheEntryListener(CacheEntryListenerConfiguration<K, V> lsnrCfg) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             ctx.continuousQueries().executeJCacheQuery(lsnrCfg, false);
@@ -1457,13 +1583,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public void deregisterCacheEntryListener(CacheEntryListenerConfiguration<K, V> lsnrCfg) {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             ctx.continuousQueries().cancelJCacheQuery(lsnrCfg);
@@ -1472,19 +1600,21 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
             throw cacheException(e);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
     /** {@inheritDoc} */
     @Override public Iterator<Cache.Entry<K, V>> iterator() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             return ctx.cache().igniteIterator();
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -1516,8 +1646,11 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
      *
      * @return Projection for portable objects.
      */
+    @SuppressWarnings("unchecked")
     public <K1, V1> IgniteCache<K1, V1> keepPortable() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             CacheOperationContext opCtx0 =
@@ -1535,7 +1668,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 lock);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -1543,7 +1676,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
      * @return Cache with skip store enabled.
      */
     public IgniteCache<K, V> skipStore() {
-        CacheOperationContext prev = onEnter(opCtx);
+        GridCacheGateway<K, V> gate = this.gate;
+
+        CacheOperationContext prev = onEnter(gate, opCtx);
 
         try {
             boolean skip = opCtx != null && opCtx.skipStore();
@@ -1565,7 +1700,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                 lock);
         }
         finally {
-            onLeave(prev);
+            onLeave(gate, prev);
         }
     }
 
@@ -1592,10 +1727,69 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     }
 
     /**
+     * @return {@code True} if proxy was closed.
+     */
+    public boolean proxyClosed() {
+        return !gate.getClass().equals(GridCacheGateway.class);
+    }
+
+    /**
+     * Closes this proxy instance.
+     */
+    public void closeProxy() {
+        gate = new GridCacheGateway<K, V>(ctx) {
+            @Override public void enter() {
+                throw new IllegalStateException("Cache has been closed: " + ctx.name());
+            }
+
+            @Override public boolean enterIfNotStopped() {
+                return false;
+            }
+
+            @Override public boolean enterIfNotStoppedNoLock() {
+                return false;
+            }
+
+            @Override public void leaveNoLock() {
+                assert false;
+            }
+
+            @Override public void leave() {
+                assert false;
+            }
+
+            @Nullable @Override public CacheOperationContext enter(@Nullable CacheOperationContext opCtx) {
+                throw new IllegalStateException("Cache has been closed: " + ctx.name());
+            }
+
+            @Nullable @Override public CacheOperationContext enterNoLock(@Nullable CacheOperationContext opCtx) {
+                throw new IllegalStateException("Cache has been closed: " + ctx.name());
+            }
+
+            @Override public void leave(CacheOperationContext prev) {
+                assert false;
+            }
+
+            @Override public void leaveNoLock(CacheOperationContext prev) {
+                assert false;
+            }
+
+            @Override public void block() {
+                // No-op.
+            }
+
+            @Override public void onStopped() {
+                // No-op.
+            }
+        };
+    }
+
+    /**
+     * @param gate Cache gateway.
      * @param opCtx Cache operation context to guard.
      * @return Previous projection set on this thread.
      */
-    private CacheOperationContext onEnter(CacheOperationContext opCtx) {
+    private CacheOperationContext onEnter(GridCacheGateway<K, V> gate, CacheOperationContext opCtx) {
         if (lock)
             return gate.enter(opCtx);
         else
@@ -1603,21 +1797,21 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     }
 
     /**
-     * On enter.
-     *
+     * @param gate Cache gateway.
      * @return {@code True} if enter successful.
      */
-    private boolean onEnterIfNoClose() {
+    private boolean onEnterIfNoStop(GridCacheGateway<K, V> gate) {
         if (lock)
-            return gate.enterIfNotClosed();
+            return gate.enterIfNotStopped();
         else
-            return gate.enterIfNotClosedNoLock();
+            return gate.enterIfNotStoppedNoLock();
     }
 
     /**
+     * @param gate Cache gateway.
      * @param opCtx Operation context to guard.
      */
-    private void onLeave(CacheOperationContext opCtx) {
+    private void onLeave(GridCacheGateway<K, V> gate, CacheOperationContext opCtx) {
         if (lock)
             gate.leave(opCtx);
         else
@@ -1625,9 +1819,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     }
 
     /**
-     * On leave.
+     * @param gate Cache gateway.
      */
-    private void onLeave() {
+    private void onLeave(GridCacheGateway<K, V> gate) {
         if (lock)
             gate.leave();
         else

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
index 89b85c4..3b411b5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
@@ -597,7 +597,9 @@ public class GridDhtCacheEntry extends GridDistributedCacheEntry {
         List<ReaderId> newRdrs = null;
 
         for (int i = 0; i < rdrs.length; i++) {
-            if (!cctx.discovery().alive(rdrs[i].nodeId())) {
+            ClusterNode node = cctx.discovery().getAlive(rdrs[i].nodeId());
+
+            if (node == null || !cctx.discovery().cacheNode(node, cacheName())) {
                 // Node has left and if new list has already been created, just skip.
                 // Otherwise, create new list and add alive nodes.
                 if (newRdrs == null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 38a0d55..5701749 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -474,6 +474,9 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
 
                 oldestNode.set(oldest);
 
+                if (!F.isEmpty(reqs))
+                    blockGateways();
+
                 startCaches();
 
                 // True if client node joined or failed.
@@ -489,24 +492,25 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
                 else {
                     assert discoEvt.type() == EVT_DISCOVERY_CUSTOM_EVT : discoEvt;
 
-                    boolean clientOnlyStart = true;
+                    boolean clientOnlyCacheEvt = true;
 
                     for (DynamicCacheChangeRequest req : reqs) {
-                        if (!req.clientStartOnly()) {
-                            clientOnlyStart = false;
+                        if (req.clientStartOnly() || req.close())
+                            continue;
 
-                            break;
-                        }
+                        clientOnlyCacheEvt = false;
+
+                        break;
                     }
 
-                    clientNodeEvt = clientOnlyStart;
+                    clientNodeEvt = clientOnlyCacheEvt;
                 }
 
                 if (clientNodeEvt) {
                     ClusterNode node = discoEvt.eventNode();
 
                     // Client need to initialize affinity for local join event or for stated client caches.
-                    if (!node.isLocal()) {
+                    if (!node.isLocal() || clientCacheClose()) {
                         for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
                             if (cacheCtx.isLocal())
                                 continue;
@@ -733,9 +737,6 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
                 if (log.isDebugEnabled())
                     log.debug("After waiting for partition release future: " + this);
 
-                if (!F.isEmpty(reqs))
-                    blockGateways();
-
                 if (exchId.isLeft())
                     cctx.mvcc().removeExplicitNodeLocks(exchId.nodeId(), exchId.topologyVersion());
 
@@ -839,6 +840,13 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
     }
 
     /**
+     * @return {@code True} if exchange initiated for client cache close.
+     */
+    private boolean clientCacheClose() {
+        return reqs != null && reqs.size() == 1 && reqs.iterator().next().close();
+    }
+
+    /**
      *
      */
     private void dumpPendingObjects() {
@@ -903,7 +911,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
      */
     private void blockGateways() {
         for (DynamicCacheChangeRequest req : reqs) {
-            if (req.stop())
+            if (req.stop() || req.close())
                 cctx.cache().blockGateway(req);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStopTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStopTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStopTask.java
index 0e848f9..83d19f1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStopTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStopTask.java
@@ -56,7 +56,7 @@ public class VisorCacheStopTask extends VisorOneNodeTask<String, Void> {
         @Override protected Void run(String cacheName) {
             IgniteCache cache = ignite.cache(cacheName);
 
-            cache.close();
+            cache.destroy();
 
             return null;
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/cache/affinity/IgniteClientNodeAffinityTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/IgniteClientNodeAffinityTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/IgniteClientNodeAffinityTest.java
index 467349f..da27fb2 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/IgniteClientNodeAffinityTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/IgniteClientNodeAffinityTest.java
@@ -127,13 +127,23 @@ public class IgniteClientNodeAffinityTest extends GridCommonAbstractTest {
 
         ccfg.setNodeFilter(new TestNodesFilter());
 
-        try (IgniteCache<Integer, Integer> cache = client.createCache(ccfg)) {
+        IgniteCache<Integer, Integer> cache = client.createCache(ccfg);
+
+        try {
             checkCache(null, 1);
         }
+        finally {
+            cache.destroy();
+        }
 
-        try (IgniteCache<Integer, Integer> cache = client.createCache(ccfg, new NearCacheConfiguration())) {
+        cache = client.createCache(ccfg, new NearCacheConfiguration());
+
+        try {
             checkCache(null, 1);
         }
+        finally {
+            cache.destroy();
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java
index 18b77e0..e51be58 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java
@@ -84,8 +84,7 @@ public class IgniteFairAffinityDynamicCacheSelfTest extends GridCommonAbstractTe
             cache.put(i, i);
 
         IgniteInternalFuture<Object> destFut = GridTestUtils.runAsync(new Callable<Object>() {
-            @Override
-            public Object call() throws Exception {
+            @Override public Object call() throws Exception {
                 ignite(0).destroyCache(cache.getName());
 
                 return null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java
index 0634197..8e53f05 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java
@@ -113,12 +113,17 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm
     public void testAtomicCache() throws Exception {
         CacheConfiguration<Integer, Integer> cfg = cacheConfiguration(null, CacheAtomicityMode.ATOMIC);
 
-        try (IgniteCache<Integer, Integer> cache = ignite(0).createCache(cfg)) {
+        IgniteCache<Integer, Integer> cache = ignite(0).createCache(cfg);
+
+        try {
             cache.loadCache(null);
             cache.get(1);
             cache.put(1, 1);
             cache.remove(1);
         }
+        finally {
+            cache.destroy();
+        }
 
         assertEquals(3, loadCacheCnt.get());
         assertEquals(1, loadCnt.get());
@@ -133,12 +138,17 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm
     public void testTransactionalCache() throws Exception {
         CacheConfiguration<Integer, Integer> cfg = cacheConfiguration(null, CacheAtomicityMode.TRANSACTIONAL);
 
-        try (IgniteCache<Integer, Integer> cache = ignite(0).createCache(cfg)) {
+        IgniteCache<Integer, Integer> cache = ignite(0).createCache(cfg);
+
+        try {
             cache.loadCache(null);
             cache.get(1);
             cache.put(1, 1);
             cache.remove(1);
         }
+        finally {
+            cache.destroy();
+        }
 
         assertEquals(3, loadCacheCnt.get());
         assertEquals(1, loadCnt.get());
@@ -153,15 +163,18 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm
     public void testExplicitTransaction() throws Exception {
         CacheConfiguration<Integer, Integer> cfg = cacheConfiguration(null, CacheAtomicityMode.TRANSACTIONAL);
 
-        try (IgniteCache<Integer, Integer> cache = ignite(0).createCache(cfg)) {
-            try (Transaction tx = ignite(0).transactions().txStart()) {
-                cache.put(1, 1);
-                cache.put(2, 2);
-                cache.remove(3);
-                cache.remove(4);
+        IgniteCache<Integer, Integer> cache = ignite(0).createCache(cfg);
 
-                tx.commit();
-            }
+        try (Transaction tx = ignite(0).transactions().txStart()) {
+            cache.put(1, 1);
+            cache.put(2, 2);
+            cache.remove(3);
+            cache.remove(4);
+
+            tx.commit();
+        }
+        finally {
+            cache.destroy();
         }
 
         assertEquals(2, writeCnt.get());
@@ -176,18 +189,20 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm
         CacheConfiguration<Integer, Integer> cfg1 = cacheConfiguration("cache1", CacheAtomicityMode.TRANSACTIONAL);
         CacheConfiguration<Integer, Integer> cfg2 = cacheConfiguration("cache2", CacheAtomicityMode.TRANSACTIONAL);
 
-        try (
-            IgniteCache<Integer, Integer> cache1 = ignite(0).createCache(cfg1);
-            IgniteCache<Integer, Integer> cache2 = ignite(0).createCache(cfg2)
-        ) {
-            try (Transaction tx = ignite(0).transactions().txStart()) {
-                cache1.put(1, 1);
-                cache2.put(2, 2);
-                cache1.remove(3);
-                cache2.remove(4);
-
-                tx.commit();
-            }
+        IgniteCache<Integer, Integer> cache1 = ignite(0).createCache(cfg1);
+        IgniteCache<Integer, Integer> cache2 = ignite(0).createCache(cfg2);
+
+        try (Transaction tx = ignite(0).transactions().txStart()) {
+            cache1.put(1, 1);
+            cache2.put(2, 2);
+            cache1.remove(3);
+            cache2.remove(4);
+
+            tx.commit();
+        }
+        finally {
+            cache1.destroy();
+            cache2.destroy();
         }
 
         assertEquals(2, writeCnt.get());
@@ -204,16 +219,18 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm
         CacheConfiguration<Integer, Integer> cfg1 = cacheConfiguration("cache1", CacheAtomicityMode.TRANSACTIONAL);
         CacheConfiguration<Integer, Integer> cfg2 = cacheConfiguration("cache2", CacheAtomicityMode.TRANSACTIONAL);
 
-        try (
-            IgniteCache<Integer, Integer> cache1 = ignite(0).createCache(cfg1);
-            IgniteCache<Integer, Integer> cache2 = ignite(0).createCache(cfg2)
-        ) {
-            try (Transaction tx = ignite(0).transactions().txStart()) {
-                cache1.put(1, 1);
-                cache2.put(2, 2);
+        IgniteCache<Integer, Integer> cache1 = ignite(0).createCache(cfg1);
+        IgniteCache<Integer, Integer> cache2 = ignite(0).createCache(cfg2);
 
-                tx.commit();
-            }
+        try (Transaction tx = ignite(0).transactions().txStart()) {
+            cache1.put(1, 1);
+            cache2.put(2, 2);
+
+            tx.commit();
+        }
+        finally {
+            cache1.destroy();
+            cache2.destroy();
         }
 
         try (Connection conn = DriverManager.getConnection(URL)) {
@@ -232,25 +249,27 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm
         CacheConfiguration<Integer, Integer> cfg1 = cacheConfiguration("cache1", CacheAtomicityMode.TRANSACTIONAL);
         CacheConfiguration<Integer, Integer> cfg2 = cacheConfiguration("cache2", CacheAtomicityMode.TRANSACTIONAL);
 
-        try (
-            IgniteCache<Integer, Integer> cache1 = ignite(0).createCache(cfg1);
-            IgniteCache<Integer, Integer> cache2 = ignite(0).createCache(cfg2)
-        ) {
-            try (Transaction tx = ignite(0).transactions().txStart()) {
-                cache1.put(1, 1);
-                cache2.put(2, 2);
+        IgniteCache<Integer, Integer> cache1 = ignite(0).createCache(cfg1);
+        IgniteCache<Integer, Integer> cache2 = ignite(0).createCache(cfg2);
 
-                tx.commit();
+        try (Transaction tx = ignite(0).transactions().txStart()) {
+            cache1.put(1, 1);
+            cache2.put(2, 2);
 
-                assert false : "Exception was not thrown.";
-            }
-            catch (IgniteException e) {
-                CacheWriterException we = X.cause(e, CacheWriterException.class);
+            tx.commit();
 
-                assertNotNull(we);
+            assert false : "Exception was not thrown.";
+        }
+        catch (IgniteException e) {
+            CacheWriterException we = X.cause(e, CacheWriterException.class);
+
+            assertNotNull(we);
 
-                assertEquals("Expected failure.", we.getMessage());
-            }
+            assertEquals("Expected failure.", we.getMessage());
+        }
+        finally {
+            cache1.destroy();
+            cache2.destroy();
         }
 
         try (Connection conn = DriverManager.getConnection(URL)) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java
index 7b01f0f..bc6b443 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/GridCacheTxLoadFromStoreOnLockSelfTest.java
@@ -92,31 +92,33 @@ public class GridCacheTxLoadFromStoreOnLockSelfTest extends GridCommonAbstractTe
         cacheCfg.setBackups(backups);
         cacheCfg.setLoadPreviousValue(true);
 
-        try (IgniteCache<Integer, Integer> cache = ignite(0).createCache(cacheCfg)) {
-            for (int i = 0; i < 10; i++)
-                assertEquals((Integer)i, cache.get(i));
+        IgniteCache<Integer, Integer> cache = ignite(0).createCache(cacheCfg);
 
-            cache.removeAll();
+        for (int i = 0; i < 10; i++)
+            assertEquals((Integer)i, cache.get(i));
 
-            assertEquals(0, cache.size());
+        cache.removeAll();
 
-            for (TransactionConcurrency conc : TransactionConcurrency.values()) {
-                for (TransactionIsolation iso : TransactionIsolation.values()) {
-                    info("Checking transaction [conc=" + conc + ", iso=" + iso + ']');
+        assertEquals(0, cache.size());
 
-                    try (Transaction tx = ignite(0).transactions().txStart(conc, iso)) {
-                        for (int i = 0; i < 10; i++)
-                            assertEquals("Invalid value for transaction [conc=" + conc + ", iso=" + iso + ']',
-                                (Integer)i, cache.get(i));
+        for (TransactionConcurrency conc : TransactionConcurrency.values()) {
+            for (TransactionIsolation iso : TransactionIsolation.values()) {
+                info("Checking transaction [conc=" + conc + ", iso=" + iso + ']');
 
-                        tx.commit();
-                    }
+                try (Transaction tx = ignite(0).transactions().txStart(conc, iso)) {
+                    for (int i = 0; i < 10; i++)
+                        assertEquals("Invalid value for transaction [conc=" + conc + ", iso=" + iso + ']',
+                            (Integer)i, cache.get(i));
 
-                    cache.removeAll();
-                    assertEquals(0, cache.size());
+                    tx.commit();
                 }
+
+                cache.removeAll();
+                assertEquals(0, cache.size());
             }
         }
+
+        cache.destroy();
     }
 
     /**



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

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


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

Branch: refs/heads/ignite-1056
Commit: 378e344aba5048e36d86ca0944435586d45b7032
Parents: 7c935a5 d3783a1
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Wed Jul 1 15:26:40 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Wed Jul 1 15:26:40 2015 -0700

----------------------------------------------------------------------
 assembly/dependencies-fabric.xml                |   1 +
 examples/pom.xml                                |   2 +-
 modules/aop/pom.xml                             |   2 +-
 modules/aws/pom.xml                             |   2 +-
 modules/clients/pom.xml                         |   2 +-
 .../ClientAbstractConnectivitySelfTest.java     |   4 +-
 modules/cloud/pom.xml                           |   2 +-
 modules/codegen/pom.xml                         |   2 +-
 modules/core/pom.xml                            |   2 +-
 .../org/apache/ignite/cluster/ClusterGroup.java |  18 +-
 .../org/apache/ignite/cluster/ClusterNode.java  |   2 +
 .../configuration/CacheConfiguration.java       | 105 +--
 .../configuration/NearCacheConfiguration.java   |  10 +-
 .../ignite/internal/GridKernalContextImpl.java  |   5 +-
 .../internal/cluster/ClusterGroupAdapter.java   |  50 +-
 .../cluster/IgniteClusterAsyncImpl.java         |  12 +-
 .../managers/communication/GridIoManager.java   |  49 +-
 .../discovery/GridDiscoveryManager.java         |  32 +-
 .../cache/GridCacheDeploymentManager.java       |  10 +-
 .../GridCachePartitionExchangeManager.java      |   6 +-
 .../processors/cache/GridCacheProcessor.java    |  62 +-
 .../processors/cache/IgniteCacheFutureImpl.java |  42 +
 .../processors/cache/IgniteCacheProxy.java      |   2 +-
 .../processors/clock/GridClockServer.java       |  21 +-
 .../processors/plugin/CachePluginManager.java   |  10 +-
 .../processors/rest/GridRestProcessor.java      |   4 +-
 .../handlers/task/GridTaskCommandHandler.java   |  12 +-
 .../processors/task/GridTaskWorker.java         |   4 +-
 .../internal/util/GridConfigurationFinder.java  |  55 +-
 .../ignite/internal/util/IgniteUtils.java       |   6 +-
 .../internal/util/future/IgniteFutureImpl.java  |  18 +-
 .../shmem/IpcSharedMemoryServerEndpoint.java    |  10 +-
 .../util/nio/GridNioMessageTracker.java         |  23 +-
 .../apache/ignite/internal/visor/VisorJob.java  |   2 +
 .../internal/visor/log/VisorLogSearchTask.java  |   2 +-
 .../visor/node/VisorNodeDataCollectorJob.java   |   4 +
 .../visor/query/VisorQueryCleanupTask.java      |  14 +
 .../util/VisorClusterGroupEmptyException.java   |  37 +
 .../ignite/spi/discovery/tcp/ClientImpl.java    | 151 ++--
 .../ignite/spi/discovery/tcp/ServerImpl.java    | 105 ++-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |   3 +-
 .../TcpDiscoveryMulticastIpFinder.java          |  74 +-
 .../core/src/main/resources/ignite.properties   |   2 +-
 .../core/src/test/config/spark/spark-config.xml |  46 ++
 modules/core/src/test/config/tests.properties   |   6 +-
 .../internal/ClusterGroupAbstractTest.java      | 777 ++++++++++++++++++
 .../internal/ClusterGroupHostsSelfTest.java     | 141 ++++
 .../ignite/internal/ClusterGroupSelfTest.java   | 251 ++++++
 .../internal/GridDiscoveryEventSelfTest.java    |  12 +-
 .../internal/GridProjectionAbstractTest.java    | 784 -------------------
 .../ignite/internal/GridProjectionSelfTest.java | 251 ------
 .../apache/ignite/internal/GridSelfTest.java    |   2 +-
 .../IgniteTopologyPrintFormatSelfTest.java      | 289 +++++++
 .../cache/GridCacheDaemonNodeStopSelfTest.java  | 119 ---
 .../IgniteDaemonNodeMarshallerCacheTest.java    | 192 +++++
 ...achePartitionedMultiNodeFullApiSelfTest.java |   4 +-
 .../internal/util/IgniteUtilsSelfTest.java      |  22 +
 .../GridP2PContinuousDeploymentSelfTest.java    |   2 -
 .../tcp/TcpClientDiscoverySpiSelfTest.java      | 265 ++++++-
 .../ignite/testsuites/IgniteBasicTestSuite.java |   7 +-
 .../testsuites/IgniteCacheTestSuite3.java       |   1 -
 .../testsuites/IgniteKernalSelfTestSuite.java   |   1 +
 modules/core/src/test/resources/helloworld.gar  | Bin 6092 -> 0 bytes
 modules/core/src/test/resources/helloworld1.gar | Bin 6092 -> 0 bytes
 modules/core/src/test/resources/readme.txt      |   6 -
 modules/docker/Dockerfile                       |  55 ++
 modules/docker/README.txt                       |  11 +
 modules/docker/build_users_libs.sh              |  39 +
 modules/docker/download_ignite.sh               |  49 ++
 modules/docker/execute.sh                       |  62 ++
 modules/docker/run.sh                           |  34 +
 modules/extdata/p2p/pom.xml                     |   4 +-
 .../p2p/GridP2PContinuousDeploymentTask1.java   |   2 +-
 modules/extdata/uri/META-INF/ignite.xml         |  38 +
 .../extdata/uri/modules/uri-dependency/pom.xml  |  42 +
 .../deployment/uri/tasks/GarHelloWorldBean.java |  60 ++
 .../src/main/resources/gar-example.properties   |  18 +
 modules/extdata/uri/pom.xml                     |  62 +-
 .../deployment/uri/tasks/GarHelloWorldTask.java |  81 ++
 .../deployment/uri/tasks/gar-spring-bean.xml    |  29 +
 modules/gce/pom.xml                             |   2 +-
 modules/geospatial/pom.xml                      |   2 +-
 modules/hadoop/pom.xml                          |   2 +-
 modules/hibernate/pom.xml                       |   2 +-
 modules/indexing/pom.xml                        |   2 +-
 modules/jcl/pom.xml                             |   2 +-
 modules/jta/pom.xml                             |   2 +-
 modules/log4j/pom.xml                           |   2 +-
 modules/mesos/pom.xml                           |   2 +-
 modules/rest-http/pom.xml                       |   2 +-
 modules/scalar-2.10/pom.xml                     |   2 +-
 modules/scalar/pom.xml                          |   2 +-
 modules/schedule/pom.xml                        |   2 +-
 modules/schema-import/pom.xml                   |   2 +-
 .../ignite/schema/model/PojoDescriptor.java     |   2 +
 .../apache/ignite/schema/model/PojoField.java   |   1 +
 .../parser/dialect/OracleMetadataDialect.java   |   2 +-
 modules/slf4j/pom.xml                           |   2 +-
 modules/spark-2.10/pom.xml                      |   2 +-
 modules/spark/pom.xml                           |   2 +-
 .../org/apache/ignite/spark/IgniteContext.scala |  50 +-
 .../org/apache/ignite/spark/IgniteRddSpec.scala |  18 +
 modules/spring/pom.xml                          |   2 +-
 modules/ssh/pom.xml                             |   2 +-
 modules/tools/pom.xml                           |   2 +-
 modules/urideploy/pom.xml                       |  16 +-
 .../GridTaskUriDeploymentDeadlockSelfTest.java  |  13 +-
 .../ignite/p2p/GridP2PDisabledSelfTest.java     |   2 +-
 modules/visor-console-2.10/pom.xml              |   2 +-
 modules/visor-console/pom.xml                   |   2 +-
 .../commands/cache/VisorCacheCommand.scala      |   7 +-
 modules/visor-plugins/pom.xml                   |   2 +-
 modules/web/pom.xml                             |   2 +-
 modules/yardstick/pom.xml                       |   2 +-
 pom.xml                                         |  14 +-
 scripts/git-patch-prop.sh                       |   2 +-
 116 files changed, 3424 insertions(+), 1498 deletions(-)
----------------------------------------------------------------------


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


[30/50] [abbrv] incubator-ignite git commit: release notes

Posted by sb...@apache.org.
release notes


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

Branch: refs/heads/ignite-1056
Commit: 064d079ce4f7cc501936b95a1eaae144c6b823bb
Parents: fa5cb91
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Jul 8 19:51:33 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Jul 8 19:51:33 2015 +0300

----------------------------------------------------------------------
 RELEASE_NOTES.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/064d079c/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 3a5043e..bcfed27 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,6 +1,16 @@
 Apache Ignite Release Notes
 ===========================
 
+Apache Ignite In-Memory Data Fabric 1.3
+---------------------------------------
+
+* Added auto-retries for cache operations in recoverable cases.
+* Fixed several issues with JTA integration.
+* Stability fixes for TCP discovery SPI.
+* Stability fixes for onheap and offheap SQL queries.
+* Bug fixes in In-Memory Accelerator For Apache Hadoop.
+* Many stability and fault-tolerance fixes.
+
 Apache Ignite In-Memory Data Fabric 1.2
 ---------------------------------------
 


[07/50] [abbrv] incubator-ignite git commit: # IGNITE-591 Enable tests.

Posted by sb...@apache.org.
# IGNITE-591 Enable tests.


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

Branch: refs/heads/ignite-1056
Commit: bac6f481dd766ac1105fcc127e7ee557f96598de
Parents: 4b06e77
Author: sevdokimov <se...@gridgain.com>
Authored: Thu Jul 2 14:56:12 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Thu Jul 2 14:56:12 2015 +0300

----------------------------------------------------------------------
 .../hibernate/HibernateL2CacheSelfTest.java     | 50 ++++++++++----------
 .../HibernateL2CacheTransactionalSelfTest.java  | 38 +++++++--------
 .../processors/cache/GridCacheJtaSelfTest.java  | 23 ++++-----
 3 files changed, 55 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bac6f481/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
index bb5884a..fe34ea8 100644
--- a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
+++ b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
@@ -17,32 +17,37 @@
 
 package org.apache.ignite.cache.hibernate;
 
-import org.apache.ignite.cache.affinity.rendezvous.*;
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.processors.cache.*;
-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.*;
-import org.apache.ignite.testframework.junits.common.*;
+import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteKernal;
+import org.apache.ignite.internal.processors.cache.IgniteCacheProxy;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.hibernate.*;
 import org.hibernate.Query;
-import org.hibernate.annotations.*;
-import org.hibernate.cache.spi.*;
+import org.hibernate.annotations.NaturalId;
+import org.hibernate.annotations.NaturalIdCache;
+import org.hibernate.cache.spi.GeneralDataRegion;
+import org.hibernate.cache.spi.TransactionalDataRegion;
 import org.hibernate.cache.spi.access.AccessType;
-import org.hibernate.cfg.*;
-import org.hibernate.exception.*;
-import org.hibernate.service.*;
-import org.hibernate.stat.*;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.exception.ConstraintViolationException;
+import org.hibernate.service.ServiceRegistryBuilder;
+import org.hibernate.stat.NaturalIdCacheStatistics;
+import org.hibernate.stat.SecondLevelCacheStatistics;
 
 import javax.persistence.*;
 import java.util.*;
-import java.util.concurrent.*;
+import java.util.concurrent.Callable;
 
-import static org.apache.ignite.cache.CacheAtomicityMode.*;
-import static org.apache.ignite.cache.CacheMode.*;
-import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 import static org.apache.ignite.cache.hibernate.HibernateRegionFactory.*;
 import static org.hibernate.cfg.Environment.*;
 
@@ -51,11 +56,6 @@ import static org.hibernate.cfg.Environment.*;
  * Tests Hibernate L2 cache.
  */
 public class HibernateL2CacheSelfTest extends GridCommonAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected void beforeTest() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-591");
-    }
-
     /** */
     private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
 
@@ -1128,6 +1128,8 @@ public class HibernateL2CacheSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testNaturalIdCache() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-1084");
+
         for (AccessType accessType : accessTypes())
             testNaturalIdCache(accessType);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bac6f481/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheTransactionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheTransactionalSelfTest.java b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheTransactionalSelfTest.java
index c429d9a..6f47d3b 100644
--- a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheTransactionalSelfTest.java
+++ b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheTransactionalSelfTest.java
@@ -17,23 +17,24 @@
 
 package org.apache.ignite.cache.hibernate;
 
-import org.apache.commons.dbcp.managed.*;
-import org.apache.ignite.cache.jta.*;
-import org.apache.ignite.configuration.*;
-import org.h2.jdbcx.*;
-import org.hibernate.cache.spi.access.*;
-import org.hibernate.engine.transaction.internal.jta.*;
+import org.apache.commons.dbcp.managed.BasicManagedDataSource;
+import org.apache.ignite.cache.jta.CacheTmLookup;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.h2.jdbcx.JdbcDataSource;
+import org.hibernate.cache.spi.access.AccessType;
+import org.hibernate.engine.transaction.internal.jta.JtaTransactionFactory;
 import org.hibernate.engine.transaction.spi.TransactionFactory;
-import org.hibernate.service.*;
-import org.hibernate.service.jdbc.connections.internal.*;
-import org.hibernate.service.jdbc.connections.spi.*;
-import org.hibernate.service.jta.platform.internal.*;
-import org.hibernate.service.jta.platform.spi.*;
-import org.jetbrains.annotations.*;
-import org.objectweb.jotm.*;
-
-import javax.transaction.*;
-import java.util.*;
+import org.hibernate.service.ServiceRegistryBuilder;
+import org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl;
+import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
+import org.hibernate.service.jta.platform.internal.AbstractJtaPlatform;
+import org.hibernate.service.jta.platform.spi.JtaPlatform;
+import org.jetbrains.annotations.Nullable;
+import org.objectweb.jotm.Jotm;
+
+import javax.transaction.TransactionManager;
+import javax.transaction.UserTransaction;
+import java.util.Collections;
 
 /**
  *
@@ -41,11 +42,6 @@ import java.util.*;
  * to used the same TransactionManager).
  */
 public class HibernateL2CacheTransactionalSelfTest extends HibernateL2CacheSelfTest {
-    /** {@inheritDoc} */
-    @Override protected void beforeTest() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-591");
-    }
-
     /** */
     private static Jotm jotm;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bac6f481/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
index 37e9ed2..9b8cb15 100644
--- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
+++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
@@ -17,18 +17,21 @@
 
 package org.apache.ignite.internal.processors.cache;
 
-import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.jta.*;
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.*;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.jta.CacheTmLookup;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.transactions.Transaction;
-import org.objectweb.jotm.*;
+import org.objectweb.jotm.Jotm;
 
-import javax.transaction.*;
+import javax.transaction.Status;
+import javax.transaction.TransactionManager;
+import javax.transaction.UserTransaction;
 
-import static org.apache.ignite.cache.CacheMode.*;
-import static org.apache.ignite.transactions.TransactionState.*;
+import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+import static org.apache.ignite.transactions.TransactionState.ACTIVE;
 
 /**
  * Abstract class for cache tests.
@@ -145,8 +148,6 @@ public class GridCacheJtaSelfTest extends GridCacheAbstractSelfTest {
     }
 
     /**
-     * TODO: IGNITE-591.
-     *
      * @throws Exception If failed.
      */
     @SuppressWarnings("ConstantConditions")


[28/50] [abbrv] incubator-ignite git commit: moved link to the project site to the top of the log

Posted by sb...@apache.org.
moved link to the project site to the top of the log


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

Branch: refs/heads/ignite-1056
Commit: 459d7022f8685858eb01792f2c99db5f5efc8e9a
Parents: 82f4992
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Jul 8 19:39:09 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Jul 8 19:39:09 2015 +0300

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


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/459d7022/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 30931fa..c12d2cf 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
@@ -1486,10 +1486,12 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
                     "  /  _/ ___/ |/ /  _/_  __/ __/ ",
                     " _/ // (7 7    // /  / / / _/   ",
                     "/___/\\___/_/|_/___/ /_/ /___/  ",
-                    " ",
+                    "",
                     ver,
                     COPYRIGHT,
                     "",
+                    "Ignite documentation: " + "http://" + SITE,
+                    "",
                     "Quiet mode.");
 
                 if (fileName != null)
@@ -1508,7 +1510,9 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
                         ">>> /___/\\___/_/|_/___/ /_/ /___/   " + NL +
                         ">>> " + NL +
                         ">>> " + ver + NL +
-                        ">>> " + COPYRIGHT + NL
+                        ">>> " + COPYRIGHT + NL +
+                        ">>> " + NL +
+                        ">>> Ignite documentation: " + "http://" + SITE + NL
                 );
             }
         }
@@ -1557,8 +1561,6 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
                     ">>> Local node addresses: " + U.addressesAsString(locNode) + NL +
                     ">>> Local ports: " + sb + NL;
 
-            str += ">>> Ignite documentation: http://" + SITE + NL;
-
             log.info(str);
         }
     }


[06/50] [abbrv] incubator-ignite git commit: IGNITE-1026 - Dynamic cache start fixes

Posted by sb...@apache.org.
IGNITE-1026 - Dynamic cache start fixes


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

Branch: refs/heads/ignite-1056
Commit: 8ff3619bae65018958c61a3299a415e595dd16c4
Parents: 378e344
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Wed Jul 1 18:51:51 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Wed Jul 1 18:51:51 2015 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/Ignite.java |  2 +-
 .../IgniteCacheConfigurationTemplateTest.java   | 26 +++-----------------
 .../cache/IgniteDynamicCacheStartSelfTest.java  | 12 ++-------
 .../IgniteDynamicClientCacheStartSelfTest.java  |  5 ++--
 4 files changed, 9 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8ff3619b/modules/core/src/main/java/org/apache/ignite/Ignite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/Ignite.java b/modules/core/src/main/java/org/apache/ignite/Ignite.java
index 209946b..7103b1b 100644
--- a/modules/core/src/main/java/org/apache/ignite/Ignite.java
+++ b/modules/core/src/main/java/org/apache/ignite/Ignite.java
@@ -308,7 +308,7 @@ public interface Ignite extends AutoCloseable {
      * @param name Cache name.
      * @return Instance of the cache for the specified name.
      */
-    public <K, V> IgniteCache<K, V> cache(@Nullable String name);
+    @Nullable public <K, V> IgniteCache<K, V> cache(@Nullable String name);
 
     /**
      * Gets grid transactions facade.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8ff3619b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
index 937a3b4..1085411 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigurationTemplateTest.java
@@ -420,29 +420,9 @@ public class IgniteCacheConfigurationTemplateTest extends GridCommonAbstractTest
                 }
             }, IllegalStateException.class, null);
 
-            GridTestUtils.assertThrows(log, new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    ignite.cache(TEMPLATE1);
-
-                    return null;
-                }
-            }, IllegalArgumentException.class, null);
-
-            GridTestUtils.assertThrows(log, new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    ignite.cache(TEMPLATE2);
-
-                    return null;
-                }
-            }, IllegalArgumentException.class, null);
-
-            GridTestUtils.assertThrows(log, new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    ignite.cache(TEMPLATE3);
-
-                    return null;
-                }
-            }, IllegalArgumentException.class, null);
+            assertNull(ignite.cache(TEMPLATE1));
+            assertNull(ignite.cache(TEMPLATE2));
+            assertNull(ignite.cache(TEMPLATE3));
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8ff3619b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
index e7b0ba5..cd19703 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
@@ -310,11 +310,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             for (IgniteInternalFuture f : kernal0.context().cache().context().exchange().exchangeFutures())
                 f.get();
 
-            GridTestUtils.assertThrows(log, new Callable<Object>() {
-                @Override public Object call() throws Exception {
-                    return kernal0.cache(DYNAMIC_CACHE_NAME);
-                }
-            }, IllegalArgumentException.class, null);
+            assertNull(kernal0.cache(DYNAMIC_CACHE_NAME));
 
             GridTestUtils.assertThrows(log, new Callable<Object>() {
                 @Override public Object call() throws Exception {
@@ -368,11 +364,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
                 for (IgniteInternalFuture f : kernal0.context().cache().context().exchange().exchangeFutures())
                     f.get();
 
-                GridTestUtils.assertThrows(log, new Callable<Object>() {
-                    @Override public Object call() throws Exception {
-                        return kernal0.cache(DYNAMIC_CACHE_NAME);
-                    }
-                }, IllegalArgumentException.class, null);
+                assertNull(kernal0.cache(DYNAMIC_CACHE_NAME));
             }
         }
         finally {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8ff3619b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java
index 24935c7..abada13 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java
@@ -30,6 +30,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.testframework.*;
 import org.apache.ignite.testframework.junits.common.*;
 
+import javax.cache.*;
 import java.util.concurrent.*;
 
 import static org.apache.ignite.cache.CacheMode.*;
@@ -139,7 +140,7 @@ public class IgniteDynamicClientCacheStartSelfTest extends GridCommonAbstractTes
 
                 return null;
             }
-        }, IgniteException.class, null);
+        }, CacheException.class, null);
 
         checkCache(ignite1, cacheName, false, false);
 
@@ -149,7 +150,7 @@ public class IgniteDynamicClientCacheStartSelfTest extends GridCommonAbstractTes
 
                 return null;
             }
-        }, IgniteException.class, null);
+        }, CacheException.class, null);
 
         checkCache(ignite1, cacheName, false, false);
     }


[46/50] [abbrv] incubator-ignite git commit: IGNITE-1097 review (cherry picked from commit 07a98df)

Posted by sb...@apache.org.
IGNITE-1097 review
(cherry picked from commit 07a98df)


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

Branch: refs/heads/ignite-1056
Commit: e11f46b8e9e1aa8634eeb85122a331958561c90b
Parents: 76515ae
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Jul 9 17:47:26 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Fri Jul 10 10:48:22 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/util/future/GridFutureChainListener.java   | 4 ----
 .../processors/cache/GridCacheAbstractFullApiSelfTest.java     | 6 +++---
 2 files changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e11f46b8/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureChainListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureChainListener.java b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureChainListener.java
index d98538e..43ffa61 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureChainListener.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureChainListener.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.util.future;
 
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.lang.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 
 /**
@@ -57,9 +56,6 @@ public class GridFutureChainListener<T, R> implements IgniteInClosure<IgniteInte
             fut.onDone(e.unwrap());
         }
         catch (RuntimeException | Error e) {
-            U.warn(null, "Failed to notify chained future (is grid stopped?) [doneCb=" + doneCb +
-                ", err=" + e.getMessage() + ']');
-
             fut.onDone(e);
 
             throw e;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e11f46b8/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 3f9c365..0a8f87c 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
@@ -69,7 +69,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
                 throw new RuntimeException("Failed!");
             }
         };
-    
+
     /** Increment processor for invoke operations. */
     public static final EntryProcessor<String, Integer, String> INCR_PROCESSOR = new EntryProcessor<String, Integer, String>() {
         @Override public String process(MutableEntry<String, Integer> e, Object... args) {
@@ -5005,7 +5005,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
      */
     public void testTransformException() throws Exception {
         final IgniteCache<String, Integer> cache = jcache().withAsync();
-        
+
         cache.invoke("key2", ERR_PROCESSOR);
 
         assertThrows(log, new Callable<Object>() {
@@ -5023,7 +5023,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
             }
         }, EntryProcessorException.class, null);
     }
-    
+
     /**
      * Sets given value, returns old value.
      */


[39/50] [abbrv] incubator-ignite git commit: Fixed review notes.

Posted by sb...@apache.org.
Fixed review notes.


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

Branch: refs/heads/ignite-1056
Commit: 7e0aef7f061e393406a1bdafb62530f5d5bb8d43
Parents: f627976
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Thu Jul 9 17:53:46 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Thu Jul 9 17:53:46 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/yarn/ApplicationMaster.java   |  5 +-
 .../apache/ignite/yarn/ClusterProperties.java   | 22 +++-----
 .../org/apache/ignite/yarn/IgniteContainer.java |  4 +-
 .../org/apache/ignite/yarn/IgniteProvider.java  | 58 ++++++--------------
 .../apache/ignite/yarn/IgniteYarnClient.java    |  5 +-
 5 files changed, 33 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e0aef7f/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
index 9169178..0d1fc53 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
@@ -74,7 +74,8 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     private Map<ContainerId, IgniteContainer> containers = new ConcurrentHashMap<>();
 
     /**
-     * @param
+     * @param ignitePath Hdfs path to ignite.
+     * @param props Cluster properties.
      */
     public ApplicationMaster(String ignitePath, ClusterProperties props) throws Exception {
         this.conf = new YarnConfiguration();
@@ -146,7 +147,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
 
     /**
      * @param cont Container.
-     * @return {@code True} if
+     * @return {@code True} if container satisfies requirements.
      */
     private boolean checkContainer(Container cont) {
         // Check limit on running nodes.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e0aef7f/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
index a2d88c0..e7bdc84 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
@@ -69,13 +69,10 @@ public class ClusterProperties {
     private double nodeCnt = DEFAULT_IGNITE_NODE_COUNT;
 
     /** */
-    public static final String IGNITE_VERSION = "IGNITE_VERSION";
-
-    /** */
-    public static final String DEFAULT_IGNITE_VERSION = "latest";
+    public static final String IGNITE_URL = "IGNITE_URL";
 
     /** Ignite version. */
-    private String igniteVer = DEFAULT_IGNITE_VERSION;
+    private String igniteUrl = null;
 
     /** */
     public static final String IGNITE_WORKING_DIR = "IGNITE_WORKING_DIR";
@@ -152,7 +149,6 @@ public class ClusterProperties {
         return clusterName;
     }
 
-
     /**
      * @return CPU count limit.
      */
@@ -209,8 +205,8 @@ public class ClusterProperties {
     /**
      * @return Ignite version.
      */
-    public String igniteVer() {
-        return igniteVer;
+    public String igniteUrl() {
+        return igniteUrl;
     }
 
     /**
@@ -256,14 +252,14 @@ public class ClusterProperties {
     }
 
     /**
-     * @return Licence path.
+     * @return Ignite hdfs path.
      */
     public String ignitePath() {
         return ignitePath;
     }
 
     /**
-     * @return Licence path.
+     * @return Jvm opts.
      */
     public String jvmOpts() {
         return jvmOpts;
@@ -298,7 +294,7 @@ public class ClusterProperties {
             prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, props, DEFAULT_MEM_PER_NODE);
             prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, props, DEFAULT_IGNITE_NODE_COUNT);
 
-            prop.igniteVer = getStringProperty(IGNITE_VERSION, props, DEFAULT_IGNITE_VERSION);
+            prop.igniteUrl = getStringProperty(IGNITE_URL, props, null);
             prop.ignitePath = getStringProperty(IGNITE_PATH, props, null);
             prop.licencePath = getStringProperty(LICENCE_PATH, props, null);
             prop.jvmOpts = getStringProperty(IGNITE_JVM_OPTS, props, null);
@@ -338,7 +334,7 @@ public class ClusterProperties {
         prop.memPerNode = getDoubleProperty(IGNITE_MEMORY_PER_NODE, null, DEFAULT_MEM_PER_NODE);
         prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, null, DEFAULT_IGNITE_NODE_COUNT);
 
-        prop.igniteVer = getStringProperty(IGNITE_VERSION, null, DEFAULT_IGNITE_VERSION);
+        prop.igniteUrl = getStringProperty(IGNITE_URL, null, null);
         prop.ignitePath = getStringProperty(IGNITE_PATH, null, null);
         prop.licencePath = getStringProperty(LICENCE_PATH, null, null);
         prop.jvmOpts = getStringProperty(IGNITE_JVM_OPTS, null, null);
@@ -376,7 +372,7 @@ public class ClusterProperties {
         envs.put(IGNITE_MEMORY_PER_NODE, toEnvVal(memPerNode));
         envs.put(IGNITE_NODE_COUNT, toEnvVal(nodeCnt));
 
-        envs.put(IGNITE_VERSION, toEnvVal(igniteVer));
+        envs.put(IGNITE_URL, toEnvVal(igniteUrl));
         envs.put(IGNITE_PATH, toEnvVal(ignitePath));
         envs.put(LICENCE_PATH, toEnvVal(licencePath));
         envs.put(IGNITE_JVM_OPTS, toEnvVal(jvmOpts));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e0aef7f/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
index 313e9e1..c3cec52 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
@@ -77,9 +77,7 @@ public class IgniteContainer {
         return mem;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    /** {@inheritDoc} */
     @Override public String toString() {
         return "IgniteTask [host=" + nodeId.getHost() + ", cpuCores=" + cpuCores + ", mem=" + mem + ']';
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e0aef7f/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
index 253752d..a5d655d 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteProvider.java
@@ -33,9 +33,6 @@ public class IgniteProvider {
     public static final String DOWNLOAD_LINK = "http://tiny.cc/updater/download_community.php";
 
     /** */
-    public static final String DIRECT_DOWNLOAD_LINK = "http://www.gridgain.com/media/gridgain-community-fabric-";
-
-    /** */
     private ClusterProperties props;
 
     /** */
@@ -175,44 +172,19 @@ public class IgniteProvider {
      * @return Ignite.
      */
     public Path getIgnite(String version) throws Exception {
-        File folder = checkDownloadFolder();
-
-        // Check to hdfs contains required ignite version.
-        List<String> hdfsFiles = findIgnites(fs, props.igniteReleasesDir());
-
-        if (hdfsFiles != null && !hdfsFiles.isEmpty()) {
-            for (String fileName : hdfsFiles) {
-                if (fileName.equals("gridgain-community-fabric-" + version + ".zip"))
-                    return new Path(formatPath(props.igniteReleasesDir(), version));
-            }
-        }
-
-        // Check local fs.
-        List<String> localFiles = findIgnites(folder);
-
-        if (localFiles != null) {
-            for (String fileName : localFiles) {
-                if (fileName.equals("gridgain-community-fabric-" + version + ".zip")) {
-                    Path dst = new Path(formatPath(props.igniteReleasesDir(), version));
-
-                    fs.copyFromLocalFile(new Path(formatPath(props.igniteLocalWorkDir(), latestVersion)), dst);
-
-                    return dst;
-                }
-            }
-        }
+        checkDownloadFolder();
 
         // Download ignite.
-        downloadIgnite(version);
+        String fileName = downloadIgnite(version);
 
-        Path dst = new Path(formatPath(props.igniteReleasesDir(), version));
+        Path dst = new Path(props.igniteReleasesDir() + File.separator + fileName);
 
-        fs.copyFromLocalFile(new Path(formatPath(props.igniteLocalWorkDir(), latestVersion)), dst);
+        if (!fs.exists(dst))
+            fs.copyFromLocalFile(new Path(props.igniteLocalWorkDir() + File.separator + fileName), dst);
 
         return dst;
     }
 
-
     /**
      * @param folder folder
      * @param version version
@@ -265,23 +237,26 @@ public class IgniteProvider {
     }
 
     /**
-     * @param version The current latest version.
-     * @return Ignite archive.
+     * @param igniteUrl Url to ignite.
+     * @return Ignite file name.
      */
-    private String downloadIgnite(String version) {
+    private String downloadIgnite(String igniteUrl) {
         try {
-            URL url = new URL(DIRECT_DOWNLOAD_LINK + version + ".zip");
+            URL url = new URL(igniteUrl);
 
             HttpURLConnection conn = (HttpURLConnection)url.openConnection();
 
             int code = conn.getResponseCode();
 
             if (code == 200) {
-                checkDownloadFolder();
-
                 String fileName = fileName(url.toString());
 
-                FileOutputStream outFile = new FileOutputStream(props.igniteLocalWorkDir() + File.separator + fileName);
+                String filePath = props.igniteLocalWorkDir() + File.separator + fileName;
+
+                if (new File(filePath).exists())
+                    return fileName;
+
+                FileOutputStream outFile = new FileOutputStream(filePath);
 
                 outFile.getChannel().transferFrom(Channels.newChannel(conn.getInputStream()), 0, Long.MAX_VALUE);
 
@@ -306,6 +281,9 @@ public class IgniteProvider {
         if (!file.exists())
             file.mkdirs();
 
+        if (!file.exists())
+            throw new RuntimeException("Couldn't create local directory! Path: " + file.toURI());
+
         return file;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e0aef7f/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
index 299f028..78e262d 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
@@ -154,11 +154,10 @@ public class IgniteYarnClient {
     private static Path getIgnite(ClusterProperties props, FileSystem fileSystem) throws Exception {
         IgniteProvider provider = new IgniteProvider(props, fileSystem);
 
-        if (props.igniteVer() == null
-            || props.igniteVer().equalsIgnoreCase(ClusterProperties.DEFAULT_IGNITE_VERSION))
+        if (props.igniteUrl() == null)
             return provider.getIgnite();
         else
-            return provider.getIgnite(props.igniteVer());
+            return provider.getIgnite(props.igniteUrl());
     }
 
     /**


[50/50] [abbrv] incubator-ignite git commit: Merge branch 'ignite-1.3' into ignite-1056

Posted by sb...@apache.org.
Merge branch 'ignite-1.3' into ignite-1056


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

Branch: refs/heads/ignite-1056
Commit: 407db169246cbb33cba15f8c3a44b84c3a91144d
Parents: 29f0f14 b19f5c4
Author: ashutak <as...@gridgain.com>
Authored: Fri Jul 10 13:46:36 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Fri Jul 10 13:46:36 2015 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    |   8 +
 RELEASE_NOTES.txt                               |  13 +
 .../examples/ScalarCacheAffinityExample.scala   |   2 +-
 .../scalar/examples/ScalarCacheExample.scala    |   2 +-
 .../ScalarCachePopularNumbersExample.scala      |   2 +-
 .../examples/ScalarCacheQueryExample.scala      |   2 +-
 .../examples/ScalarSnowflakeSchemaExample.scala |   4 +-
 .../src/main/java/org/apache/ignite/Ignite.java |   2 +-
 .../java/org/apache/ignite/IgniteCache.java     |  14 +-
 .../org/apache/ignite/cache/CacheManager.java   |  13 +-
 .../configuration/CacheConfiguration.java       |   4 +
 .../configuration/TransactionConfiguration.java |  23 +
 .../apache/ignite/internal/IgniteKernal.java    |  34 +-
 .../discovery/GridDiscoveryManager.java         |  23 +-
 .../cache/DynamicCacheChangeRequest.java        |  39 +-
 .../processors/cache/GridCacheAttributes.java   |   3 +
 .../processors/cache/GridCacheContext.java      |   8 +-
 .../processors/cache/GridCacheGateway.java      |   4 +-
 .../processors/cache/GridCacheIoManager.java    |   8 +-
 .../GridCachePartitionExchangeManager.java      |   6 +-
 .../processors/cache/GridCacheProcessor.java    | 220 ++---
 .../cache/GridCacheSharedContext.java           |  15 +-
 .../processors/cache/IgniteCacheFutureImpl.java |   6 +
 .../processors/cache/IgniteCacheProxy.java      | 495 +++++++----
 .../distributed/dht/GridDhtCacheEntry.java      |   4 +-
 .../GridDhtPartitionsExchangeFuture.java        |  30 +-
 .../distributed/near/GridNearGetFuture.java     |   4 +-
 .../cache/jta/CacheJtaManagerAdapter.java       |  17 +-
 .../cache/jta/CacheNoopJtaManager.java          |   2 +-
 .../continuous/CacheContinuousQueryHandler.java |   4 +-
 .../datastructures/DataStructuresProcessor.java |  39 +-
 .../GridCacheCountDownLatchImpl.java            |  15 +-
 .../ignite/internal/util/IgniteUtils.java       |   6 +-
 .../util/future/GridFutureChainListener.java    |   4 -
 .../internal/util/future/IgniteFutureImpl.java  |  12 +-
 .../visor/cache/VisorCacheConfiguration.java    |  11 -
 .../visor/cache/VisorCacheStopTask.java         |   2 +-
 .../tcp/internal/TcpDiscoveryNode.java          |   8 +-
 .../affinity/IgniteClientNodeAffinityTest.java  |  14 +-
 .../IgniteFairAffinityDynamicCacheSelfTest.java |   3 +-
 ...cheStoreSessionListenerAbstractSelfTest.java | 112 ++-
 .../GridCacheTxLoadFromStoreOnLockSelfTest.java |  34 +-
 .../cache/CacheFutureExceptionSelfTest.java     |  72 +-
 .../CacheMetricsForClusterGroupSelfTest.java    |  10 +-
 .../cache/CacheOffheapMapEntrySelfTest.java     |   7 +-
 .../cache/CacheStopAndDestroySelfTest.java      | 859 +++++++++++++++++++
 ...eUsageMultinodeDynamicStartAbstractTest.java |   2 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  32 +
 ...ProjectionForCachesOnDaemonNodeSelfTest.java |   2 +-
 .../IgniteCacheConfigurationTemplateTest.java   |  26 +-
 .../cache/IgniteDynamicCacheStartSelfTest.java  | 156 ++--
 .../IgniteDynamicClientCacheStartSelfTest.java  |   5 +-
 .../IgniteClientDataStructuresAbstractTest.java | 109 ++-
 .../IgniteCountDownLatchAbstractSelfTest.java   |  12 +-
 ...teCacheClientNodePartitionsExchangeTest.java |  29 +-
 ...CacheLocalOffHeapAndSwapMetricsSelfTest.java |   2 +-
 .../DataStreamerMultinodeCreateCacheTest.java   |  14 +-
 .../loadtests/hashmap/GridCacheTestContext.java |   4 +-
 .../testsuites/IgniteCacheTestSuite4.java       |   2 +
 .../CacheConfigurationP2PTestClient.java        |   4 +-
 .../HibernateTransactionalDataRegion.java       |  12 +-
 .../hibernate/HibernateL2CacheSelfTest.java     |   7 +-
 .../HibernateL2CacheTransactionalSelfTest.java  |   5 -
 .../apache/ignite/cache/jta/CacheTmLookup.java  |   3 +-
 .../processors/cache/jta/CacheJtaManager.java   |  72 +-
 .../cache/jta/GridCacheXAResource.java          |  16 +-
 .../processors/cache/GridCacheJtaSelfTest.java  |  52 +-
 .../GridTmLookupLifecycleAwareSelfTest.java     |  29 +-
 modules/kafka/pom.xml                           |  11 -
 .../apache/ignite/mesos/ClusterProperties.java  |  14 +
 .../apache/ignite/mesos/IgniteScheduler.java    |  26 +-
 .../util/spring/IgniteSpringHelperImpl.java     |  10 +-
 .../IgniteExcludeInConfigurationTest.java       |   5 +-
 .../org/apache/ignite/spring/sprint-exclude.xml |  19 +
 .../commands/cache/VisorCacheCommand.scala      |   2 -
 .../visor/commands/open/VisorOpenCommand.scala  |   2 +-
 modules/yarn/README.txt                         |  28 +
 modules/yarn/licenses/apache-2.0.txt            | 202 +++++
 modules/yarn/pom.xml                            | 100 +++
 .../apache/ignite/yarn/ApplicationMaster.java   | 400 +++++++++
 .../apache/ignite/yarn/ClusterProperties.java   | 432 ++++++++++
 .../org/apache/ignite/yarn/IgniteContainer.java |  84 ++
 .../org/apache/ignite/yarn/IgniteProvider.java  | 339 ++++++++
 .../apache/ignite/yarn/IgniteYarnClient.java    | 178 ++++
 .../org/apache/ignite/yarn/package-info.java    |  22 +
 .../ignite/yarn/utils/IgniteYarnUtils.java      |  81 ++
 .../main/resources/ignite-default-config.xml    |  35 +
 .../org/apache/ignite/IgniteYarnTestSuite.java  |  38 +
 .../yarn/IgniteApplicationMasterSelfTest.java   | 532 ++++++++++++
 parent/pom.xml                                  |   4 +
 pom.xml                                         |   1 +
 91 files changed, 4689 insertions(+), 690 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/407db169/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------


[34/50] [abbrv] incubator-ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10416

Posted by sb...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-gg-10416


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

Branch: refs/heads/ignite-1056
Commit: d04c1042ec120027c1ddc84d672726db7b7135b0
Parents: 8cc75fc c134dcf
Author: Andrey <an...@gridgain.com>
Authored: Thu Jul 9 17:04:20 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jul 9 17:04:20 2015 +0700

----------------------------------------------------------------------
 RELEASE_NOTES.txt                               |  12 ++
 .../src/main/java/org/apache/ignite/Ignite.java |   2 +-
 .../configuration/CacheConfiguration.java       |   4 +
 .../configuration/TransactionConfiguration.java |  23 +++
 .../apache/ignite/internal/IgniteKernal.java    |  32 +--
 .../processors/cache/GridCacheAttributes.java   |   3 +
 .../processors/cache/GridCacheContext.java      |   8 +-
 .../processors/cache/GridCacheIoManager.java    |   8 +-
 .../processors/cache/GridCacheProcessor.java    | 118 ++++-------
 .../cache/GridCacheSharedContext.java           |  15 +-
 .../distributed/near/GridNearGetFuture.java     |   4 +-
 .../cache/jta/CacheJtaManagerAdapter.java       |  17 +-
 .../cache/jta/CacheNoopJtaManager.java          |   2 +-
 .../continuous/CacheContinuousQueryHandler.java |   4 +-
 .../datastructures/DataStructuresProcessor.java |  39 +++-
 .../GridCacheCountDownLatchImpl.java            |  15 +-
 .../visor/cache/VisorCacheConfiguration.java    |  11 -
 .../ignite/spi/discovery/tcp/ServerImpl.java    |  20 ++
 .../tcp/internal/TcpDiscoveryNode.java          |   2 +-
 .../tcp/internal/TcpDiscoveryNodesRing.java     |   8 +-
 .../tcp/internal/TcpDiscoveryStatistics.java    |  10 +-
 ...cheStoreSessionListenerAbstractSelfTest.java |   1 -
 .../cache/CacheFutureExceptionSelfTest.java     | 161 +++++++--------
 .../IgniteCacheConfigurationTemplateTest.java   |  26 +--
 .../cache/IgniteDynamicCacheStartSelfTest.java  |  16 +-
 .../IgniteDynamicClientCacheStartSelfTest.java  |   5 +-
 .../IgniteClientDataStructuresAbstractTest.java | 109 +++++++---
 .../IgniteCountDownLatchAbstractSelfTest.java   |  12 +-
 ...acheAtomicReplicatedNodeRestartSelfTest.java |   8 +-
 .../loadtests/hashmap/GridCacheTestContext.java |   4 +-
 .../tcp/TcpDiscoveryMultiThreadedTest.java      |  38 ++++
 .../IgniteSpiDiscoverySelfTestSuite.java        |   3 +
 .../HibernateTransactionalDataRegion.java       |  12 +-
 .../hibernate/HibernateL2CacheSelfTest.java     |   7 +-
 .../HibernateL2CacheTransactionalSelfTest.java  |   5 -
 .../apache/ignite/cache/jta/CacheTmLookup.java  |   3 +-
 .../processors/cache/jta/CacheJtaManager.java   |  72 ++++++-
 .../cache/jta/GridCacheXAResource.java          |  16 +-
 .../processors/cache/GridCacheJtaSelfTest.java  |  52 +++--
 .../GridTmLookupLifecycleAwareSelfTest.java     |  29 ++-
 modules/kafka/licenses/apache-2.0.txt           | 202 +++++++++++++++++++
 modules/kafka/pom.xml                           |  11 -
 .../commands/cache/VisorCacheCommand.scala      |   2 -
 .../config/benchmark-put-indexed-val.properties |  64 ++++++
 modules/yardstick/config/ignite-base-config.xml |  23 +++
 .../cache/IgnitePutIndexedValue1Benchmark.java  |  42 ++++
 .../cache/IgnitePutIndexedValue2Benchmark.java  |  42 ++++
 .../cache/IgnitePutIndexedValue8Benchmark.java  |  42 ++++
 .../ignite/yardstick/cache/model/Person1.java   |  55 +++++
 .../ignite/yardstick/cache/model/Person2.java   |  67 ++++++
 .../ignite/yardstick/cache/model/Person8.java   | 109 ++++++++++
 51 files changed, 1219 insertions(+), 376 deletions(-)
----------------------------------------------------------------------



[14/50] [abbrv] incubator-ignite git commit: # IGNITE-591 Deprecate CacheConfiguration.transactionLookupClassName, create TransactionConfiguration.txLookupClassName instead.

Posted by sb...@apache.org.
# IGNITE-591 Deprecate CacheConfiguration.transactionLookupClassName, create TransactionConfiguration.txLookupClassName instead.


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

Branch: refs/heads/ignite-1056
Commit: 006209c6f4dff212c3aa7b48acb3bca9b303d5f8
Parents: b84fdaa
Author: sevdokimov <se...@jetbrains.com>
Authored: Sat Jul 4 17:09:48 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Sat Jul 4 17:09:48 2015 +0300

----------------------------------------------------------------------
 .../configuration/CacheConfiguration.java       |   4 +
 .../configuration/TransactionConfiguration.java |  23 +++
 .../processors/cache/GridCacheAttributes.java   |   3 +
 .../processors/cache/GridCacheContext.java      |   7 +-
 .../processors/cache/GridCacheProcessor.java    |  21 +--
 .../cache/GridCacheSharedContext.java           |  15 +-
 .../cache/jta/CacheJtaManagerAdapter.java       |  17 +-
 .../cache/jta/CacheNoopJtaManager.java          |   2 +-
 .../visor/cache/VisorCacheConfiguration.java    |  11 --
 .../loadtests/hashmap/GridCacheTestContext.java |   5 +-
 .../HibernateTransactionalDataRegion.java       |  12 +-
 .../apache/ignite/cache/jta/CacheTmLookup.java  |   3 +-
 .../processors/cache/jta/CacheJtaManager.java   | 167 +++++++++++--------
 .../processors/cache/GridCacheJtaSelfTest.java  |  43 ++++-
 .../GridTmLookupLifecycleAwareSelfTest.java     |  30 +++-
 .../commands/cache/VisorCacheCommand.scala      |   2 -
 16 files changed, 234 insertions(+), 131 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index e2308f2..63c7269 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -967,7 +967,9 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * Gets class name of transaction manager finder for integration for JEE app servers.
      *
      * @return Transaction manager finder.
+     * @deprecated Use {@link TransactionConfiguration#getTxManagerLookupClassName()} instead.
      */
+    @Deprecated
     public String getTransactionManagerLookupClassName() {
         return tmLookupClsName;
     }
@@ -978,7 +980,9 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @param tmLookupClsName Name of class implementing GridCacheTmLookup interface that is used to
      *      receive JTA transaction manager.
      * @return {@code this} for chaining.
+     * @deprecated Use {@link TransactionConfiguration#setTxManagerLookupClassName(String)} instead.
      */
+    @Deprecated
     public CacheConfiguration<K, V> setTransactionManagerLookupClassName(String tmLookupClsName) {
         this.tmLookupClsName = tmLookupClsName;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
index 9a4114b..5fed59f 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
@@ -61,6 +61,9 @@ public class TransactionConfiguration implements Serializable {
     /** Pessimistic tx log linger. */
     private int pessimisticTxLogLinger = DFLT_PESSIMISTIC_TX_LOG_LINGER;
 
+    /** Name of class implementing GridCacheTmLookup. */
+    private String tmLookupClsName;
+
     /**
      * Empty constructor.
      */
@@ -78,6 +81,7 @@ public class TransactionConfiguration implements Serializable {
         pessimisticTxLogLinger = cfg.getPessimisticTxLogLinger();
         pessimisticTxLogSize = cfg.getPessimisticTxLogSize();
         txSerEnabled = cfg.isTxSerializableEnabled();
+        tmLookupClsName = cfg.getTxManagerLookupClassName();
     }
 
     /**
@@ -202,4 +206,23 @@ public class TransactionConfiguration implements Serializable {
     public void setPessimisticTxLogLinger(int pessimisticTxLogLinger) {
         this.pessimisticTxLogLinger = pessimisticTxLogLinger;
     }
+
+    /**
+     * Gets class name of transaction manager finder for integration for JEE app servers.
+     *
+     * @return Transaction manager finder.
+     */
+    public String getTxManagerLookupClassName() {
+        return tmLookupClsName;
+    }
+
+    /**
+     * Sets look up mechanism for available {@code TransactionManager} implementation, if any.
+     *
+     * @param tmLookupClsName Name of class implementing GridCacheTmLookup interface that is used to
+     *      receive JTA transaction manager.
+     */
+    public void setTxManagerLookupClassName(String tmLookupClsName) {
+        this.tmLookupClsName = tmLookupClsName;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
index 755b89a..78c4722 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
@@ -186,7 +186,10 @@ public class GridCacheAttributes implements Serializable {
 
     /**
      * @return Transaction manager lookup class name.
+     * @deprecated Transaction manager lookup must be configured in 
+     *  {@link TransactionConfiguration#getTxManagerLookupClassName()}.
      */
+    @Deprecated
     public String transactionManagerLookupClassName() {
         return ccfg.getTransactionManagerLookupClassName();
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/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 580e452..c454da9 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
@@ -133,9 +133,6 @@ public class GridCacheContext<K, V> implements Externalizable {
     /** Replication manager. */
     private GridCacheDrManager drMgr;
 
-    /** JTA manager. */
-    private CacheJtaManagerAdapter jtaMgr;
-
     /** Conflict resolver manager. */
     private CacheConflictResolutionManager rslvrMgr;
 
@@ -251,7 +248,6 @@ public class GridCacheContext<K, V> implements Externalizable {
         CacheDataStructuresManager dataStructuresMgr,
         GridCacheTtlManager ttlMgr,
         GridCacheDrManager drMgr,
-        CacheJtaManagerAdapter jtaMgr,
         CacheConflictResolutionManager<K, V> rslvrMgr,
         CachePluginManager pluginMgr
     ) {
@@ -292,7 +288,6 @@ public class GridCacheContext<K, V> implements Externalizable {
         this.dataStructuresMgr = add(dataStructuresMgr);
         this.ttlMgr = add(ttlMgr);
         this.drMgr = add(drMgr);
-        this.jtaMgr = add(jtaMgr);
         this.rslvrMgr = add(rslvrMgr);
         this.pluginMgr = add(pluginMgr);
 
@@ -1018,7 +1013,7 @@ public class GridCacheContext<K, V> implements Externalizable {
      * @return JTA manager.
      */
     public CacheJtaManagerAdapter jta() {
-        return jtaMgr;
+        return sharedCtx.jta();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/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 8124594..1acb351 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
@@ -495,7 +495,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         cleanup(cfg, cfg.getEvictionPolicy(), false);
         cleanup(cfg, cfg.getAffinity(), false);
         cleanup(cfg, cfg.getAffinityMapper(), false);
-        cleanup(cfg, cctx.jta().tmLookup(), false);
         cleanup(cfg, cctx.store().configuredStore(), false);
 
         NearCacheConfiguration nearCfg = cfg.getNearConfiguration();
@@ -1001,8 +1000,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         ctx.kernalContext().query().onCacheStop(ctx);
         ctx.kernalContext().continuous().onCacheStop(ctx);
 
-        U.stopLifecycleAware(log, lifecycleAwares(cache.configuration(), ctx.jta().tmLookup(),
-            ctx.store().configuredStore()));
+        U.stopLifecycleAware(log, lifecycleAwares(cache.configuration(), ctx.store().configuredStore()));
 
         if (log.isInfoEnabled())
             log.info("Stopped cache: " + cache.name());
@@ -1120,9 +1118,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         pluginMgr.validate();
 
-        CacheJtaManagerAdapter jta = JTA.create(cfg.getTransactionManagerLookupClassName() == null);
-
-        jta.createTmLookup(cfg);
+        sharedCtx.jta().registerCache(cfg);
 
         // Skip suggestions for internal caches.
         if (cacheType.userCache())
@@ -1130,8 +1126,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         Collection<Object> toPrepare = new ArrayList<>();
 
-        toPrepare.add(jta.tmLookup());
-
         if (cfgStore instanceof GridCacheLoaderWriterStore) {
             toPrepare.add(((GridCacheLoaderWriterStore)cfgStore).loader());
             toPrepare.add(((GridCacheLoaderWriterStore)cfgStore).writer());
@@ -1141,7 +1135,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         prepare(cfg, toPrepare);
 
-        U.startLifecycleAware(lifecycleAwares(cfg, jta.tmLookup(), cfgStore));
+        U.startLifecycleAware(lifecycleAwares(cfg, cfgStore));
 
         GridCacheAffinityManager affMgr = new GridCacheAffinityManager();
         GridCacheEventManager evtMgr = new GridCacheEventManager();
@@ -1181,7 +1175,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             dataStructuresMgr,
             ttlMgr,
             drMgr,
-            jta,
             rslvrMgr,
             pluginMgr
         );
@@ -1311,7 +1304,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                 dataStructuresMgr,
                 ttlMgr,
                 drMgr,
-                jta,
                 rslvrMgr,
                 pluginMgr
             );
@@ -1632,7 +1624,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      */
     @SuppressWarnings("unchecked")
     private GridCacheSharedContext createSharedContext(GridKernalContext kernalCtx,
-        Collection<CacheStoreSessionListener> storeSesLsnrs) {
+        Collection<CacheStoreSessionListener> storeSesLsnrs) throws IgniteCheckedException {
         IgniteTxManager tm = new IgniteTxManager();
         GridCacheMvccManager mvccMgr = new GridCacheMvccManager();
         GridCacheVersionManager verMgr = new GridCacheVersionManager();
@@ -1640,6 +1632,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         GridCachePartitionExchangeManager exchMgr = new GridCachePartitionExchangeManager();
         GridCacheIoManager ioMgr = new GridCacheIoManager();
 
+        CacheJtaManagerAdapter jta = JTA.createOptional();
+        
         return new GridCacheSharedContext(
             kernalCtx,
             tm,
@@ -1648,7 +1642,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             depMgr,
             exchMgr,
             ioMgr,
-            storeSesLsnrs
+            storeSesLsnrs,
+            jta
         );
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
index 1071ef2..7f4daff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
@@ -27,6 +27,7 @@ import org.apache.ignite.internal.managers.deployment.*;
 import org.apache.ignite.internal.managers.discovery.*;
 import org.apache.ignite.internal.managers.eventstorage.*;
 import org.apache.ignite.internal.processors.affinity.*;
+import org.apache.ignite.internal.processors.cache.jta.*;
 import org.apache.ignite.internal.processors.cache.store.*;
 import org.apache.ignite.internal.processors.cache.transactions.*;
 import org.apache.ignite.internal.processors.cache.version.*;
@@ -54,6 +55,9 @@ public class GridCacheSharedContext<K, V> {
     /** Cache transaction manager. */
     private IgniteTxManager txMgr;
 
+    /** JTA manager. */
+    private CacheJtaManagerAdapter jtaMgr;
+
     /** Partition exchange manager. */
     private GridCachePartitionExchangeManager<K, V> exchMgr;
 
@@ -94,12 +98,14 @@ public class GridCacheSharedContext<K, V> {
         GridCacheDeploymentManager<K, V> depMgr,
         GridCachePartitionExchangeManager<K, V> exchMgr,
         GridCacheIoManager ioMgr,
-        Collection<CacheStoreSessionListener> storeSesLsnrs
+        Collection<CacheStoreSessionListener> storeSesLsnrs,
+        CacheJtaManagerAdapter jtaMgr
     ) {
         this.kernalCtx = kernalCtx;
         this.mvccMgr = add(mvccMgr);
         this.verMgr = add(verMgr);
         this.txMgr = add(txMgr);
+        this.jtaMgr = add(jtaMgr);
         this.depMgr = add(depMgr);
         this.exchMgr = add(exchMgr);
         this.ioMgr = add(ioMgr);
@@ -281,6 +287,13 @@ public class GridCacheSharedContext<K, V> {
     }
 
     /**
+     * @return JTA manager.
+     */
+    public CacheJtaManagerAdapter jta() {
+        return jtaMgr;
+    }
+
+    /**
      * @return Exchange manager.
      */
     public GridCachePartitionExchangeManager<K, V> exchange() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManagerAdapter.java
index ef9204d..85fa4b0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManagerAdapter.java
@@ -25,15 +25,7 @@ import org.jetbrains.annotations.*;
 /**
  * Provides possibility to integrate cache transactions with JTA.
  */
-public abstract class CacheJtaManagerAdapter extends GridCacheManagerAdapter {
-    /**
-     * Creates transaction manager finder.
-     *
-     * @param ccfg Cache configuration.
-     * @throws IgniteCheckedException If failed.
-     */
-    public abstract void createTmLookup(CacheConfiguration ccfg) throws IgniteCheckedException;
-
+public abstract class CacheJtaManagerAdapter extends GridCacheSharedManagerAdapter {
     /**
      * Checks if cache is working in JTA transaction and enlist cache as XAResource if necessary.
      *
@@ -42,6 +34,13 @@ public abstract class CacheJtaManagerAdapter extends GridCacheManagerAdapter {
     public abstract void checkJta() throws IgniteCheckedException;
 
     /**
+     * @param cfg Cache configuration.
+     * @throws IgniteCheckedException If {@link CacheConfiguration#getTransactionManagerLookupClassName()} is incompatible with
+     *     another caches or {@link TransactionConfiguration#getTxManagerLookupClassName()}.
+     */
+    public abstract void registerCache(CacheConfiguration<?, ?> cfg) throws IgniteCheckedException;
+
+    /**
      * Gets transaction manager finder. Returns Object to avoid dependency on JTA library.
      *
      * @return Transaction manager finder.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheNoopJtaManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheNoopJtaManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheNoopJtaManager.java
index 451357f..60e4102 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheNoopJtaManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheNoopJtaManager.java
@@ -31,7 +31,7 @@ public class CacheNoopJtaManager extends CacheJtaManagerAdapter {
     }
 
     /** {@inheritDoc} */
-    @Override public void createTmLookup(CacheConfiguration ccfg) throws IgniteCheckedException {
+    @Override public void registerCache(CacheConfiguration<?, ?> cfg) {
         // No-op.
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
index 4097c4f..b983039 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
@@ -62,9 +62,6 @@ public class VisorCacheConfiguration implements Serializable {
     /** Start size. */
     private int startSize;
 
-    /** Name of class implementing GridCacheTmLookup. */
-    private String tmLookupClsName;
-
     /** Off-heap max memory. */
     private long offHeapMaxMemory;
 
@@ -134,7 +131,6 @@ public class VisorCacheConfiguration implements Serializable {
         swapEnabled = ccfg.isSwapEnabled();
         invalidate = ccfg.isInvalidate();
         startSize = ccfg.getStartSize();
-        tmLookupClsName = ccfg.getTransactionManagerLookupClassName();
         offHeapMaxMemory = ccfg.getOffHeapMaxMemory();
         maxConcurrentAsyncOps = ccfg.getMaxConcurrentAsyncOperations();
         memoryMode = ccfg.getMemoryMode();
@@ -222,13 +218,6 @@ public class VisorCacheConfiguration implements Serializable {
     }
 
     /**
-     * @return Name of class implementing GridCacheTmLookup.
-     */
-    @Nullable public String transactionManagerLookupClassName() {
-        return tmLookupClsName;
-    }
-
-    /**
      * @return Off-heap max memory.
      */
     public long offsetHeapMaxMemory() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/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 77d3905..f0d1af8 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
@@ -19,6 +19,7 @@ package org.apache.ignite.loadtests.hashmap;
 
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 import org.apache.ignite.internal.processors.cache.dr.*;
@@ -55,7 +56,8 @@ public class GridCacheTestContext<K, V> extends GridCacheContext<K, V> {
                 new GridCacheDeploymentManager<K, V>(),
                 new GridCachePartitionExchangeManager<K, V>(),
                 new GridCacheIoManager(),
-                null
+                null,
+                new CacheNoopJtaManager()
             ),
             defaultCacheConfiguration(),
             CacheType.USER,
@@ -71,7 +73,6 @@ public class GridCacheTestContext<K, V> extends GridCacheContext<K, V> {
             new CacheDataStructuresManager(),
             new GridCacheTtlManager(),
             new GridOsCacheDrManager(),
-            new CacheNoopJtaManager(),
             new CacheOsConflictResolutionManager<K, V>(),
             new CachePluginManager(ctx, new CacheConfiguration())
         );

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateTransactionalDataRegion.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateTransactionalDataRegion.java b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateTransactionalDataRegion.java
index 6a1fd2b..0e2526e 100644
--- a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateTransactionalDataRegion.java
+++ b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateTransactionalDataRegion.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.cache.hibernate;
 
 import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.hibernate.cache.*;
 import org.hibernate.cache.spi.*;
@@ -83,9 +84,14 @@ public class HibernateTransactionalDataRegion extends HibernateRegion implements
                     throw new CacheException("Hibernate TRANSACTIONAL access strategy must have Ignite cache with " +
                         "'TRANSACTIONAL' atomicity mode: " + cache.name());
 
-                if (cache.configuration().getTransactionManagerLookupClassName() == null)
-                    throw new CacheException("Hibernate TRANSACTIONAL access strategy must have Ignite cache with " +
-                        "TransactionManagerLookup configured: " + cache.name());
+                if (cache.configuration().getTransactionManagerLookupClassName() == null) {
+                    TransactionConfiguration txCfg = ignite.configuration().getTransactionConfiguration();
+                    
+                    if (txCfg == null || txCfg.getTxManagerLookupClassName() == null)
+                        throw new CacheException("Hibernate TRANSACTIONAL access strategy must have Ignite with " +
+                            "TransactionManagerLookup configured (see IgniteConfiguration." +
+                            "getTransactionConfiguration().getTxManagerLookupClassName()): " + cache.name());
+                }
 
                 return new HibernateTransactionalAccessStrategy(ignite, cache);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java b/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
index c909c7c..5a38576 100644
--- a/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
+++ b/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.cache.jta;
 
 import org.apache.ignite.*;
+import org.apache.ignite.configuration.TransactionConfiguration;
 import org.jetbrains.annotations.*;
 
 import javax.transaction.*;
@@ -25,7 +26,7 @@ import javax.transaction.*;
 /**
  * Allows grid to use different transactional systems. Implement this interface
  * to look up native transaction manager within your environment. Transaction
- * manager lookup is configured via {@link org.apache.ignite.configuration.CacheConfiguration#getTransactionManagerLookupClassName()}
+ * manager lookup is configured via {@link TransactionConfiguration#getTxManagerLookupClassName()}
  * method.
  * <p>
  * The following implementations are provided out of the box:

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
index 2a0d46d..09d856b 100644
--- a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
+++ b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
@@ -21,37 +21,60 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.jta.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.processors.cache.transactions.*;
+import org.apache.ignite.lifecycle.*;
 import org.jetbrains.annotations.*;
 
 import javax.transaction.*;
-import java.lang.ref.*;
-import java.util.*;
+import java.util.concurrent.atomic.*;
 
 /**
  * Implementation of {@link CacheJtaManagerAdapter}.
  */
 public class CacheJtaManager extends CacheJtaManagerAdapter {
     /** */
-    private static final Map<TransactionManager, ThreadLocal<WeakReference<GridCacheXAResource>>> threadLocals =
-            new WeakHashMap<>();
+    private final ThreadLocal<GridCacheXAResource> xaRsrc = new ThreadLocal<>();
 
     /** */
     private volatile TransactionManager jtaTm;
 
     /** */
-    private ThreadLocal<WeakReference<GridCacheXAResource>> xaRsrc;
+    private final AtomicReference<CacheTmLookup> tmLookupRef = new AtomicReference<>();
 
-    /** */
-    private CacheTmLookup tmLookup;
+    /** {@inheritDoc} */
+    @Override protected void start0() throws IgniteCheckedException {
+        super.start0();
+
+        if (cctx.txConfig() != null) {
+            String txLookupClsName = cctx.txConfig().getTxManagerLookupClassName();
+            
+            if (txLookupClsName != null)
+                tmLookupRef.set(createTmLookup(txLookupClsName));
+        }
+    }
 
     /** {@inheritDoc} */
-    @Override public void createTmLookup(CacheConfiguration ccfg) throws IgniteCheckedException {
-        assert ccfg.getTransactionManagerLookupClassName() != null;
+    @Override protected void stop0(boolean cancel) {
+        CacheTmLookup tmLookup = tmLookupRef.get();
+        
+        if (tmLookup instanceof LifecycleAware)
+            ((LifecycleAware)tmLookup).stop();
+    }
 
+    /**
+     * @throws IgniteCheckedException
+     */
+    private CacheTmLookup createTmLookup(String tmLookupClsName) throws IgniteCheckedException {
         try {
-            Class<?> cls = Class.forName(ccfg.getTransactionManagerLookupClassName());
+            Class<?> cls = Class.forName(tmLookupClsName);
+
+            CacheTmLookup res = (CacheTmLookup)cls.newInstance();
 
-            tmLookup = (CacheTmLookup)cls.newInstance();
+            cctx.kernalContext().resource().injectGeneric(res);
+            
+            if (res instanceof LifecycleAware)
+                ((LifecycleAware)res).start();
+            
+            return res;
         }
         catch (Exception e) {
             throw new IgniteCheckedException("Failed to instantiate transaction manager lookup.", e);
@@ -60,82 +83,90 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
 
     /** {@inheritDoc} */
     @Override public void checkJta() throws IgniteCheckedException {
-        TransactionManager jtaTm = this.jtaTm;
-
         if (jtaTm == null) {
             try {
-                jtaTm = tmLookup.getTm();
-
-                if (jtaTm == null)
+                CacheTmLookup tmLookup = tmLookupRef.get();
+                
+                if (tmLookup == null)
                     return;
-
-                synchronized (threadLocals) {
-                    if (this.jtaTm != null)
-                        jtaTm = this.jtaTm;
-                    else {
-                        xaRsrc = threadLocals.get(jtaTm);
-
-                        if (xaRsrc == null) {
-                            xaRsrc = new ThreadLocal<>();
-
-                            threadLocals.put(jtaTm, xaRsrc);
-                        }
-
-                        this.jtaTm = jtaTm;
-                    }
-                }
+                
+                jtaTm = tmLookup.getTm();
             }
             catch (Exception e) {
                 throw new IgniteCheckedException("Failed to get transaction manager: " + e, e);
             }
         }
 
-        WeakReference<GridCacheXAResource> rsrcRef = xaRsrc.get();
-
-        GridCacheXAResource rsrc = rsrcRef == null ? null : rsrcRef.get();
-
-        if (rsrc == null || rsrc.isFinished()) {
-            try {
-                Transaction jtaTx = jtaTm.getTransaction();
-
-                if (jtaTx != null) {
-                    IgniteInternalTx tx = cctx.tm().userTx();
-
-                    if (tx == null) {
-                        TransactionConfiguration tCfg = cctx.kernalContext().config()
-                            .getTransactionConfiguration();
-
-                        tx = cctx.tm().newTx(
-                            /*implicit*/false,
-                            /*implicit single*/false,
-                            null,
-                            tCfg.getDefaultTxConcurrency(),
-                            tCfg.getDefaultTxIsolation(),
-                            tCfg.getDefaultTxTimeout(),
-                            /*store enabled*/true,
-                            /*tx size*/0
-                        );
-                    }
+        if (jtaTm != null) {
+            GridCacheXAResource rsrc = xaRsrc.get();
+
+            if (rsrc == null || rsrc.isFinished()) {
+                try {
+                    Transaction jtaTx = jtaTm.getTransaction();
+
+                    if (jtaTx != null) {
+                        IgniteInternalTx tx = cctx.tm().userTx();
+
+                        if (tx == null) {
+                            TransactionConfiguration tCfg = cctx.kernalContext().config()
+                                .getTransactionConfiguration();
+
+                            tx = cctx.tm().newTx(
+                                /*implicit*/false,
+                                /*implicit single*/false,
+                                null,
+                                tCfg.getDefaultTxConcurrency(),
+                                tCfg.getDefaultTxIsolation(),
+                                tCfg.getDefaultTxTimeout(),
+                                /*store enabled*/true,
+                                /*tx size*/0
+                            );
+                        }
 
-                    rsrc = new GridCacheXAResource(tx, cctx.kernalContext());
+                        rsrc = new GridCacheXAResource(tx, cctx.kernalContext());
 
-                    if (!jtaTx.enlistResource(rsrc))
-                        throw new IgniteCheckedException("Failed to enlist XA resource to JTA user transaction.");
+                        if (!jtaTx.enlistResource(rsrc))
+                            throw new IgniteCheckedException("Failed to enlist XA resource to JTA user transaction.");
 
-                    xaRsrc.set(new WeakReference<>(rsrc));
+                        xaRsrc.set(rsrc);
+                    }
+                }
+                catch (SystemException e) {
+                    throw new IgniteCheckedException("Failed to obtain JTA transaction.", e);
+                }
+                catch (RollbackException e) {
+                    throw new IgniteCheckedException("Failed to enlist XAResource to JTA transaction.", e);
                 }
             }
-            catch (SystemException e) {
-                throw new IgniteCheckedException("Failed to obtain JTA transaction.", e);
-            }
-            catch (RollbackException e) {
-                throw new IgniteCheckedException("Failed to enlist XAResource to JTA transaction.", e);
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public void registerCache(CacheConfiguration<?, ?> cfg) throws IgniteCheckedException {
+        String cacheLookupClsName = cfg.getTransactionManagerLookupClassName();
+        
+        if (cacheLookupClsName != null) {
+            CacheTmLookup tmLookup = tmLookupRef.get();
+            
+            if (tmLookup == null) {
+                tmLookup = createTmLookup(cacheLookupClsName);
+                
+                if (tmLookupRef.compareAndSet(null, tmLookup))
+                    return;
+                
+                tmLookup = tmLookupRef.get();
             }
+
+            if (!cacheLookupClsName.equals(tmLookup.getClass().getName()))
+                throw new IgniteCheckedException("Failed to start cache with CacheTmLookup that specified in cache " +
+                    "configuration, because node uses another CacheTmLookup [cache" + cfg.getName() +
+                    ", tmLookupClassName=" + cacheLookupClsName + ", tmLookupUsedByNode=" 
+                    + tmLookup.getClass().getName() + ']');
         }
     }
 
     /** {@inheritDoc} */
     @Nullable @Override public Object tmLookup() {
-        return tmLookup;
+        return tmLookupRef.get();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
index e1c8a77..29836ef 100644
--- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
+++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
@@ -22,11 +22,14 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.jta.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.testframework.*;
 import org.apache.ignite.transactions.Transaction;
 import org.objectweb.jotm.*;
 
 import javax.transaction.*;
 
+import java.util.concurrent.*;
+
 import static org.apache.ignite.cache.CacheMode.*;
 import static org.apache.ignite.transactions.TransactionState.*;
 
@@ -65,18 +68,11 @@ public class GridCacheJtaSelfTest extends GridCacheAbstractSelfTest {
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(gridName);
-
-        cfg.setTransactionManagerLookupClassName(TestTmLookup.class.getName());
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
+        cfg.getTransactionConfiguration().setTxManagerLookupClassName(TestTmLookup.class.getName());
+        
         CacheConfiguration cfg1 = cacheConfiguration(gridName);
 
         CacheConfiguration cfg2 = cacheConfiguration(gridName);
@@ -100,6 +96,17 @@ public class GridCacheJtaSelfTest extends GridCacheAbstractSelfTest {
     }
 
     /**
+     *
+     */
+    @SuppressWarnings("PublicInnerClass")
+    public static class TestTmLookup2 implements CacheTmLookup {
+        /** {@inheritDoc} */
+        @Override public TransactionManager getTm() {
+            return null;
+        }
+    }
+
+    /**
      * JUnit.
      *
      * @throws Exception If failed.
@@ -185,4 +192,22 @@ public class GridCacheJtaSelfTest extends GridCacheAbstractSelfTest {
         assertEquals(1, (int)cache1.get("key"));
         assertEquals(1, (int)cache2.get("key"));
     }
+    
+    public void testUncompatibleTmLookup() {
+        final IgniteEx ignite = grid(0);
+        
+        final CacheConfiguration cacheCfg = new CacheConfiguration();
+        
+        cacheCfg.setName("Foo");
+        cacheCfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
+        cacheCfg.setTransactionManagerLookupClassName(TestTmLookup2.class.getName());
+        
+        GridTestUtils.assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws IgniteException {
+                ignite.createCache(cacheCfg);
+                
+                return null;
+            }
+        }, IgniteException.class, null);
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
index 5465a91..261765b 100644
--- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
+++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
@@ -23,6 +23,7 @@ import org.apache.ignite.cache.jta.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.lifecycle.*;
+import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
@@ -41,15 +42,24 @@ public class GridTmLookupLifecycleAwareSelfTest extends GridAbstractLifecycleAwa
     /** */
     private boolean near;
 
+    /** */
+    private boolean configureGlobalTmLookup;
+    
     /**
      */
     @SuppressWarnings("PublicInnerClass")
     public static class TestTxLookup extends GridAbstractLifecycleAwareSelfTest.TestLifecycleAware
         implements CacheTmLookup {
-        /**
-         */
-        public TestTxLookup() {
-            super(CACHE_NAME);
+
+        /** */
+        @IgniteInstanceResource
+        Ignite ignite;
+        
+        /** {@inheritDoc} */
+        @Override public void start() {
+            super.start();
+            
+            assertNotNull(ignite);
         }
 
         /** {@inheritDoc} */
@@ -74,7 +84,10 @@ public class GridTmLookupLifecycleAwareSelfTest extends GridAbstractLifecycleAwa
 
         ccfg.setName(CACHE_NAME);
 
-        ccfg.setTransactionManagerLookupClassName(TestTxLookup.class.getName());
+        if (configureGlobalTmLookup)
+            cfg.getTransactionConfiguration().setTxManagerLookupClassName(TestTxLookup.class.getName());
+        else
+            ccfg.setTransactionManagerLookupClassName(TestTxLookup.class.getName());
 
         cfg.setCacheConfiguration(ccfg);
 
@@ -99,4 +112,11 @@ public class GridTmLookupLifecycleAwareSelfTest extends GridAbstractLifecycleAwa
             super.testLifecycleAware();
         }
     }
+
+    /** {@inheritDoc} */
+    public void testLifecycleAwareGlobal() throws Exception {
+        configureGlobalTmLookup = true;
+
+        super.testLifecycleAware();
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/006209c6/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
index 4c005af..90c2de0 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
@@ -833,8 +833,6 @@ object VisorCacheCommand {
         cacheT += ("Invalidate", bool2Str(cfg.invalidate()))
         cacheT += ("Start Size", cfg.startSize())
 
-        cacheT += ("Transaction Manager Lookup", safe(cfg.transactionManagerLookupClassName()))
-
         cacheT += ("Affinity Function", safe(affinityCfg.function()))
         cacheT += ("Affinity Backups", affinityCfg.partitionedBackups())
         cacheT += ("Affinity Partitions", safe(affinityCfg.partitions()))


[33/50] [abbrv] incubator-ignite git commit: Merge branches 'ignite-1026' and 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-1026

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


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

Branch: refs/heads/ignite-1056
Commit: c134dcfa5e7bb5dbc7a533f3d047e6e40cf2ce4e
Parents: 3089ace 0a569b8
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Wed Jul 8 12:20:13 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Wed Jul 8 12:20:13 2015 -0700

----------------------------------------------------------------------
 RELEASE_NOTES.txt                               |  12 ++
 dev-tools/slurp.sh                              |   2 +-
 modules/core/pom.xml                            |   4 +-
 .../cache/eviction/fifo/FifoEvictionPolicy.java |   5 -
 .../cache/eviction/lru/LruEvictionPolicy.java   |   5 -
 .../eviction/sorted/SortedEvictionPolicy.java   |  19 +-
 .../configuration/CacheConfiguration.java       |   4 +
 .../configuration/TransactionConfiguration.java |  23 +++
 .../apache/ignite/internal/IgniteKernal.java    |  10 +-
 .../internal/interop/InteropIgnition.java       |  48 +++--
 .../internal/interop/InteropProcessor.java      |   7 +
 .../processors/cache/CacheObjectImpl.java       |   1 -
 .../processors/cache/GridCacheAttributes.java   |   3 +
 .../processors/cache/GridCacheContext.java      |   8 +-
 .../processors/cache/GridCacheIoManager.java    |   8 +-
 .../processors/cache/GridCacheProcessor.java    |  21 +-
 .../cache/GridCacheSharedContext.java           |  15 +-
 .../dht/GridPartitionedGetFuture.java           |  13 +-
 .../distributed/near/GridNearGetFuture.java     |   4 +-
 .../cache/jta/CacheJtaManagerAdapter.java       |  17 +-
 .../cache/jta/CacheNoopJtaManager.java          |   2 +-
 .../cache/query/GridCacheQueryAdapter.java      |  35 +++-
 .../processors/query/GridQueryProcessor.java    |   5 +
 .../ignite/internal/util/IgniteUtils.java       |   6 +-
 .../visor/cache/VisorCacheConfiguration.java    |  11 -
 .../ignite/spi/discovery/tcp/ServerImpl.java    |  46 +++++
 .../tcp/internal/TcpDiscoveryNode.java          |   2 +-
 .../tcp/internal/TcpDiscoveryNodesRing.java     |   8 +-
 .../tcp/internal/TcpDiscoveryStatistics.java    |  10 +-
 .../cache/CacheFutureExceptionSelfTest.java     | 158 +++++++++++++++
 .../GridCachePartitionedNodeRestartTest.java    |   5 -
 ...ePartitionedOptimisticTxNodeRestartTest.java |   2 +-
 .../GridCacheReplicatedFailoverSelfTest.java    |   5 -
 .../GridCacheReplicatedNodeRestartSelfTest.java |   5 -
 ...acheAtomicReplicatedNodeRestartSelfTest.java |  14 +-
 ...heConcurrentEvictionConsistencySelfTest.java |  15 +-
 .../loadtests/hashmap/GridCacheTestContext.java |   4 +-
 .../tcp/TcpDiscoveryMultiThreadedTest.java      |  38 ++++
 .../TcpDiscoveryNodeConsistentIdSelfTest.java   |  80 ++++++++
 .../ignite/testsuites/IgniteCacheTestSuite.java |   1 +
 .../IgniteSpiDiscoverySelfTestSuite.java        |   5 +
 .../HibernateTransactionalDataRegion.java       |  12 +-
 .../hibernate/HibernateL2CacheSelfTest.java     |   7 +-
 .../HibernateL2CacheTransactionalSelfTest.java  |   5 -
 .../CacheAbstractQueryMetricsSelfTest.java      | 157 +++++++++++++-
 .../cache/CacheLocalQueryMetricsSelfTest.java   |  33 +++
 ...titionedQueryMetricsDistributedSelfTest.java |  33 +++
 ...chePartitionedQueryMetricsLocalSelfTest.java |  33 +++
 .../CachePartitionedQueryMetricsSelfTest.java   |  32 ---
 ...plicatedQueryMetricsDistributedSelfTest.java |  33 +++
 ...acheReplicatedQueryMetricsLocalSelfTest.java |  33 +++
 .../CacheReplicatedQueryMetricsSelfTest.java    |  32 ---
 .../IgniteCacheQuerySelfTestSuite.java          |   7 +-
 .../apache/ignite/cache/jta/CacheTmLookup.java  |   3 +-
 .../processors/cache/jta/CacheJtaManager.java   |  72 ++++++-
 .../cache/jta/GridCacheXAResource.java          |  16 +-
 .../processors/cache/GridCacheJtaSelfTest.java  |  52 +++--
 .../GridTmLookupLifecycleAwareSelfTest.java     |  29 ++-
 modules/kafka/licenses/apache-2.0.txt           | 202 +++++++++++++++++++
 modules/kafka/pom.xml                           |  11 -
 modules/mesos/pom.xml                           |   1 -
 modules/rest-http/pom.xml                       |  14 +-
 modules/urideploy/pom.xml                       |   8 +-
 .../commands/cache/VisorCacheCommand.scala      |   2 -
 modules/web/pom.xml                             |   6 +-
 .../config/benchmark-put-indexed-val.properties |  64 ++++++
 modules/yardstick/config/ignite-base-config.xml |  23 +++
 .../cache/IgnitePutIndexedValue1Benchmark.java  |  42 ++++
 .../cache/IgnitePutIndexedValue2Benchmark.java  |  42 ++++
 .../cache/IgnitePutIndexedValue8Benchmark.java  |  42 ++++
 .../ignite/yardstick/cache/model/Person1.java   |  55 +++++
 .../ignite/yardstick/cache/model/Person2.java   |  67 ++++++
 .../ignite/yardstick/cache/model/Person8.java   | 109 ++++++++++
 parent/pom.xml                                  |   1 +
 scripts/git-patch-prop.sh                       |   2 +-
 75 files changed, 1695 insertions(+), 271 deletions(-)
----------------------------------------------------------------------


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

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


[08/50] [abbrv] incubator-ignite git commit: # IGNITE-591 Don't use static ThreadLocal.

Posted by sb...@apache.org.
# IGNITE-591 Don't use static ThreadLocal.


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

Branch: refs/heads/ignite-1056
Commit: 53143355dc713f2af3308f5ceef9fcc6e3d3d2a1
Parents: bac6f48
Author: sevdokimov <se...@gridgain.com>
Authored: Thu Jul 2 16:38:10 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Thu Jul 2 16:38:10 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/jta/CacheJtaManager.java   | 122 ++++++++++++-------
 1 file changed, 77 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/53143355/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
index 2a078dc..c5a94bc 100644
--- a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
+++ b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
@@ -17,23 +17,34 @@
 
 package org.apache.ignite.internal.processors.cache.jta;
 
-import org.apache.ignite.*;
-import org.apache.ignite.cache.jta.*;
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.processors.cache.transactions.*;
-import org.jetbrains.annotations.*;
-
-import javax.transaction.*;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.cache.jta.CacheTmLookup;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.TransactionConfiguration;
+import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
+import org.jetbrains.annotations.Nullable;
+
+import javax.transaction.RollbackException;
+import javax.transaction.SystemException;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+import java.lang.ref.WeakReference;
+import java.util.Map;
+import java.util.WeakHashMap;
 
 /**
  * Implementation of {@link CacheJtaManagerAdapter}.
  */
 public class CacheJtaManager extends CacheJtaManagerAdapter {
     /** */
-    private final static ThreadLocal<GridCacheXAResource> xaRsrc = new ThreadLocal<>();
+    private static final Map<TransactionManager, ThreadLocal<WeakReference<GridCacheXAResource>>> threadLocals =
+            new WeakHashMap<>();
+
+    /** */
+    private volatile TransactionManager jtaTm;
 
     /** */
-    private TransactionManager jtaTm;
+    private ThreadLocal<WeakReference<GridCacheXAResource>> xaRsrc;
 
     /** */
     private CacheTmLookup tmLookup;
@@ -54,55 +65,76 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
 
     /** {@inheritDoc} */
     @Override public void checkJta() throws IgniteCheckedException {
+        TransactionManager jtaTm = this.jtaTm;
+
         if (jtaTm == null) {
             try {
                 jtaTm = tmLookup.getTm();
+
+                if (jtaTm == null)
+                    return;
+
+                synchronized (threadLocals) {
+                    if (this.jtaTm != null)
+                        jtaTm = this.jtaTm;
+                    else {
+                        xaRsrc = threadLocals.get(jtaTm);
+
+                        if (xaRsrc == null) {
+                            xaRsrc = new ThreadLocal<>();
+
+                            threadLocals.put(jtaTm, xaRsrc);
+                        }
+
+                        this.jtaTm = jtaTm;
+                    }
+                }
             }
             catch (Exception e) {
                 throw new IgniteCheckedException("Failed to get transaction manager: " + e, e);
             }
         }
 
-        if (jtaTm != null) {
-            GridCacheXAResource rsrc = xaRsrc.get();
-
-            if (rsrc == null || rsrc.isFinished()) {
-                try {
-                    Transaction jtaTx = jtaTm.getTransaction();
-
-                    if (jtaTx != null) {
-                        IgniteInternalTx tx = cctx.tm().userTx();
-
-                        if (tx == null) {
-                            TransactionConfiguration tCfg = cctx.kernalContext().config()
-                                .getTransactionConfiguration();
-
-                            tx = cctx.tm().newTx(
-                                /*implicit*/false,
-                                /*implicit single*/false,
-                                null,
-                                tCfg.getDefaultTxConcurrency(),
-                                tCfg.getDefaultTxIsolation(),
-                                tCfg.getDefaultTxTimeout(),
-                                /*store enabled*/true,
-                                /*tx size*/0
-                            );
-                        }
-
-                        rsrc = new GridCacheXAResource(tx, cctx.kernalContext());
+        WeakReference<GridCacheXAResource> rsrcRef = xaRsrc.get();
 
-                        if (!jtaTx.enlistResource(rsrc))
-                            throw new IgniteCheckedException("Failed to enlist XA resource to JTA user transaction.");
+        GridCacheXAResource rsrc = rsrcRef == null ? null : rsrcRef.get();
 
-                        xaRsrc.set(rsrc);
+        if (rsrc == null || rsrc.isFinished()) {
+            try {
+                Transaction jtaTx = jtaTm.getTransaction();
+
+                if (jtaTx != null) {
+                    IgniteInternalTx tx = cctx.tm().userTx();
+
+                    if (tx == null) {
+                        TransactionConfiguration tCfg = cctx.kernalContext().config()
+                            .getTransactionConfiguration();
+
+                        tx = cctx.tm().newTx(
+                            /*implicit*/false,
+                            /*implicit single*/false,
+                            null,
+                            tCfg.getDefaultTxConcurrency(),
+                            tCfg.getDefaultTxIsolation(),
+                            tCfg.getDefaultTxTimeout(),
+                            /*store enabled*/true,
+                            /*tx size*/0
+                        );
                     }
+
+                    rsrc = new GridCacheXAResource(tx, cctx.kernalContext());
+
+                    if (!jtaTx.enlistResource(rsrc))
+                        throw new IgniteCheckedException("Failed to enlist XA resource to JTA user transaction.");
+
+                    xaRsrc.set(new WeakReference<>(rsrc));
                 }
-                catch (SystemException e) {
-                    throw new IgniteCheckedException("Failed to obtain JTA transaction.", e);
-                }
-                catch (RollbackException e) {
-                    throw new IgniteCheckedException("Failed to enlist XAResource to JTA transaction.", e);
-                }
+            }
+            catch (SystemException e) {
+                throw new IgniteCheckedException("Failed to obtain JTA transaction.", e);
+            }
+            catch (RollbackException e) {
+                throw new IgniteCheckedException("Failed to enlist XAResource to JTA transaction.", e);
             }
         }
     }


[12/50] [abbrv] incubator-ignite git commit: IGNITE-591 Fix imports.

Posted by sb...@apache.org.
IGNITE-591 Fix imports.


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

Branch: refs/heads/ignite-1056
Commit: bb8dcf9ce0290a4016c13184aef9796c7a2d7bde
Parents: 5314335
Author: sevdokimov <se...@jetbrains.com>
Authored: Fri Jul 3 11:09:43 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Fri Jul 3 11:09:43 2015 +0300

----------------------------------------------------------------------
 .../hibernate/HibernateL2CacheSelfTest.java     | 45 +++++++++-----------
 .../HibernateL2CacheTransactionalSelfTest.java  | 33 +++++++-------
 .../processors/cache/jta/CacheJtaManager.java   | 23 ++++------
 .../processors/cache/GridCacheJtaSelfTest.java  | 21 ++++-----
 4 files changed, 55 insertions(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bb8dcf9c/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
index fe34ea8..91d5c26 100644
--- a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
+++ b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
@@ -17,40 +17,37 @@
 
 package org.apache.ignite.cache.hibernate;
 
-import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteKernal;
-import org.apache.ignite.internal.processors.cache.IgniteCacheProxy;
-import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.cache.affinity.rendezvous.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.cache.*;
+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.*;
+import org.apache.ignite.testframework.junits.common.*;
 import org.hibernate.*;
 import org.hibernate.Query;
-import org.hibernate.annotations.NaturalId;
-import org.hibernate.annotations.NaturalIdCache;
-import org.hibernate.cache.spi.GeneralDataRegion;
-import org.hibernate.cache.spi.TransactionalDataRegion;
+import org.hibernate.annotations.*;
+import org.hibernate.cache.spi.*;
 import org.hibernate.cache.spi.access.AccessType;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.exception.ConstraintViolationException;
-import org.hibernate.service.ServiceRegistryBuilder;
-import org.hibernate.stat.NaturalIdCacheStatistics;
-import org.hibernate.stat.SecondLevelCacheStatistics;
+import org.hibernate.cfg.*;
+import org.hibernate.exception.*;
+import org.hibernate.service.*;
+import org.hibernate.stat.*;
 
 import javax.persistence.*;
 import java.util.*;
-import java.util.concurrent.Callable;
+import java.util.concurrent.*;
 
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
 import static org.apache.ignite.cache.hibernate.HibernateRegionFactory.*;
 import static org.hibernate.cfg.Environment.*;
 
+import org.apache.ignite.cache.hibernate.HibernateL2CacheSelfTest.Entity;
+
 /**
  *
  * Tests Hibernate L2 cache.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bb8dcf9c/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheTransactionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheTransactionalSelfTest.java b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheTransactionalSelfTest.java
index 6f47d3b..efc6f3e 100644
--- a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheTransactionalSelfTest.java
+++ b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheTransactionalSelfTest.java
@@ -17,24 +17,23 @@
 
 package org.apache.ignite.cache.hibernate;
 
-import org.apache.commons.dbcp.managed.BasicManagedDataSource;
-import org.apache.ignite.cache.jta.CacheTmLookup;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.h2.jdbcx.JdbcDataSource;
-import org.hibernate.cache.spi.access.AccessType;
-import org.hibernate.engine.transaction.internal.jta.JtaTransactionFactory;
+import org.apache.commons.dbcp.managed.*;
+import org.apache.ignite.cache.jta.*;
+import org.apache.ignite.configuration.*;
+import org.h2.jdbcx.*;
+import org.hibernate.cache.spi.access.*;
+import org.hibernate.engine.transaction.internal.jta.*;
 import org.hibernate.engine.transaction.spi.TransactionFactory;
-import org.hibernate.service.ServiceRegistryBuilder;
-import org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl;
-import org.hibernate.service.jdbc.connections.spi.ConnectionProvider;
-import org.hibernate.service.jta.platform.internal.AbstractJtaPlatform;
-import org.hibernate.service.jta.platform.spi.JtaPlatform;
-import org.jetbrains.annotations.Nullable;
-import org.objectweb.jotm.Jotm;
-
-import javax.transaction.TransactionManager;
-import javax.transaction.UserTransaction;
-import java.util.Collections;
+import org.hibernate.service.*;
+import org.hibernate.service.jdbc.connections.internal.*;
+import org.hibernate.service.jdbc.connections.spi.*;
+import org.hibernate.service.jta.platform.internal.*;
+import org.hibernate.service.jta.platform.spi.*;
+import org.jetbrains.annotations.*;
+import org.objectweb.jotm.*;
+
+import javax.transaction.*;
+import java.util.*;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bb8dcf9c/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
index c5a94bc..2a0d46d 100644
--- a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
+++ b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
@@ -17,20 +17,15 @@
 
 package org.apache.ignite.internal.processors.cache.jta;
 
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.jta.CacheTmLookup;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.TransactionConfiguration;
-import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
-import org.jetbrains.annotations.Nullable;
-
-import javax.transaction.RollbackException;
-import javax.transaction.SystemException;
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-import java.lang.ref.WeakReference;
-import java.util.Map;
-import java.util.WeakHashMap;
+import org.apache.ignite.*;
+import org.apache.ignite.cache.jta.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.processors.cache.transactions.*;
+import org.jetbrains.annotations.*;
+
+import javax.transaction.*;
+import java.lang.ref.*;
+import java.util.*;
 
 /**
  * Implementation of {@link CacheJtaManagerAdapter}.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bb8dcf9c/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
index 9b8cb15..e1c8a77 100644
--- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
+++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
@@ -17,21 +17,18 @@
 
 package org.apache.ignite.internal.processors.cache;
 
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.jta.CacheTmLookup;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.jta.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.transactions.Transaction;
-import org.objectweb.jotm.Jotm;
+import org.objectweb.jotm.*;
 
-import javax.transaction.Status;
-import javax.transaction.TransactionManager;
-import javax.transaction.UserTransaction;
+import javax.transaction.*;
 
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-import static org.apache.ignite.transactions.TransactionState.ACTIVE;
+import static org.apache.ignite.cache.CacheMode.*;
+import static org.apache.ignite.transactions.TransactionState.*;
 
 /**
  * Abstract class for cache tests.


[37/50] [abbrv] incubator-ignite git commit: Fixed notes

Posted by sb...@apache.org.
Fixed notes


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

Branch: refs/heads/ignite-1056
Commit: c392cdc9adb759cb73bbfc7f01e3d4be3cc65ea6
Parents: 3a2376c
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Thu Jul 9 16:01:30 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Thu Jul 9 16:01:30 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/yarn/ApplicationMaster.java   | 10 +++-
 .../apache/ignite/yarn/ClusterProperties.java   | 48 ++++++++++++++++++++
 .../apache/ignite/yarn/IgniteYarnClient.java    |  7 ++-
 3 files changed, 63 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c392cdc9/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
index 739a71a..f57df92 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
@@ -93,6 +93,9 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
 
                     env.put("IGNITE_TCP_DISCOVERY_ADDRESSES", getAddress(c.getNodeId().getHost()));
 
+                    if (props.jvmOpts() != null && !props.jvmOpts().isEmpty())
+                        env.put("JVM_OPTS", props.jvmOpts());
+
                     ctx.setEnvironment(env);
 
                     Map<String, LocalResource> resources = new HashMap<>();
@@ -100,6 +103,10 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
                     resources.put("ignite", IgniteYarnUtils.setupFile(ignitePath, fs, LocalResourceType.ARCHIVE));
                     resources.put("ignite-config.xml", IgniteYarnUtils.setupFile(cfgPath, fs, LocalResourceType.FILE));
 
+                    if (props.licencePath() != null)
+                        resources.put("gridgain-license.xml",
+                            IgniteYarnUtils.setupFile(new Path(props.licencePath()), fs, LocalResourceType.FILE));
+
                     if (props.userLibs() != null)
                         resources.put("libs", IgniteYarnUtils.setupFile(new Path(props.userLibs()), fs,
                             LocalResourceType.FILE));
@@ -108,7 +115,8 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
 
                     ctx.setCommands(
                         Collections.singletonList(
-                            "cp -r ./libs/* ./ignite/*/libs/ || true && "
+                            (props.licencePath() != null ? "cp gridgain-license.xml ./ignite/*/ || true && " : "")
+                            + "cp -r ./libs/* ./ignite/*/libs/ || true && "
                             + "./ignite/*/bin/ignite.sh "
                             + "./ignite-config.xml"
                             + " -J-Xmx" + c.getResource().getMemory() + "m"

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c392cdc9/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
index d1a6390..a2d88c0 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
@@ -87,6 +87,24 @@ public class ClusterProperties {
     private String igniteWorkDir = DEFAULT_IGNITE_WORK_DIR;
 
     /** */
+    public static final String IGNITE_PATH = "IGNITE_PATH";
+
+    /** Ignite path. */
+    private String ignitePath = null;
+
+    /** */
+    public static final String LICENCE_PATH = "LICENCE_PATH";
+
+    /** Licence path. */
+    private String licencePath = null;
+
+    /** */
+    public static final String IGNITE_JVM_OPTS = "IGNITE_JVM_OPTS";
+
+    /** JVM opts. */
+    private String jvmOpts = null;
+
+    /** */
     public static final String IGNITE_LOCAL_WORK_DIR = "IGNITE_LOCAL_WORK_DIR";
 
     /** */
@@ -231,6 +249,27 @@ public class ClusterProperties {
     }
 
     /**
+     * @return Licence path.
+     */
+    public String licencePath() {
+        return licencePath;
+    }
+
+    /**
+     * @return Licence path.
+     */
+    public String ignitePath() {
+        return ignitePath;
+    }
+
+    /**
+     * @return Licence path.
+     */
+    public String jvmOpts() {
+        return jvmOpts;
+    }
+
+    /**
      * @return Host name constraint.
      */
     public Pattern hostnameConstraint() {
@@ -260,6 +299,9 @@ public class ClusterProperties {
             prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, props, DEFAULT_IGNITE_NODE_COUNT);
 
             prop.igniteVer = getStringProperty(IGNITE_VERSION, props, DEFAULT_IGNITE_VERSION);
+            prop.ignitePath = getStringProperty(IGNITE_PATH, props, null);
+            prop.licencePath = getStringProperty(LICENCE_PATH, props, null);
+            prop.jvmOpts = getStringProperty(IGNITE_JVM_OPTS, props, null);
             prop.igniteWorkDir = getStringProperty(IGNITE_WORKING_DIR, props, DEFAULT_IGNITE_WORK_DIR);
             prop.igniteLocalWorkDir = getStringProperty(IGNITE_LOCAL_WORK_DIR, props, DEFAULT_IGNITE_LOCAL_WORK_DIR);
             prop.igniteReleasesDir = getStringProperty(IGNITE_RELEASES_DIR, props, DEFAULT_IGNITE_RELEASES_DIR);
@@ -297,6 +339,9 @@ public class ClusterProperties {
         prop.nodeCnt = getDoubleProperty(IGNITE_NODE_COUNT, null, DEFAULT_IGNITE_NODE_COUNT);
 
         prop.igniteVer = getStringProperty(IGNITE_VERSION, null, DEFAULT_IGNITE_VERSION);
+        prop.ignitePath = getStringProperty(IGNITE_PATH, null, null);
+        prop.licencePath = getStringProperty(LICENCE_PATH, null, null);
+        prop.jvmOpts = getStringProperty(IGNITE_JVM_OPTS, null, null);
         prop.igniteWorkDir = getStringProperty(IGNITE_WORKING_DIR, null, DEFAULT_IGNITE_WORK_DIR);
         prop.igniteLocalWorkDir = getStringProperty(IGNITE_LOCAL_WORK_DIR, null, DEFAULT_IGNITE_LOCAL_WORK_DIR);
         prop.igniteReleasesDir = getStringProperty(IGNITE_RELEASES_DIR, null, DEFAULT_IGNITE_RELEASES_DIR);
@@ -332,6 +377,9 @@ public class ClusterProperties {
         envs.put(IGNITE_NODE_COUNT, toEnvVal(nodeCnt));
 
         envs.put(IGNITE_VERSION, toEnvVal(igniteVer));
+        envs.put(IGNITE_PATH, toEnvVal(ignitePath));
+        envs.put(LICENCE_PATH, toEnvVal(licencePath));
+        envs.put(IGNITE_JVM_OPTS, toEnvVal(jvmOpts));
         envs.put(IGNITE_WORKING_DIR, toEnvVal(igniteWorkDir));
         envs.put(IGNITE_LOCAL_WORK_DIR, toEnvVal(igniteLocalWorkDir));
         envs.put(IGNITE_RELEASES_DIR, toEnvVal(igniteReleasesDir));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c392cdc9/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
index 764e717..299f028 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteYarnClient.java
@@ -61,8 +61,13 @@ public class IgniteYarnClient {
 
         FileSystem fs = FileSystem.get(conf);
 
+        Path ignite;
+
         // Load ignite and jar
-        Path ignite = getIgnite(props, fs);
+        if (props.ignitePath() == null)
+            ignite = getIgnite(props, fs);
+        else
+            ignite = new Path(props.ignitePath());
 
         Path appJar = IgniteYarnUtils.copyLocalToHdfs(fs, pathAppMasterJar,
             props.igniteWorkDir() + File.separator + IgniteYarnUtils.JAR_NAME);


[47/50] [abbrv] incubator-ignite git commit: # ignite-929 close does not destroy cache (cherry picked from commit e3fba88)

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java
index 1ba24e3..5093af5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsForClusterGroupSelfTest.java
@@ -107,7 +107,7 @@ public class CacheMetricsForClusterGroupSelfTest extends GridCommonAbstractTest
         assertMetrics(cache1);
         assertMetrics(cache2);
 
-        closeCaches();
+        destroyCaches();
     }
 
     /**
@@ -135,7 +135,7 @@ public class CacheMetricsForClusterGroupSelfTest extends GridCommonAbstractTest
         assertMetrics(cache1);
         assertMetrics(cache2);
 
-        closeCaches();
+        destroyCaches();
     }
 
     /**
@@ -157,9 +157,9 @@ public class CacheMetricsForClusterGroupSelfTest extends GridCommonAbstractTest
     /**
      * Closes caches.
      */
-    private void closeCaches() {
-        cache1.close();
-        cache2.close();
+    private void destroyCaches() {
+        cache1.destroy();
+        cache2.destroy();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
index 8c7d33d..f4d7607 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
@@ -149,7 +149,9 @@ public class CacheOffheapMapEntrySelfTest extends GridCacheAbstractSelfTest {
             cacheMode,
             "Cache");
 
-        try (IgniteCache jcache = grid(0).getOrCreateCache(cfg)) {
+        IgniteCache jcache = grid(0).getOrCreateCache(cfg);
+
+        try {
             GridCacheAdapter<Integer, String> cache = ((IgniteKernal)grid(0)).internalCache(jcache.getName());
 
             Integer key = primaryKey(grid(0).cache(null));
@@ -164,5 +166,8 @@ public class CacheOffheapMapEntrySelfTest extends GridCacheAbstractSelfTest {
 
             assertEquals(entry.getClass(), entryCls);
         }
+        finally {
+            jcache.destroy();
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
new file mode 100644
index 0000000..20284a8
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStopAndDestroySelfTest.java
@@ -0,0 +1,859 @@
+/*
+ *  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.cluster.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.managers.communication.*;
+import org.apache.ignite.internal.processors.cache.distributed.dht.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.plugin.extensions.communication.*;
+import org.apache.ignite.spi.*;
+import org.apache.ignite.spi.communication.tcp.*;
+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.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import javax.cache.*;
+import javax.cache.CacheManager;
+import javax.cache.configuration.*;
+import java.util.*;
+import java.util.concurrent.atomic.*;
+
+import static org.apache.ignite.cache.CacheMode.*;
+
+/**
+ * Checks stop and destroy methods behavior.
+ */
+public class CacheStopAndDestroySelfTest extends GridCommonAbstractTest {
+    /** */
+    private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
+    /** key-value used at test. */
+    protected static String KEY_VAL = "1";
+
+    /** cache name 1. */
+    protected static String CACHE_NAME_DHT = "cache";
+
+    /** cache name 2. */
+    protected static String CACHE_NAME_CLIENT = "cache_client";
+
+    /** near cache name. */
+    protected static String CACHE_NAME_NEAR = "cache_near";
+
+    /** local cache name. */
+    protected static String CACHE_NAME_LOC = "cache_local";
+
+    /** */
+    private static volatile boolean stop;
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        super.beforeTest();
+
+        startGridsMultiThreaded(gridCount());
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        super.afterTest();
+
+        stopAllGrids();
+    }
+
+    /**
+     * @return Grids count to start.
+     */
+    protected int gridCount() {
+        return 3;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration iCfg = super.getConfiguration(gridName);
+
+        if (getTestGridName(2).equals(gridName))
+            iCfg.setClientMode(true);
+
+        ((TcpDiscoverySpi)iCfg.getDiscoverySpi()).setIpFinder(ipFinder);
+        ((TcpDiscoverySpi)iCfg.getDiscoverySpi()).setForceServerMode(true);
+
+        iCfg.setCacheConfiguration();
+
+        TcpCommunicationSpi commSpi = new CountingTxRequestsToClientNodeTcpCommunicationSpi();
+
+        commSpi.setLocalPort(GridTestUtils.getNextCommPort(getClass()));
+        commSpi.setTcpNoDelay(true);
+
+        iCfg.setCommunicationSpi(commSpi);
+
+        return iCfg;
+    }
+
+    /**
+     * Helps to count messages.
+     */
+    public static class CountingTxRequestsToClientNodeTcpCommunicationSpi extends TcpCommunicationSpi {
+        /** Counter. */
+        public static AtomicInteger cnt = new AtomicInteger();
+
+        /** Node filter. */
+        public static UUID nodeFilter;
+
+        /** {@inheritDoc} */
+        @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
+            super.sendMessage(node, msg);
+
+            if (nodeFilter != null &&
+                node.id().equals(nodeFilter) &&
+                msg instanceof GridIoMessage &&
+                ((GridIoMessage)msg).message() instanceof GridDhtTxPrepareRequest)
+                cnt.incrementAndGet();
+        }
+    }
+
+    /**
+     * @return dht config
+     */
+    private CacheConfiguration getDhtConfig() {
+        CacheConfiguration cfg = defaultCacheConfiguration();
+
+        cfg.setName(CACHE_NAME_DHT);
+        cfg.setCacheMode(PARTITIONED);
+        cfg.setNearConfiguration(null);
+
+        return cfg;
+    }
+
+    /**
+     * @return client config
+     */
+    private CacheConfiguration getClientConfig() {
+        CacheConfiguration cfg = defaultCacheConfiguration();
+
+        cfg.setName(CACHE_NAME_CLIENT);
+        cfg.setCacheMode(PARTITIONED);
+        cfg.setNearConfiguration(null);
+
+        return cfg;
+    }
+
+    /**
+     * @return near config
+     */
+    private CacheConfiguration getNearConfig() {
+        CacheConfiguration cfg = defaultCacheConfiguration();
+
+        cfg.setName(CACHE_NAME_NEAR);
+        cfg.setCacheMode(PARTITIONED);
+        cfg.setNearConfiguration(new NearCacheConfiguration());
+
+        return cfg;
+    }
+
+    /**
+     * @return local config
+     */
+    private CacheConfiguration getLocalConfig() {
+        CacheConfiguration cfg = defaultCacheConfiguration();
+
+        cfg.setName(CACHE_NAME_LOC);
+        cfg.setCacheMode(LOCAL);
+        cfg.setNearConfiguration(null);
+
+        return cfg;
+    }
+
+    /**
+     * Test Double Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    public void testDhtDoubleDestroy() throws Exception {
+        dhtDestroy();
+
+        dhtDestroy();
+    }
+
+    /**
+     * Test DHT Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    private void dhtDestroy() throws Exception {
+        grid(0).getOrCreateCache(getDhtConfig());
+
+        assertNull(grid(0).cache(CACHE_NAME_DHT).get(KEY_VAL));
+
+        grid(0).cache(CACHE_NAME_DHT).put(KEY_VAL, KEY_VAL);
+
+        assertEquals(KEY_VAL, grid(0).cache(CACHE_NAME_DHT).get(KEY_VAL));
+        assertEquals(KEY_VAL, grid(1).cache(CACHE_NAME_DHT).get(KEY_VAL));
+        assertEquals(KEY_VAL, grid(2).cache(CACHE_NAME_DHT).get(KEY_VAL));
+
+        assertFalse(grid(0).configuration().isClientMode());
+
+        // DHT Destroy. Cache should be removed from each node.
+
+        IgniteCache<Object, Object> cache = grid(0).cache(CACHE_NAME_DHT);
+
+        cache.destroy();
+
+        checkDestroyed(cache);
+    }
+
+    /**
+     * Test Double Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    public void testClientDoubleDestroy() throws Exception {
+        clientDestroy();
+
+        clientDestroy();
+    }
+
+    /**
+     * Test Client Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    private void clientDestroy() throws Exception {
+        grid(0).getOrCreateCache(getClientConfig());
+
+        assertNull(grid(0).cache(CACHE_NAME_CLIENT).get(KEY_VAL));
+
+        grid(0).cache(CACHE_NAME_CLIENT).put(KEY_VAL, KEY_VAL);
+
+        assertEquals(KEY_VAL, grid(0).cache(CACHE_NAME_CLIENT).get(KEY_VAL));
+        assertEquals(KEY_VAL, grid(1).cache(CACHE_NAME_CLIENT).get(KEY_VAL));
+        assertEquals(KEY_VAL, grid(2).cache(CACHE_NAME_CLIENT).get(KEY_VAL));
+
+        // DHT Destroy from client node. Cache should be removed from each node.
+
+        assertTrue(grid(2).configuration().isClientMode());
+
+        IgniteCache<Object, Object> cache = grid(2).cache(CACHE_NAME_CLIENT);
+
+        cache.destroy(); // Client node.
+
+        checkDestroyed(cache);
+    }
+
+    /**
+     * Test Double Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    public void testNearDoubleDestroy() throws Exception {
+        nearDestroy();
+
+        nearDestroy();
+    }
+
+    /**
+     * Test Near Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    private void nearDestroy() throws Exception {
+        grid(0).getOrCreateCache(getNearConfig());
+
+        grid(2).getOrCreateNearCache(CACHE_NAME_NEAR, new NearCacheConfiguration());
+
+        assertNull(grid(0).cache(CACHE_NAME_NEAR).get(KEY_VAL));
+        assertNull(grid(2).cache(CACHE_NAME_NEAR).get(KEY_VAL));
+
+        grid(2).cache(CACHE_NAME_NEAR).put(KEY_VAL, KEY_VAL);
+        grid(0).cache(CACHE_NAME_NEAR).put(KEY_VAL, "near-test");
+
+        assertEquals("near-test", grid(2).cache(CACHE_NAME_NEAR).localPeek(KEY_VAL));
+
+        // Near cache destroy. Cache should be removed from each node.
+
+        IgniteCache<Object, Object> cache = grid(2).cache(CACHE_NAME_NEAR);
+
+        cache.destroy();
+
+        checkDestroyed(cache);
+    }
+
+    /**
+     * Test Double Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    public void testLocalDoubleDestroy() throws Exception {
+        localDestroy();
+
+        localDestroy();
+    }
+
+    /**
+     * Test Local Destroy.
+     *
+     * @throws Exception If failed.
+     */
+    private void localDestroy() throws Exception {
+        grid(0).getOrCreateCache(getLocalConfig());
+
+        assert grid(0).cache(CACHE_NAME_LOC).get(KEY_VAL) == null;
+        assert grid(1).cache(CACHE_NAME_LOC).get(KEY_VAL) == null;
+
+        grid(0).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + 0);
+        grid(1).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + 1);
+
+        assert grid(0).cache(CACHE_NAME_LOC).get(KEY_VAL).equals(KEY_VAL + 0);
+        assert grid(1).cache(CACHE_NAME_LOC).get(KEY_VAL).equals(KEY_VAL + 1);
+
+        grid(0).cache(CACHE_NAME_LOC).destroy();
+
+        assertNull(grid(0).cache(CACHE_NAME_LOC));
+    }
+
+    /**
+     * Test Dht close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testDhtClose() throws Exception {
+        IgniteCache<Integer, Integer> dhtCache0 = grid(0).getOrCreateCache(getDhtConfig());
+
+        final Integer key = primaryKey(dhtCache0);
+
+        assertNull(dhtCache0.get(key));
+
+        dhtCache0.put(key, key);
+
+        assertEquals(key, dhtCache0.get(key));
+
+        // DHT Close. No-op.
+
+        IgniteCache<Integer, Integer> dhtCache1 = grid(1).cache(CACHE_NAME_DHT);
+        IgniteCache<Integer, Integer> dhtCache2 = grid(2).cache(CACHE_NAME_DHT);
+
+        dhtCache0.close();
+
+        try {
+            dhtCache0.get(key);// Not affected, but can not be taken.
+
+            fail();
+        }
+        catch (IllegalStateException ignored) {
+            // No-op
+        }
+
+        assertEquals(key, dhtCache1.get(key)); // Not affected.
+        assertEquals(key, dhtCache2.get(key));// Not affected.
+
+        // DHT Creation after closed.
+
+        IgniteCache<Integer, Integer> dhtCache0New = grid(0).cache(CACHE_NAME_DHT);
+
+        assertNotSame(dhtCache0, dhtCache0New);
+
+        assertEquals(key, dhtCache0New.get(key)); // Not affected, can be taken since cache reopened.
+
+        dhtCache2.put(key, key + 1);
+
+        assertEquals((Object)(key + 1), dhtCache0New.get(key));
+
+        // Check close at last node.
+
+        stopAllGrids(true);
+
+        startGrid(0);
+
+        dhtCache0 = grid(0).getOrCreateCache(getDhtConfig());
+
+        assertNull(dhtCache0.get(key));
+
+        dhtCache0.put(key, key);
+
+        assertEquals(key, dhtCache0.get(key));
+
+        // Closing last node.
+        dhtCache0.close();
+
+        try {
+            dhtCache0.get(key);// Can not be taken.
+
+            fail();
+        }
+        catch (IllegalStateException ignored) {
+            // No-op
+        }
+
+        // Reopening cache.
+        dhtCache0 = grid(0).cache(CACHE_NAME_DHT);
+
+        assertEquals(key, dhtCache0.get(key)); // Entry not loosed.
+    }
+
+    /**
+     * Test Dht close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testDhtCloseWithTry() throws Exception {
+        String curVal = null;
+
+        for (int i = 0; i < 3; i++) {
+            try (IgniteCache<String, String> cache0 = grid(0).getOrCreateCache(getDhtConfig())) {
+                IgniteCache<String, String> cache1 = grid(1).cache(CACHE_NAME_DHT);
+                IgniteCache<String, String> cache2 = grid(2).cache(CACHE_NAME_DHT);
+
+                if (i == 0) {
+                    assert cache0.get(KEY_VAL) == null;
+                    assert cache1.get(KEY_VAL) == null;
+                    assert cache2.get(KEY_VAL) == null;
+                }
+                else {
+                    assert cache0.get(KEY_VAL).equals(curVal);
+                    assert cache1.get(KEY_VAL).equals(curVal);
+                    assert cache2.get(KEY_VAL).equals(curVal);
+                }
+
+                curVal = KEY_VAL + curVal;
+
+                cache0.put(KEY_VAL, curVal);
+
+                assert cache0.get(KEY_VAL).equals(curVal);
+                assert cache1.get(KEY_VAL).equals(curVal);
+                assert cache2.get(KEY_VAL).equals(curVal);
+            }
+        }
+    }
+
+    /**
+     * Test Client close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testClientClose() throws Exception {
+        IgniteCache<String, String> cache0 = grid(0).getOrCreateCache(getClientConfig());
+
+        assert cache0.get(KEY_VAL) == null;
+
+        cache0.put(KEY_VAL, KEY_VAL);
+
+        assert cache0.get(KEY_VAL).equals(KEY_VAL);
+
+        // DHT Close from client node. Should affect only client node.
+
+        IgniteCache<String, String> cache1 = grid(1).cache(CACHE_NAME_CLIENT);
+        IgniteCache<String, String> cache2 = grid(2).cache(CACHE_NAME_CLIENT);
+
+        assert cache2.get(KEY_VAL).equals(KEY_VAL);
+
+        cache2.close();// Client node.
+
+        assert cache0.get(KEY_VAL).equals(KEY_VAL);// Not affected.
+        assert cache1.get(KEY_VAL).equals(KEY_VAL);// Not affected.
+
+        try {
+            cache2.get(KEY_VAL);// Affected.
+
+            assert false;
+        }
+        catch (IllegalStateException ignored) {
+            // No-op
+        }
+
+        // DHT Creation from client node after closed.
+        IgniteCache<String, String> cache2New = grid(2).cache(CACHE_NAME_CLIENT);
+
+        assertNotSame(cache2, cache2New);
+
+        assert cache2New.get(KEY_VAL).equals(KEY_VAL);
+
+        cache0.put(KEY_VAL, KEY_VAL + "recreated");
+
+        assert cache0.get(KEY_VAL).equals(KEY_VAL + "recreated");
+        assert cache1.get(KEY_VAL).equals(KEY_VAL + "recreated");
+        assert cache2New.get(KEY_VAL).equals(KEY_VAL + "recreated");
+    }
+
+    /**
+     * Test Client close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testClientCloseWithTry() throws Exception {
+        String curVal = null;
+
+        for (int i = 0; i < 3; i++) {
+            try (IgniteCache<String, String> cache2 = grid(2).getOrCreateCache(getClientConfig())) {
+                IgniteCache<String, String> cache0 = grid(0).cache(CACHE_NAME_CLIENT);
+                IgniteCache<String, String> cache1 = grid(1).cache(CACHE_NAME_CLIENT);
+
+                if (i == 0) {
+                    assert cache0.get(KEY_VAL) == null;
+                    assert cache1.get(KEY_VAL) == null;
+                    assert cache2.get(KEY_VAL) == null;
+                }
+                else {
+                    assert cache0.get(KEY_VAL).equals(curVal);
+                    assert cache1.get(KEY_VAL).equals(curVal);
+                    assert cache2.get(KEY_VAL).equals(curVal);
+                }
+
+                curVal = KEY_VAL + curVal;
+
+                cache2.put(KEY_VAL, curVal);
+
+                assert cache0.get(KEY_VAL).equals(curVal);
+                assert cache1.get(KEY_VAL).equals(curVal);
+                assert cache2.get(KEY_VAL).equals(curVal);
+            }
+
+            awaitPartitionMapExchange();
+        }
+    }
+
+    /**
+     * Test Near close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testNearClose() throws Exception {
+        IgniteCache<String, String> cache0 = grid(0).getOrCreateCache(getNearConfig());
+
+        // GridDhtTxPrepareRequest requests to Client node will be counted.
+        CountingTxRequestsToClientNodeTcpCommunicationSpi.nodeFilter = grid(2).context().localNodeId();
+
+        // Near Close from client node.
+
+        IgniteCache<String, String> cache1 = grid(1).cache(CACHE_NAME_NEAR);
+        IgniteCache<String, String> cache2 = grid(2).createNearCache(CACHE_NAME_NEAR, new NearCacheConfiguration());
+
+        assert cache2.get(KEY_VAL) == null;
+
+        // Subscribing to events.
+        cache2.put(KEY_VAL, KEY_VAL);
+
+        CountingTxRequestsToClientNodeTcpCommunicationSpi.cnt.set(0);
+
+        cache0.put(KEY_VAL, "near-test");
+
+        U.sleep(1000);
+
+        //Ensure near cache was automatically updated.
+        assert CountingTxRequestsToClientNodeTcpCommunicationSpi.cnt.get() != 0;
+
+        assert cache2.localPeek(KEY_VAL).equals("near-test");
+
+        cache2.close();
+
+        CountingTxRequestsToClientNodeTcpCommunicationSpi.cnt.set(0);
+
+        // Should not produce messages to client node.
+        cache0.put(KEY_VAL, KEY_VAL + 0);
+
+        U.sleep(1000);
+
+        // Ensure near cache was NOT automatically updated.
+        assert CountingTxRequestsToClientNodeTcpCommunicationSpi.cnt.get() == 0;
+
+        assert cache0.get(KEY_VAL).equals(KEY_VAL + 0);// Not affected.
+        assert cache1.get(KEY_VAL).equals(KEY_VAL + 0);// Not affected.
+
+        try {
+            cache2.get(KEY_VAL);// Affected.
+
+            assert false;
+        }
+        catch (IllegalArgumentException | IllegalStateException ignored) {
+            // No-op
+        }
+
+        // Near Creation from client node after closed.
+
+        IgniteCache<String, String> cache2New = grid(2).createNearCache(CACHE_NAME_NEAR, new NearCacheConfiguration());
+
+        assertNotSame(cache2, cache2New);
+
+        // Subscribing to events.
+        cache2New.put(KEY_VAL, KEY_VAL);
+
+        assert cache2New.localPeek(KEY_VAL).equals(KEY_VAL);
+
+        cache0.put(KEY_VAL, KEY_VAL + "recreated");
+
+        assert cache0.get(KEY_VAL).equals(KEY_VAL + "recreated");
+        assert cache1.get(KEY_VAL).equals(KEY_VAL + "recreated");
+        assert cache2New.localPeek(KEY_VAL).equals(KEY_VAL + "recreated");
+    }
+
+    /**
+     * Test Near close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testNearCloseWithTry() throws Exception {
+        String curVal = null;
+
+        grid(0).getOrCreateCache(getNearConfig());
+
+        NearCacheConfiguration nearCfg = new NearCacheConfiguration();
+
+        for (int i = 0; i < 3; i++) {
+            try (IgniteCache<String, String> cache2 = grid(2).getOrCreateNearCache(CACHE_NAME_NEAR, nearCfg)) {
+                IgniteCache<String, String> cache0 = grid(0).cache(CACHE_NAME_NEAR);
+                IgniteCache<String, String> cache1 = grid(1).cache(CACHE_NAME_NEAR);
+
+                assert cache2.localPeek(KEY_VAL) == null;
+
+                assert cache0.get(KEY_VAL) == null || cache0.get(KEY_VAL).equals(curVal);
+                assert cache1.get(KEY_VAL) == null || cache1.get(KEY_VAL).equals(curVal);
+                assert cache2.get(KEY_VAL) == null || cache2.get(KEY_VAL).equals(curVal);
+
+                curVal = KEY_VAL + curVal;
+
+                cache2.put(KEY_VAL, curVal);
+
+                assert cache2.localPeek(KEY_VAL).equals(curVal);
+
+                assert cache0.get(KEY_VAL).equals(curVal);
+                assert cache1.get(KEY_VAL).equals(curVal);
+                assert cache2.get(KEY_VAL).equals(curVal);
+            }
+        }
+    }
+
+    /**
+     * Test Local close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testLocalClose() throws Exception {
+        grid(0).getOrCreateCache(getLocalConfig());
+
+        assert grid(0).cache(CACHE_NAME_LOC).get(KEY_VAL) == null;
+        assert grid(1).cache(CACHE_NAME_LOC).get(KEY_VAL) == null;
+
+        grid(0).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + 0);
+        grid(1).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + 1);
+
+        assert grid(0).cache(CACHE_NAME_LOC).get(KEY_VAL).equals(KEY_VAL + 0);
+        assert grid(1).cache(CACHE_NAME_LOC).get(KEY_VAL).equals(KEY_VAL + 1);
+
+        // Local close. Same as Local destroy.
+
+        IgniteCache<Object, Object> cache = grid(1).cache(CACHE_NAME_LOC);
+
+        cache.close();
+
+        checkUsageFails(cache);
+
+        assertNull(grid(1).cache(CACHE_NAME_LOC));
+
+        // Local creation after closed.
+
+        grid(0).getOrCreateCache(getLocalConfig());
+
+        grid(0).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + "recreated0");
+        grid(1).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + "recreated1");
+        grid(2).cache(CACHE_NAME_LOC).put(KEY_VAL, KEY_VAL + "recreated2");
+
+        assert grid(0).cache(CACHE_NAME_LOC).get(KEY_VAL).equals(KEY_VAL + "recreated0");
+        assert grid(1).cache(CACHE_NAME_LOC).get(KEY_VAL).equals(KEY_VAL + "recreated1");
+        assert grid(2).cache(CACHE_NAME_LOC).get(KEY_VAL).equals(KEY_VAL + "recreated2");
+    }
+
+    /**
+     * Test Local close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testLocalCloseWithTry() throws Exception {
+        String curVal = null;
+
+        for (int i = 0; i < 3; i++) {
+            try (IgniteCache<String, String> cache2 = grid(2).getOrCreateCache(getLocalConfig())) {
+                IgniteCache<String, String> cache0 = grid(0).cache(CACHE_NAME_LOC);
+                IgniteCache<String, String> cache1 = grid(1).cache(CACHE_NAME_LOC);
+
+                assert cache0.get(KEY_VAL) == null;
+                assert cache1.get(KEY_VAL) == null;
+                assert cache2.get(KEY_VAL) == null;
+
+                curVal = KEY_VAL + curVal;
+
+                cache0.put(KEY_VAL, curVal + 1);
+                cache1.put(KEY_VAL, curVal + 2);
+                cache2.put(KEY_VAL, curVal + 3);
+
+                assert cache0.get(KEY_VAL).equals(curVal + 1);
+                assert cache1.get(KEY_VAL).equals(curVal + 2);
+                assert cache2.get(KEY_VAL).equals(curVal + 3);
+            }
+        }
+    }
+
+    /**
+     * Tests concurrent close.
+     *
+     * @throws Exception If failed.
+     */
+    public void testConcurrentCloseSetWithTry() throws Exception {
+        final AtomicInteger a1 = new AtomicInteger();
+        final AtomicInteger a2 = new AtomicInteger();
+        final AtomicInteger a3 = new AtomicInteger();
+        final AtomicInteger a4 = new AtomicInteger();
+
+        Thread t1 = new Thread(new Runnable() {
+            @Override public void run() {
+                Thread.currentThread().setName("test-thread-1");
+
+                closeWithTry(a1, 0);
+            }
+        });
+        Thread t2 = new Thread(new Runnable() {
+            @Override public void run() {
+                Thread.currentThread().setName("test-thread-2");
+
+                closeWithTry(a2, 0);
+            }
+        });
+        Thread t3 = new Thread(new Runnable() {
+            @Override public void run() {
+                Thread.currentThread().setName("test-thread-3");
+
+                closeWithTry(a3, 2);
+            }
+        });
+        Thread t4 = new Thread(new Runnable() {
+            @Override public void run() {
+                Thread.currentThread().setName("test-thread-4");
+
+                closeWithTry(a4, 2);
+            }
+        });
+
+        IgniteCache<Object, Object> cache = grid(0).getOrCreateCache(getDhtConfig());
+
+        cache.close();
+
+        t1.start();
+        t2.start();
+        t3.start();
+        t4.start();
+
+        try {
+            U.sleep(1000);
+        }
+        finally {
+            stop = true;
+        }
+
+        t1.join();
+        t2.join();
+        t3.join();
+        t4.join();
+
+        assert a1.get() > 1;
+        assert a2.get() > 1;
+        assert a3.get() > 1;
+        assert a4.get() > 1;
+
+        checkUsageFails(cache);
+    }
+
+    /**
+     * @param a AtomicInteger.
+     * @param node Node.
+     */
+    public void closeWithTry(AtomicInteger a, int node) {
+        while (!stop) {
+            try (IgniteCache<String, String> cache = grid(node).getOrCreateCache(getDhtConfig())) {
+                a.incrementAndGet();
+
+                assert cache.get(KEY_VAL) == null || cache.get(KEY_VAL).equals(KEY_VAL);
+
+                cache.put(KEY_VAL, KEY_VAL);
+
+                assert cache.get(KEY_VAL).equals(KEY_VAL);
+            }
+        }
+    }
+
+    /**
+     * Tests start -> destroy -> start -> close using CacheManager.
+     */
+    public void testTckStyleCreateDestroyClose() {
+        CacheManager mgr = Caching.getCachingProvider().getCacheManager();
+
+        String cacheName = "cache";
+
+        mgr.createCache(cacheName, new MutableConfiguration<Integer, String>().setTypes(Integer.class, String.class));
+
+        mgr.destroyCache(cacheName);
+
+        Cache<Integer, String> cache = mgr.createCache(cacheName,
+            new MutableConfiguration<Integer, String>().setTypes(Integer.class, String.class));
+
+        cache.close();
+
+        cache.close();
+
+        try {
+            cache.get(1);
+
+            fail();
+        }
+        catch (IllegalStateException e) {
+            // No-op;
+        }
+    }
+
+    /**
+     * @param cache Cache.
+     * @throws Exception If failed.
+     */
+    private void checkDestroyed(IgniteCache<Object, Object> cache) throws Exception {
+        checkUsageFails(cache);
+
+        awaitPartitionMapExchange();
+
+        String cacheName = cache.getName();
+
+        for (int i = 0; i < 3; i++)
+            assertNull("Unexpected cache for node: " + i, grid(i).cache(cacheName));
+    }
+
+    /**
+     * @param cache Cache.
+     * @throws Exception If failed.
+     */
+    private void checkUsageFails(IgniteCache<Object, Object> cache) throws Exception {
+        try {
+            cache.get(0);
+
+            fail();
+        }
+        catch (IllegalStateException e) {
+            // No-op.
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java
index 82667d9..2d52933 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreUsageMultinodeDynamicStartAbstractTest.java
@@ -163,7 +163,7 @@ public abstract class CacheStoreUsageMultinodeDynamicStartAbstractTest extends C
             cache = srv.cache(null);
 
             if (cache != null)
-                cache.close();
+                cache.destroy();
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
index b9acd99..e640f82 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridProjectionForCachesOnDaemonNodeSelfTest.java
@@ -88,7 +88,7 @@ public class GridProjectionForCachesOnDaemonNodeSelfTest extends GridCommonAbstr
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        ignite.cache(null).close();
+        ignite.cache(null).destroy();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
index cd19703..d1f8016 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
@@ -175,7 +175,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
 
         GridTestUtils.runMultiThreaded(new Callable<Object>() {
             @Override public Object call() throws Exception {
-                futs.add(kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME));
+                futs.add(kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME));
 
                 return null;
             }
@@ -237,7 +237,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             @Override public Object call() throws Exception {
                 IgniteEx kernal = grid(ThreadLocalRandom.current().nextInt(nodeCount()));
 
-                futs.add(kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME));
+                futs.add(kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME));
 
                 return null;
             }
@@ -300,7 +300,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
         for (int g = 0; g < nodeCount(); g++)
             caches[g] = grid(g).cache(DYNAMIC_CACHE_NAME);
 
-        kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME).get();
+        kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get();
 
         for (int g = 0; g < nodeCount(); g++) {
             final IgniteKernal kernal0 = (IgniteKernal) grid(g);
@@ -353,7 +353,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             }
 
             // Undeploy cache.
-            kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME).get();
+            kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get();
 
             startGrid(nodeCount() + 1);
 
@@ -430,7 +430,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
                     }, IllegalArgumentException.class, null);
             }
 
-            kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME).get();
+            kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get();
 
             stopGrid(nodeCount() + 1);
             stopGrid(nodeCount());
@@ -483,7 +483,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
 
             GridTestUtils.assertThrows(log, new Callable<Object>() {
                 @Override public Object call() throws Exception {
-                    IgniteKernal ignite = (IgniteKernal) grid(nodeCount());
+                    IgniteKernal ignite = (IgniteKernal)grid(nodeCount());
 
                     return ignite.getCache(DYNAMIC_CACHE_NAME);
                 }
@@ -497,7 +497,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             for (int g = 0; g < nodeCount() + 1; g++)
                 assertEquals("1", ignite(g).cache(DYNAMIC_CACHE_NAME).get("1"));
 
-            kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME).get();
+            kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get();
         }
         finally {
             stopGrid(nodeCount());
@@ -539,7 +539,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             for (int g = 0; g < nodeCount() + 1; g++)
                 assertEquals("1", ignite(g).cache(DYNAMIC_CACHE_NAME).get("1"));
 
-            kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME).get();
+            kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get();
         }
         finally {
             stopGrid(nodeCount());
@@ -585,7 +585,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             for (int g = 0; g < nodeCount() + 1; g++)
                 assertEquals("1", ignite(g).cache(DYNAMIC_CACHE_NAME).get("1"));
 
-            kernal.context().cache().dynamicStopCache(DYNAMIC_CACHE_NAME).get();
+            kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get();
         }
         finally {
             stopGrid(nodeCount());
@@ -638,10 +638,15 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             ignite(i).events().localListen(lsnrs[i], EventType.EVTS_CACHE_LIFECYCLE);
         }
 
-        try (IgniteCache<Object, Object> ignored = ignite(0).createCache(cfg)) {
+        IgniteCache<Object, Object> cache = ignite(0).createCache(cfg);
+
+        try {
             for (CountDownLatch start : starts)
                 start.await();
         }
+        finally {
+            cache.destroy();
+        }
 
         for (CountDownLatch stop : stops)
             stop.await();
@@ -665,28 +670,29 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
             ccfg.setCacheMode(CacheMode.PARTITIONED);
             ccfg.setNodeFilter(NODE_FILTER);
 
-            try (IgniteCache cache = ig.createCache(ccfg, new NearCacheConfiguration())) {
-                assertNotNull(cache);
+            IgniteCache cache = ig.createCache(ccfg, new NearCacheConfiguration());
+            assertNotNull(cache);
 
-                GridCacheAdapter<Object, Object> cacheAdapter =
-                    ((IgniteKernal)ig).internalCache(DYNAMIC_CACHE_NAME);
+            GridCacheAdapter<Object, Object> cacheAdapter =
+                ((IgniteKernal)ig).internalCache(DYNAMIC_CACHE_NAME);
 
-                assertNotNull(cacheAdapter);
-                assertFalse(cacheAdapter.context().affinityNode());
-                assertTrue(cacheAdapter.context().isNear());
+            assertNotNull(cacheAdapter);
+            assertFalse(cacheAdapter.context().affinityNode());
+            assertTrue(cacheAdapter.context().isNear());
 
-                try {
-                    IgniteEx grid = startGrid(nodeCount() + 1);
+            try {
+                IgniteEx grid = startGrid(nodeCount() + 1);
 
-                    // Check that new node sees near node.
-                    GridDiscoveryManager disco = grid.context().discovery();
+                // Check that new node sees near node.
+                GridDiscoveryManager disco = grid.context().discovery();
 
-                    assertTrue(disco.cacheNearNode(disco.node(ig.cluster().localNode().id()),
-                        DYNAMIC_CACHE_NAME));
-                }
-                finally {
-                    stopGrid(nodeCount() + 1);
-                }
+                assertTrue(disco.cacheNearNode(disco.node(ig.cluster().localNode().id()),
+                    DYNAMIC_CACHE_NAME));
+            }
+            finally {
+                cache.destroy();
+
+                stopGrid(nodeCount() + 1);
             }
         }
         finally {
@@ -955,14 +961,14 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
 
         cfg.setNodeFilter(F.not(NODE_FILTER));
 
-        try (IgniteCache<Object, Object> ignored = ignite(0).createCache(cfg)) {
+        IgniteCache<Object, Object> cache = ignite(0).createCache(cfg);
 
-            final CountDownLatch[] latches = new CountDownLatch[nodeCount()];
+        final CountDownLatch[] latches = new CountDownLatch[nodeCount()];
 
-            IgnitePredicate[] lsnrs = new IgnitePredicate[nodeCount()];
+        IgnitePredicate[] lsnrs = new IgnitePredicate[nodeCount()];
 
-            for (int i = 0; i < nodeCount(); i++) {
-                final int idx = i;
+        for (int i = 0; i < nodeCount(); i++) {
+            final int idx = i;
 
                 latches[i] = new CountDownLatch(1);
                 lsnrs[i] = new IgnitePredicate<CacheEvent>() {
@@ -971,29 +977,30 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
                             case EventType.EVT_CACHE_NODES_LEFT:
                                 latches[idx].countDown();
 
-                                break;
+                            break;
 
-                            default:
-                                assert false;
-                        }
+                        default:
+                            assert false;
+                    }
 
-                        assertEquals(DYNAMIC_CACHE_NAME, e.cacheName());
+                    assertEquals(DYNAMIC_CACHE_NAME, e.cacheName());
 
-                        return true;
-                    }
-                };
+                    return true;
+                }
+            };
 
-                ignite(i).events().localListen(lsnrs[i], EventType.EVTS_CACHE_LIFECYCLE);
-            }
+            ignite(i).events().localListen(lsnrs[i], EventType.EVTS_CACHE_LIFECYCLE);
+        }
 
-            stopGrid(nodeCount());
+        stopGrid(nodeCount());
 
-            for (CountDownLatch latch : latches)
-                latch.await();
+        for (CountDownLatch latch : latches)
+            latch.await();
 
-            for (int i = 0; i < nodeCount(); i++)
-                ignite(i).events().stopLocalListen(lsnrs[i]);
-        }
+        for (int i = 0; i < nodeCount(); i++)
+            ignite(i).events().stopLocalListen(lsnrs[i]);
+
+        cache.destroy();
     }
 
     /**
@@ -1007,7 +1014,9 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
         try {
             CacheConfiguration cfg = new CacheConfiguration(DYNAMIC_CACHE_NAME);
 
-            try (IgniteCache cache = ignite(0).createCache(cfg)) {
+            IgniteCache cache = ignite(0).createCache(cfg);
+
+            try {
                 for (int i = 0; i < 100; i++) {
                     assertFalse(ignite(0).affinity(DYNAMIC_CACHE_NAME).mapKeyToPrimaryAndBackups(i)
                         .contains(dNode.cluster().localNode()));
@@ -1015,6 +1024,9 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
                     cache.put(i, i);
                 }
             }
+            finally {
+                cache.destroy();
+            }
         }
         finally {
             stopGrid(nodeCount());
@@ -1027,23 +1039,25 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testAwaitPartitionMapExchange() throws Exception {
-        try (IgniteCache ignored = grid(0).getOrCreateCache(new CacheConfiguration(DYNAMIC_CACHE_NAME))) {
-            awaitPartitionMapExchange();
+        IgniteCache cache = grid(0).getOrCreateCache(new CacheConfiguration(DYNAMIC_CACHE_NAME));
 
-            startGrid(nodeCount());
+        awaitPartitionMapExchange();
 
-            awaitPartitionMapExchange();
+        startGrid(nodeCount());
 
-            startGrid(nodeCount() + 1);
+        awaitPartitionMapExchange();
 
-            awaitPartitionMapExchange();
+        startGrid(nodeCount() + 1);
 
-            stopGrid(nodeCount() + 1);
+        awaitPartitionMapExchange();
 
-            awaitPartitionMapExchange();
+        stopGrid(nodeCount() + 1);
 
-            stopGrid(nodeCount());
-        }
+        awaitPartitionMapExchange();
+
+        stopGrid(nodeCount());
+
+        cache.destroy();
     }
 
     /**
@@ -1084,9 +1098,11 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
                 if (iter % 10 == 0)
                     log.info("Cache start/stop iteration: " + iter);
 
-                try (IgniteCache<Object, Object> cache = ignite1.getOrCreateCache("cache-" + iter)) {
-                    assertNotNull(cache);
-                }
+                IgniteCache<Object, Object> cache = ignite1.getOrCreateCache("cache-" + iter);
+
+                assertNotNull(cache);
+
+                cache.destroy();
 
                 iter++;
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
index d60a0c3..5a51a1b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
@@ -498,7 +498,7 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
         spi1.reset();
         spi2.reset();
 
-        assertNull(((IgniteKernal)ignite2).context().cache().context().cache().internalCache("cache1"));
+        assertNull(((IgniteKernal)ignite2).context().cache().context().cache().internalCache(CACHE_NAME1));
 
         if (nearCache)
             ignite2.getOrCreateNearCache(CACHE_NAME1, new NearCacheConfiguration<>());
@@ -507,7 +507,7 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
 
         waitForTopologyUpdate(3, new AffinityTopologyVersion(3, 1));
 
-        GridCacheAdapter cache = ((IgniteKernal)ignite2).context().cache().context().cache().internalCache("cache1");
+        GridCacheAdapter cache = ((IgniteKernal)ignite2).context().cache().context().cache().internalCache(CACHE_NAME1);
 
         assertNotNull(cache);
         assertEquals(nearCache, cache.context().isNear());
@@ -533,6 +533,29 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
         spi1.reset();
         spi2.reset();
 
+        AffinityTopologyVersion topVer;
+
+        if (!srvNode) {
+            log.info("Close client cache: " + CACHE_NAME1);
+
+            ignite2.cache(CACHE_NAME1).close();
+
+            assertNull(((IgniteKernal)ignite2).context().cache().context().cache().internalCache(CACHE_NAME1));
+
+            waitForTopologyUpdate(3, new AffinityTopologyVersion(3, 2));
+
+            assertEquals(0, spi0.partitionsSingleMessages());
+            assertEquals(0, spi0.partitionsFullMessages());
+            assertEquals(0, spi1.partitionsSingleMessages());
+            assertEquals(0, spi1.partitionsFullMessages());
+            assertEquals(0, spi2.partitionsSingleMessages());
+            assertEquals(0, spi2.partitionsFullMessages());
+
+            topVer = new AffinityTopologyVersion(3, 3);
+        }
+        else
+            topVer = new AffinityTopologyVersion(3, 2);
+
         final String CACHE_NAME2 = "cache2";
 
         ccfg = new CacheConfiguration();
@@ -541,7 +564,7 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
 
         ignite2.createCache(ccfg);
 
-        waitForTopologyUpdate(3, new AffinityTopologyVersion(3, 2));
+        waitForTopologyUpdate(3, topVer);
 
         assertEquals(0, spi0.partitionsSingleMessages());
         assertEquals(2, spi0.partitionsFullMessages());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
index 3d44600..f4b0d2d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
@@ -96,7 +96,7 @@ public class CacheLocalOffHeapAndSwapMetricsSelfTest extends GridCommonAbstractT
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
         if (cache != null)
-            cache.close();
+            cache.destroy();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
index 12b6458..470ac79 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
@@ -76,15 +76,17 @@ public class DataStreamerMultinodeCreateCacheTest extends GridCommonAbstractTest
                 while (System.currentTimeMillis() < stopTime) {
                     String cacheName = "cache-" + threadIdx + "-" + (iter % 10);
 
-                    try (IgniteCache<Integer, String> cache = ignite.getOrCreateCache(cacheName)) {
-                        try (IgniteDataStreamer<Object, Object> stmr = ignite.dataStreamer(cacheName)) {
-                            ((DataStreamerImpl<Object, Object>)stmr).maxRemapCount(0);
+                    IgniteCache<Integer, String> cache = ignite.getOrCreateCache(cacheName);
 
-                            for (int i = 0; i < 1000; i++)
-                                stmr.addData(i, i);
-                        }
+                    try (IgniteDataStreamer<Object, Object> stmr = ignite.dataStreamer(cacheName)) {
+                        ((DataStreamerImpl<Object, Object>)stmr).maxRemapCount(0);
+
+                        for (int i = 0; i < 1000; i++)
+                            stmr.addData(i, i);
                     }
 
+                    cache.destroy();
+
                     iter++;
                 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/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 12d2b05..bde3a72 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
@@ -131,6 +131,8 @@ public class IgniteCacheTestSuite4 extends TestSuite {
 
         suite.addTestSuite(CacheRemoveAllSelfTest.class);
 
+        suite.addTestSuite(CacheStopAndDestroySelfTest.class);
+
         suite.addTestSuite(CacheOffheapMapEntrySelfTest.class);
 
         suite.addTestSuite(CacheJdbcStoreSessionListenerSelfTest.class);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a233fa00/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java
index eea3a9b..701668b0 100644
--- a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java
+++ b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/startcache/CacheConfigurationP2PTestClient.java
@@ -109,9 +109,9 @@ public class CacheConfigurationP2PTestClient {
             if (cnt != 600)
                 throw new Exception("Unexpected query result: " + cnt);
 
-            cache1.close();
+            cache1.destroy();
 
-            cache2.close();
+            cache2.destroy();
         }
     }
 }


[11/50] [abbrv] incubator-ignite git commit: IGNITE-1026 - Count down latch fix

Posted by sb...@apache.org.
IGNITE-1026 - Count down latch fix


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

Branch: refs/heads/ignite-1056
Commit: d27453fdcdea4612a7ba4d0ef6b0168eb5569ed0
Parents: d38ad8c
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Thu Jul 2 17:52:56 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Thu Jul 2 17:52:56 2015 -0700

----------------------------------------------------------------------
 .../IgniteCountDownLatchAbstractSelfTest.java           | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d27453fd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java
index 80e6123..01ffaf4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCountDownLatchAbstractSelfTest.java
@@ -19,9 +19,9 @@ package org.apache.ignite.internal.processors.cache.datastructures;
 
 import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.resources.*;
-import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.testframework.*;
 import org.jetbrains.annotations.*;
 
@@ -133,7 +133,13 @@ public abstract class IgniteCountDownLatchAbstractSelfTest extends IgniteAtomics
      *
      * @throws Exception If failed.
      */
-    protected void checkRemovedLatch(IgniteCountDownLatch latch) throws Exception {
+    protected void checkRemovedLatch(final IgniteCountDownLatch latch) throws Exception {
+        assert GridTestUtils.waitForCondition(new PA() {
+            @Override public boolean apply() {
+                return latch.removed();
+            }
+        }, 5000);
+
         assert latch.removed();
 
         assert latch.count() == 0;
@@ -177,7 +183,7 @@ public abstract class IgniteCountDownLatchAbstractSelfTest extends IgniteAtomics
      */
     private void checkAwait() throws Exception {
         // Check only 'false' cases here. Successful await is tested over the grid.
-        IgniteCountDownLatch latch = createLatch("await", 5, true);
+        IgniteCountDownLatch latch = createLatch("await", 5, false);
 
         assert !latch.await(10);
         assert !latch.await(10, MILLISECONDS);


[09/50] [abbrv] incubator-ignite git commit: IGNITE-1026 - Count down latch fix

Posted by sb...@apache.org.
IGNITE-1026 - Count down latch fix


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

Branch: refs/heads/ignite-1056
Commit: 6f50ad9f2d7a0e049863f235104c65c86ee8c5ad
Parents: 8ff3619
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Thu Jul 2 16:05:03 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Thu Jul 2 16:05:03 2015 -0700

----------------------------------------------------------------------
 .../continuous/CacheContinuousQueryHandler.java |  4 +--
 .../datastructures/DataStructuresProcessor.java | 31 +++++++++++++++++---
 .../GridCacheCountDownLatchImpl.java            | 12 ++++----
 3 files changed, 36 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6f50ad9f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
index ff2905f..e059760 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
@@ -353,8 +353,8 @@ class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler {
         Iterable<CacheEntryEvent<? extends K, ? extends V>> evts = F.viewReadOnly(entries,
             new C1<CacheContinuousQueryEntry, CacheEntryEvent<? extends K, ? extends V>>() {
                 @Override public CacheEntryEvent<? extends K, ? extends V> apply(CacheContinuousQueryEntry e) {
-                    return new CacheContinuousQueryEvent<K, V>(cache, cctx, e);
-                };
+                    return new CacheContinuousQueryEvent<>(cache, cctx, e);
+                }
             }
         );
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6f50ad9f/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
index 4d2ecbe..5c171e8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
@@ -1056,7 +1056,8 @@ public final class DataStructuresProcessor extends GridProcessorAdapter {
                         dsView.remove(key);
 
                         tx.commit();
-                    } else
+                    }
+                    else
                         tx.setRollbackOnly();
 
                     return null;
@@ -1147,19 +1148,41 @@ public final class DataStructuresProcessor extends GridProcessorAdapter {
                         GridCacheInternalKey key = evt.getKey();
 
                         // Notify latch on changes.
-                        GridCacheRemovable latch = dsMap.get(key);
+                        final GridCacheRemovable latch = dsMap.get(key);
 
                         GridCacheCountDownLatchValue val = (GridCacheCountDownLatchValue)val0;
 
                         if (latch instanceof GridCacheCountDownLatchEx) {
-                            GridCacheCountDownLatchEx latch0 = (GridCacheCountDownLatchEx)latch;
+                            final GridCacheCountDownLatchEx latch0 = (GridCacheCountDownLatchEx)latch;
 
                             latch0.onUpdate(val.get());
 
                             if (val.get() == 0 && val.autoDelete()) {
                                 dsMap.remove(key);
 
-                                latch.onRemoved();
+                                IgniteInternalFuture<?> removeFut = ctx.closure().runLocalSafe(new GPR() {
+                                    @Override public void run() {
+                                        try {
+                                            removeCountDownLatch(latch0.name());
+                                        }
+                                        catch (IgniteCheckedException e) {
+                                            U.error(log, "Failed to remove count down latch: " + latch0.name(), e);
+                                        }
+                                    }
+                                });
+
+                                removeFut.listen(new CI1<IgniteInternalFuture<?>>() {
+                                    @Override public void apply(IgniteInternalFuture<?> f) {
+                                        try {
+                                            f.get();
+                                        }
+                                        catch (IgniteCheckedException e) {
+                                            U.error(log, "Failed to remove count down latch: " + latch0.name(), e);
+                                        }
+
+                                        latch.onRemoved();
+                                    }
+                                });
                             }
                         }
                         else if (latch != null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6f50ad9f/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
index a5353d8..2df6015 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
@@ -288,11 +288,13 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc
 
     /** {@inheritDoc} */
     @Override public void close() {
-        try {
-            ctx.kernalContext().dataStructures().removeCountDownLatch(name);
-        }
-        catch (IgniteCheckedException e) {
-            throw U.convertException(e);
+        if (!rmvd) {
+            try {
+                ctx.kernalContext().dataStructures().removeCountDownLatch(name);
+            }
+            catch (IgniteCheckedException e) {
+                throw U.convertException(e);
+            }
         }
     }
 


[20/50] [abbrv] incubator-ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-591

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


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

Branch: refs/heads/ignite-1056
Commit: 9a51cdf8d051dd0a6c0159fe1a2bc4bf56201da7
Parents: bc29797 0f1b31a
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Tue Jul 7 19:09:30 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Tue Jul 7 19:09:30 2015 -0700

----------------------------------------------------------------------
 dev-tools/slurp.sh                              |   2 +-
 .../internal/interop/InteropIgnition.java       |  17 +-
 .../internal/interop/InteropProcessor.java      |   7 +
 .../cache/query/GridCacheQueryAdapter.java      |  35 ++++-
 .../processors/query/GridQueryProcessor.java    |   5 +
 .../CacheAbstractQueryMetricsSelfTest.java      | 157 ++++++++++++++++++-
 .../cache/CacheLocalQueryMetricsSelfTest.java   |  33 ++++
 ...titionedQueryMetricsDistributedSelfTest.java |  33 ++++
 ...chePartitionedQueryMetricsLocalSelfTest.java |  33 ++++
 .../CachePartitionedQueryMetricsSelfTest.java   |  32 ----
 ...plicatedQueryMetricsDistributedSelfTest.java |  33 ++++
 ...acheReplicatedQueryMetricsLocalSelfTest.java |  33 ++++
 .../CacheReplicatedQueryMetricsSelfTest.java    |  32 ----
 .../IgniteCacheQuerySelfTestSuite.java          |   7 +-
 scripts/git-patch-prop.sh                       |   2 +-
 15 files changed, 386 insertions(+), 75 deletions(-)
----------------------------------------------------------------------



[35/50] [abbrv] incubator-ignite git commit: # ignite-gg-10416 Fixed tests.

Posted by sb...@apache.org.
# ignite-gg-10416 Fixed tests.


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

Branch: refs/heads/ignite-1056
Commit: 546d5955a1fdb4a16c186242945d4a27ba13c52c
Parents: d04c104
Author: Andrey <an...@gridgain.com>
Authored: Thu Jul 9 17:14:10 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jul 9 17:14:10 2015 +0700

----------------------------------------------------------------------
 .../util/spring/IgniteSpringHelperImpl.java      | 10 +++++-----
 .../spring/IgniteExcludeInConfigurationTest.java |  5 ++++-
 .../org/apache/ignite/spring/sprint-exclude.xml  | 19 +++++++++++++++++++
 3 files changed, 28 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/546d5955/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
index 6cfca36..435f522 100644
--- a/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
+++ b/modules/spring/src/main/java/org/apache/ignite/internal/util/spring/IgniteSpringHelperImpl.java
@@ -422,6 +422,8 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
         GenericApplicationContext springCtx = new GenericApplicationContext();
 
         if (excludedProps.length > 0) {
+            final List<String> excludedPropsList = Arrays.asList(excludedProps);
+
             BeanFactoryPostProcessor postProc = new BeanFactoryPostProcessor() {
                 /**
                  * @param def Registered BeanDefinition.
@@ -433,12 +435,10 @@ public class IgniteSpringHelperImpl implements IgniteSpringHelper {
                     while (iterVals.hasNext()) {
                         PropertyValue val = iterVals.next();
 
-                        for (String excludedProp : excludedProps) {
-                            if (val.getName().equals(excludedProp)) {
-                                iterVals.remove();
+                        if (excludedPropsList.contains(val.getName())) {
+                            iterVals.remove();
 
-                                return;
-                            }
+                            continue;
                         }
 
                         if (val.getValue() instanceof Iterable) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/546d5955/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
index 1edca77..b708f21 100644
--- a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java
@@ -40,7 +40,8 @@ public class IgniteExcludeInConfigurationTest extends GridCommonAbstractTest {
     public void testExclude() throws Exception {
          IgniteSpringHelper spring = SPRING.create(false);
 
-        Collection<IgniteConfiguration> cfgs = spring.loadConfigurations(cfgLocation, "typeMetadata").get1();
+        Collection<IgniteConfiguration> cfgs = spring.loadConfigurations(cfgLocation, "fileSystemConfiguration",
+            "typeMetadata").get1();
 
         assertNotNull(cfgs);
         assertEquals(1, cfgs.size());
@@ -50,6 +51,8 @@ public class IgniteExcludeInConfigurationTest extends GridCommonAbstractTest {
         assertEquals(1, cfg.getCacheConfiguration().length);
         assertNull(cfg.getCacheConfiguration()[0].getTypeMetadata());
 
+        assertNull(cfg.getFileSystemConfiguration());
+
         cfgs = spring.loadConfigurations(cfgLocation, "keyType").get1();
 
         assertNotNull(cfgs);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/546d5955/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml b/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
index 494f786..e6bf426 100644
--- a/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml
@@ -29,6 +29,25 @@
         http://www.springframework.org/schema/util
         http://www.springframework.org/schema/util/spring-util.xsd">
     <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+        <property name="fileSystemConfiguration">
+            <list>
+                <bean class="org.apache.ignite.configuration.FileSystemConfiguration">
+                    <property name="name" value="test"/>
+                    <property name="metaCacheName" value="meta"/>
+                    <property name="dataCacheName" value="data"/>
+
+                    <property name="maxSpaceSize" value="#{100L * 1024 * 1024}"/>
+
+                    <!-- Loopback endpoint. -->
+                    <property name="ipcEndpointConfiguration">
+                        <bean class="org.apache.ignite.igfs.IgfsIpcEndpointConfiguration">
+                            <property name="type" value="TCP" />
+                        </bean>
+                    </property>
+                </bean>
+            </list>
+        </property>
+
         <!-- Cache configurations (all properties are optional). -->
         <property name="cacheConfiguration">
             <list>


[16/50] [abbrv] incubator-ignite git commit: Merge branches 'ignite-1026' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-1026

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


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

Branch: refs/heads/ignite-1056
Commit: 3089ace6c9de37765b6f4fa0697b1430f4cb417e
Parents: d27453f f72b291
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Sun Jul 5 11:55:10 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Sun Jul 5 11:55:10 2015 -0700

----------------------------------------------------------------------
 bin/ignite.bat                                  |   8 +-
 bin/ignite.sh                                   |   6 +-
 bin/include/parseargs.bat                       |   1 +
 bin/include/parseargs.sh                        |   3 +
 .../startup/cmdline/CommandLineStartup.java     |   3 +-
 .../startup/cmdline/CommandLineTransformer.java |   9 +
 .../GridCachePartitionedFailoverSelfTest.java   |   5 +
 modules/kafka/pom.xml                           | 116 ++++++
 .../ignite/stream/kafka/KafkaStreamer.java      | 220 +++++++++++
 .../kafka/IgniteKafkaStreamerSelfTestSuite.java |  37 ++
 .../stream/kafka/KafkaEmbeddedBroker.java       | 378 +++++++++++++++++++
 .../kafka/KafkaIgniteStreamerSelfTest.java      | 227 +++++++++++
 .../ignite/stream/kafka/SimplePartitioner.java  |  53 +++
 .../util/spring/IgniteSpringHelperImpl.java     |  72 +++-
 .../IgniteExcludeInConfigurationTest.java       |  78 ++++
 .../org/apache/ignite/spring/sprint-exclude.xml |  57 +++
 .../testsuites/IgniteSpringTestSuite.java       |   2 +
 .../ignite/visor/commands/VisorConsole.scala    |   3 +-
 .../visor/commands/open/VisorOpenCommand.scala  | 319 ++++++++++++++++
 .../scala/org/apache/ignite/visor/visor.scala   | 230 +----------
 .../ignite/visor/VisorRuntimeBaseSpec.scala     |   2 +
 .../commands/kill/VisorKillCommandSpec.scala    |   1 +
 .../commands/start/VisorStartCommandSpec.scala  |   1 +
 .../commands/tasks/VisorTasksCommandSpec.scala  |   1 +
 .../commands/vvm/VisorVvmCommandSpec.scala      |   1 +
 pom.xml                                         |   1 +
 26 files changed, 1593 insertions(+), 241 deletions(-)
----------------------------------------------------------------------



[24/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-591

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


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

Branch: refs/heads/ignite-1056
Commit: cfeec2ddb63770dfe28176c3916630753162631c
Parents: 839fe79 44b52b4
Author: sevdokimov <se...@gridgain.com>
Authored: Wed Jul 8 14:32:52 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Wed Jul 8 14:32:52 2015 +0300

----------------------------------------------------------------------
 .../ignite/spi/discovery/tcp/ServerImpl.java    |  20 ++
 .../tcp/internal/TcpDiscoveryNode.java          |   2 +-
 .../tcp/internal/TcpDiscoveryNodesRing.java     |   8 +-
 .../tcp/internal/TcpDiscoveryStatistics.java    |  10 +-
 ...acheAtomicReplicatedNodeRestartSelfTest.java |   8 +-
 .../tcp/TcpDiscoveryMultiThreadedTest.java      |  38 ++++
 .../IgniteSpiDiscoverySelfTestSuite.java        |   3 +
 modules/kafka/licenses/apache-2.0.txt           | 202 +++++++++++++++++++
 .../config/benchmark-put-indexed-val.properties |  64 ++++++
 modules/yardstick/config/ignite-base-config.xml |  23 +++
 .../cache/IgnitePutIndexedValue1Benchmark.java  |  42 ++++
 .../cache/IgnitePutIndexedValue2Benchmark.java  |  42 ++++
 .../cache/IgnitePutIndexedValue8Benchmark.java  |  42 ++++
 .../ignite/yardstick/cache/model/Person1.java   |  55 +++++
 .../ignite/yardstick/cache/model/Person2.java   |  67 ++++++
 .../ignite/yardstick/cache/model/Person8.java   | 109 ++++++++++
 16 files changed, 727 insertions(+), 8 deletions(-)
----------------------------------------------------------------------



[17/50] [abbrv] incubator-ignite git commit: Merge branches 'ignite-591' and 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-591

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


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

Branch: refs/heads/ignite-1056
Commit: 5dc2d2bc41bf04d0b7c538dd1a37b3cbc67c45e6
Parents: e54f572 44506c3
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Tue Jul 7 14:23:41 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Tue Jul 7 14:23:41 2015 +0300

----------------------------------------------------------------------
 modules/core/pom.xml                            |   4 +-
 .../internal/interop/InteropIgnition.java       |  31 ++--
 .../processors/cache/CacheObjectImpl.java       |   1 -
 .../dht/GridPartitionedGetFuture.java           |  13 +-
 .../ignite/internal/util/IgniteUtils.java       |   6 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |  26 +++
 .../cache/CacheFutureExceptionSelfTest.java     | 171 +++++++++++++++++++
 .../GridCachePartitionedNodeRestartTest.java    |   5 -
 ...ePartitionedOptimisticTxNodeRestartTest.java |   2 +-
 .../GridCacheReplicatedFailoverSelfTest.java    |   5 -
 .../GridCacheReplicatedNodeRestartSelfTest.java |   5 -
 ...acheAtomicReplicatedNodeRestartSelfTest.java |  10 ++
 .../TcpDiscoveryNodeConsistentIdSelfTest.java   |  80 +++++++++
 .../ignite/testsuites/IgniteCacheTestSuite.java |   1 +
 .../IgniteSpiDiscoverySelfTestSuite.java        |   2 +
 modules/mesos/pom.xml                           |   1 -
 modules/rest-http/pom.xml                       |  14 +-
 modules/urideploy/pom.xml                       |   8 +-
 modules/web/pom.xml                             |   6 +-
 parent/pom.xml                                  |   1 +
 20 files changed, 343 insertions(+), 49 deletions(-)
----------------------------------------------------------------------



[19/50] [abbrv] incubator-ignite git commit: # review

Posted by sb...@apache.org.
# review


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

Branch: refs/heads/ignite-1056
Commit: bc2979788d7f728766e5b70314ae45c62c9596b2
Parents: 25c349f
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Tue Jul 7 16:51:30 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Tue Jul 7 16:51:30 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/loadtests/hashmap/GridCacheTestContext.java | 1 -
 .../ignite/cache/hibernate/HibernateL2CacheSelfTest.java      | 2 --
 .../main/java/org/apache/ignite/cache/jta/CacheTmLookup.java  | 2 +-
 .../processors/cache/GridTmLookupLifecycleAwareSelfTest.java  | 7 +++----
 4 files changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bc297978/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 f0d1af8..e9d7a45 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
@@ -19,7 +19,6 @@ package org.apache.ignite.loadtests.hashmap;
 
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.datastructures.*;
 import org.apache.ignite.internal.processors.cache.dr.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bc297978/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
index 91d5c26..c819ec9 100644
--- a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
+++ b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheSelfTest.java
@@ -46,8 +46,6 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
 import static org.apache.ignite.cache.hibernate.HibernateRegionFactory.*;
 import static org.hibernate.cfg.Environment.*;
 
-import org.apache.ignite.cache.hibernate.HibernateL2CacheSelfTest.Entity;
-
 /**
  *
  * Tests Hibernate L2 cache.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bc297978/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java b/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
index 5a38576..f16d6d2 100644
--- a/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
+++ b/modules/jta/src/main/java/org/apache/ignite/cache/jta/CacheTmLookup.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.cache.jta;
 
 import org.apache.ignite.*;
-import org.apache.ignite.configuration.TransactionConfiguration;
+import org.apache.ignite.configuration.*;
 import org.jetbrains.annotations.*;
 
 import javax.transaction.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bc297978/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
index 261765b..f7d3902 100644
--- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
+++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridTmLookupLifecycleAwareSelfTest.java
@@ -44,21 +44,20 @@ public class GridTmLookupLifecycleAwareSelfTest extends GridAbstractLifecycleAwa
 
     /** */
     private boolean configureGlobalTmLookup;
-    
+
     /**
      */
     @SuppressWarnings("PublicInnerClass")
     public static class TestTxLookup extends GridAbstractLifecycleAwareSelfTest.TestLifecycleAware
         implements CacheTmLookup {
-
         /** */
         @IgniteInstanceResource
         Ignite ignite;
-        
+
         /** {@inheritDoc} */
         @Override public void start() {
             super.start();
-            
+
             assertNotNull(ignite);
         }
 


[43/50] [abbrv] incubator-ignite git commit: # IGNITE-1097 (IgniteFuture.chain() unwraps exceptions incorrectly.) (cherry picked from commit b131c81)

Posted by sb...@apache.org.
# IGNITE-1097 (IgniteFuture.chain() unwraps exceptions incorrectly.)
(cherry picked from commit b131c81)


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

Branch: refs/heads/ignite-1056
Commit: 98c57e00676dd22e7f92c3c95b85c6039f902021
Parents: 3dcf891
Author: sevdokimov <se...@jetbrains.com>
Authored: Thu Jul 9 16:04:54 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Fri Jul 10 10:47:35 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheFutureImpl.java |  6 ++++
 .../internal/util/future/IgniteFutureImpl.java  | 12 ++++++--
 .../cache/GridCacheAbstractFullApiSelfTest.java | 32 ++++++++++++++++++++
 3 files changed, 47 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/98c57e00/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
index 06c28e6..42e31d2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheFutureImpl.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.future.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
 
 /**
  * Implementation of public API future for cache.
@@ -36,6 +37,11 @@ public class IgniteCacheFutureImpl<V> extends IgniteFutureImpl<V> {
     }
 
     /** {@inheritDoc} */
+    @Override public <T> IgniteFuture<T> chain(IgniteClosure<? super IgniteFuture<V>, T> doneCb) {
+        return new IgniteCacheFutureImpl<>(chainInternal(doneCb));
+    }
+
+    /** {@inheritDoc} */
     @Override protected RuntimeException convertException(IgniteCheckedException e) {
         return CU.convertToCacheException(e);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/98c57e00/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
index 764e0ea..13d564d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java
@@ -78,7 +78,15 @@ public class IgniteFutureImpl<V> implements IgniteFuture<V> {
 
     /** {@inheritDoc} */
     @Override public <T> IgniteFuture<T> chain(final IgniteClosure<? super IgniteFuture<V>, T> doneCb) {
-        IgniteInternalFuture<T> fut0 = fut.chain(new C1<IgniteInternalFuture<V>, T>() {
+        return new IgniteFutureImpl<>(chainInternal(doneCb));
+    }
+
+    /**
+     * @param doneCb Done callback.
+     * @return Internal future
+     */
+    protected  <T> IgniteInternalFuture<T> chainInternal(final IgniteClosure<? super IgniteFuture<V>, T> doneCb) {
+        return fut.chain(new C1<IgniteInternalFuture<V>, T>() {
             @Override public T apply(IgniteInternalFuture<V> fut) {
                 assert IgniteFutureImpl.this.fut == fut;
 
@@ -90,8 +98,6 @@ public class IgniteFutureImpl<V> implements IgniteFuture<V> {
                 }
             }
         });
-
-        return new IgniteFutureImpl<>(fut0);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/98c57e00/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 151c249..3f9c365 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
@@ -62,6 +62,14 @@ import static org.apache.ignite.transactions.TransactionState.*;
  * Full API cache test.
  */
 public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstractSelfTest {
+    /** */
+    public static final CacheEntryProcessor<String, Integer, String> ERR_PROCESSOR =
+        new CacheEntryProcessor<String, Integer, String>() {
+            @Override public String process(MutableEntry<String, Integer> e, Object... args) {
+                throw new RuntimeException("Failed!");
+            }
+        };
+    
     /** Increment processor for invoke operations. */
     public static final EntryProcessor<String, Integer, String> INCR_PROCESSOR = new EntryProcessor<String, Integer, String>() {
         @Override public String process(MutableEntry<String, Integer> e, Object... args) {
@@ -4993,6 +5001,30 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testTransformException() throws Exception {
+        final IgniteCache<String, Integer> cache = jcache().withAsync();
+        
+        cache.invoke("key2", ERR_PROCESSOR);
+
+        assertThrows(log, new Callable<Object>() {
+            @Override public Object call() throws Exception {
+
+                IgniteFuture fut = cache.future().chain(new IgniteClosure<IgniteFuture, Object>() {
+                    @Override public Object apply(IgniteFuture o) {
+                        return o.get();
+                    }
+                });
+
+                fut.get();
+
+                return null;
+            }
+        }, EntryProcessorException.class, null);
+    }
+    
+    /**
      * Sets given value, returns old value.
      */
     public static final class SetValueProcessor implements EntryProcessor<String, Integer, Integer> {


[02/50] [abbrv] incubator-ignite git commit: IGNITE-1026 - Count down latch fix

Posted by sb...@apache.org.
IGNITE-1026 - Count down latch fix


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

Branch: refs/heads/ignite-1056
Commit: 389bad8d1cac892b01c0a5e5e9479337410c1109
Parents: fe92bfe
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Wed Jun 24 18:47:42 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Wed Jun 24 18:47:42 2015 -0700

----------------------------------------------------------------------
 .../processors/datastructures/DataStructuresProcessor.java  | 9 ---------
 .../datastructures/GridCacheCountDownLatchImpl.java         | 3 ---
 2 files changed, 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/389bad8d/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
index c26e14d..4d2ecbe 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
@@ -29,7 +29,6 @@ import org.apache.ignite.internal.transactions.*;
 import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.lang.*;
 import org.jetbrains.annotations.*;
 import org.jsr166.*;
 
@@ -1158,14 +1157,6 @@ public final class DataStructuresProcessor extends GridProcessorAdapter {
                             latch0.onUpdate(val.get());
 
                             if (val.get() == 0 && val.autoDelete()) {
-                                try {
-                                    removeCountDownLatch(latch0.name());
-                                }
-                                catch (IgniteCheckedException e) {
-                                    U.error(log, "Failed to automatically delete count down latch: " +
-                                        latch0.name(), e);
-                                }
-
                                 dsMap.remove(key);
 
                                 latch.onRemoved();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/389bad8d/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
index 33547d9..a5353d8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
@@ -288,9 +288,6 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc
 
     /** {@inheritDoc} */
     @Override public void close() {
-        if (rmvd)
-            return;
-
         try {
             ctx.kernalContext().dataStructures().removeCountDownLatch(name);
         }


[25/50] [abbrv] incubator-ignite git commit: # Fixed unmarshalling error handling for cache 'get'

Posted by sb...@apache.org.
# Fixed unmarshalling error handling for cache 'get'


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

Branch: refs/heads/ignite-1056
Commit: 6d6ec778b43d730dd19001011aaaa49ec86c5d20
Parents: 94a42a4
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jul 8 15:08:33 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jul 8 15:08:33 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheIoManager.java    |  8 ++-
 .../distributed/near/GridNearGetFuture.java     |  4 +-
 .../cache/CacheFutureExceptionSelfTest.java     | 72 +++++++++++++++++---
 3 files changed, 71 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d6ec778/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
index 0707096..29e3551 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
@@ -445,8 +445,7 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
             case 50: {
                 GridNearGetResponse res = (GridNearGetResponse)msg;
 
-                GridPartitionedGetFuture fut = (GridPartitionedGetFuture)ctx.mvcc().future(
-                    res.version(), res.futureId());
+                GridCacheFuture fut = ctx.mvcc().future(res.version(), res.futureId());
 
                 if (fut == null) {
                     if (log.isDebugEnabled())
@@ -457,7 +456,10 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
 
                 res.error(res.classError());
 
-                fut.onResult(nodeId, res);
+                if (fut instanceof GridNearGetFuture)
+                    ((GridNearGetFuture)fut).onResult(nodeId, res);
+                else
+                    ((GridPartitionedGetFuture)fut).onResult(nodeId, res);
             }
 
             break;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d6ec778/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
index 74438bb..58f6fe5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
@@ -223,7 +223,7 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
      * @param nodeId Sender.
      * @param res Result.
      */
-    void onResult(UUID nodeId, GridNearGetResponse res) {
+    public void onResult(UUID nodeId, GridNearGetResponse res) {
         for (IgniteInternalFuture<Map<K, V>> fut : futures())
             if (isMini(fut)) {
                 MiniFuture f = (MiniFuture)fut;
@@ -649,7 +649,7 @@ public final class GridNearGetFuture<K, V> extends GridCompoundIdentityFuture<Ma
                     if (log.isDebugEnabled())
                         log.debug("Got removed entry while processing get response (will not retry).");
                 }
-                catch (IgniteCheckedException e) {
+                catch (Exception e) {
                     // Fail.
                     onDone(e);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d6ec778/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
index 34d2daa..372c859 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
@@ -20,6 +20,9 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.testframework.junits.common.*;
 
 import javax.cache.*;
@@ -32,31 +35,82 @@ import static java.util.concurrent.TimeUnit.*;
  * Cache future self test.
  */
 public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest {
+    /** */
+    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /** */
+    private static volatile boolean fail;
+
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = new IgniteConfiguration();
+
         cfg.setGridName(gridName);
 
+        TcpDiscoverySpi spi = new TcpDiscoverySpi();
+
+        spi.setIpFinder(IP_FINDER);
+
+        cfg.setDiscoverySpi(spi);
+
         if (gridName.equals(getTestGridName(1)))
             cfg.setClientMode(true);
 
         return cfg;
     }
 
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        stopAllGrids();
+    }
+
     /**
      * @throws Exception If failed.
      */
     public void testAsyncCacheFuture() throws Exception {
-        Ignite srv = startGrid(0);
+        startGrid(0);
+
+        startGrid(1);
+
+        testGet(false, false);
+
+        testGet(false, true);
+
+        testGet(true, false);
+
+        testGet(true, true);
+    }
+
+    /**
+     * @param nearCache If {@code true} creates near cache on client.
+     * @param cpyOnRead Cache copy on read flag.
+     * @throws Exception If failed.
+     */
+    private void testGet(boolean nearCache, boolean cpyOnRead) throws Exception {
+        fail = false;
+
+        Ignite srv = grid(0);
+
+        Ignite client = grid(1);
+
+        final String cacheName = nearCache ? ("NEAR-CACHE-" + cpyOnRead) : ("CACHE-" + cpyOnRead);
+
+        CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+
+        ccfg.setCopyOnRead(cpyOnRead);
+
+        ccfg.setName(cacheName);
+
+        IgniteCache<Object, Object> cache = srv.createCache(ccfg);
 
-        IgniteCache<String, NotSerializableClass> cache = srv.getOrCreateCache("CACHE");
         cache.put("key", new NotSerializableClass());
 
-        Ignite client = startGrid(1);
+        IgniteCache<Object, Object> clientCache = nearCache ? client.createNearCache(cacheName,
+            new NearCacheConfiguration<>()) : client.cache(cacheName);
 
-        IgniteCache<String, NotSerializableClass> asyncCache = client.<String, NotSerializableClass>cache("CACHE").withAsync();
+        IgniteCache<Object, Object> asyncCache = clientCache.withAsync();
 
-        System.setProperty("FAIL", "true");
+        fail = true;
 
         asyncCache.get("key");
 
@@ -79,7 +133,9 @@ public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest {
             }
         });
 
-        assertTrue(futLatch.await(60, SECONDS));
+        assertTrue(futLatch.await(5, SECONDS));
+
+        srv.destroyCache(cache.getName());
     }
 
     /**
@@ -93,10 +149,10 @@ public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest {
 
         /** {@inheritDoc}*/
         private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
-            if (System.getProperty("FAIL") != null)
+            if (fail)
                 throw new RuntimeException("Deserialization failed.");
 
             in.readObject();
         }
     }
-}	
\ No newline at end of file
+}
\ No newline at end of file


[27/50] [abbrv] incubator-ignite git commit: Redundant dependencies removed from ignite-kafka module

Posted by sb...@apache.org.
Redundant dependencies removed from ignite-kafka module


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

Branch: refs/heads/ignite-1056
Commit: 4c9d8c2e4d5421d4088a3f3bfe3f17df589a4f0f
Parents: 23dc8fc
Author: agura <ag...@gridgain.com>
Authored: Wed Jul 8 17:09:19 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Wed Jul 8 17:09:56 2015 +0300

----------------------------------------------------------------------
 modules/kafka/pom.xml | 11 -----------
 1 file changed, 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4c9d8c2e/modules/kafka/pom.xml
----------------------------------------------------------------------
diff --git a/modules/kafka/pom.xml b/modules/kafka/pom.xml
index d0e9cd9..c492100 100644
--- a/modules/kafka/pom.xml
+++ b/modules/kafka/pom.xml
@@ -87,17 +87,6 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.gridgain</groupId>
-            <artifactId>ignite-shmem</artifactId>
-            <version>1.0.0</version>
-        </dependency>
-
-        <dependency>
             <groupId>org.apache.ignite</groupId>
             <artifactId>ignite-spring</artifactId>
             <version>${project.version}</version>


[21/50] [abbrv] incubator-ignite git commit: #IGNITE-591 - Minor

Posted by sb...@apache.org.
#IGNITE-591 - Minor


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

Branch: refs/heads/ignite-1056
Commit: cd01e4c39362e5c27fe749fcd1cf2788b50bcc3d
Parents: 9a51cdf
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Tue Jul 7 19:21:15 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Tue Jul 7 19:21:15 2015 -0700

----------------------------------------------------------------------
 .../apache/ignite/internal/processors/cache/GridCacheContext.java   | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd01e4c3/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 c454da9..eb813c3 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
@@ -220,7 +220,6 @@ public class GridCacheContext<K, V> implements Externalizable {
      * @param dataStructuresMgr Cache dataStructures manager.
      * @param ttlMgr TTL manager.
      * @param drMgr Data center replication manager.
-     * @param jtaMgr JTA manager.
      * @param rslvrMgr Conflict resolution manager.
      * @param pluginMgr Cache plugin manager.
      */


[41/50] [abbrv] incubator-ignite git commit: Fixed build.

Posted by sb...@apache.org.
Fixed build.


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

Branch: refs/heads/ignite-1056
Commit: 9dcca80a74ae02e6824ee07080cd6ed8eb1a0940
Parents: 8c66879
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Fri Jul 10 10:02:20 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Fri Jul 10 10:02:20 2015 +0300

----------------------------------------------------------------------
 modules/yarn/pom.xml | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9dcca80a/modules/yarn/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yarn/pom.xml b/modules/yarn/pom.xml
index f51b0e8..1471ac7 100644
--- a/modules/yarn/pom.xml
+++ b/modules/yarn/pom.xml
@@ -23,9 +23,15 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <groupId>org.apache.ignite</groupId>
+    <parent>
+        <groupId>org.apache.ignite</groupId>
+        <artifactId>ignite-parent</artifactId>
+        <version>1</version>
+        <relativePath>../../parent</relativePath>
+    </parent>
+
     <artifactId>ignite-yarn</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
 
     <properties>
         <hadoop.version>2.7.0</hadoop.version>


[15/50] [abbrv] incubator-ignite git commit: # IGNITE-591 Comment broken test

Posted by sb...@apache.org.
# IGNITE-591 Comment broken 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/e54f5729
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e54f5729
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e54f5729

Branch: refs/heads/ignite-1056
Commit: e54f5729b710c04d4a72b2ffabcc5c08cf21aaa2
Parents: 006209c
Author: sevdokimov <se...@jetbrains.com>
Authored: Sat Jul 4 17:34:58 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Sat Jul 4 17:34:58 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/GridCacheJtaSelfTest.java  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e54f5729/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
index 29836ef..7302f7e 100644
--- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
+++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
@@ -193,7 +193,12 @@ public class GridCacheJtaSelfTest extends GridCacheAbstractSelfTest {
         assertEquals(1, (int)cache2.get("key"));
     }
     
+    /**
+     *
+     */
     public void testUncompatibleTmLookup() {
+        fail("https://issues.apache.org/jira/browse/IGNITE-1094");
+        
         final IgniteEx ignite = grid(0);
         
         final CacheConfiguration cacheCfg = new CacheConfiguration();


[42/50] [abbrv] incubator-ignite git commit: #ignite-gg-10526: fix consistentId.

Posted by sb...@apache.org.
#ignite-gg-10526: fix consistentId.


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

Branch: refs/heads/ignite-1056
Commit: 3dcf89167d2c0a9b53baddf533653ad5bb8bd5a5
Parents: 9dcca80
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Jul 10 10:42:17 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Jul 10 10:42:17 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/internal/util/IgniteUtils.java    | 6 +-----
 .../ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java  | 8 ++++++--
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3dcf8916/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 46a23d6..f457d6c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -8048,13 +8048,9 @@ public abstract class IgniteUtils {
     public static String consistentId(Collection<String> addrs, int port) {
         assert !F.isEmpty(addrs);
 
-        List<String> sortedAddrs = new ArrayList<>(addrs);
-
-        Collections.sort(sortedAddrs);
-
         StringBuilder sb = new StringBuilder();
 
-        for (String addr : sortedAddrs)
+        for (String addr : addrs)
             sb.append(addr).append(',');
 
         sb.delete(sb.length() - 1, sb.length());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3dcf8916/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
index 4b4df45..22f56c3 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
@@ -143,13 +143,17 @@ public class TcpDiscoveryNode extends GridMetadataAwareAdapter implements Cluste
         assert ver != null;
 
         this.id = id;
-        this.addrs = addrs;
+
+        List<String> sortedAddrs = new ArrayList<>(addrs);
+        Collections.sort(sortedAddrs);
+
+        this.addrs = sortedAddrs;
         this.hostNames = hostNames;
         this.discPort = discPort;
         this.metricsProvider = metricsProvider;
         this.ver = ver;
 
-        consistentId = U.consistentId(addrs, discPort);
+        consistentId = U.consistentId(sortedAddrs, discPort);
 
         metrics = metricsProvider.metrics();
         cacheMetrics = metricsProvider.cacheMetrics();


[31/50] [abbrv] incubator-ignite git commit: release notes

Posted by sb...@apache.org.
release notes


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

Branch: refs/heads/ignite-1056
Commit: f13f5946beaae7115f2ca5796988624ac36c193a
Parents: 064d079
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Jul 8 19:52:13 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Jul 8 19:52:13 2015 +0300

----------------------------------------------------------------------
 RELEASE_NOTES.txt | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f13f5946/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index bcfed27..ec8c4e6 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -6,6 +6,7 @@ Apache Ignite In-Memory Data Fabric 1.3
 
 * Added auto-retries for cache operations in recoverable cases.
 * Fixed several issues with JTA integration.
+* Fixed issue with GAR files in source release.
 * Stability fixes for TCP discovery SPI.
 * Stability fixes for onheap and offheap SQL queries.
 * Bug fixes in In-Memory Accelerator For Apache Hadoop.


[40/50] [abbrv] incubator-ignite git commit: Fixed notes.

Posted by sb...@apache.org.
Fixed notes.


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

Branch: refs/heads/ignite-1056
Commit: 8c6687944643853a85fc56246e42a811d249f497
Parents: 7e0aef7
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Thu Jul 9 18:20:42 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Thu Jul 9 18:24:55 2015 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    |  8 ++++++
 .../apache/ignite/mesos/ClusterProperties.java  | 14 +++++++++++
 .../apache/ignite/mesos/IgniteScheduler.java    | 26 +++++++++++++++-----
 parent/pom.xml                                  |  4 +++
 4 files changed, 46 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c668794/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/DEVNOTES.txt b/DEVNOTES.txt
index d7cffa7..b5e556a 100644
--- a/DEVNOTES.txt
+++ b/DEVNOTES.txt
@@ -99,6 +99,14 @@ mvn clean package
 
 Look for ignite-mesos-<version>-jar-with-dependencies.jar in ./target directory.
 
+Ignite Yarn Maven Build Instructions
+============================================
+cd to ./modules/yarn
+
+mvn clean package
+
+Look for ignite-yarn-<version>-jar-with-dependencies.jar in ./target directory.
+
 Run tests
 ==========
 To run tests locally use:

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c668794/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java
----------------------------------------------------------------------
diff --git a/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java b/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java
index a97a97f..548b4bb 100644
--- a/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java
+++ b/modules/mesos/src/main/java/org/apache/ignite/mesos/ClusterProperties.java
@@ -169,6 +169,12 @@ public class ClusterProperties {
     private String userLibsUrl = null;
 
     /** */
+    public static final String LICENCE_URL = "LICENCE_URL";
+
+    /** Licence url. */
+    private String licenceUrl = null;
+
+    /** */
     public static final String IGNITE_CONFIG_XML = "IGNITE_XML_CONFIG";
 
     /** Ignite config. */
@@ -398,6 +404,13 @@ public class ClusterProperties {
     }
 
     /**
+     * @return Url to licence.
+     */
+    public String licenceUrl() {
+        return licenceUrl;
+    }
+
+    /**
      * @return Host name constraint.
      */
     public Pattern hostnameConstraint() {
@@ -436,6 +449,7 @@ public class ClusterProperties {
 
             prop.userLibsUrl = getStringProperty(IGNITE_USERS_LIBS_URL, props, null);
             prop.ignitePackageUrl = getStringProperty(IGNITE_PACKAGE_URL, props, null);
+            prop.licenceUrl = getStringProperty(LICENCE_URL, props, null);
             prop.igniteCfgUrl = getStringProperty(IGNITE_CONFIG_XML_URL, props, null);
 
             prop.cpu = getDoubleProperty(IGNITE_TOTAL_CPU, props, UNLIMITED);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c668794/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java
----------------------------------------------------------------------
diff --git a/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java b/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java
index 7795a31..9097d64 100644
--- a/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java
+++ b/modules/mesos/src/main/java/org/apache/ignite/mesos/IgniteScheduler.java
@@ -147,14 +147,18 @@ public class IgniteScheduler implements Scheduler {
 
         String cfgName = resourceProvider.configName();
 
-        if (clusterProps.igniteConfigUrl() != null) {
-            String[] split = clusterProps.igniteConfigUrl().split("/");
+        if (clusterProps.igniteConfigUrl() != null)
+            cfgName = fileName(clusterProps.igniteConfigUrl());
 
-            cfgName = split[split.length - 1];
-        }
+        String licenceFile = null;
+
+        if (clusterProps.licenceUrl() != null)
+            licenceFile = fileName(clusterProps.licenceUrl());
 
-        builder.setValue("find . -maxdepth 1 -name \"*.jar\" -exec cp {} ./gridgain-community-*/libs/ \\; && "
-            + "./gridgain-community-*/bin/ignite.sh "
+        builder.setValue(
+            (licenceFile != null ? "find . -maxdepth 1 -name \"" + licenceFile + "\" -exec cp {} ./*/ \\; && " : "")
+            + "find . -maxdepth 1 -name \"*.jar\" -exec cp {} ./*/libs/ \\; && "
+            + "./*/bin/ignite.sh "
             + cfgName
             + " -J-Xmx" + String.valueOf((int)igniteTask.mem() + "m")
             + " -J-Xms" + String.valueOf((int)igniteTask.mem()) + "m");
@@ -180,6 +184,16 @@ public class IgniteScheduler implements Scheduler {
     }
 
     /**
+     * @param path Path.
+     * @return File name.
+     */
+    private String fileName(String path) {
+        String[] split = path.split("/");
+
+        return split[split.length - 1];
+    }
+
+    /**
      * @return Address running nodes.
      */
     private String getAddress(String address) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8c668794/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index bfa9f62..5eecff7 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -323,6 +323,10 @@
                                 <packages>org.apache.ignite.mesos*</packages>
                             </group>
                             <group>
+                                <title>Yarn Integration</title>
+                                <packages>org.apache.ignite.yarn*</packages>
+                            </group>
+                            <group>
                                 <title>Spark Integration</title>
                                 <packages>org.apache.ignite.spark.examples.java</packages>
                             </group>


[32/50] [abbrv] incubator-ignite git commit: release notes

Posted by sb...@apache.org.
release notes


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

Branch: refs/heads/ignite-1056
Commit: 0a569b8acfa4918dcd98a9fa0e4873f1e5b5737a
Parents: f13f594
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Jul 8 19:55:58 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Jul 8 19:55:58 2015 +0300

----------------------------------------------------------------------
 RELEASE_NOTES.txt | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0a569b8a/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index ec8c4e6..0e22f1f 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -6,6 +6,7 @@ Apache Ignite In-Memory Data Fabric 1.3
 
 * Added auto-retries for cache operations in recoverable cases.
 * Fixed several issues with JTA integration.
+* Fixed several issues with Hibernate L2 cache.
 * Fixed issue with GAR files in source release.
 * Stability fixes for TCP discovery SPI.
 * Stability fixes for onheap and offheap SQL queries.


[45/50] [abbrv] incubator-ignite git commit: IGNITE-1097 Remove duplicated method. (cherry picked from commit 2074f70)

Posted by sb...@apache.org.
IGNITE-1097 Remove duplicated method.
(cherry picked from commit 2074f70)


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

Branch: refs/heads/ignite-1056
Commit: 76515aeddd94be7048158c33e6f9a82d03257172
Parents: 2084175
Author: sevdokimov <se...@jetbrains.com>
Authored: Thu Jul 9 17:27:54 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Fri Jul 10 10:47:58 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheProxy.java      | 40 +-------------------
 1 file changed, 1 insertion(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76515aed/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 00fc0f9..1acd49f 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
@@ -1277,45 +1277,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     /** {@inheritDoc} */
     @Override public <T> T invoke(K key, CacheEntryProcessor<K, V, T> entryProcessor, Object... args)
         throws EntryProcessorException {
-        try {
-            CacheOperationContext prev = onEnter(opCtx);
-
-            try {
-                if (isAsync()) {
-                    IgniteInternalFuture<EntryProcessorResult<T>> fut = delegate.invokeAsync(key, entryProcessor, args);
-
-                    IgniteInternalFuture<T> fut0 = fut.chain(new CX1<IgniteInternalFuture<EntryProcessorResult<T>>, T>() {
-                        @Override public T applyx(IgniteInternalFuture<EntryProcessorResult<T>> fut)
-                            throws IgniteCheckedException {
-
-                            try {
-                                EntryProcessorResult<T> res = fut.get();
-
-                                return res != null ? res.get() : null;
-                            }
-                            catch (RuntimeException e) {
-                                throw new GridClosureException(e);
-                            }
-                        }
-                    });
-
-                    setFuture(fut0);
-
-                    return null;
-                }
-                else {
-                    EntryProcessorResult<T> res = delegate.invoke(key, entryProcessor, args);
-
-                    return res != null ? res.get() : null;
-                }
-            }
-            finally {
-                onLeave(prev);
-            }
-        }
-        catch (IgniteCheckedException e) {
-            throw cacheException(e);
-        }
+        return invoke(key, (EntryProcessor<K, V, T>)entryProcessor, args);
     }
 
     /** {@inheritDoc} */


[03/50] [abbrv] incubator-ignite git commit: IGNITE-1026 - Count down latch fix

Posted by sb...@apache.org.
IGNITE-1026 - Count down latch fix


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

Branch: refs/heads/ignite-1056
Commit: 7c935a58ab6cc37ac062f1c37a2650504e9ef95c
Parents: 389bad8
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Fri Jun 26 14:30:16 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Fri Jun 26 14:30:16 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c935a58/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 6c7c511..60ffce0 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
@@ -2421,9 +2421,9 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
     /**
      * @param cache Cache.
      */
-    private void checkNearCacheStarted(IgniteCacheProxy<?, ?> cache) {
+    private void checkNearCacheStarted(IgniteCacheProxy<?, ?> cache) throws IgniteCheckedException {
         if (!cache.context().isNear())
-            throw new IgniteException("Failed to start near cache " +
+            throw new IgniteCheckedException("Failed to start near cache " +
                 "(a cache with the same name without near cache is already started)");
     }
 


[38/50] [abbrv] incubator-ignite git commit: review YARN

Posted by sb...@apache.org.
review YARN


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

Branch: refs/heads/ignite-1056
Commit: f6279767ad499ca2540f493b93427f44c98d699d
Parents: c392cdc
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Jul 9 16:22:31 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Jul 9 16:22:31 2015 +0300

----------------------------------------------------------------------
 RELEASE_NOTES.txt                                               | 1 +
 .../src/main/java/org/apache/ignite/yarn/ApplicationMaster.java | 4 +---
 .../src/main/java/org/apache/ignite/yarn/IgniteContainer.java   | 5 +----
 3 files changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f6279767/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 0e22f1f..f68a339 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -5,6 +5,7 @@ Apache Ignite In-Memory Data Fabric 1.3
 ---------------------------------------
 
 * Added auto-retries for cache operations in recoverable cases.
+* Added integration with Apache YARN.
 * Fixed several issues with JTA integration.
 * Fixed several issues with Hibernate L2 cache.
 * Fixed issue with GAR files in source release.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f6279767/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
index f57df92..9169178 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
@@ -74,7 +74,7 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     private Map<ContainerId, IgniteContainer> containers = new ConcurrentHashMap<>();
 
     /**
-     * Constructor.
+     * @param
      */
     public ApplicationMaster(String ignitePath, ClusterProperties props) throws Exception {
         this.conf = new YarnConfiguration();
@@ -145,8 +145,6 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler {
     }
 
     /**
-     * Checks that container
-     *
      * @param cont Container.
      * @return {@code True} if
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f6279767/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
index a8b0342..313e9e1 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/IgniteContainer.java
@@ -81,9 +81,6 @@ public class IgniteContainer {
      * {@inheritDoc}
      */
     @Override public String toString() {
-        return "IgniteTask " +
-            "host: [" + nodeId.getHost() + ']' +
-            ", cpuCores: [" + cpuCores + "]" +
-            ", mem: [" + mem + "]";
+        return "IgniteTask [host=" + nodeId.getHost() + ", cpuCores=" + cpuCores + ", mem=" + mem + ']';
     }
 }


[36/50] [abbrv] incubator-ignite git commit: Merge branch 'master' into yarn

Posted by sb...@apache.org.
Merge branch 'master' into yarn

Conflicts:
	pom.xml


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

Branch: refs/heads/ignite-1056
Commit: 3a2376cbb0129a879690615bb774eb54977fc472
Parents: b02b8dd 546d595
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Thu Jul 9 14:56:01 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Thu Jul 9 14:56:01 2015 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    |   63 +-
 RELEASE_NOTES.txt                               |   24 +
 assembly/dependencies-fabric.xml                |    2 +
 assembly/dependencies-visor-console.xml         |    3 +
 bin/ignite.bat                                  |    8 +-
 bin/ignite.sh                                   |    6 +-
 bin/include/parseargs.bat                       |    1 +
 bin/include/parseargs.sh                        |    3 +
 dev-tools/slurp.sh                              |    2 +-
 examples/config/example-cache.xml               |    2 +
 examples/pom.xml                                |   36 +-
 .../hibernate/CacheHibernatePersonStore.java    |  202 +-
 .../hibernate/CacheHibernateStoreExample.java   |   17 +
 .../store/jdbc/CacheJdbcPersonStore.java        |  180 +-
 .../store/jdbc/CacheJdbcStoreExample.java       |   13 +
 .../store/spring/CacheSpringPersonStore.java    |  128 +
 .../store/spring/CacheSpringStoreExample.java   |  143 +
 .../datagrid/store/spring/package-info.java     |   22 +
 .../client/memcache/MemcacheRestExample.java    |   32 +-
 idea/ignite_codeStyle.xml                       |  147 +
 modules/aop/pom.xml                             |    2 +-
 modules/aws/pom.xml                             |    2 +-
 .../s3/S3CheckpointManagerSelfTest.java         |    2 +-
 .../checkpoint/s3/S3CheckpointSpiSelfTest.java  |    4 +-
 .../s3/S3CheckpointSpiStartStopSelfTest.java    |    2 +-
 .../s3/S3SessionCheckpointSelfTest.java         |    2 +-
 .../s3/TcpDiscoveryS3IpFinderSelfTest.java      |    2 +-
 modules/clients/pom.xml                         |    2 +-
 .../ClientAbstractConnectivitySelfTest.java     |    4 +-
 .../client/router/TcpSslRouterSelfTest.java     |    5 +
 .../client/suite/IgniteClientTestSuite.java     |    3 +-
 modules/cloud/pom.xml                           |    2 +-
 .../cloud/TcpDiscoveryCloudIpFinder.java        |   25 +-
 .../TcpDiscoveryCloudIpFinderSelfTest.java      |    3 +-
 modules/codegen/pom.xml                         |    2 +-
 modules/core/pom.xml                            |    7 +-
 .../src/main/java/org/apache/ignite/Ignite.java |    2 +-
 .../java/org/apache/ignite/IgniteCache.java     |   46 +-
 .../apache/ignite/IgniteSystemProperties.java   |    9 +
 .../main/java/org/apache/ignite/Ignition.java   |   18 +-
 .../org/apache/ignite/cache/CacheMetrics.java   |  187 +-
 .../ignite/cache/eviction/EvictableEntry.java   |    7 +
 .../ignite/cache/eviction/EvictionPolicy.java   |    2 +
 .../cache/eviction/fifo/FifoEvictionPolicy.java |  112 +-
 .../eviction/fifo/FifoEvictionPolicyMBean.java  |   22 +
 .../cache/eviction/lru/LruEvictionPolicy.java   |  130 +-
 .../eviction/lru/LruEvictionPolicyMBean.java    |   38 +
 .../eviction/random/RandomEvictionPolicy.java   |   10 +-
 .../eviction/sorted/SortedEvictionPolicy.java   |  146 +-
 .../sorted/SortedEvictionPolicyMBean.java       |   22 +
 .../apache/ignite/cache/query/QueryMetrics.java |    6 +-
 .../apache/ignite/cache/query/ScanQuery.java    |   48 +-
 .../apache/ignite/cache/store/CacheStore.java   |    2 +
 .../ignite/cache/store/CacheStoreSession.java   |   22 +
 .../cache/store/CacheStoreSessionListener.java  |  133 +
 .../cache/store/jdbc/CacheJdbcBlobStore.java    |   22 +-
 .../store/jdbc/CacheJdbcBlobStoreFactory.java   |  290 +
 .../cache/store/jdbc/CacheJdbcPojoStore.java    |    6 +-
 .../store/jdbc/CacheJdbcPojoStoreFactory.java   |  148 +
 .../jdbc/CacheJdbcStoreSessionListener.java     |  141 +
 .../org/apache/ignite/cluster/ClusterGroup.java |   18 +-
 .../org/apache/ignite/cluster/ClusterNode.java  |   26 +-
 .../configuration/CacheConfiguration.java       |  177 +-
 .../configuration/IgniteConfiguration.java      |   48 +-
 .../configuration/IgniteReflectionFactory.java  |   81 +-
 .../configuration/NearCacheConfiguration.java   |   10 +-
 .../configuration/TransactionConfiguration.java |   23 +
 .../org/apache/ignite/igfs/IgfsUserContext.java |  119 +
 .../igfs/secondary/IgfsSecondaryFileSystem.java |    7 +
 .../ignite/internal/ClusterMetricsSnapshot.java |   14 +
 .../internal/GridEventConsumeHandler.java       |  100 +-
 .../ignite/internal/GridKernalContext.java      |    5 +
 .../ignite/internal/GridKernalContextImpl.java  |   13 +-
 .../ignite/internal/GridPluginContext.java      |    6 +
 .../apache/ignite/internal/IgniteKernal.java    |   96 +-
 .../ignite/internal/IgniteNodeAttributes.java   |    5 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |   30 +-
 .../internal/MarshallerContextAdapter.java      |   82 +-
 .../ignite/internal/MarshallerContextImpl.java  |   38 +-
 .../client/GridClientConfiguration.java         |    2 +-
 .../GridClientOptimizedMarshaller.java          |   26 +
 .../impl/GridTcpRouterNioListenerAdapter.java   |    2 +-
 .../internal/cluster/ClusterGroupAdapter.java   |   50 +-
 .../cluster/IgniteClusterAsyncImpl.java         |   12 +-
 .../internal/events/DiscoveryCustomEvent.java   |   18 +-
 .../internal/igfs/common/IgfsMarshaller.java    |   35 +-
 .../igfs/common/IgfsPathControlRequest.java     |   22 +
 .../internal/interop/InteropBootstrap.java      |    3 +-
 .../internal/interop/InteropIgnition.java       |   93 +-
 .../internal/interop/InteropProcessor.java      |   15 +
 .../internal/managers/GridManagerAdapter.java   |   76 +-
 .../checkpoint/GridCheckpointManager.java       |   52 +-
 .../managers/communication/GridIoManager.java   |  294 +-
 .../managers/communication/GridIoMessage.java   |   15 +-
 .../managers/communication/GridIoPolicy.java    |   32 +-
 .../managers/discovery/CustomEventListener.java |   31 +
 .../discovery/CustomMessageWrapper.java         |   63 +
 .../discovery/DiscoveryCustomMessage.java       |   54 +
 .../discovery/GridDiscoveryManager.java         |  345 +-
 .../eventstorage/GridEventStorageManager.java   |    2 +-
 .../managers/indexing/GridIndexingManager.java  |    4 -
 .../affinity/AffinityTopologyVersion.java       |    7 -
 .../affinity/GridAffinityAssignment.java        |   12 +
 .../affinity/GridAffinityAssignmentCache.java   |   40 +-
 .../affinity/GridAffinityProcessor.java         |   23 +-
 .../cache/CacheEvictableEntryImpl.java          |   31 +
 .../processors/cache/CacheMetricsImpl.java      |  367 +-
 .../cache/CacheMetricsMXBeanImpl.java           |  100 +
 .../processors/cache/CacheMetricsSnapshot.java  |  380 +-
 .../processors/cache/CacheObjectImpl.java       |    1 -
 .../processors/cache/CacheOperationContext.java |   44 +-
 .../internal/processors/cache/CacheType.java    |    8 +-
 .../cache/DynamicCacheChangeBatch.java          |   29 +-
 .../cache/DynamicCacheDescriptor.java           |   19 +
 .../processors/cache/GridCacheAdapter.java      |  156 +-
 .../cache/GridCacheAffinityManager.java         |   14 +
 .../processors/cache/GridCacheAtomicFuture.java |   12 +-
 .../processors/cache/GridCacheAttributes.java   |    3 +
 .../cache/GridCacheConcurrentMap.java           |   21 +-
 .../processors/cache/GridCacheContext.java      |   36 +-
 .../cache/GridCacheDeploymentManager.java       |   10 +-
 .../processors/cache/GridCacheEntryEx.java      |    6 +
 .../processors/cache/GridCacheGateway.java      |    2 +-
 .../processors/cache/GridCacheIoManager.java    |   90 +-
 .../processors/cache/GridCacheMapEntry.java     |   69 +-
 .../processors/cache/GridCacheMessage.java      |   51 -
 .../processors/cache/GridCacheMvccManager.java  |   40 +-
 .../GridCachePartitionExchangeManager.java      |  174 +-
 .../processors/cache/GridCachePreloader.java    |    6 +-
 .../cache/GridCachePreloaderAdapter.java        |   11 +-
 .../processors/cache/GridCacheProcessor.java    |  334 +-
 .../processors/cache/GridCacheProxyImpl.java    |   36 +-
 .../cache/GridCacheSharedContext.java           |   61 +-
 .../processors/cache/GridCacheSwapManager.java  |  394 +-
 .../processors/cache/GridCacheTtlManager.java   |    9 +-
 .../processors/cache/GridCacheUtils.java        |  337 +-
 .../processors/cache/IgniteCacheFutureImpl.java |   42 +
 .../processors/cache/IgniteCacheProxy.java      |   84 +-
 .../processors/cache/IgniteInternalCache.java   |   43 +-
 .../processors/cache/KeyCacheObjectImpl.java    |   11 +-
 .../processors/cache/QueryCursorImpl.java       |   23 +-
 .../cache/affinity/GridCacheAffinityImpl.java   |   10 +-
 .../CacheDataStructuresManager.java             |    2 +-
 .../distributed/GridCacheTxRecoveryRequest.java |   26 +-
 .../GridCacheTxRecoveryResponse.java            |   14 +-
 .../distributed/GridDistributedBaseMessage.java |   77 +-
 .../distributed/GridDistributedCacheEntry.java  |    7 -
 .../distributed/GridDistributedLockRequest.java |   54 +-
 .../GridDistributedLockResponse.java            |   14 +-
 .../GridDistributedTxFinishRequest.java         |   57 +-
 .../distributed/GridDistributedTxMapping.java   |   17 +
 .../GridDistributedTxPrepareRequest.java        |   71 +-
 .../GridDistributedTxPrepareResponse.java       |   64 +-
 .../GridDistributedTxRemoteAdapter.java         |    3 +-
 .../GridDistributedUnlockRequest.java           |    6 +-
 .../dht/GridClientPartitionTopology.java        |   10 +-
 .../dht/GridDhtAssignmentFetchFuture.java       |    4 +-
 .../distributed/dht/GridDhtCacheAdapter.java    |   27 +-
 .../distributed/dht/GridDhtCacheEntry.java      |    6 +-
 .../cache/distributed/dht/GridDhtGetFuture.java |   11 +-
 .../distributed/dht/GridDhtLocalPartition.java  |   66 +-
 .../distributed/dht/GridDhtLockFuture.java      |   12 +-
 .../distributed/dht/GridDhtLockRequest.java     |   72 +-
 .../distributed/dht/GridDhtLockResponse.java    |   18 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |   42 +-
 .../dht/GridDhtPartitionsReservation.java       |  292 +
 .../dht/GridDhtTransactionalCacheAdapter.java   |  224 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |   41 +-
 .../cache/distributed/dht/GridDhtTxLocal.java   |    3 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |   11 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |    3 +-
 .../dht/GridDhtTxPrepareRequest.java            |   54 +-
 .../dht/GridDhtTxPrepareResponse.java           |   22 +-
 .../cache/distributed/dht/GridDhtTxRemote.java  |    5 +-
 .../distributed/dht/GridDhtUnlockRequest.java   |    6 +-
 .../dht/GridPartitionedGetFuture.java           |   13 +-
 .../cache/distributed/dht/GridReservable.java   |   35 +
 .../dht/atomic/GridDhtAtomicCache.java          |   64 +-
 .../dht/atomic/GridDhtAtomicUpdateFuture.java   |   23 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |  251 +-
 .../dht/atomic/GridNearAtomicUpdateRequest.java |  112 +-
 .../dht/colocated/GridDhtColocatedCache.java    |   12 +-
 .../colocated/GridDhtColocatedLockFuture.java   |  213 +-
 .../dht/preloader/GridDhtForceKeysFuture.java   |   44 +-
 .../preloader/GridDhtPartitionDemandPool.java   |   26 +-
 .../dht/preloader/GridDhtPartitionMap.java      |   28 +-
 .../preloader/GridDhtPartitionSupplyPool.java   |   29 +-
 .../GridDhtPartitionsExchangeFuture.java        |  521 +-
 .../preloader/GridDhtPartitionsFullMessage.java |    4 +-
 .../GridDhtPartitionsSingleMessage.java         |   33 +-
 .../dht/preloader/GridDhtPreloader.java         |   41 +-
 .../preloader/GridDhtPreloaderAssignments.java  |    3 +-
 .../distributed/near/GridNearAtomicCache.java   |    5 +
 .../distributed/near/GridNearCacheAdapter.java  |    2 +-
 .../distributed/near/GridNearGetFuture.java     |    6 +-
 .../distributed/near/GridNearLockFuture.java    |  271 +-
 .../distributed/near/GridNearLockRequest.java   |   42 +-
 .../distributed/near/GridNearLockResponse.java  |   30 +-
 .../near/GridNearOptimisticTxPrepareFuture.java |   83 +-
 .../GridNearPessimisticTxPrepareFuture.java     |    5 +-
 .../near/GridNearTransactionalCache.java        |    4 +-
 .../near/GridNearTxFinishRequest.java           |   29 +-
 .../cache/distributed/near/GridNearTxLocal.java |   46 +-
 .../near/GridNearTxPrepareRequest.java          |   38 +-
 .../near/GridNearTxPrepareResponse.java         |   74 +-
 .../distributed/near/GridNearTxRemote.java      |    5 +-
 .../distributed/near/GridNearUnlockRequest.java |    2 +-
 .../cache/jta/CacheJtaManagerAdapter.java       |   17 +-
 .../cache/jta/CacheNoopJtaManager.java          |    2 +-
 .../processors/cache/local/GridLocalCache.java  |    6 +-
 .../local/atomic/GridLocalAtomicCache.java      |   31 +-
 .../processors/cache/query/CacheQuery.java      |    2 +-
 .../query/GridCacheDistributedQueryManager.java |    3 +
 .../cache/query/GridCacheQueryAdapter.java      |  200 +-
 .../cache/query/GridCacheQueryErrorFuture.java  |    2 +
 .../cache/query/GridCacheQueryManager.java      |  243 +-
 .../cache/query/GridCacheQueryRequest.java      |   47 +-
 .../cache/query/GridCacheTwoStepQuery.java      |   22 +-
 .../processors/cache/query/QueryCursorEx.java   |    8 +
 .../continuous/CacheContinuousQueryHandler.java |   12 +-
 .../continuous/CacheContinuousQueryManager.java |   28 +-
 .../cache/store/CacheOsStoreManager.java        |    1 -
 .../cache/store/CacheStoreManager.java          |    7 +-
 .../store/GridCacheStoreManagerAdapter.java     |  202 +-
 .../cache/transactions/IgniteInternalTx.java    |    8 +-
 .../cache/transactions/IgniteTxAdapter.java     |   59 +-
 .../cache/transactions/IgniteTxHandler.java     |  151 +-
 .../transactions/IgniteTxLocalAdapter.java      |  183 +-
 .../cache/transactions/IgniteTxManager.java     |    3 -
 .../cacheobject/IgniteCacheObjectProcessor.java |   14 +-
 .../IgniteCacheObjectProcessorImpl.java         |   14 +-
 .../processors/clock/GridClockServer.java       |   21 +-
 .../continuous/AbstractContinuousMessage.java   |   63 +
 .../continuous/GridContinuousMessageType.java   |   12 -
 .../continuous/GridContinuousProcessor.java     |  853 +--
 .../processors/continuous/StartRequestData.java |  267 +
 .../StartRoutineAckDiscoveryMessage.java        |   63 +
 .../StartRoutineDiscoveryMessage.java           |   85 +
 .../StopRoutineAckDiscoveryMessage.java         |   49 +
 .../continuous/StopRoutineDiscoveryMessage.java |   49 +
 .../datastreamer/DataStreamerCacheUpdaters.java |    2 +-
 .../datastreamer/DataStreamerImpl.java          |  102 +-
 .../datastructures/DataStructuresProcessor.java |  273 +-
 .../datastructures/GridCacheAtomicLongImpl.java |   25 +-
 .../GridCacheAtomicSequenceImpl.java            |   11 +-
 .../GridCacheAtomicStampedImpl.java             |   21 +-
 .../GridCacheCountDownLatchImpl.java            |   31 +-
 .../datastructures/GridCacheSetImpl.java        |    4 +-
 .../dr/IgniteDrDataStreamerCacheUpdater.java    |    7 +-
 .../internal/processors/hadoop/HadoopJob.java   |    2 +-
 .../processors/hadoop/HadoopJobInfo.java        |    4 +-
 .../processors/hadoop/HadoopTaskContext.java    |   14 +-
 .../hadoop/counter/HadoopCounterWriter.java     |    5 +-
 .../internal/processors/igfs/IgfsContext.java   |    5 +-
 .../ignite/internal/processors/igfs/IgfsEx.java |    8 +-
 .../internal/processors/igfs/IgfsImpl.java      |    8 +-
 .../processors/igfs/IgfsIpcHandler.java         |  184 +-
 .../processors/igfs/IgfsMetaManager.java        |    2 +-
 .../igfs/IgfsSecondaryFileSystemImpl.java       |    9 +-
 .../internal/processors/igfs/IgfsServer.java    |    4 +-
 .../internal/processors/igfs/IgfsUtils.java     |   16 +
 .../offheap/GridOffHeapProcessor.java           |   19 +-
 .../processors/plugin/CachePluginManager.java   |   10 +-
 .../plugin/IgnitePluginProcessor.java           |   19 +-
 .../portable/GridPortableInputStream.java       |   10 +
 .../processors/query/GridQueryIndexing.java     |   18 +-
 .../processors/query/GridQueryProcessor.java    |  405 +-
 .../messages/GridQueryNextPageResponse.java     |   35 +-
 .../h2/twostep/messages/GridQueryRequest.java   |  111 +-
 .../processors/rest/GridRestProcessor.java      |    4 +-
 .../rest/client/message/GridRouterRequest.java  |   18 +
 .../rest/client/message/GridRouterResponse.java |   18 +
 .../handlers/task/GridTaskCommandHandler.java   |   12 +-
 .../rest/protocols/tcp/GridTcpRestProtocol.java |    3 +-
 .../service/GridServiceProcessor.java           |  125 +-
 .../processors/task/GridTaskProcessor.java      |   23 +-
 .../processors/task/GridTaskWorker.java         |    4 +-
 .../timeout/GridSpiTimeoutObject.java           |   73 +
 .../timeout/GridTimeoutProcessor.java           |  105 +-
 .../IgniteTxRollbackCheckedException.java       |    9 +
 .../internal/util/GridConfigurationFinder.java  |   55 +-
 .../apache/ignite/internal/util/GridDebug.java  |   48 +-
 .../ignite/internal/util/GridJavaProcess.java   |   30 +-
 .../ignite/internal/util/IgniteUtils.java       |   40 +-
 .../internal/util/future/GridFutureAdapter.java |    4 +-
 .../internal/util/future/IgniteFutureImpl.java  |   18 +-
 .../shmem/IpcSharedMemoryClientEndpoint.java    |    2 +-
 .../ipc/shmem/IpcSharedMemoryNativeLoader.java  |  151 +-
 .../shmem/IpcSharedMemoryServerEndpoint.java    |   12 +-
 .../util/ipc/shmem/IpcSharedMemoryUtils.java    |    4 +-
 .../util/nio/GridCommunicationClient.java       |   30 +-
 .../util/nio/GridNioDelimitedBuffer.java        |    2 +-
 .../util/nio/GridNioMessageTracker.java         |   23 +-
 .../util/nio/GridNioRecoveryDescriptor.java     |   13 +-
 .../ignite/internal/util/nio/GridNioServer.java |   64 +-
 .../util/nio/GridShmemCommunicationClient.java  |  146 +
 .../util/nio/GridTcpCommunicationClient.java    |  554 --
 .../util/nio/GridTcpNioCommunicationClient.java |    8 -
 .../util/spring/IgniteSpringHelper.java         |   10 +
 .../apache/ignite/internal/visor/VisorJob.java  |    2 +
 .../internal/visor/VisorMultiNodeTask.java      |    2 +-
 .../ignite/internal/visor/cache/VisorCache.java |    2 +-
 .../visor/cache/VisorCacheConfiguration.java    |   11 -
 .../VisorCacheConfigurationCollectorJob.java    |    6 +-
 .../internal/visor/cache/VisorCacheMetrics.java |   19 +-
 .../cache/VisorCacheMetricsCollectorTask.java   |   10 +-
 .../cache/VisorCacheStoreConfiguration.java     |    5 +-
 .../internal/visor/log/VisorLogSearchTask.java  |    2 +-
 .../visor/node/VisorNodeDataCollectorJob.java   |    4 +
 .../visor/node/VisorNodeDataCollectorTask.java  |    9 +-
 .../node/VisorNodeDataCollectorTaskResult.java  |   17 +-
 .../node/VisorNodeSuppressedErrorsTask.java     |   12 +-
 .../visor/query/VisorQueryCleanupTask.java      |   14 +
 .../internal/visor/query/VisorQueryJob.java     |   13 +-
 .../internal/visor/query/VisorQueryTask.java    |    3 +-
 .../util/VisorClusterGroupEmptyException.java   |   37 +
 .../visor/util/VisorExceptionWrapper.java       |   81 +
 .../internal/visor/util/VisorTaskUtils.java     |    6 +-
 .../ignite/marshaller/MarshallerContext.java    |    8 +
 .../ignite/mxbean/CacheMetricsMXBean.java       |   80 +
 .../org/apache/ignite/plugin/PluginContext.java |    6 +
 .../apache/ignite/plugin/PluginProvider.java    |   26 +-
 .../plugin/extensions/communication/IoPool.java |   42 +
 .../SpringApplicationContextResource.java       |    4 +-
 .../apache/ignite/resources/SpringResource.java |    6 +-
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |  105 +-
 .../org/apache/ignite/spi/IgniteSpiContext.java |   66 +-
 .../ignite/spi/IgniteSpiTimeoutObject.java      |   44 +
 .../spi/checkpoint/noop/NoopCheckpointSpi.java  |    3 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  965 +--
 .../tcp/TcpCommunicationSpiMBean.java           |   29 +-
 .../ignite/spi/discovery/DiscoverySpi.java      |   23 +-
 .../discovery/DiscoverySpiCustomMessage.java    |   40 +
 .../spi/discovery/DiscoverySpiListener.java     |    5 +-
 .../ignite/spi/discovery/tcp/ClientImpl.java    | 1722 ++++++
 .../ignite/spi/discovery/tcp/ServerImpl.java    | 4896 +++++++++++++++
 .../discovery/tcp/TcpClientDiscoverySpi.java    | 1264 ----
 .../tcp/TcpClientDiscoverySpiMBean.java         |  164 -
 .../spi/discovery/tcp/TcpDiscoveryImpl.java     |  279 +
 .../spi/discovery/tcp/TcpDiscoverySpi.java      | 5790 ++++--------------
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   | 1160 ----
 .../spi/discovery/tcp/TcpDiscoverySpiMBean.java |    9 +
 .../tcp/internal/TcpDiscoveryNode.java          |   27 +-
 .../tcp/internal/TcpDiscoveryNodesRing.java     |   10 +-
 .../tcp/internal/TcpDiscoveryStatistics.java    |   10 +-
 .../tcp/ipfinder/TcpDiscoveryIpFinder.java      |   10 +-
 .../ipfinder/TcpDiscoveryIpFinderAdapter.java   |   34 +-
 .../TcpDiscoveryMulticastIpFinder.java          |  114 +-
 .../messages/TcpDiscoveryAbstractMessage.java   |   34 +-
 .../TcpDiscoveryClientHeartbeatMessage.java     |   67 +
 .../messages/TcpDiscoveryClientPingRequest.java |   56 +
 .../TcpDiscoveryClientPingResponse.java         |   67 +
 .../TcpDiscoveryCustomEventMessage.java         |   41 +-
 .../messages/TcpDiscoveryHeartbeatMessage.java  |   28 +-
 .../TcpDiscoveryNodeAddFinishedMessage.java     |   43 +
 .../messages/TcpDiscoveryNodeAddedMessage.java  |    2 +-
 .../messages/TcpDiscoveryNodeFailedMessage.java |   18 +
 .../tcp/messages/TcpDiscoveryPingRequest.java   |    6 +
 .../tcp/messages/TcpDiscoveryPingResponse.java  |   15 +-
 .../RoundRobinGlobalLoadBalancer.java           |    2 +-
 .../spi/swapspace/file/FileSwapSpaceSpi.java    |    8 +-
 .../startup/cmdline/CommandLineStartup.java     |    3 +-
 .../startup/cmdline/CommandLineTransformer.java |    9 +
 .../java/org/jsr166/ConcurrentHashMap8.java     |    8 +-
 .../java/org/jsr166/ConcurrentLinkedDeque8.java |  586 +-
 .../src/main/java/org/jsr166/LongAdder8.java    |   35 +-
 .../core/src/main/java/org/jsr166/README.txt    |   11 +
 .../src/main/java/org/jsr166/Striped64_8.java   |   22 +-
 .../java/org/jsr166/ThreadLocalRandom8.java     |   19 +-
 .../src/main/java/org/jsr166/package-info.java  |   12 +-
 .../core/src/main/resources/ignite.properties   |    2 +-
 .../core/src/test/config/spark/spark-config.xml |   46 +
 modules/core/src/test/config/tests.properties   |    8 +-
 .../ignite/GridSuppressedExceptionSelfTest.java |    4 +-
 .../affinity/IgniteClientNodeAffinityTest.java  |  182 +
 ...cheStoreSessionListenerAbstractSelfTest.java |  314 +
 ...heStoreSessionListenerLifecycleSelfTest.java |  395 ++
 .../CacheJdbcStoreSessionListenerSelfTest.java  |  175 +
 .../internal/ClusterGroupAbstractTest.java      |  777 +++
 .../internal/ClusterGroupHostsSelfTest.java     |  141 +
 .../ignite/internal/ClusterGroupSelfTest.java   |  251 +
 .../ignite/internal/GridAffinitySelfTest.java   |    1 +
 .../internal/GridDiscoveryEventSelfTest.java    |   13 +-
 ...ridFailFastNodeFailureDetectionSelfTest.java |   22 +-
 .../GridFailoverTaskWithPredicateSelfTest.java  |    3 -
 .../GridJobMasterLeaveAwareSelfTest.java        |    2 -
 .../internal/GridJobStealingSelfTest.java       |    3 -
 .../internal/GridProjectionAbstractTest.java    |  768 ---
 .../GridProjectionForCachesSelfTest.java        |   11 +-
 ...ectionLocalJobMultipleArgumentsSelfTest.java |    2 -
 .../ignite/internal/GridProjectionSelfTest.java |  251 -
 .../internal/GridReleaseTypeSelfTest.java       |   77 +-
 .../apache/ignite/internal/GridSelfTest.java    |   30 +-
 .../GridTaskExecutionContextSelfTest.java       |    9 -
 .../GridTaskFailoverAffinityRunTest.java        |  170 +
 .../IgniteComputeEmptyClusterGroupTest.java     |    3 -
 .../IgniteComputeTopologyExceptionTest.java     |    9 -
 .../IgniteSlowClientDetectionSelfTest.java      |  187 +
 .../communication/GridIoManagerSelfTest.java    |    2 +-
 .../GridDiscoveryManagerAliveCacheSelfTest.java |   82 +-
 .../GridDiscoveryManagerAttributesSelfTest.java |  122 +-
 .../discovery/GridDiscoveryManagerSelfTest.java |   46 +-
 .../IgniteTopologyPrintFormatSelfTest.java      |  289 +
 .../GridAffinityProcessorAbstractSelfTest.java  |    1 +
 .../cache/CacheClientStoreSelfTest.java         |  228 +
 .../cache/CacheFutureExceptionSelfTest.java     |  158 +
 .../CacheReadThroughAtomicRestartSelfTest.java  |   32 +
 ...heReadThroughLocalAtomicRestartSelfTest.java |   32 +
 .../CacheReadThroughLocalRestartSelfTest.java   |   32 +
 ...dThroughReplicatedAtomicRestartSelfTest.java |   32 +
 ...cheReadThroughReplicatedRestartSelfTest.java |   32 +
 .../cache/CacheReadThroughRestartSelfTest.java  |  133 +
 .../cache/CacheRemoveAllSelfTest.java           |    2 +-
 .../CacheStoreUsageMultinodeAbstractTest.java   |  305 +
 ...eUsageMultinodeDynamicStartAbstractTest.java |  169 +
 ...oreUsageMultinodeDynamicStartAtomicTest.java |   32 +
 ...heStoreUsageMultinodeDynamicStartTxTest.java |   32 +
 ...reUsageMultinodeStaticStartAbstractTest.java |  158 +
 ...toreUsageMultinodeStaticStartAtomicTest.java |   32 +
 ...cheStoreUsageMultinodeStaticStartTxTest.java |   32 +
 .../GridCacheAbstractFailoverSelfTest.java      |   10 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  152 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java |   48 +-
 .../GridCacheAbstractRemoveFailureTest.java     |   23 +
 .../cache/GridCacheAbstractSelfTest.java        |    7 +-
 .../cache/GridCacheAffinityRoutingSelfTest.java |    4 +-
 .../GridCacheAtomicMessageCountSelfTest.java    |    1 +
 .../GridCacheConcurrentTxMultiNodeTest.java     |    8 +-
 ...idCacheConfigurationConsistencySelfTest.java |   14 +-
 .../cache/GridCacheDeploymentSelfTest.java      |    3 -
 .../cache/GridCacheEntryMemorySizeSelfTest.java |   91 +-
 .../GridCacheExAbstractFullApiSelfTest.java     |  103 -
 .../cache/GridCacheMemoryModeSelfTest.java      |   25 +-
 ...GridCacheMixedPartitionExchangeSelfTest.java |    2 +-
 ...ridCacheMultinodeUpdateAbstractSelfTest.java |    9 +
 ...inodeUpdateNearEnabledNoBackupsSelfTest.java |    2 +-
 ...CacheMultinodeUpdateNearEnabledSelfTest.java |    2 +-
 .../processors/cache/GridCacheOffHeapTest.java  |   33 +-
 .../cache/GridCachePutAllFailoverSelfTest.java  |    1 +
 .../GridCacheReferenceCleanupSelfTest.java      |    3 -
 .../cache/GridCacheReloadSelfTest.java          |    6 +-
 .../GridCacheReturnValueTransferSelfTest.java   |    3 +
 .../processors/cache/GridCacheStopSelfTest.java |    5 +
 ...acheTcpClientDiscoveryMultiThreadedTest.java |  190 +
 .../processors/cache/GridCacheTestEntryEx.java  |    4 +
 .../GridCacheVariableTopologySelfTest.java      |   12 +-
 .../cache/GridCacheVersionMultinodeTest.java    |    6 +-
 .../IgniteCacheAbstractStopBusySelfTest.java    |   36 +-
 .../cache/IgniteCacheAbstractTest.java          |    5 +-
 .../IgniteCacheAtomicStopBusySelfTest.java      |    8 +-
 .../IgniteCacheConfigurationTemplateTest.java   |   28 +-
 .../IgniteCacheEntryListenerAbstractTest.java   |   14 +-
 .../IgniteCacheInterceptorSelfTestSuite.java    |    2 +-
 .../cache/IgniteCacheInvokeReadThroughTest.java |    5 +
 .../cache/IgniteCacheNearLockValueSelfTest.java |    3 +
 .../IgniteCacheP2pUnmarshallingErrorTest.java   |   29 +-
 ...gniteCacheP2pUnmarshallingNearErrorTest.java |   13 +-
 ...CacheP2pUnmarshallingRebalanceErrorTest.java |   15 +-
 .../IgniteCacheP2pUnmarshallingTxErrorTest.java |   25 +-
 .../IgniteCachePartitionMapUpdateTest.java      |  226 +
 .../cache/IgniteCachePeekModesAbstractTest.java |    5 +-
 ...gniteCacheTransactionalStopBusySelfTest.java |   13 +-
 .../IgniteDaemonNodeMarshallerCacheTest.java    |  192 +
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |  466 ++
 .../cache/IgniteDynamicCacheStartSelfTest.java  |  134 +-
 ...niteDynamicCacheWithConfigStartSelfTest.java |   97 +
 .../IgniteDynamicClientCacheStartSelfTest.java  |  284 +
 .../cache/IgniteInternalCacheTypesTest.java     |    3 +-
 ...teStartCacheInTransactionAtomicSelfTest.java |   32 +
 .../IgniteStartCacheInTransactionSelfTest.java  |  254 +
 .../cache/IgniteSystemCacheOnClientTest.java    |   97 +
 .../IgniteTxMultiThreadedAbstractTest.java      |    4 +-
 ...cheAtomicReferenceMultiNodeAbstractTest.java |   11 -
 .../GridCacheQueueApiSelfAbstractTest.java      |    4 +-
 ...GridCacheQueueMultiNodeAbstractSelfTest.java |    6 +-
 ...dCacheQueueMultiNodeConsistencySelfTest.java |    5 +
 ...CacheQueueRotativeMultiNodeAbstractTest.java |   10 -
 .../GridCacheSetAbstractSelfTest.java           |   31 +-
 .../IgniteClientDataStructuresAbstractTest.java |  340 +
 .../IgniteClientDataStructuresTest.java         |   28 +
 ...IgniteClientDiscoveryDataStructuresTest.java |   28 +
 .../IgniteCountDownLatchAbstractSelfTest.java   |  114 +-
 .../IgniteDataStructureWithJobTest.java         |  111 +
 ...omicOffheapQueueCreateMultiNodeSelfTest.java |    5 +
 ...ionedAtomicQueueCreateMultiNodeSelfTest.java |    5 +
 ...rtitionedDataStructuresFailoverSelfTest.java |    5 +
 ...edOffheapDataStructuresFailoverSelfTest.java |    5 +
 ...PartitionedQueueCreateMultiNodeSelfTest.java |    5 +
 ...dCachePartitionedQueueEntryMoveSelfTest.java |    5 +
 ...nedQueueFailoverDataConsistencySelfTest.java |    5 +
 ...eplicatedDataStructuresFailoverSelfTest.java |    5 +
 ...CacheLoadingConcurrentGridStartSelfTest.java |    5 +
 .../GridCacheAbstractJobExecutionTest.java      |    3 -
 .../GridCacheClientModesAbstractSelfTest.java   |   94 +-
 ...ientModesTcpClientDiscoveryAbstractTest.java |  168 +
 .../distributed/GridCacheMixedModeSelfTest.java |    3 +
 ...ridCachePartitionNotLoadedEventSelfTest.java |   82 +
 .../GridCachePreloadLifecycleAbstractTest.java  |    2 -
 .../distributed/IgniteCache150ClientsTest.java  |  189 +
 ...niteCacheClientNodeChangingTopologyTest.java | 1803 ++++++
 .../IgniteCacheClientNodeConcurrentStart.java   |  113 +
 ...teCacheClientNodePartitionsExchangeTest.java |  633 ++
 .../distributed/IgniteCacheManyClientsTest.java |  318 +
 .../IgniteCacheMessageRecoveryAbstractTest.java |    1 +
 .../IgniteCacheTxMessageRecoveryTest.java       |    5 +
 .../IgniteCrossCacheTxStoreSelfTest.java        |  147 +-
 ...heAbstractTransformWriteThroughSelfTest.java |    3 -
 .../dht/GridCacheClientOnlySelfTest.java        |   60 +-
 .../GridCacheColocatedTxExceptionSelfTest.java  |    5 +
 .../GridCacheDhtClientRemoveFailureTest.java    |   28 +
 ...GridCacheDhtEvictionNearReadersSelfTest.java |   11 +-
 .../dht/GridCacheDhtEvictionSelfTest.java       |   11 +-
 .../GridCacheExColocatedFullApiSelfTest.java    |   33 -
 ...ePartitionedNearDisabledMetricsSelfTest.java |    4 +-
 ...dCachePartitionedTopologyChangeSelfTest.java |    5 +
 .../dht/IgniteCacheMultiTxLockSelfTest.java     |   53 +-
 .../IgniteCachePutRetryAbstractSelfTest.java    |  147 +
 .../dht/IgniteCachePutRetryAtomicSelfTest.java  |   34 +
 ...gniteCachePutRetryTransactionalSelfTest.java |   74 +
 ...cClientInvalidPartitionHandlingSelfTest.java |   29 +
 .../GridCacheAtomicClientRemoveFailureTest.java |   28 +
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   28 +-
 ...unctionExcludeNeighborsAbstractSelfTest.java |    3 +-
 .../near/GridCacheAtomicNearOnlySelfTest.java   |   32 -
 .../near/GridCacheExNearFullApiSelfTest.java    |   39 -
 .../near/GridCacheNearEvictionSelfTest.java     |    3 -
 ...idCacheNearOnlyMultiNodeFullApiSelfTest.java |    7 +-
 .../near/GridCacheNearOnlySelfTest.java         |   63 +-
 .../near/GridCacheNearOnlyTopologySelfTest.java |    1 +
 .../near/GridCacheNearTxExceptionSelfTest.java  |    5 +
 ...ionedClientOnlyNoPrimaryFullApiSelfTest.java |    5 +-
 .../GridCachePartitionedEvictionSelfTest.java   |   11 +-
 .../GridCachePartitionedFailoverSelfTest.java   |    5 +
 ...PartitionedFullApiMultithreadedSelfTest.java |    5 +
 .../GridCachePartitionedFullApiSelfTest.java    |   32 +
 ...idCachePartitionedHitsAndMissesSelfTest.java |    3 -
 ...achePartitionedMultiNodeFullApiSelfTest.java |   53 +-
 ...ePartitionedMultiThreadedPutGetSelfTest.java |    6 +-
 ...edOffHeapTieredMultiNodeFullApiSelfTest.java |    2 +-
 ...ePartitionedOptimisticTxNodeRestartTest.java |    5 +
 ...achePartitionedPreloadLifecycleSelfTest.java |    2 +-
 ...CachePartitionedTxMultiThreadedSelfTest.java |    5 +
 .../GridCachePartitionedTxSalvageSelfTest.java  |   37 +-
 ...idCacheRendezvousAffinityClientSelfTest.java |    4 +
 .../GridCacheExReplicatedFullApiSelfTest.java   |   33 -
 .../GridCacheReplicatedClientOnlySelfTest.java  |   43 -
 ...eReplicatedFullApiMultithreadedSelfTest.java |    5 +
 .../GridCacheReplicatedInvalidateSelfTest.java  |    4 +-
 ...ridCacheReplicatedMultiNodeLockSelfTest.java |    5 +
 .../GridCacheReplicatedMultiNodeSelfTest.java   |    5 +
 .../GridCacheReplicatedNearOnlySelfTest.java    |   43 -
 .../GridCacheReplicatedTxExceptionSelfTest.java |    5 +
 .../GridCacheSyncReplicatedPreloadSelfTest.java |    1 -
 .../replicated/GridReplicatedTxPreloadTest.java |    2 +
 ...acheAtomicReplicatedNodeRestartSelfTest.java |   15 +
 ...CacheReplicatedPreloadLifecycleSelfTest.java |    6 +-
 .../cache/eviction/EvictionAbstractTest.java    | 1056 ++++
 .../GridCacheBatchEvictUnswapSelfTest.java      |    5 +-
 ...heConcurrentEvictionConsistencySelfTest.java |   97 +-
 .../GridCacheConcurrentEvictionsSelfTest.java   |   29 +-
 .../GridCacheDistributedEvictionsSelfTest.java  |    5 +-
 .../GridCacheEmptyEntriesAbstractSelfTest.java  |   11 +-
 .../eviction/GridCacheEvictionAbstractTest.java |  484 --
 .../GridCacheEvictionFilterSelfTest.java        |    2 +-
 .../GridCacheEvictionTouchSelfTest.java         |   22 +-
 .../cache/eviction/GridCacheMockEntry.java      |    5 +
 ...cheSynchronousEvictionsFailoverSelfTest.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  |    6 +
 .../random/RandomEvictionPolicySelfTest.java    |  357 ++
 ...dCacheSortedBatchEvictionPolicySelfTest.java |  385 --
 ...acheSortedEvictionPolicyPerformanceTest.java |  135 -
 .../GridCacheSortedEvictionPolicySelfTest.java  |  373 --
 .../SortedEvictionPolicyPerformanceTest.java    |  134 +
 .../sorted/SortedEvictionPolicySelfTest.java    |  266 +
 .../IgniteCacheClientNearCacheExpiryTest.java   |  103 +
 .../IgniteCacheExpiryPolicyAbstractTest.java    |   10 +-
 .../IgniteCacheExpiryPolicyTestSuite.java       |    2 +
 ...eCacheExpiryPolicyWithStoreAbstractTest.java |    4 +-
 .../IgniteCacheTxStoreSessionTest.java          |    4 +
 ...CacheLocalOffHeapAndSwapMetricsSelfTest.java |  412 ++
 .../local/GridCacheExLocalFullApiSelfTest.java  |   30 -
 ...dCacheLocalFullApiMultithreadedSelfTest.java |    5 +
 .../GridCacheLocalTxExceptionSelfTest.java      |    5 +
 .../GridCacheSwapScanQueryAbstractSelfTest.java |  115 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |    8 +-
 ...CacheClientWriteBehindStoreAbstractTest.java |  104 +
 ...teCacheClientWriteBehindStoreAtomicTest.java |   38 +
 .../IgnteCacheClientWriteBehindStoreTxTest.java |   32 +
 .../closure/GridClosureProcessorSelfTest.java   |   29 +-
 .../continuous/GridEventConsumeSelfTest.java    |   98 +-
 .../DataStreamProcessorSelfTest.java            |   48 +-
 .../DataStreamerMultiThreadedSelfTest.java      |   62 +-
 .../DataStreamerMultinodeCreateCacheTest.java   |   97 +
 .../igfs/IgfsClientCacheSelfTest.java           |   12 +-
 .../processors/igfs/IgfsCommonAbstractTest.java |   10 -
 .../processors/igfs/IgfsModesSelfTest.java      |    4 +-
 .../processors/igfs/IgfsOneClientNodeTest.java  |    8 +-
 .../service/ClosureServiceClientsNodesTest.java |   16 +-
 .../service/GridServiceClientNodeTest.java      |   81 +
 .../internal/util/IgniteUtilsSelfTest.java      |   22 +
 .../ipc/shmem/IgfsSharedMemoryTestServer.java   |    2 +
 .../IpcSharedMemoryCrashDetectionSelfTest.java  |    2 +-
 .../ipc/shmem/IpcSharedMemorySpaceSelfTest.java |    2 +-
 .../ipc/shmem/IpcSharedMemoryUtilsSelfTest.java |    2 +-
 .../LoadWithCorruptedLibFileTestRunner.java     |    2 +-
 .../IpcSharedMemoryBenchmarkReader.java         |    2 +-
 .../IpcSharedMemoryBenchmarkWriter.java         |    2 +-
 .../nio/GridNioDelimitedBufferSelfTest.java     |  112 +
 .../util/nio/GridNioDelimitedBufferTest.java    |  112 -
 .../internal/util/nio/GridNioSelfTest.java      |   15 +-
 .../internal/util/nio/GridNioSslSelfTest.java   |    2 +
 .../unsafe/GridUnsafeMemorySelfTest.java        |    4 +-
 .../tostring/GridToStringBuilderSelfTest.java   |    4 +-
 .../loadtests/GridCacheMultiNodeLoadTest.java   |    5 +-
 .../communication/GridIoManagerBenchmark0.java  |    1 +
 .../GridCachePartitionedAtomicLongLoadTest.java |    6 +-
 .../loadtests/hashmap/GridCacheTestContext.java |    6 +-
 .../swap/GridSwapEvictAllBenchmark.java         |    6 +-
 .../marshaller/MarshallerContextTestImpl.java   |   29 +-
 .../OptimizedMarshallerNodeFailoverTest.java    |    4 +-
 ...GridMessagingNoPeerClassLoadingSelfTest.java |    7 +-
 .../ignite/messaging/GridMessagingSelfTest.java |   16 +-
 .../IgniteMessagingWithClientTest.java          |  166 +
 .../p2p/GridP2PLocalDeploymentSelfTest.java     |    6 +-
 .../p2p/GridP2PRemoteClassLoadersSelfTest.java  |   31 +-
 .../spi/GridTcpSpiForwardingSelfTest.java       |    4 +-
 .../GridTcpCommunicationSpiAbstractTest.java    |   17 +-
 ...mmunicationSpiConcurrentConnectSelfTest.java |    6 +-
 .../GridTcpCommunicationSpiConfigSelfTest.java  |    3 -
 ...cpCommunicationSpiMultithreadedSelfTest.java |   23 +-
 ...pCommunicationSpiMultithreadedShmemTest.java |   28 +
 ...dTcpCommunicationSpiRecoveryAckSelfTest.java |    1 +
 ...GridTcpCommunicationSpiRecoverySelfTest.java |    1 +
 .../GridTcpCommunicationSpiShmemSelfTest.java   |   38 +
 .../tcp/GridTcpCommunicationSpiTcpSelfTest.java |    7 +
 .../discovery/AbstractDiscoverySelfTest.java    |   21 +-
 ...pClientDiscoveryMarshallerCheckSelfTest.java |   76 +
 .../tcp/TcpClientDiscoverySelfTest.java         |  700 ---
 .../tcp/TcpClientDiscoverySpiMulticastTest.java |  129 +
 .../tcp/TcpClientDiscoverySpiSelfTest.java      | 1632 +++++
 .../tcp/TcpDiscoveryConcurrentStartTest.java    |   61 +-
 .../tcp/TcpDiscoveryMultiThreadedTest.java      |   56 +-
 .../TcpDiscoveryNodeConsistentIdSelfTest.java   |   80 +
 .../spi/discovery/tcp/TcpDiscoverySelfTest.java |   46 +-
 .../inmemory/GridTestSwapSpaceSpi.java          |    3 +-
 .../stream/socket/SocketStreamerSelfTest.java   |   29 +-
 .../testframework/GridSpiTestContext.java       |   42 +-
 .../ignite/testframework/GridTestUtils.java     |   31 +-
 .../config/GridTestProperties.java              |   14 +-
 .../testframework/junits/GridAbstractTest.java  |   54 +-
 .../junits/GridTestKernalContext.java           |    3 +-
 .../junits/IgniteTestResources.java             |   16 +-
 .../junits/cache/TestCacheSession.java          |   18 +
 .../cache/TestThreadLocalCacheSession.java      |   15 +
 .../junits/common/GridCommonAbstractTest.java   |   98 +-
 .../ignite/testsuites/IgniteBasicTestSuite.java |   35 +-
 .../IgniteCacheDataStructuresSelfTestSuite.java |   28 +-
 .../IgniteCacheEvictionSelfTestSuite.java       |   17 +-
 .../IgniteCacheFailoverTestSuite.java           |   27 +-
 .../IgniteCacheFailoverTestSuite2.java          |   47 +
 .../IgniteCacheFullApiSelfTestSuite.java        |   14 +-
 .../IgniteCacheMetricsSelfTestSuite.java        |    1 +
 .../IgniteCacheNearOnlySelfTestSuite.java       |   16 +-
 ...gniteCacheP2pUnmarshallingErrorTestSuit.java |   41 -
 ...niteCacheP2pUnmarshallingErrorTestSuite.java |   53 +
 .../testsuites/IgniteCacheRestartTestSuite.java |   10 +-
 .../IgniteCacheTcpClientDiscoveryTestSuite.java |   47 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |   54 +-
 .../testsuites/IgniteCacheTestSuite2.java       |   15 +-
 .../testsuites/IgniteCacheTestSuite3.java       |   14 +-
 .../testsuites/IgniteCacheTestSuite4.java       |   35 +-
 .../IgniteCacheWriteBehindTestSuite.java        |    2 +
 .../testsuites/IgniteClientTestSuite.java       |   38 +
 .../testsuites/IgniteComputeGridTestSuite.java  |    1 +
 .../testsuites/IgniteKernalSelfTestSuite.java   |   24 +-
 .../IgniteMarshallerSelfTestSuite.java          |   28 +-
 .../IgniteSpiCommunicationSelfTestSuite.java    |    2 +
 .../IgniteSpiDiscoverySelfTestSuite.java        |    9 +-
 .../testsuites/IgniteStreamSelfTestSuite.java   |   39 +
 .../testsuites/IgniteStreamTestSuite.java       |   39 -
 .../testsuites/IgniteUtilSelfTestSuite.java     |   20 +-
 .../apache/ignite/util/GridRandomSelfTest.java  |    4 +-
 .../ignite/util/TestTcpCommunicationSpi.java    |   21 +
 modules/core/src/test/resources/helloworld.gar  |  Bin 6092 -> 0 bytes
 modules/core/src/test/resources/helloworld1.gar |  Bin 6092 -> 0 bytes
 modules/core/src/test/resources/readme.txt      |    6 -
 modules/docker/Dockerfile                       |   55 +
 modules/docker/README.txt                       |   11 +
 modules/docker/build_users_libs.sh              |   39 +
 modules/docker/download_ignite.sh               |   49 +
 modules/docker/execute.sh                       |   62 +
 modules/docker/run.sh                           |   34 +
 modules/extdata/p2p/pom.xml                     |    4 +-
 .../p2p/GridP2PContinuousDeploymentTask1.java   |    2 +-
 .../tests/p2p/P2PTestTaskExternalPath1.java     |   10 +-
 .../tests/p2p/P2PTestTaskExternalPath2.java     |    8 +-
 modules/extdata/uri/META-INF/ignite.xml         |   38 +
 .../extdata/uri/modules/uri-dependency/pom.xml  |   42 +
 .../deployment/uri/tasks/GarHelloWorldBean.java |   60 +
 .../src/main/resources/gar-example.properties   |   18 +
 modules/extdata/uri/pom.xml                     |   62 +-
 .../deployment/uri/tasks/GarHelloWorldTask.java |   81 +
 .../deployment/uri/tasks/gar-spring-bean.xml    |   29 +
 modules/gce/pom.xml                             |    2 +-
 .../gce/TcpDiscoveryGoogleStorageIpFinder.java  |   43 +-
 modules/geospatial/pom.xml                      |    2 +-
 modules/hadoop/pom.xml                          |   81 +-
 .../fs/IgniteHadoopFileSystemCounterWriter.java |   21 +-
 .../fs/IgniteHadoopIgfsSecondaryFileSystem.java |  165 +-
 .../hadoop/fs/v1/IgniteHadoopFileSystem.java    |  137 +-
 .../hadoop/fs/v2/IgniteHadoopFileSystem.java    |   32 +-
 .../processors/hadoop/HadoopClassLoader.java    |   29 +
 .../processors/hadoop/HadoopDefaultJobInfo.java |   27 +-
 .../internal/processors/hadoop/HadoopUtils.java |   51 +-
 .../hadoop/SecondaryFileSystemProvider.java     |   58 +-
 .../hadoop/fs/HadoopDistributedFileSystem.java  |   91 -
 .../hadoop/fs/HadoopFileSystemCacheUtils.java   |  241 +
 .../hadoop/fs/HadoopFileSystemsUtils.java       |   26 +-
 .../hadoop/fs/HadoopLazyConcurrentMap.java      |  209 +
 .../processors/hadoop/igfs/HadoopIgfsEx.java    |    6 +
 .../hadoop/igfs/HadoopIgfsInProc.java           |  170 +-
 .../processors/hadoop/igfs/HadoopIgfsIpcIo.java |    2 +-
 .../hadoop/igfs/HadoopIgfsOutProc.java          |   33 +-
 .../hadoop/igfs/HadoopIgfsWrapper.java          |   19 +-
 .../hadoop/jobtracker/HadoopJobTracker.java     |   25 +-
 .../hadoop/taskexecutor/HadoopRunnableTask.java |   20 +-
 .../child/HadoopChildProcessRunner.java         |    3 +-
 .../processors/hadoop/v2/HadoopV2Job.java       |  111 +-
 .../hadoop/v2/HadoopV2JobResourceManager.java   |   40 +-
 .../hadoop/v2/HadoopV2TaskContext.java          |   85 +-
 .../hadoop/HadoopClientProtocolSelfTest.java    |    6 +-
 .../HadoopIgfs20FileSystemAbstractSelfTest.java |   73 +-
 ...oopSecondaryFileSystemConfigurationTest.java |   18 +-
 .../apache/ignite/igfs/IgfsEventsTestSuite.java |    5 +-
 .../igfs/IgfsNearOnlyMultiNodeSelfTest.java     |    5 +-
 .../IgniteHadoopFileSystemAbstractSelfTest.java |   65 +-
 .../IgniteHadoopFileSystemClientSelfTest.java   |    2 +-
 ...IgniteHadoopFileSystemHandshakeSelfTest.java |    7 +
 .../IgniteHadoopFileSystemIpcCacheSelfTest.java |    9 +
 .../hadoop/HadoopAbstractSelfTest.java          |   19 +-
 .../hadoop/HadoopCommandLineTest.java           |   14 +-
 .../hadoop/HadoopFileSystemsTest.java           |   23 +-
 .../processors/hadoop/HadoopMapReduceTest.java  |  185 +-
 .../hadoop/HadoopTaskExecutionSelfTest.java     |    2 +-
 .../hadoop/HadoopTasksAllVersionsTest.java      |   15 +-
 .../processors/hadoop/HadoopTasksV1Test.java    |    8 +-
 .../processors/hadoop/HadoopTasksV2Test.java    |    8 +-
 .../processors/hadoop/HadoopV2JobSelfTest.java  |    8 +-
 .../collections/HadoopAbstractMapTest.java      |   15 +-
 .../collections/HadoopHashMapSelfTest.java      |    4 +-
 .../collections/HadoopSkipListSelfTest.java     |    4 +-
 .../HadoopExternalTaskExecutionSelfTest.java    |    2 +
 .../HadoopExternalCommunicationSelfTest.java    |    5 +
 .../testsuites/IgniteHadoopTestSuite.java       |    9 +-
 .../IgniteIgfsLinuxAndMacOSTestSuite.java       |    3 +-
 modules/hibernate/pom.xml                       |   16 +-
 .../HibernateTransactionalDataRegion.java       |   12 +-
 .../hibernate/CacheHibernateBlobStore.java      |   87 +-
 .../CacheHibernateBlobStoreFactory.java         |  235 +
 .../CacheHibernateStoreSessionListener.java     |  216 +
 .../hibernate/src/test/config/factory-cache.xml |   59 +
 .../src/test/config/factory-cache1.xml          |   61 +
 .../config/factory-incorrect-store-cache.xml    |   56 +
 .../hibernate/HibernateL2CacheSelfTest.java     |    2 +
 .../CacheHibernateStoreFactorySelfTest.java     |  273 +
 ...heHibernateStoreSessionListenerSelfTest.java |  228 +
 .../testsuites/IgniteHibernateTestSuite.java    |    8 +-
 modules/indexing/pom.xml                        |   18 +-
 .../processors/query/h2/IgniteH2Indexing.java   |  125 +-
 .../query/h2/opt/GridH2KeyValueRowOffheap.java  |    8 +-
 .../processors/query/h2/opt/GridH2Table.java    |    2 +-
 .../query/h2/sql/GridSqlQuerySplitter.java      |   49 +-
 .../query/h2/twostep/GridMapQueryExecutor.java  |  321 +-
 .../query/h2/twostep/GridMergeIndex.java        |   17 +-
 .../h2/twostep/GridMergeIndexUnsorted.java      |    7 +-
 .../h2/twostep/GridReduceQueryExecutor.java     |  656 +-
 .../query/h2/twostep/GridResultPage.java        |   21 +-
 .../CacheAbstractQueryMetricsSelfTest.java      |  358 ++
 .../cache/CacheLocalQueryMetricsSelfTest.java   |   33 +
 ...titionedQueryMetricsDistributedSelfTest.java |   33 +
 ...chePartitionedQueryMetricsLocalSelfTest.java |   33 +
 ...plicatedQueryMetricsDistributedSelfTest.java |   33 +
 ...acheReplicatedQueryMetricsLocalSelfTest.java |   33 +
 ...CacheScanPartitionQueryFallbackSelfTest.java |  408 ++
 .../cache/GridCacheCrossCacheQuerySelfTest.java |   25 +-
 .../cache/GridCacheOffHeapSelfTest.java         |    1 -
 .../GridCacheOffheapIndexEntryEvictTest.java    |  200 +
 .../cache/GridCacheOffheapIndexGetSelfTest.java |   80 +-
 .../cache/GridCacheQueryMetricsSelfTest.java    |  152 -
 ...idCacheReduceQueryMultithreadedSelfTest.java |   10 -
 .../processors/cache/GridCacheSwapSelfTest.java |    3 -
 .../cache/GridIndexingWithNoopSwapSelfTest.java |    6 +-
 .../IgniteCacheAbstractFieldsQuerySelfTest.java |   13 +-
 .../cache/IgniteCacheAbstractQuerySelfTest.java |   85 +-
 ...acheConfigurationPrimitiveTypesSelfTest.java |  104 +
 .../cache/IgniteCacheOffheapEvictQueryTest.java |  196 +
 ...niteCacheP2pUnmarshallingQueryErrorTest.java |    3 +-
 ...hePartitionedQueryMultiThreadedSelfTest.java |   40 +-
 ...QueryMultiThreadedOffHeapTieredSelfTest.java |   37 +
 ...eQueryMultiThreadedOffHeapTiredSelfTest.java |   37 -
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |   17 +-
 ...lientQueryReplicatedNodeRestartSelfTest.java |  419 ++
 .../IgniteCacheQueryNodeRestartSelfTest.java    |   41 +-
 .../IgniteCacheQueryNodeRestartSelfTest2.java   |  388 ++
 ...dCacheAbstractReduceFieldsQuerySelfTest.java |    1 -
 .../cache/ttl/CacheTtlAbstractSelfTest.java     |    6 +-
 .../h2/GridIndexingSpiAbstractSelfTest.java     |    4 +-
 .../query/h2/sql/BaseH2CompareQueryTest.java    |    6 +-
 .../query/h2/sql/GridQueryParsingTest.java      |    5 +-
 .../IgniteCacheQuerySelfTestSuite.java          |   16 +-
 .../IgniteCacheWithIndexingTestSuite.java       |    3 +
 modules/jcl/pom.xml                             |    2 +-
 modules/jta/pom.xml                             |    2 +-
 .../apache/ignite/cache/jta/CacheTmLookup.java  |    3 +-
 .../processors/cache/jta/CacheJtaManager.java   |   72 +-
 .../cache/jta/GridCacheXAResource.java          |   34 +-
 .../processors/cache/GridCacheJtaSelfTest.java  |   52 +-
 .../GridTmLookupLifecycleAwareSelfTest.java     |   29 +-
 modules/kafka/licenses/apache-2.0.txt           |  202 +
 modules/kafka/pom.xml                           |  105 +
 .../ignite/stream/kafka/KafkaStreamer.java      |  220 +
 .../kafka/IgniteKafkaStreamerSelfTestSuite.java |   37 +
 .../stream/kafka/KafkaEmbeddedBroker.java       |  378 ++
 .../kafka/KafkaIgniteStreamerSelfTest.java      |  227 +
 .../ignite/stream/kafka/SimplePartitioner.java  |   53 +
 modules/log4j/pom.xml                           |    2 +-
 modules/mesos/README.txt                        |    2 +-
 modules/mesos/pom.xml                           |   11 +-
 .../apache/ignite/mesos/ClusterProperties.java  |   15 +
 .../apache/ignite/mesos/IgniteScheduler.java    |   10 +-
 modules/rest-http/pom.xml                       |   16 +-
 modules/scalar-2.10/README.txt                  |    4 +
 modules/scalar-2.10/licenses/apache-2.0.txt     |  202 +
 .../scalar-2.10/licenses/scala-bsd-license.txt  |   18 +
 modules/scalar-2.10/pom.xml                     |  197 +
 modules/scalar/pom.xml                          |    2 +-
 modules/schedule/pom.xml                        |    2 +-
 modules/schema-import/pom.xml                   |    2 +-
 .../ignite/schema/model/PojoDescriptor.java     |    2 +
 .../apache/ignite/schema/model/PojoField.java   |    1 +
 .../parser/dialect/OracleMetadataDialect.java   |    2 +-
 modules/slf4j/pom.xml                           |    2 +-
 modules/spark-2.10/README.txt                   |    4 +
 modules/spark-2.10/licenses/apache-2.0.txt      |  202 +
 .../spark-2.10/licenses/scala-bsd-license.txt   |   18 +
 modules/spark-2.10/pom.xml                      |  120 +
 modules/spark/README.txt                        |    8 +
 modules/spark/licenses/apache-2.0.txt           |  202 +
 modules/spark/licenses/scala-bsd-license.txt    |   18 +
 modules/spark/pom.xml                           |  110 +
 .../org/apache/ignite/spark/IgniteContext.scala |  161 +
 .../org/apache/ignite/spark/IgniteRDD.scala     |  244 +
 .../apache/ignite/spark/JavaIgniteContext.scala |   63 +
 .../org/apache/ignite/spark/JavaIgniteRDD.scala |   99 +
 .../ignite/spark/impl/IgniteAbstractRDD.scala   |   39 +
 .../ignite/spark/impl/IgnitePartition.scala     |   24 +
 .../ignite/spark/impl/IgniteQueryIterator.scala |   27 +
 .../apache/ignite/spark/impl/IgniteSqlRDD.scala |   41 +
 .../spark/impl/JavaIgniteAbstractRDD.scala      |   34 +
 .../ignite/spark/JavaIgniteRDDSelfTest.java     |  298 +
 .../scala/org/apache/ignite/spark/Entity.scala  |   28 +
 .../org/apache/ignite/spark/IgniteRddSpec.scala |  249 +
 modules/spring/pom.xml                          |   23 +-
 .../spring/CacheSpringStoreSessionListener.java |  207 +
 .../GridResourceSpringBeanInjector.java         |    2 +-
 .../util/spring/IgniteSpringHelperImpl.java     |   89 +-
 .../src/test/config/incorrect-store-cache.xml   |   57 +
 modules/spring/src/test/config/node.xml         |   43 +
 modules/spring/src/test/config/node1.xml        |   45 +
 .../test/config/pojo-incorrect-store-cache.xml  |   56 +
 modules/spring/src/test/config/store-cache.xml  |   59 +
 modules/spring/src/test/config/store-cache1.xml |   62 +
 .../jdbc/CacheJdbcBlobStoreFactorySelfTest.java |  172 +
 .../jdbc/CacheJdbcPojoStoreFactorySelfTest.java |  193 +
 ...CacheSpringStoreSessionListenerSelfTest.java |  197 +
 .../IgniteExcludeInConfigurationTest.java       |   81 +
 .../org/apache/ignite/spring/sprint-exclude.xml |   76 +
 .../testsuites/IgniteSpringTestSuite.java       |   10 +
 modules/ssh/pom.xml                             |    2 +-
 modules/tools/pom.xml                           |    2 +-
 .../ignite/tools/classgen/ClassesGenerator.java |   30 +-
 modules/urideploy/pom.xml                       |   10 +-
 .../GridTaskUriDeploymentDeadlockSelfTest.java  |   13 +-
 .../ignite/p2p/GridP2PDisabledSelfTest.java     |    2 +-
 modules/visor-console-2.10/README.txt           |    4 +
 modules/visor-console-2.10/pom.xml              |  174 +
 modules/visor-console/pom.xml                   |    2 +-
 .../ignite/visor/commands/VisorConsole.scala    |    3 +-
 .../commands/cache/VisorCacheCommand.scala      |    9 +-
 .../commands/cache/VisorCacheScanCommand.scala  |    2 +-
 .../visor/commands/open/VisorOpenCommand.scala  |  319 +
 .../scala/org/apache/ignite/visor/visor.scala   |  230 +-
 .../ignite/visor/VisorRuntimeBaseSpec.scala     |    2 +
 .../commands/kill/VisorKillCommandSpec.scala    |    1 +
 .../commands/start/VisorStartCommandSpec.scala  |    1 +
 .../commands/tasks/VisorTasksCommandSpec.scala  |    1 +
 .../commands/vvm/VisorVvmCommandSpec.scala      |    1 +
 modules/visor-plugins/pom.xml                   |    2 +-
 modules/web/pom.xml                             |    8 +-
 .../IgniteWebSessionSelfTestSuite.java          |    2 +-
 .../config/benchmark-put-indexed-val.properties |   64 +
 modules/yardstick/config/ignite-base-config.xml |   23 +
 modules/yardstick/pom.xml                       |    2 +-
 .../cache/IgnitePutIndexedValue1Benchmark.java  |   42 +
 .../cache/IgnitePutIndexedValue2Benchmark.java  |   42 +
 .../cache/IgnitePutIndexedValue8Benchmark.java  |   42 +
 .../ignite/yardstick/cache/model/Person1.java   |   55 +
 .../ignite/yardstick/cache/model/Person2.java   |   67 +
 .../ignite/yardstick/cache/model/Person8.java   |  109 +
 parent/pom.xml                                  |    6 +
 pom.xml                                         |   35 +-
 scripts/git-apply-patch.sh                      |    8 +-
 scripts/git-format-patch.sh                     |   16 +-
 scripts/git-patch-functions.sh                  |   36 +-
 scripts/git-patch-prop.sh                       |    2 +-
 925 files changed, 54443 insertions(+), 21554 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3a2376cb/pom.xml
----------------------------------------------------------------------
diff --cc pom.xml
index 9cea078,b47d34b..6208084
--- a/pom.xml
+++ b/pom.xml
@@@ -70,7 -70,7 +70,8 @@@
          <module>modules/gce</module>
          <module>modules/cloud</module>
          <module>modules/mesos</module>
+         <module>modules/kafka</module>
 +        <module>modules/yarn</module>
      </modules>
  
      <profiles>


[44/50] [abbrv] incubator-ignite git commit: # IGNITE-1097 Wrap RuntimeException to GridClosureException. (cherry picked from commit 6831b30)

Posted by sb...@apache.org.
# IGNITE-1097 Wrap RuntimeException to GridClosureException.
(cherry picked from commit 6831b30)


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

Branch: refs/heads/ignite-1056
Commit: 208417597717fce72714bf778296f838074fa4bb
Parents: 98c57e0
Author: sevdokimov <se...@jetbrains.com>
Authored: Thu Jul 9 17:25:42 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Fri Jul 10 10:47:45 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheProxy.java      | 29 ++++++++++++++++----
 1 file changed, 23 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20841759/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 b31b2e8..00fc0f9 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
@@ -28,6 +28,7 @@ import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.future.*;
+import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -884,7 +885,12 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
                     IgniteInternalFuture<Void> fut0 = fut.chain(new CX1<IgniteInternalFuture<Boolean>, Void>() {
                         @Override public Void applyx(IgniteInternalFuture<Boolean> fut) throws IgniteCheckedException {
-                            fut.get();
+                            try {
+                                fut.get();
+                            }
+                            catch (RuntimeException e) {
+                                throw new GridClosureException(e);
+                            }
 
                             return null;
                         }
@@ -1238,9 +1244,14 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     IgniteInternalFuture<T> fut0 = fut.chain(new CX1<IgniteInternalFuture<EntryProcessorResult<T>>, T>() {
                         @Override public T applyx(IgniteInternalFuture<EntryProcessorResult<T>> fut)
                             throws IgniteCheckedException {
-                            EntryProcessorResult<T> res = fut.get();
-
-                            return res != null ? res.get() : null;
+                            try {
+                                EntryProcessorResult<T> res = fut.get();
+
+                                return res != null ? res.get() : null;
+                            }
+                            catch (RuntimeException e) {
+                                throw new GridClosureException(e);
+                            }
                         }
                     });
 
@@ -1276,9 +1287,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
                     IgniteInternalFuture<T> fut0 = fut.chain(new CX1<IgniteInternalFuture<EntryProcessorResult<T>>, T>() {
                         @Override public T applyx(IgniteInternalFuture<EntryProcessorResult<T>> fut)
                             throws IgniteCheckedException {
-                            EntryProcessorResult<T> res = fut.get();
 
-                            return res != null ? res.get() : null;
+                            try {
+                                EntryProcessorResult<T> res = fut.get();
+
+                                return res != null ? res.get() : null;
+                            }
+                            catch (RuntimeException e) {
+                                throw new GridClosureException(e);
+                            }
                         }
                     });
 


[22/50] [abbrv] incubator-ignite git commit: # review

Posted by sb...@apache.org.
# review


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

Branch: refs/heads/ignite-1056
Commit: 839fe79fa5ff0ee91b528b43d6a7834aa1ea719f
Parents: cd01e4c
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Jul 8 06:16:48 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Jul 8 06:16:48 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/jta/CacheJtaManager.java   | 24 ++++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/839fe79f/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
index 09d856b..ace5fe7 100644
--- a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
+++ b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
@@ -35,7 +35,7 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
     private final ThreadLocal<GridCacheXAResource> xaRsrc = new ThreadLocal<>();
 
     /** */
-    private volatile TransactionManager jtaTm;
+    private TransactionManager jtaTm;
 
     /** */
     private final AtomicReference<CacheTmLookup> tmLookupRef = new AtomicReference<>();
@@ -46,7 +46,7 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
 
         if (cctx.txConfig() != null) {
             String txLookupClsName = cctx.txConfig().getTxManagerLookupClassName();
-            
+
             if (txLookupClsName != null)
                 tmLookupRef.set(createTmLookup(txLookupClsName));
         }
@@ -55,7 +55,7 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
     /** {@inheritDoc} */
     @Override protected void stop0(boolean cancel) {
         CacheTmLookup tmLookup = tmLookupRef.get();
-        
+
         if (tmLookup instanceof LifecycleAware)
             ((LifecycleAware)tmLookup).stop();
     }
@@ -70,10 +70,10 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
             CacheTmLookup res = (CacheTmLookup)cls.newInstance();
 
             cctx.kernalContext().resource().injectGeneric(res);
-            
+
             if (res instanceof LifecycleAware)
                 ((LifecycleAware)res).start();
-            
+
             return res;
         }
         catch (Exception e) {
@@ -86,10 +86,10 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
         if (jtaTm == null) {
             try {
                 CacheTmLookup tmLookup = tmLookupRef.get();
-                
+
                 if (tmLookup == null)
                     return;
-                
+
                 jtaTm = tmLookup.getTm();
             }
             catch (Exception e) {
@@ -144,23 +144,23 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
     /** {@inheritDoc} */
     @Override public void registerCache(CacheConfiguration<?, ?> cfg) throws IgniteCheckedException {
         String cacheLookupClsName = cfg.getTransactionManagerLookupClassName();
-        
+
         if (cacheLookupClsName != null) {
             CacheTmLookup tmLookup = tmLookupRef.get();
-            
+
             if (tmLookup == null) {
                 tmLookup = createTmLookup(cacheLookupClsName);
-                
+
                 if (tmLookupRef.compareAndSet(null, tmLookup))
                     return;
-                
+
                 tmLookup = tmLookupRef.get();
             }
 
             if (!cacheLookupClsName.equals(tmLookup.getClass().getName()))
                 throw new IgniteCheckedException("Failed to start cache with CacheTmLookup that specified in cache " +
                     "configuration, because node uses another CacheTmLookup [cache" + cfg.getName() +
-                    ", tmLookupClassName=" + cacheLookupClsName + ", tmLookupUsedByNode=" 
+                    ", tmLookupClassName=" + cacheLookupClsName + ", tmLookupUsedByNode="
                     + tmLookup.getClass().getName() + ']');
         }
     }


[49/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-1.3' into ignite-1.3

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

Conflicts:
	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.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/b19f5c45
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b19f5c45
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b19f5c45

Branch: refs/heads/ignite-1056
Commit: b19f5c45fe179d12024fc12f4f2b9823ea04ebe0
Parents: a233fa0 e11f46b
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jul 10 10:49:53 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jul 10 10:49:53 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheFutureImpl.java |  6 +++
 .../processors/cache/IgniteCacheProxy.java      | 55 ++++++--------------
 .../util/future/GridFutureChainListener.java    |  4 --
 .../internal/util/future/IgniteFutureImpl.java  | 12 +++--
 .../cache/GridCacheAbstractFullApiSelfTest.java | 32 ++++++++++++
 5 files changed, 63 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


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


[26/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-591'

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-591'


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

Branch: refs/heads/ignite-1056
Commit: 23dc8fc87352bdb38a0ff7d01dab048c22ceae77
Parents: 6d6ec77 cfeec2d
Author: sevdokimov <se...@gridgain.com>
Authored: Wed Jul 8 15:57:06 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Wed Jul 8 15:57:06 2015 +0300

----------------------------------------------------------------------
 .../configuration/CacheConfiguration.java       |  4 ++
 .../configuration/TransactionConfiguration.java | 23 +++++++
 .../processors/cache/GridCacheAttributes.java   |  3 +
 .../processors/cache/GridCacheContext.java      |  8 +--
 .../processors/cache/GridCacheProcessor.java    | 21 +++---
 .../cache/GridCacheSharedContext.java           | 15 +++-
 .../cache/jta/CacheJtaManagerAdapter.java       | 17 +++--
 .../cache/jta/CacheNoopJtaManager.java          |  2 +-
 .../visor/cache/VisorCacheConfiguration.java    | 11 ---
 .../loadtests/hashmap/GridCacheTestContext.java |  4 +-
 .../HibernateTransactionalDataRegion.java       | 12 +++-
 .../hibernate/HibernateL2CacheSelfTest.java     |  7 +-
 .../HibernateL2CacheTransactionalSelfTest.java  |  5 --
 .../apache/ignite/cache/jta/CacheTmLookup.java  |  3 +-
 .../processors/cache/jta/CacheJtaManager.java   | 72 ++++++++++++++++++--
 .../cache/jta/GridCacheXAResource.java          | 16 ++---
 .../processors/cache/GridCacheJtaSelfTest.java  | 52 ++++++++++----
 .../GridTmLookupLifecycleAwareSelfTest.java     | 29 ++++++--
 .../commands/cache/VisorCacheCommand.scala      |  2 -
 19 files changed, 211 insertions(+), 95 deletions(-)
----------------------------------------------------------------------



[04/50] [abbrv] incubator-ignite git commit: IGNITE-591 Make GridCacheXAResource shared.

Posted by sb...@apache.org.
IGNITE-591 Make GridCacheXAResource shared.


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

Branch: refs/heads/ignite-1056
Commit: 4b06e77c8e770f9b9ef8b34b59a69ec47da615c7
Parents: 1a21477
Author: sevdokimov <se...@jetbrains.com>
Authored: Wed Jul 1 10:08:13 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Wed Jul 1 10:08:13 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/jta/CacheJtaManager.java       |  4 ++--
 .../processors/cache/jta/GridCacheXAResource.java   | 16 ++++++----------
 .../processors/cache/GridCacheJtaSelfTest.java      |  2 --
 3 files changed, 8 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b06e77c/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
index 9af29d6..2a078dc 100644
--- a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
+++ b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/CacheJtaManager.java
@@ -30,7 +30,7 @@ import javax.transaction.*;
  */
 public class CacheJtaManager extends CacheJtaManagerAdapter {
     /** */
-    private final ThreadLocal<GridCacheXAResource> xaRsrc = new ThreadLocal<>();
+    private final static ThreadLocal<GridCacheXAResource> xaRsrc = new ThreadLocal<>();
 
     /** */
     private TransactionManager jtaTm;
@@ -89,7 +89,7 @@ public class CacheJtaManager extends CacheJtaManagerAdapter {
                             );
                         }
 
-                        rsrc = new GridCacheXAResource(tx, cctx);
+                        rsrc = new GridCacheXAResource(tx, cctx.kernalContext());
 
                         if (!jtaTx.enlistResource(rsrc))
                             throw new IgniteCheckedException("Failed to enlist XA resource to JTA user transaction.");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b06e77c/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/GridCacheXAResource.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/GridCacheXAResource.java b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/GridCacheXAResource.java
index 442cdde..ad233e5 100644
--- a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/GridCacheXAResource.java
+++ b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/GridCacheXAResource.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.internal.processors.cache.jta;
 
 import org.apache.ignite.*;
-import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.transactions.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.transactions.*;
@@ -41,9 +41,6 @@ public final class GridCacheXAResource implements XAResource {
     /** */
     private static final Xid[] NO_XID = new Xid[] {};
 
-    /** Context. */
-    private GridCacheContext cctx;
-
     /** Cache transaction. */
     private IgniteInternalTx cacheTx;
 
@@ -52,17 +49,16 @@ public final class GridCacheXAResource implements XAResource {
 
     /**
      * @param cacheTx Cache jta.
-     * @param cctx Cache context.
+     * @param ctx Kernal context.
      */
-    public GridCacheXAResource(IgniteInternalTx cacheTx, GridCacheContext cctx) {
+    public GridCacheXAResource(IgniteInternalTx cacheTx, GridKernalContext ctx) {
         assert cacheTx != null;
-        assert cctx != null;
+        assert ctx != null;
 
-        this.cctx = cctx;
         this.cacheTx = cacheTx;
 
         if (log == null)
-            log = U.logger(cctx.kernalContext(), logRef, GridCacheXAResource.class);
+            log = U.logger(ctx, logRef, GridCacheXAResource.class);
     }
 
     /** {@inheritDoc} */
@@ -229,7 +225,7 @@ public final class GridCacheXAResource implements XAResource {
 
         GridCacheXAResource other = (GridCacheXAResource)xar;
 
-        return cctx == other.cctx;
+        return cacheTx == other.cacheTx;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b06e77c/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
index b299f8d..37e9ed2 100644
--- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
+++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
@@ -151,8 +151,6 @@ public class GridCacheJtaSelfTest extends GridCacheAbstractSelfTest {
      */
     @SuppressWarnings("ConstantConditions")
     public void testJtaTwoCaches() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-591");
-
         UserTransaction jtaTx = jotm.getUserTransaction();
 
         IgniteEx ignite = grid(0);


[23/50] [abbrv] incubator-ignite git commit: # ignite-gg-10416 Exclude lifecycleBeans for daemon node.

Posted by sb...@apache.org.
# ignite-gg-10416 Exclude lifecycleBeans for daemon node.


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

Branch: refs/heads/ignite-1056
Commit: 8cc75fc562706be8aebb837b708c03a9be264027
Parents: 0f1b31a
Author: Andrey <an...@gridgain.com>
Authored: Wed Jul 8 10:50:16 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Wed Jul 8 10:50:16 2015 +0700

----------------------------------------------------------------------
 .../org/apache/ignite/visor/commands/open/VisorOpenCommand.scala   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8cc75fc5/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
index 6498baf..632a96b 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
@@ -144,7 +144,7 @@ class VisorOpenCommand extends VisorConsoleCommand {
                     try
                         // Cache, IGFS, indexing SPI configurations should be excluded from daemon node config.
                         spring.loadConfigurations(url, "cacheConfiguration", "fileSystemConfiguration",
-                            "indexingSpi").get1()
+                            "lifecycleBeans", "indexingSpi").get1()
                     finally {
                         if (log4jTup != null)
                             U.removeLog4jNoOpLogger(log4jTup)


[18/50] [abbrv] incubator-ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-591

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


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

Branch: refs/heads/ignite-1056
Commit: 25c349f47f70c9824c8d4ba9c4ee679ff597051e
Parents: 5dc2d2b 9d0aa6f
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Tue Jul 7 16:01:47 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Tue Jul 7 16:01:47 2015 +0300

----------------------------------------------------------------------
 .../cache/eviction/fifo/FifoEvictionPolicy.java  |  5 -----
 .../cache/eviction/lru/LruEvictionPolicy.java    |  5 -----
 .../eviction/sorted/SortedEvictionPolicy.java    | 19 +++++--------------
 ...cheConcurrentEvictionConsistencySelfTest.java | 15 +++++++++++++--
 4 files changed, 18 insertions(+), 26 deletions(-)
----------------------------------------------------------------------