Merge branch 'sprint-1' into ignite-160

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

Branch: refs/heads/ignite-160
Commit: d803519d99f4868d2a78a2ecb2734143750e2425
Parents: 51cd3b2 22c8fea
Author: nikolay_tikhonov <[email protected]>
Authored: Fri Feb 6 16:11:15 2015 +0300
Committer: nikolay_tikhonov <[email protected]>
Committed: Fri Feb 6 16:35:19 2015 +0300

----------------------------------------------------------------------
 bin/ignite.bat                                  |   22 +-
 bin/ignite.sh                                   |    4 +-
 bin/igniterouter.sh                             |    2 +-
 bin/ignitevisorcmd.bat                          |   26 +-
 bin/ignitevisorcmd.sh                           |    4 +-
 bin/include/functions.sh                        |   10 +-
 bin/include/ggservice.exe                       |  Bin 5632 -> 0 bytes
 bin/include/igniteservice.exe                   |  Bin 0 -> 6144 bytes
 bin/include/parseargs.bat                       |    2 +-
 bin/include/parseargs.sh                        |    2 +-
 bin/include/service.sh                          |    8 +-
 bin/include/setenv.bat                          |   10 +-
 bin/include/setenv.sh                           |    8 +-
 bin/setup-hadoop.bat                            |    4 +-
 bin/setup-hadoop.sh                             |    6 +-
 config/hadoop/default-config.xml                |   20 +-
 config/java.util.logging.properties             |    2 +-
 config/router/default-router.xml                |    4 +-
 .../IgniteAtomicReferenceExample.java           |    2 +-
 .../IgniteAtomicStampedExample.java             |    2 +-
 .../streaming/StreamingCheckInExample.java      |    2 +-
 .../StreamingPopularNumbersExample.java         |    2 +-
 .../streaming/StreamingPriceBarsExample.java    |    2 +-
 .../apache/ignite/examples/ComputeExample.java  |    6 +-
 .../examples/ScalarCacheAffinityExample1.scala  |    3 +-
 .../test/config/aop/aspectj/META-INF/aop.xml    |    8 +-
 .../config/aop/jboss/jboss-gridgain-aop.xml     |   38 -
 .../GridifySetToXXXNonSpringAopSelfTest.java    |    4 +-
 .../GridifySetToXXXSpringAopSelfTest.java       |    4 +-
 .../ignite/gridify/NonSpringAopSelfTest.java    |    6 +-
 .../testsuites/IgniteAopSelfTestSuite.java      |    2 +-
 .../gridify/GridifySingleSplitLoadTest.java     |    2 +-
 .../gridify/ExternalNonSpringAopSelfTest.java   |    4 +-
 .../spi/checkpoint/s3/S3CheckpointSpi.java      |    4 +-
 .../s3/TcpDiscoveryS3IpFinderSelfTest.java      |    2 +-
 .../config/grid-client-config.properties        |    4 +-
 .../config/grid-client-spring-config.xml        |    4 +-
 modules/clients/readme.md                       |    8 +-
 .../ClientAbstractMultiThreadedSelfTest.java    |    2 +-
 .../client/ClientDefaultCacheSelfTest.java      |    2 +-
 .../ignite/client/ClientSslNodeStartup.java     |    2 +-
 .../ignite/client/ClientStartNodeTask.java      |    2 +-
 .../ClientPropertiesConfigurationSelfTest.java  |    4 +-
 .../integration/ClientAbstractSelfTest.java     |   12 +-
 .../ClientTcpConnectivitySelfTest.java          |    6 +-
 .../rest/JettyRestProcessorSignedSelfTest.java  |    4 +-
 .../rest/RestBinaryProtocolSelfTest.java        |    2 +-
 .../processors/rest/RestProcessorTest.java      |   28 +-
 .../protocols/tcp/TcpRestParserSelfTest.java    |    4 +-
 .../ignite/jdbc/JdbcComplexQuerySelfTest.java   |    2 +-
 .../ignite/jdbc/JdbcConnectionSelfTest.java     |    2 +-
 .../ignite/jdbc/JdbcEmptyCacheSelfTest.java     |    2 +-
 .../ignite/jdbc/JdbcLocalCachesSelfTest.java    |    2 +-
 .../ignite/jdbc/JdbcMetadataSelfTest.java       |    2 +-
 .../jdbc/JdbcPreparedStatementSelfTest.java     |    2 +-
 .../ignite/jdbc/JdbcResultSetSelfTest.java      |    2 +-
 .../ignite/jdbc/JdbcStatementSelfTest.java      |    2 +-
 modules/clients/src/test/resources/log4j.xml    |   12 +-
 .../clients/src/test/resources/spring-cache.xml |   16 +-
 .../src/test/resources/spring-router-ssl.xml    |    6 +-
 .../src/test/resources/spring-router.xml        |    6 +-
 .../src/test/resources/spring-server-node.xml   |   10 +-
 .../test/resources/spring-server-ssl-node.xml   |   10 +-
 .../src/main/java/org/apache/ignite/Ignite.java |    8 +-
 .../java/org/apache/ignite/IgniteCluster.java   |   20 +-
 .../java/org/apache/ignite/IgniteCompute.java   |   34 +-
 .../org/apache/ignite/IgniteDataLoader.java     |    4 +-
 .../java/org/apache/ignite/IgniteEvents.java    |   10 +-
 .../main/java/org/apache/ignite/IgniteFs.java   |    4 +-
 .../java/org/apache/ignite/IgniteLogger.java    |   14 +-
 .../java/org/apache/ignite/IgniteManaged.java   |   36 +-
 .../java/org/apache/ignite/IgniteMessaging.java |    4 +-
 .../java/org/apache/ignite/IgnitePortables.java |   36 +-
 .../java/org/apache/ignite/IgniteScheduler.java |    6 +-
 .../java/org/apache/ignite/IgniteState.java     |    2 +-
 .../main/java/org/apache/ignite/Ignition.java   |   20 +-
 .../apache/ignite/cache/CacheProjection.java    |    2 +-
 .../apache/ignite/cache/CachingProvider.java    |    2 +-
 .../CacheRendezvousAffinityFunction.java        |    2 +-
 .../cache/eviction/CacheEvictionPolicy.java     |    6 +-
 .../apache/ignite/cache/query/CacheQueries.java |    2 +-
 .../apache/ignite/cache/query/CacheQuery.java   |   14 +-
 .../ignite/cache/query/CacheQuerySqlField.java  |    2 +-
 .../cache/query/annotations/QuerySqlField.java  |    2 +-
 .../apache/ignite/cache/store/CacheStore.java   |    2 +-
 .../cache/store/jdbc/CacheJdbcBlobStore.java    |    6 +-
 .../org/apache/ignite/client/GridClient.java    |    4 +-
 .../apache/ignite/client/GridClientCompute.java |    6 +-
 .../ignite/client/GridClientConfiguration.java  |    4 +-
 .../apache/ignite/client/GridClientData.java    |    2 +-
 .../client/impl/GridClientComputeImpl.java      |    2 +-
 .../ignite/client/impl/GridClientImpl.java      |    2 +-
 .../GridClientConnectionManagerAdapter.java     |    2 +-
 .../impl/connection/GridClientTopology.java     |    2 +-
 .../org/apache/ignite/client/impl/package.html  |    2 +-
 .../client/marshaller/optimized/package.html    |    2 +-
 .../impl/GridRouterCommandLineStartup.java      |    2 +-
 .../client/router/impl/GridTcpRouterImpl.java   |    2 +-
 .../org/apache/ignite/client/ssl/package.html   |    2 +-
 .../org/apache/ignite/cluster/ClusterGroup.java |    4 +-
 .../org/apache/ignite/cluster/ClusterNode.java  |   27 +-
 .../org/apache/ignite/compute/ComputeJob.java   |    4 +-
 .../ignite/compute/ComputeJobAdapter.java       |    2 +-
 .../ignite/compute/ComputeJobContext.java       |    2 +-
 .../compute/ComputeJobContinuationAdapter.java  |    2 +-
 .../org/apache/ignite/compute/ComputeTask.java  |    2 +-
 .../ignite/compute/ComputeTaskMapAsync.java     |    2 +-
 .../apache/ignite/compute/ComputeTaskName.java  |    2 +-
 .../ignite/compute/ComputeTaskSession.java      |    3 -
 .../apache/ignite/compute/ComputeTaskSpis.java  |    2 +-
 .../apache/ignite/compute/gridify/Gridify.java  |   10 +-
 .../ignite/compute/gridify/GridifyInput.java    |    2 +-
 .../ignite/compute/gridify/GridifySetToSet.java |   16 +-
 .../compute/gridify/GridifySetToValue.java      |   16 +-
 .../ClientConnectionConfiguration.java          |    4 +-
 .../configuration/IgniteAddressResolver.java    |    2 +-
 .../configuration/IgniteConfiguration.java      |   70 +-
 .../configuration/IgniteDeploymentMode.java     |   20 +-
 .../configuration/IgniteQueryConfiguration.java |    8 +-
 .../events/IgniteAuthenticationEvent.java       |    8 +-
 .../ignite/events/IgniteAuthorizationEvent.java |    8 +-
 .../apache/ignite/events/IgniteCacheEvent.java  |   12 +-
 .../events/IgniteCachePreloadingEvent.java      |   12 +-
 .../events/IgniteCacheQueryExecutedEvent.java   |   12 +-
 .../events/IgniteCacheQueryReadEvent.java       |   12 +-
 .../ignite/events/IgniteCheckpointEvent.java    |   12 +-
 .../ignite/events/IgniteDeploymentEvent.java    |   12 +-
 .../ignite/events/IgniteDiscoveryEvent.java     |   12 +-
 .../org/apache/ignite/events/IgniteEvent.java   |   16 +-
 .../apache/ignite/events/IgniteEventType.java   |  176 +-
 .../org/apache/ignite/events/IgniteFsEvent.java |   12 +-
 .../apache/ignite/events/IgniteJobEvent.java    |   12 +-
 .../ignite/events/IgniteLicenseEvent.java       |   12 +-
 .../ignite/events/IgniteSecureSessionEvent.java |   12 +-
 .../ignite/events/IgniteSwapSpaceEvent.java     |   12 +-
 .../apache/ignite/events/IgniteTaskEvent.java   |   16 +-
 .../java/org/apache/ignite/events/package.html  |    2 +-
 .../apache/ignite/fs/IgniteFsConfiguration.java |   12 +-
 .../fs/IgniteFsGroupDataBlocksKeyMapper.java    |    2 +-
 .../fs/IgniteFsInvalidHdfsVersionException.java |    4 +-
 .../ignite/internal/ClusterGroupAdapter.java    |    2 +-
 .../apache/ignite/internal/GridComponent.java   |    2 +-
 .../apache/ignite/internal/GridDiagnostic.java  |    2 +-
 .../ignite/internal/GridKernalContext.java      |    4 +-
 .../ignite/internal/GridKernalContextImpl.java  |    2 +-
 .../apache/ignite/internal/GridKillTask.java    |    2 +-
 .../ignite/internal/GridNodeAttributes.java     |  141 --
 .../apache/ignite/internal/GridProperties.java  |    2 +-
 .../ignite/internal/GridUpdateNotifier.java     |    2 +-
 .../ignite/internal/IgniteComponentType.java    |    2 +-
 .../ignite/internal/IgniteComputeImpl.java      |   21 +-
 .../ignite/internal/IgniteEventsImpl.java       |    2 +-
 .../org/apache/ignite/internal/IgniteEx.java    |    2 +-
 .../apache/ignite/internal/IgniteKernal.java    |   58 +-
 .../ignite/internal/IgniteNodeAttributes.java   |  141 ++
 .../org/apache/ignite/internal/IgnitionEx.java  |   36 +-
 .../internal/fs/common/GridGgfsMessage.java     |    2 +-
 .../internal/managers/GridManagerAdapter.java   |    2 +-
 .../managers/communication/GridIoManager.java   |    2 +-
 .../discovery/GridDiscoveryManager.java         |    6 +-
 .../eventstorage/GridEventStorageManager.java   |    4 +-
 .../managers/security/GridSecurityContext.java  |    6 +-
 .../processors/cache/GridCacheAttributes.java   |    6 +-
 .../processors/cache/GridCacheProcessor.java    |    4 +-
 .../processors/cache/GridCacheUtils.java        |    2 +-
 .../cache/query/GridCacheSqlIndexMetadata.java  |    2 +-
 .../cache/query/GridCacheSqlMetadata.java       |    4 +-
 .../clock/GridClockSyncProcessor.java           |    2 +-
 .../internal/processors/fs/GridGgfsContext.java |    2 +-
 .../internal/processors/fs/GridGgfsImpl.java    |    4 +-
 .../processors/fs/IgniteFsProcessor.java        |    6 +-
 .../internal/processors/hadoop/GridHadoop.java  |    2 +-
 .../processors/hadoop/GridHadoopJob.java        |    4 +-
 .../hadoop/GridHadoopJobProperty.java           |    4 +-
 .../license/GridLicenseProcessor.java           |    2 +-
 .../license/GridLicenseSubsystem.java           |    2 +-
 .../resource/GridSpringResourceContext.java     |    2 +-
 .../processors/rest/GridRestProcessor.java      |    2 +-
 .../processors/rest/client/message/package.html |    2 +-
 .../handlers/log/GridLogCommandHandler.java     |    4 +-
 .../top/GridTopologyCommandHandler.java         |    4 +-
 .../protocols/tcp/GridClientPacketType.java     |    4 +-
 .../rest/protocols/tcp/GridTcpRestParser.java   |    2 +-
 .../rest/protocols/tcp/GridTcpRestProtocol.java |    6 +-
 .../schedule/IgniteNoopScheduleProcessor.java   |    4 +-
 .../spring/IgniteSpringProcessor.java           |    4 +-
 .../streamer/GridStreamProcessor.java           |    2 +-
 .../ignite/internal/product/IgniteProduct.java  |    6 +-
 .../internal/product/IgniteProductLicense.java  |    4 +-
 .../internal/util/GridConfigurationFinder.java  |   12 +-
 .../ignite/internal/util/IgniteUtils.java       |   86 +-
 .../internal/util/lang/GridAbsClosure.java      |    4 +-
 .../ignite/internal/util/lang/GridFunc.java     |    2 +-
 .../internal/util/lang/GridPeerDeployAware.java |    2 +-
 .../util/lang/GridPeerDeployAwareAdapter.java   |    2 +-
 .../nio/GridConnectionBytesVerifyFilter.java    |    2 +-
 .../util/nodestart/GridNodeCallable.java        |   29 -
 .../util/nodestart/GridNodeStartUtils.java      |  390 ----
 .../nodestart/GridRemoteStartSpecification.java |  279 ---
 .../util/nodestart/IgniteNodeCallable.java      |   30 +
 .../util/nodestart/IgniteNodeStartUtils.java    |  391 ++++
 .../IgniteRemoteStartSpecification.java         |  279 +++
 .../util/nodestart/IgniteSshProcessor.java      |    2 +-
 .../util/portscanner/GridJmxPortFinder.java     |    2 +-
 .../apache/ignite/internal/util/typedef/CA.java |    3 +-
 .../ignite/internal/util/typedef/CAX.java       |    2 +-
 .../apache/ignite/internal/util/typedef/X.java  |    8 +-
 .../visor/cache/VisorCacheConfiguration.java    |    6 +-
 .../internal/visor/file/VisorFileBlockTask.java |    2 +-
 .../visor/file/VisorLatestTextFilesTask.java    |    2 +-
 .../internal/visor/log/VisorLogSearchTask.java  |    2 +-
 .../node/VisorExecutorServiceConfiguration.java |   15 +-
 .../streamer/VisorStreamerConfiguration.java    |    6 +-
 .../internal/visor/util/VisorTaskUtils.java     |    2 +-
 .../ignite/jdbc/IgniteJdbcConnection.java       |    8 +-
 .../ignite/jdbc/IgniteJdbcDatabaseMetadata.java |    6 +-
 .../apache/ignite/jdbc/IgniteJdbcDriver.java    |   30 +-
 .../apache/ignite/jdbc/IgniteJdbcResultSet.java |    2 +-
 .../apache/ignite/jdbc/IgniteJdbcStatement.java |    2 +-
 .../org/apache/ignite/lang/IgniteClosure.java   |    2 +-
 .../org/apache/ignite/lang/IgnitePredicate.java |    2 +-
 .../org/apache/ignite/lang/IgniteRunnable.java  |    2 +-
 .../apache/ignite/lifecycle/LifecycleAware.java |    2 +-
 .../apache/ignite/lifecycle/LifecycleBean.java  |    4 +-
 .../ignite/logger/IgniteLoggerNodeIdAware.java  |    2 +-
 .../ignite/logger/java/IgniteJavaLogger.java    |   12 +-
 .../apache/ignite/managed/ManagedService.java   |   14 +-
 .../managed/ManagedServiceConfiguration.java    |    2 +-
 .../ignite/marshaller/IgniteMarshaller.java     |    4 +-
 .../marshaller/IgniteMarshallerExclusions.java  |    6 +-
 .../marshaller/jdk/IgniteJdkMarshaller.java     |    2 +-
 .../optimized/IgniteOptimizedClassResolver.java |    2 +-
 .../optimized/IgniteOptimizedMarshallable.java  |    2 +-
 .../optimized/IgniteOptimizedMarshaller.java    |    4 +-
 .../IgniteOptimizedObjectInputStream.java       |    2 +-
 .../IgniteOptimizedObjectOutputStream.java      |    2 +-
 .../org/apache/ignite/mxbean/IgniteMXBean.java  |   20 +-
 .../ignite/plugin/security/GridSecurity.java    |    6 +-
 .../security/GridSecurityCredentials.java       |    2 +-
 .../GridSecurityCredentialsProvider.java        |    2 +-
 .../segmentation/GridSegmentationPolicy.java    |    2 +-
 .../segmentation/GridSegmentationResolver.java  |    2 +-
 .../ignite/portables/PortableBuilder.java       |    4 +-
 .../ignite/portables/PortableConfiguration.java |    2 +-
 .../ignite/portables/PortableIdMapper.java      |    4 +-
 .../ignite/portables/PortableMarshalAware.java  |    2 +-
 .../apache/ignite/portables/PortableObject.java |   16 +-
 .../apache/ignite/portables/PortableReader.java |    6 +-
 .../apache/ignite/portables/PortableWriter.java |    6 +-
 .../ignite/resources/IgniteServiceResource.java |    2 +-
 .../IgniteSpringApplicationContextResource.java |    2 +-
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |    4 +-
 .../ignite/spi/IgniteSpiConfiguration.java      |    2 +-
 .../ignite/spi/IgniteSpiManagementMBean.java    |    8 +-
 .../org/apache/ignite/spi/IgniteSpiThread.java  |    2 +-
 .../spi/authentication/AuthenticationSpi.java   |    6 +-
 .../noop/NoopAuthenticationSpi.java             |    6 +-
 .../ignite/spi/checkpoint/CheckpointSpi.java    |    4 +-
 .../checkpoint/cache/CacheCheckpointSpi.java    |    6 +-
 .../spi/checkpoint/jdbc/JdbcCheckpointSpi.java  |    4 +-
 .../sharedfs/SharedFsCheckpointSpi.java         |    6 +-
 .../ignite/spi/collision/CollisionSpi.java      |    6 +-
 .../fifoqueue/FifoQueueCollisionSpi.java        |    4 +-
 .../jobstealing/JobStealingCollisionSpi.java    |    2 +-
 .../PriorityQueueCollisionSpi.java              |    2 +-
 .../spi/communication/CommunicationSpi.java     |    6 +-
 .../communication/tcp/TcpCommunicationSpi.java  |    6 +-
 .../ignite/spi/deployment/DeploymentSpi.java    |    4 +-
 .../spi/discovery/DiscoveryMetricsProvider.java |    2 +-
 .../ignite/spi/discovery/DiscoverySpi.java      |    8 +-
 .../spi/discovery/DiscoverySpiDataExchange.java |    2 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |   30 +-
 .../discovery/tcp/TcpDiscoverySpiAdapter.java   |    2 +-
 .../tcp/internal/TcpDiscoveryNode.java          |    6 +-
 .../ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java |    6 +-
 .../spi/eventstorage/EventStorageSpi.java       |    4 +-
 .../memory/MemoryEventStorageSpi.java           |    4 +-
 .../apache/ignite/spi/failover/FailoverSpi.java |    4 +-
 .../spi/failover/always/AlwaysFailoverSpi.java  |    2 +-
 .../jobstealing/JobStealingFailoverSpi.java     |   14 +-
 .../spi/failover/never/NeverFailoverSpi.java    |    2 +-
 .../ignite/spi/indexing/GridIndexingSpi.java    |    2 +-
 .../spi/loadbalancing/LoadBalancingSpi.java     |    4 +-
 .../adaptive/AdaptiveCpuLoadProbe.java          |    6 +-
 .../adaptive/AdaptiveJobCountLoadProbe.java     |    6 +-
 .../adaptive/AdaptiveLoadBalancingSpi.java      |    4 +-
 .../adaptive/AdaptiveLoadProbe.java             |    2 +-
 .../AdaptiveProcessingTimeLoadProbe.java        |    6 +-
 .../roundrobin/RoundRobinLoadBalancingSpi.java  |    2 +-
 .../WeightedRandomLoadBalancingSpi.java         |    2 +-
 .../spi/securesession/SecureSessionSpi.java     |    6 +-
 .../noop/NoopSecureSessionSpi.java              |    6 +-
 .../ignite/spi/swapspace/SwapSpaceSpi.java      |    6 +-
 .../spi/swapspace/file/FileSwapSpaceSpi.java    |    4 +-
 .../ignite/startup/BasicWarmupClosure.java      |    2 +-
 .../ignite/startup/cmdline/AboutDialog.java     |    2 +-
 .../startup/cmdline/CommandLineStartup.java     |   10 +-
 .../startup/cmdline/CommandLineTransformer.java |    4 +-
 .../org/apache/ignite/startup/package-info.java |    2 +-
 .../ignite/streamer/StreamerConfiguration.java  |   10 +-
 .../apache/ignite/streamer/StreamerWindow.java  |    2 +-
 .../org/apache/ignite/thread/IgniteThread.java  |    2 +-
 .../apache/ignite/transactions/IgniteTx.java    |    4 +-
 .../core/src/test/bin/start-nodes-custom.bat    |    2 +-
 .../spring-cache-client-benchmark-1.xml         |    8 +-
 .../spring-cache-client-benchmark-2.xml         |    8 +-
 .../spring-cache-client-benchmark-3.xml         |    8 +-
 modules/core/src/test/config/example-cache.xml  |    2 +-
 modules/core/src/test/config/ggfs-shmem.xml     |    8 +-
 .../src/test/config/load/cache-benchmark.xml    |    2 +-
 .../test/config/load/cache-client-benchmark.xml |    2 +-
 .../config/load/dsi-49-server-production.xml    |    2 +-
 .../src/test/config/load/merge-sort-base.xml    |    8 +-
 modules/core/src/test/config/log4j-test.xml     |    8 +-
 .../core/src/test/config/spring-cache-load.xml  |    8 +-
 .../config/spring-cache-put-remove-load.xml     |    2 +-
 .../core/src/test/config/spring-cache-swap.xml  |    2 +-
 .../src/test/config/spring-cache-teststore.xml  |    4 +-
 .../core/src/test/config/spring-multicache.xml  |    8 +-
 .../src/test/config/spring-start-nodes-attr.xml |    2 +-
 .../core/src/test/config/spring-start-nodes.xml |    2 +-
 modules/core/src/test/config/start-nodes.ini    |    6 +-
 .../average/spring-streamer-average-base.xml    |    8 +-
 .../average/spring-streamer-average-local.xml   |    8 +-
 .../average/spring-streamer-average-random.xml  |    8 +-
 .../config/streamer/spring-streamer-base.xml    |    8 +-
 .../internal/GridAffinityP2PSelfTest.java       |    4 +-
 .../GridFailoverTaskWithPredicateSelfTest.java  |    2 +-
 .../GridJobMasterLeaveAwareSelfTest.java        |    4 +-
 .../GridNodeVisorAttributesSelfTest.java        |    4 +-
 .../internal/GridProjectionAbstractTest.java    |   18 +-
 .../internal/GridReleaseTypeSelfTest.java       |    4 +-
 .../apache/ignite/internal/GridStartupMain.java |    8 +-
 .../apache/ignite/internal/GridStartupTest.java |    8 +-
 .../GridTaskCancelSingleNodeSelfTest.java       |    2 -
 .../GridTaskExecutionContextSelfTest.java       |    4 +-
 .../GridTopologyBuildVersionSelfTest.java       |    8 +-
 .../internal/GridUpdateNotifierSelfTest.java    |    2 +-
 .../IgniteComputeEmptyClusterGroupTest.java     |    4 +-
 .../communication/GridIoManagerSelfTest.java    |    4 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |    8 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |    2 +-
 .../cache/GridCacheP2PUndeploySelfTest.java     |    2 +-
 .../GridCacheQueryInternalKeysSelfTest.java     |    2 +-
 ...eAbstractDataStructuresFailoverSelfTest.java |    2 +-
 .../GridCacheMultiNodeDataStructureTest.java    |    2 +-
 .../GridCacheQueueCleanupSelfTest.java          |    2 +-
 ...GridCacheQueueMultiNodeAbstractSelfTest.java |    2 +-
 .../GridCacheSetAbstractSelfTest.java           |    3 +-
 ...xOriginatingNodeFailureAbstractSelfTest.java |    3 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |    4 +-
 .../dht/GridCacheAtomicNearCacheSelfTest.java   |    2 +-
 .../dht/GridCacheDhtPreloadDelayedSelfTest.java |    3 -
 .../GridCacheDhtPreloadMessageCountTest.java    |    4 -
 .../dht/GridCacheDhtPreloadPutGetSelfTest.java  |    4 -
 ...unctionExcludeNeighborsAbstractSelfTest.java |    4 +-
 .../near/GridCacheNearEvictionSelfTest.java     |    5 +-
 ...idCacheNearOnlyMultiNodeFullApiSelfTest.java |    2 +-
 .../GridCachePartitionedAffinitySelfTest.java   |    2 +-
 .../GridCachePartitionedEntryLockSelfTest.java  |    3 +-
 ...achePartitionedMultiNodeFullApiSelfTest.java |    2 +-
 .../GridCacheDistributedEvictionsSelfTest.java  |    2 -
 .../closure/GridClosureProcessorSelfTest.java   |   14 +-
 .../continuous/GridEventConsumeSelfTest.java    |    4 +-
 .../apache/ignite/internal/updatestatus.html    |    4 +-
 ...artupWithSpecifiedWorkDirectorySelfTest.java |    8 +-
 ...tartupWithUndefinedGridGainHomeSelfTest.java |  105 -
 ...dStartupWithUndefinedIgniteHomeSelfTest.java |  105 +
 .../internal/util/IgniteUtilsSelfTest.java      |    6 +-
 .../ipc/shmem/GgfsSharedMemoryTestServer.java   |    2 +-
 .../IpcSharedMemoryCrashDetectionSelfTest.java  |    2 +-
 .../jvmtest/ServerSocketMultiThreadedTest.java  |    4 +-
 .../apache/ignite/lang/GridFuncSelfTest.java    |    4 +-
 .../loadtest/GridSingleExecutionTest.java       |    6 +-
 .../cache/GridCacheAbstractLoadTest.java        |   10 +-
 .../loadtests/cache/GridCacheBenchmark.java     |    8 +-
 .../cache/GridCacheGroupLockComparisonTest.java |   12 +-
 .../capacity/spring-capacity-cache.xml          |    8 +-
 .../loadtests/colocation/GridTestMain.java      |    2 +-
 .../loadtests/colocation/spring-colocation.xml  |    8 +-
 .../communication/GridIoManagerBenchmark.java   |    2 +-
 .../GridTcpCommunicationBenchmark.java          |   12 +-
 .../GridSingleSplitsRedeployLoadTest.java       |    2 +-
 .../loadtests/discovery/GridGcTimeoutTest.java  |    2 +-
 .../cacheget/GridBenchmarkCacheGetLoadTest.java |    2 +-
 .../ignite/loadtests/job/GridJobLoadTest.java   |    4 +-
 .../loadtests/mapper/GridNodeStartup.java       |    8 +-
 .../loadtests/nio/GridNioBenchmarkTest.java     |    2 +-
 .../streamer/GridStreamerBenchmark.java         |    2 +-
 .../ignite/logger/java/GridJavaLoggerTest.java  |   65 -
 .../logger/java/IgniteJavaLoggerTest.java       |   65 +
 .../marshaller/GridMarshallerAbstractTest.java  |    2 +-
 .../GridOptimizedMarshallerEnumSelfTest.java    |   62 -
 .../GridOptimizedMarshallerSelfTest.java        |  452 ----
 .../optimized/GridOptimizedMarshallerTest.java  |  830 -------
 .../GridOptimizedObjectStreamSelfTest.java      | 2093 ------------------
 .../GridTestTcpDiscoveryIpFinderAdapter.java    |   44 -
 .../OptimizedMarshallerEnumSelfTest.java        |   62 +
 .../optimized/OptimizedMarshallerSelfTest.java  |  452 ++++
 .../optimized/OptimizedMarshallerTest.java      |  830 +++++++
 .../OptimizedObjectStreamSelfTest.java          | 2093 ++++++++++++++++++
 .../TestTcpDiscoveryIpFinderAdapter.java        |   44 +
 .../spi/GridTcpSpiForwardingSelfTest.java       |    3 +-
 .../cache/CacheCheckpointSpiConfigSelfTest.java |   34 +
 .../CacheCheckpointSpiSecondCacheSelfTest.java  |  106 +
 .../cache/CacheCheckpointSpiSelfTest.java       |   29 +
 .../CacheCheckpointSpiStartStopSelfTest.java    |   34 +
 .../GridCacheCheckpointSpiConfigSelfTest.java   |   34 -
 ...idCacheCheckpointSpiSecondCacheSelfTest.java |  106 -
 .../cache/GridCacheCheckpointSpiSelfTest.java   |   29 -
 ...GridCacheCheckpointSpiStartStopSelfTest.java |   34 -
 .../GridJdbcCheckpointSpiConfigSelfTest.java    |   77 -
 ...idJdbcCheckpointSpiCustomConfigSelfTest.java |   47 -
 ...dJdbcCheckpointSpiDefaultConfigSelfTest.java |   45 -
 .../GridJdbcCheckpointSpiStartStopSelfTest.java |   47 -
 .../jdbc/JdbcCheckpointSpiConfigSelfTest.java   |   77 +
 .../JdbcCheckpointSpiCustomConfigSelfTest.java  |   47 +
 .../JdbcCheckpointSpiDefaultConfigSelfTest.java |   45 +
 .../JdbcCheckpointSpiStartStopSelfTest.java     |   47 +
 ...redFsCheckpointSpiMultiThreadedSelfTest.java |    2 +-
 ...bStealingCollisionSpiAttributesSelfTest.java |    2 +-
 ...alingCollisionSpiCustomTopologySelfTest.java |    2 +-
 .../GridJobStealingCollisionSpiSelfTest.java    |    2 +-
 ...obStealingCollisionSpiStartStopSelfTest.java |    2 +-
 .../GridAbstractCommunicationSelfTest.java      |    4 +-
 ...cpCommunicationSpiMultithreadedSelfTest.java |    4 +-
 .../AbstractDiscoveryRandomStartStopTest.java   |  213 ++
 .../discovery/AbstractDiscoverySelfTest.java    |  496 +++++
 .../spi/discovery/AbstractDiscoveryTest.java    |  153 ++
 ...ridAbstractDiscoveryRandomStartStopTest.java |  213 --
 .../GridAbstractDiscoverySelfTest.java          |  496 -----
 .../discovery/GridAbstractDiscoveryTest.java    |  153 --
 .../tcp/GridTcpClientDiscoverySelfTest.java     |  691 ------
 .../GridTcpDiscoveryConcurrentStartTest.java    |  118 -
 ...GridTcpDiscoveryMarshallerCheckSelfTest.java |  102 -
 .../tcp/GridTcpDiscoveryMultiThreadedTest.java  |  206 --
 .../discovery/tcp/GridTcpDiscoverySelfTest.java |  988 ---------
 .../GridTcpDiscoverySnapshotHistoryTest.java    |  173 --
 .../tcp/GridTcpDiscoverySpiConfigSelfTest.java  |   45 -
 .../GridTcpDiscoverySpiRandomStartStopTest.java |   45 -
 .../tcp/GridTcpDiscoverySpiSelfTest.java        |   43 -
 .../GridTcpDiscoverySpiStartStopSelfTest.java   |   82 -
 .../GridTcpDiscoverySpiWildcardSelfTest.java    |   63 -
 .../tcp/TcpClientDiscoverySelfTest.java         |  691 ++++++
 .../tcp/TcpDiscoveryConcurrentStartTest.java    |  118 +
 .../TcpDiscoveryMarshallerCheckSelfTest.java    |  102 +
 .../tcp/TcpDiscoveryMultiThreadedTest.java      |  206 ++
 .../spi/discovery/tcp/TcpDiscoverySelfTest.java |  988 +++++++++
 .../tcp/TcpDiscoverySnapshotHistoryTest.java    |  173 ++
 .../tcp/TcpDiscoverySpiConfigSelfTest.java      |   45 +
 .../tcp/TcpDiscoverySpiRandomStartStopTest.java |   45 +
 .../discovery/tcp/TcpDiscoverySpiSelfTest.java  |   43 +
 .../tcp/TcpDiscoverySpiStartStopSelfTest.java   |   82 +
 .../tcp/TcpDiscoverySpiWildcardSelfTest.java    |   63 +
 ...ridTcpDiscoveryIpFinderAbstractSelfTest.java |  125 --
 .../TcpDiscoveryIpFinderAbstractSelfTest.java   |  125 ++
 .../GridTcpDiscoveryJdbcIpFinderSelfTest.java   |   90 -
 .../jdbc/TcpDiscoveryJdbcIpFinderSelfTest.java  |   90 +
 ...idTcpDiscoveryMulticastIpFinderSelfTest.java |  115 -
 .../TcpDiscoveryMulticastIpFinderSelfTest.java  |  115 +
 ...ridTcpDiscoverySharedFsIpFinderSelfTest.java |   56 -
 .../TcpDiscoverySharedFsIpFinderSelfTest.java   |   56 +
 .../vm/GridTcpDiscoveryVmIpFinderSelfTest.java  |  193 --
 .../vm/TcpDiscoveryVmIpFinderSelfTest.java      |  193 ++
 ...idJobStealingFailoverSpiOneNodeSelfTest.java |    4 +-
 .../GridJobStealingFailoverSpiSelfTest.java     |    2 +-
 ...JobStealingFailoverSpiStartStopSelfTest.java |    2 +-
 .../GridSwapSpaceSpiAbstractSelfTest.java       |    2 +-
 .../startup/GridRandomCommandLineLoader.java    |   10 +-
 .../ignite/startup/GridVmNodesStarter.java      |    2 +-
 .../cmdline/GridCommandLineLoaderTest.java      |    2 +-
 .../GridCommandLineTransformerSelfTest.java     |    4 +-
 .../startup/servlet/GridServletLoaderTest.java  |   12 +-
 .../ignite/testframework/GridTestNode.java      |    4 +-
 .../ignite/testframework/GridTestUtils.java     |   36 +-
 .../config/GridTestProperties.java              |    2 +-
 .../testframework/junits/GridAbstractTest.java  |   19 +-
 .../junits/IgniteTestResources.java             |   10 +-
 .../junits/common/GridAbstractExamplesTest.java |    2 +-
 .../junits/common/GridCommonAbstractTest.java   |    2 +-
 .../junits/logger/GridTestLog4jLogger.java      |   12 +-
 .../junits/spi/GridSpiAbstractTest.java         |    4 +-
 .../IgniteCacheDataStructuresSelfTestSuite.java |    2 +-
 .../IgniteCacheFailoverTestSuite.java           |    2 +-
 .../IgniteCacheWriteBehindTestSuite.java        |    2 +-
 .../IgniteContinuousTaskSelfTestSuite.java      |    2 +-
 .../ignite/testsuites/IgniteFsTestSuite.java    |    2 +-
 .../IgniteJobMetricsSelfTestSuite.java          |    2 +-
 .../testsuites/IgniteKernalSelfTestSuite.java   |    2 +-
 .../testsuites/IgniteLangSelfTestSuite.java     |    2 +-
 .../testsuites/IgniteLoggingSelfTestSuite.java  |    2 +-
 .../IgniteMarshallerSelfTestSuite.java          |    8 +-
 .../IgniteSpiCheckpointSelfTestSuite.java       |   16 +-
 .../IgniteSpiDiscoverySelfTestSuite.java        |   20 +-
 .../IgniteSpiEventStorageSelfTestSuite.java     |    2 +-
 .../testsuites/IgniteUtilSelfTestSuite.java     |    2 +-
 .../util/GridConcurrentLinkedDequeSelfTest.java |    2 -
 .../util/GridTopologyHeapSizeSelfTest.java      |    2 +-
 .../src/test/resources/load/html/index.html     |   26 +-
 .../core/src/test/webapp/META-INF/gg-config.xml |   18 +-
 modules/core/src/test/webapp/WEB-INF/web.xml    |    4 +-
 modules/extdata/p2p/META-INF/gridgain.xml       |   40 -
 modules/extdata/p2p/META-INF/ignite.xml         |   40 +
 .../uri/tasks/GridUriDeploymentDependency1.java |    2 +-
 .../uri/tasks/GridUriDeploymentDependency2.java |    2 +-
 .../uri/tasks/GridUriDeploymentTestTask2.java   |    2 +-
 .../client/hadoop/GridHadoopClientProtocol.java |    4 +-
 .../GridHadoopClientProtocolProvider.java       |    6 +-
 .../apache/ignite/client/hadoop/package.html    |    2 +-
 .../fs/hadoop/GridGgfsHadoopParameters.java     |    2 +-
 .../fs/hadoop/v1/GridGgfsHadoopFileSystem.java  |   12 +-
 .../org/apache/ignite/fs/hadoop/v1/package.html |    2 +-
 .../fs/hadoop/v2/GridGgfsHadoopFileSystem.java  |   12 +-
 .../org/apache/ignite/fs/hadoop/v2/package.html |    2 +-
 .../hadoop/GridGgfsHadoopFileSystemWrapper.java |    2 +-
 .../hadoop/GridHadoopClassLoader.java           |    2 +-
 .../processors/hadoop/GridHadoopSetup.java      |   56 +-
 .../GridHadoopExternalTaskExecutor.java         |    2 +-
 .../child/GridHadoopExternalProcessStarter.java |    4 +-
 .../apache/ignite/fs/GridFileSystemLoad.java    |    4 +-
 ...dGgfsHadoop20FileSystemAbstractSelfTest.java |    2 +-
 .../fs/GridGgfsHadoopDualAbstractSelfTest.java  |    2 +-
 ...ridGgfsHadoopFileSystemAbstractSelfTest.java |    6 +-
 ...ridGgfsHadoopFileSystemIpcCacheSelfTest.java |    2 +-
 .../GridGgfsHadoopFileSystemLoggerSelfTest.java |    2 +-
 ...GgfsHadoopFileSystemLoggerStateSelfTest.java |    6 +-
 ...fsHadoopFileSystemSecondaryModeSelfTest.java |    2 +-
 .../fs/GridGgfsNearOnlyMultiNodeSelfTest.java   |    2 +-
 .../ignite/fs/IgniteFsEventsTestSuite.java      |    2 +-
 .../hadoop/GridHadoopCommandLineTest.java       |    4 +-
 .../hadoop/GridHadoopPopularWordsTest.java      |    6 +-
 .../loadtests/ggfs/GridGgfsNodeStartup.java     |    6 +-
 .../ggfs/GridGgfsPerformanceBenchmark.java      |    2 +-
 .../IgniteFsLinuxAndMacOSTestSuite.java         |    4 +-
 .../GridHibernateAccessStrategyAdapter.java     |    3 +-
 .../GridHibernateCollectionRegion.java          |    2 +-
 .../hibernate/GridHibernateEntityRegion.java    |    2 +-
 .../GridHibernateNonStrictAccessStrategy.java   |    2 +-
 .../GridHibernateQueryResultsRegion.java        |    2 +-
 .../GridHibernateReadOnlyAccessStrategy.java    |    2 +-
 .../GridHibernateReadWriteAccessStrategy.java   |    2 +-
 .../hibernate/GridHibernateRegionFactory.java   |   10 +-
 ...ridHibernateTransactionalAccessStrategy.java |    2 +-
 .../GridHibernateTransactionalDataRegion.java   |    6 +-
 .../apache/ignite/cache/hibernate/package.html  |    4 +-
 .../hibernate/CacheHibernateBlobStore.java      |    2 +-
 .../CacheHibernateBlobStoreEntry.hbm.xml        |    2 +-
 .../CacheHibernateBlobStoreSelfTest.java        |    8 +-
 ...idCachePartitionedHitsAndMissesSelfTest.java |    2 +-
 .../apache/ignite/logger/jcl/GridJclLogger.java |  170 --
 .../ignite/logger/jcl/IgniteJclLogger.java      |  170 ++
 .../ignite/logger/jcl/GridJclLoggerTest.java    |   48 -
 .../ignite/logger/jcl/IgniteJclLoggerTest.java  |   48 +
 .../ignite/testsuites/IgniteJclTestSuite.java   |    2 +-
 .../ignite/logger/log4j/IgniteLog4jLogger.java  |   12 +-
 .../log4j/GridLog4jCorrectFileNameTest.java     |    2 +-
 .../logger/log4j/GridLog4jLoggingFileTest.java  |    2 +-
 .../logger/log4j/GridLog4jLoggingUrlTest.java   |    2 +-
 .../http/jetty/GridJettyRestProtocol.java       |    8 +-
 .../rest/protocols/http/jetty/rest.html         |   18 +-
 modules/scalar/pom.xml                          |    8 +-
 .../ignite/scalar/ScalarConversions.scala       |   10 +-
 .../ignite/scalar/lang/ScalarOutClosure.scala   |    4 +-
 .../scalar/lang/ScalarOutClosureFunction.scala  |    4 +-
 .../org/apache/ignite/scalar/pimps/Packet.scala |    2 +-
 .../ignite/scalar/pimps/ScalarCachePimp.scala   |    2 +-
 .../pimps/ScalarCacheProjectionPimp.scala       |    4 +-
 .../ignite/scalar/pimps/ScalarGridPimp.scala    |    2 +-
 .../scalar/pimps/ScalarProjectionPimp.scala     |   10 +-
 .../scala/org/apache/ignite/scalar/scalar.scala |   14 +-
 .../test/resources/spring-ping-pong-partner.xml |    4 +-
 .../ignite/schema/model/PojoDescriptor.java     |    8 +-
 .../org/apache/ignite/schema/ui/Controls.java   |    4 +-
 .../apache/ignite/schema/ui/SchemaLoadApp.java  |  137 +-
 .../ignite/logger/slf4j/GridSlf4jLogger.java    |    4 +-
 .../java/org/apache/ignite/IgniteSpring.java    |    2 +-
 .../org/apache/ignite/IgniteSpringBean.java     |    2 +-
 .../ignite/cache/spring/SpringCacheManager.java |   16 +-
 .../cache/spring/SpringDynamicCacheManager.java |    8 +-
 .../spring/IgniteSpringProcessorImpl.java       |    4 +-
 .../ignite/internal/GridFactorySelfTest.java    |    8 +-
 .../p2p/GridP2PUserVersionChangeSelfTest.java   |   12 +-
 .../testsuites/IgniteResourceSelfTestSuite.java |    2 +-
 .../util/nodestart/GridNodeCallableImpl.java    |  344 ---
 .../util/nodestart/IgniteNodeCallableImpl.java  |  344 +++
 .../util/nodestart/IgniteSshProcessorImpl.java  |    4 +-
 .../internal/GridNodeStartUtilsSelfTest.java    |   89 -
 .../GridProjectionStartStopRestartSelfTest.java | 1032 ---------
 .../internal/IgniteNodeStartUtilsSelfTest.java  |   88 +
 ...gniteProjectionStartStopRestartSelfTest.java | 1032 +++++++++
 .../IgniteStartStopRestartTestSuite.java        |    4 +-
 .../ignite/tools/javadoc/IgniteLinkTaglet.java  |    6 +-
 .../optimized/OptimizedClassNamesGenerator.java |    8 +-
 .../util/antgar/IgniteDeploymentGarAntTask.java |   10 +-
 .../spi/deployment/uri/UriDeploymentSpi.java    |   28 +-
 .../GridTaskUriDeploymentDeadlockSelfTest.java  |    2 +-
 .../ignite/p2p/GridP2PDisabledSelfTest.java     |    2 +-
 ...loymentClassLoaderMultiThreadedSelfTest.java |    4 +-
 .../GridUriDeploymentClassLoaderSelfTest.java   |    2 +-
 ...riDeploymentClassloaderRegisterSelfTest.java |    2 +-
 .../GridUriDeploymentFileProcessorSelfTest.java |   14 +-
 .../GridUriDeploymentMultiScannersSelfTest.java |    2 +-
 .../uri/GridUriDeploymentSimpleSelfTest.java    |    2 +-
 .../META-INF/bad-signed-deployfile-gridgain.xml |   39 -
 .../META-INF/bad-signed-deployfile-ignite.xml   |   39 +
 .../spi/deployment/uri/META-INF/bad_classes.xml |    2 +-
 .../META-INF/deploy-with-resources-gridgain.xml |   37 -
 .../META-INF/deploy-with-resources-ignite.xml   |   37 +
 .../uri/META-INF/deploydepend-gridgain.xml      |   37 -
 .../uri/META-INF/deploydepend-ignite.xml        |   37 +
 .../uri/META-INF/deploydir-gridgain.xml         |   38 -
 .../uri/META-INF/deploydir-ignite.xml           |   38 +
 .../uri/META-INF/deployfile-gridgain.xml        |   38 -
 .../uri/META-INF/deployfile-ignite.xml          |   38 +
 .../deployment/uri/META-INF/gridgain.brokenxml  |   18 -
 .../spi/deployment/uri/META-INF/gridgain.empty  |    0
 .../deployment/uri/META-INF/gridgain.incorrefs  |   18 -
 .../spi/deployment/uri/META-INF/gridgain.xml    |   38 -
 .../deployment/uri/META-INF/ignite.brokenxml    |   18 +
 .../spi/deployment/uri/META-INF/ignite.empty    |    0
 .../deployment/uri/META-INF/ignite.incorrefs    |   18 +
 .../spi/deployment/uri/META-INF/ignite.xml      |   38 +
 .../deployment/uri/META-INF/p2p-gridgain.xml    |   42 -
 .../spi/deployment/uri/META-INF/p2p-ignite.xml  |   42 +
 .../well-signed-deployfile-gridgain.xml         |   38 -
 .../META-INF/well-signed-deployfile-ignite.xml  |   38 +
 .../GridFileDeploymentUndeploySelfTest.java     |    2 +-
 .../http/GridHttpDeploymentSelfTest.java        |    2 +-
 .../apache/ignite/tools/GridToolsSelfTest.java  |   16 +-
 .../ignite/tools/gartask/META-INF/gridgain.xml  |   38 -
 .../ignite/tools/gartask/META-INF/ignite.xml    |   38 +
 modules/visor-console/pom.xml                   |    4 +-
 .../scala/org/apache/ignite/visor/Packet.scala  |    4 +-
 .../ignite/visor/commands/VisorConsole.scala    |    2 +-
 .../commands/alert/VisorAlertCommand.scala      |    6 +-
 .../config/VisorConfigurationCommand.scala      |    2 +-
 .../ignite/visor/commands/disco/Packet.scala    |    6 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |   12 +-
 .../ignite/visor/commands/events/Packet.scala   |    6 +-
 .../commands/events/VisorEventsCommand.scala    |   12 +-
 .../visor/commands/kill/VisorKillCommand.scala  |    4 +-
 .../visor/commands/node/VisorNodeCommand.scala  |    4 +-
 .../ignite/visor/commands/start/Packet.scala    |    8 +-
 .../commands/start/VisorStartCommand.scala      |   20 +-
 .../ignite/visor/commands/tasks/Packet.scala    |    6 +-
 .../commands/tasks/VisorTasksCommand.scala      |   12 +-
 .../commands/top/VisorTopologyCommand.scala     |    4 +-
 .../visor/commands/vvm/VisorVvmCommand.scala    |    4 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   38 +-
 modules/visor-plugins/pom.xml                   |    4 +-
 .../cache/websession/GridWebSessionFilter.java  |    8 +-
 .../IgniteServletContextListenerStartup.java    |   20 +-
 .../startup/servlet/IgniteServletStartup.java   |   26 +-
 .../internal/websession/WebSessionSelfTest.java |    2 +-
 .../websession/WebSessionServerStart.java       |    2 +-
 modules/winservice/IgniteService.sln            |   22 +
 .../winservice/IgniteService/IgniteService.cs   |  170 ++
 .../IgniteService/IgniteService.csproj          |   90 +
 modules/winservice/README.md                    |    3 +
 .../config/benchmark-atomic-win.properties      |    2 +-
 .../config/benchmark-atomic.properties          |    2 +-
 .../config/benchmark-compute-win.properties     |    2 +-
 .../config/benchmark-compute.properties         |    2 +-
 .../config/benchmark-query-win.properties       |    2 +-
 .../yardstick/config/benchmark-query.properties |    4 +-
 .../config/benchmark-tx-win.properties          |    2 +-
 .../yardstick/config/benchmark-tx.properties    |    2 +-
 .../yardstick/config/benchmark-win.properties   |    2 +-
 modules/yardstick/config/benchmark.properties   |    2 +-
 .../org/apache/ignite/yardstick/IgniteNode.java |    4 +-
 .../cache/IgniteGetOffHeapBenchmark.java        |    2 +-
 .../cache/IgniteGetOffHeapValuesBenchmark.java  |    2 +-
 .../cache/IgnitePutGetOffHeapBenchmark.java     |    2 +-
 .../IgnitePutGetOffHeapValuesBenchmark.java     |    2 +-
 .../cache/IgnitePutGetTxOffHeapBenchmark.java   |    2 +-
 .../IgnitePutGetTxOffHeapValuesBenchmark.java   |    2 +-
 .../cache/IgnitePutOffHeapBenchmark.java        |    2 +-
 .../cache/IgnitePutOffHeapValuesBenchmark.java  |    2 +-
 .../cache/IgnitePutTxOffHeapBenchmark.java      |    2 +-
 .../IgnitePutTxOffHeapValuesBenchmark.java      |    2 +-
 .../IgniteSqlQueryJoinOffHeapBenchmark.java     |    2 +-
 .../cache/IgniteSqlQueryOffHeapBenchmark.java   |    2 +-
 .../IgniteSqlQueryPutOffHeapBenchmark.java      |    2 +-
 .../jdbc/IgniteJdbcStoreAbstractBenchmark.java  |   10 +-
 .../yardstick/compute/IgniteRunBenchmark.java   |    5 +-
 .../yardstick/compute/model/NoopCallable.java   |    5 +-
 686 files changed, 13153 insertions(+), 12874 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/aop/src/test/java/org/apache/loadtests/gridify/GridifySingleSplitLoadTest.java
----------------------------------------------------------------------
diff --cc 
modules/aop/src/test/java/org/apache/loadtests/gridify/GridifySingleSplitLoadTest.java
index cc0dc63,176343e..68e4244
--- 
a/modules/aop/src/test/java/org/apache/loadtests/gridify/GridifySingleSplitLoadTest.java
+++ 
b/modules/aop/src/test/java/org/apache/loadtests/gridify/GridifySingleSplitLoadTest.java
@@@ -71,8 -71,10 +71,8 @@@ public class GridifySingleSplitLoadTes
          @SuppressWarnings("TypeMayBeWeakened")
          IgniteLog4jLogger log = (IgniteLog4jLogger)cfg.getGridLogger();
  
-         log.getLogger("org.gridgain.grid").setLevel(Level.INFO);
+         log.getLogger("org.apache.ignite").setLevel(Level.INFO);
  
 -        
((ThreadPoolExecutor)cfg.getExecutorService()).prestartAllCoreThreads();
 -
          return cfg;
      }
  

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcEmptyCacheSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java
----------------------------------------------------------------------

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------
diff --cc 
modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index 5be5da0,e7c9494..b6dd8c7
--- 
a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@@ -240,13 -265,13 +240,13 @@@ public class IgniteConfiguration 
      /** Lifecycle email notification. */
      private boolean lifeCycleEmailNtf = true;
  
 -    /** Executor service. */
 -    private ExecutorService p2pSvc;
 +    /** P2P pool size. */
 +    private int p2pPoolSz = DFLT_P2P_THREAD_CNT;
  
-     /** Gridgain installation folder. */
+     /** Ignite installation folder. */
      private String ggHome;
  
-     /** Gridgain work folder. */
+     /** Ignite work folder. */
      private String ggWork;
  
      /** MBean server. */
@@@ -1216,9 -1366,9 +1216,9 @@@
      }
  
      /**
-      * Sets GridGain installation folder.
+      * Sets Ignite installation folder.
       *
 -     * @param ggHome {@code Ignition} installation folder.
 +     * @param ggHome {@code GridGain} installation folder.
       * @see IgniteConfiguration#getIgniteHome()
       * @see org.apache.ignite.IgniteSystemProperties#IGNITE_HOME
       */
@@@ -2553,8 -2728,68 +2553,8 @@@
      }
  
      /**
-      * Sets system-wide local address or host for all GridGain components to 
bind to. If provided it will
-      * override all default local bind settings within GridGain or any of its 
SPIs.
 -     * Should return an instance of fully configured thread pool to be used 
for
 -     * processing of client messages (REST requests).
 -     * <p>
 -     * If not provided, new executor service will be created using the 
following
 -     * configuration:
 -     * <ul>
 -     *     <li>Core pool size - {@link #DFLT_REST_CORE_THREAD_CNT}</li>
 -     *     <li>Max pool size - {@link #DFLT_REST_MAX_THREAD_CNT}</li>
 -     *     <li>Queue capacity - {@link #DFLT_REST_THREADPOOL_QUEUE_CAP}</li>
 -     * </ul>
 -     *
 -     * @return Thread pool implementation to be used for processing of client
 -     *      messages.
 -     * @deprecated Use {@link 
ClientConnectionConfiguration#getRestExecutorService()}.
 -     */
 -    @Deprecated
 -    public ExecutorService getRestExecutorService() {
 -        return restExecSvc;
 -    }
 -
 -    /**
 -     * Sets thread pool to use for processing of client messages (REST 
requests).
 -     *
 -     * @param restExecSvc Thread pool to use for processing of client 
messages.
 -     * @see IgniteConfiguration#getRestExecutorService()
 -     * @deprecated Use {@link 
ClientConnectionConfiguration#setRestExecutorService(ExecutorService)}.
 -     */
 -    @Deprecated
 -    public void setRestExecutorService(ExecutorService restExecSvc) {
 -        this.restExecSvc = restExecSvc;
 -    }
 -
 -    /**
 -     * Sets REST executor service shutdown flag.
 -     *
 -     * @param restSvcShutdown REST executor service shutdown flag.
 -     * @see IgniteConfiguration#getRestExecutorService()
 -     * @deprecated Use {@link 
ClientConnectionConfiguration#setRestExecutorServiceShutdown(boolean)}.
 -     */
 -    @Deprecated
 -    public void setRestExecutorServiceShutdown(boolean restSvcShutdown) {
 -        this.restSvcShutdown = restSvcShutdown;
 -    }
 -
 -    /**
 -     * Shutdown flag for REST executor service.
 -     * <p>
 -     * If not provided, default value {@code true} will be used which will 
shutdown
 -     * executor service when Ignite stops regardless whether it was started 
before Ignite
 -     * or by Ignite.
 -     *
 -     * @return REST executor service shutdown flag.
 -     * @deprecated Use {@link 
ClientConnectionConfiguration#isRestExecutorServiceShutdown()}.
 -     */
 -    @Deprecated
 -    public boolean getRestExecutorServiceShutdown() {
 -        return restSvcShutdown;
 -    }
 -
 -    /**
+      * Sets system-wide local address or host for all Ignite components to 
bind to. If provided it will
+      * override all default local bind settings within Ignite or any of its 
SPIs.
       *
       * @param locHost Local IP address or host to bind to.
       */

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

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

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

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
----------------------------------------------------------------------
diff --cc 
modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
index da5f72c,f7bab30..ac32610
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
@@@ -58,9 -73,10 +58,8 @@@ public class VisorExecutorServiceConfig
  
          ClientConnectionConfiguration cc = 
c.getClientConnectionConfiguration();
  
--        if (cc != null) {
 -            
cfg.restExecutorService(compactClass(cc.getRestExecutorService()));
 -            
cfg.restExecutorServiceShutdown(cc.isRestExecutorServiceShutdown());
 -        }
++        if (cc != null)
 +            cfg.restExecutorService(cc.getRestExecutorService());
-         }
  
          return cfg;
      }
@@@ -108,17 -180,17 +107,17 @@@
      }
  
      /**
-      * @return REST requests pool size.
 -     * @return REST executor service shutdown flag.
++     * @param restPoolSz REST requests pool size.
       */
-     public int restExecutorService() {
-         return restPoolSz;
 -    public boolean restExecutorServiceShutdown() {
 -        return restSvcShutdown;
++    public void restExecutorService(int restPoolSz) {
++        this.restPoolSz = restPoolSz;
      }
  
      /**
-      * @param restExecSvc New REST requests pool size.
 -     * @param restSvcShutdown New REST executor service shutdown flag.
++     * @return REST requests pool size.
       */
-     public void restExecutorService(int restExecSvc) {
-         this.restPoolSz = restExecSvc;
 -    public void restExecutorServiceShutdown(boolean restSvcShutdown) {
 -        this.restSvcShutdown = restSvcShutdown;
++    public int restExecutorService() {
++        return restPoolSz;
      }
  
      /** {@inheritDoc} */

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

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java
----------------------------------------------------------------------
diff --cc 
modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java
index 0000000,1cb9aa6..2f176e1
mode 000000,100644..100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/util/GridStartupWithUndefinedIgniteHomeSelfTest.java
@@@ -1,0 -1,106 +1,105 @@@
+ /*
+  * 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.util;
+ 
+ import junit.framework.*;
+ import org.apache.ignite.*;
+ import org.apache.ignite.configuration.*;
+ import org.apache.ignite.internal.util.typedef.*;
+ import org.apache.ignite.internal.util.typedef.internal.*;
+ import org.apache.ignite.logger.java.*;
+ 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 static org.apache.ignite.IgniteSystemProperties.*;
+ import static org.apache.ignite.internal.util.IgniteUtils.*;
+ 
+ /**
+  * Checks that node can be started without operations with undefined 
IGNITE_HOME.
+  * <p>
+  * Notes:
+  * 1. The test intentionally extends JUnit {@link TestCase} class to make the 
test
+  * independent from {@link GridCommonAbstractTest} stuff.
+  * 2. Do not replace native Java asserts with JUnit ones - test won't fall on 
TeamCity.
+  */
+ public class GridStartupWithUndefinedIgniteHomeSelfTest extends TestCase {
+     /** */
+     private static final TcpDiscoveryIpFinder IP_FINDER = new 
TcpDiscoveryVmIpFinder(true);
+ 
+     /** */
+     private static final int GRID_COUNT = 2;
+ 
+     /** {@inheritDoc} */
+     @Override protected void tearDown() throws Exception {
+         // Next grid in the same VM shouldn't use cached values produced by 
these tests.
+         nullifyHomeDirectory();
+ 
+         U.getIgniteHome();
+     }
+ 
+     /**
+      * @throws Exception If failed.
+      */
+     public void testStartStopWithUndefinedIgniteHome() throws Exception {
+         IgniteUtils.nullifyHomeDirectory();
+ 
+         // We can't use U.getIgniteHome() here because
+         // it will initialize cached value which is forbidden to override.
+         String ggHome = IgniteSystemProperties.getString(IGNITE_HOME);
+ 
+         assert ggHome != null;
+ 
+         U.setIgniteHome(null);
+ 
+         String ggHome0 = U.getIgniteHome();
+ 
+         assert ggHome0 == null;
+ 
+         IgniteLogger log = new IgniteJavaLogger();
+ 
+         log.info(">>> Test started: " + getName());
+         log.info("Grid start-stop test count: " + GRID_COUNT);
+ 
+         for (int i = 0; i < GRID_COUNT; i++) {
+             TcpDiscoverySpi disc = new TcpDiscoverySpi();
+ 
+             disc.setIpFinder(IP_FINDER);
+ 
+             IgniteConfiguration cfg = new IgniteConfiguration();
+ 
+             // We have to explicitly configure path to license config because 
of undefined IGNITE_HOME.
+             cfg.setLicenseUrl("file:///" + ggHome + "/" + 
Ignition.DFLT_LIC_FILE_NAME);
+ 
+             // Default console logger is used
+             cfg.setGridLogger(log);
+             cfg.setDiscoverySpi(disc);
 -            cfg.setRestEnabled(false);
+ 
+             try (Ignite g = G.start(cfg)) {
+                 assert g != null;
+ 
+                 ggHome0 = U.getIgniteHome();
+ 
+                 assert ggHome0 == null;
+ 
+                 X.println("Stopping grid " + g.cluster().localNode().id());
+             }
+         }
+     }
+ }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/core/src/test/java/org/apache/ignite/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/core/src/test/java/org/apache/ignite/spi/GridTcpSpiForwardingSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d803519d/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
----------------------------------------------------------------------
diff --cc 
modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
index 0000000,93962bd..158604f
mode 000000,100644..100644
--- 
a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java
@@@ -1,0 -1,990 +1,988 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ 
+ package org.apache.ignite.spi.discovery.tcp;
+ 
+ import org.apache.ignite.*;
+ import org.apache.ignite.configuration.*;
+ import org.apache.ignite.events.*;
+ import org.apache.ignite.internal.*;
+ import org.apache.ignite.internal.processors.port.*;
+ import org.apache.ignite.internal.util.typedef.*;
+ import org.apache.ignite.internal.util.typedef.internal.*;
+ import org.apache.ignite.lang.*;
+ import org.apache.ignite.spi.*;
+ import org.apache.ignite.spi.discovery.*;
+ import org.apache.ignite.spi.discovery.tcp.internal.*;
+ import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.*;
+ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+ import org.apache.ignite.spi.discovery.tcp.messages.*;
+ import org.apache.ignite.testframework.*;
+ import org.apache.ignite.testframework.junits.common.*;
+ import org.jetbrains.annotations.*;
+ 
+ import java.io.*;
+ import java.net.*;
+ import java.util.*;
+ import java.util.concurrent.*;
+ import java.util.concurrent.atomic.*;
+ 
+ import static java.util.concurrent.TimeUnit.*;
+ import static org.apache.ignite.events.IgniteEventType.*;
+ import static org.apache.ignite.spi.IgnitePortProtocol.*;
+ 
+ /**
+  * Test for {@link TcpDiscoverySpi}.
+  */
+ public class TcpDiscoverySelfTest extends GridCommonAbstractTest {
+     /** */
+     private TcpDiscoveryVmIpFinder ipFinder = new 
TcpDiscoveryVmIpFinder(true);
+ 
+     /** */
+     private Map<String, TcpDiscoverySpi> discoMap = new HashMap<>();
+ 
+     /** */
+     private UUID nodeId;
+ 
+     /**
+      * @throws Exception If fails.
+      */
+     public TcpDiscoverySelfTest() throws Exception {
+         super(false);
+     }
+ 
+     /** {@inheritDoc} */
+     @SuppressWarnings({"IfMayBeConditional", "deprecation"})
+     @Override protected IgniteConfiguration getConfiguration(String gridName) 
throws Exception {
+         IgniteConfiguration cfg = super.getConfiguration(gridName);
+ 
+         TcpDiscoverySpi spi;
+ 
+         if (gridName.contains("FailBeforeNodeAddedSentSpi"))
+             spi = new FailBeforeNodeAddedSentSpi();
+         else if (gridName.contains("FailBeforeNodeLeftSentSpi"))
+             spi = new FailBeforeNodeLeftSentSpi();
+         else
+             spi = new TcpDiscoverySpi();
+ 
+         discoMap.put(gridName, spi);
+ 
+         spi.setIpFinder(ipFinder);
+ 
+         spi.setNetworkTimeout(2500);
+ 
+         spi.setHeartbeatFrequency(1000);
+ 
+         spi.setMaxMissedHeartbeats(3);
+ 
+         spi.setIpFinderCleanFrequency(5000);
+ 
+         spi.setJoinTimeout(5000);
+ 
+         cfg.setDiscoverySpi(spi);
+ 
+         cfg.setCacheConfiguration();
+ 
+         cfg.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, 
EVT_JOB_MAPPED);
+ 
+         cfg.setIncludeProperties();
+ 
+         if (!gridName.contains("LoopbackProblemTest"))
+             cfg.setLocalHost("127.0.0.1");
+ 
+         if (gridName.contains("testFailureDetectionOnNodePing")) {
+             spi.setReconnectCount(1); // To make test faster: on Windows 1 
connect takes 1 second.
+             spi.setHeartbeatFrequency(40000);
+         }
+ 
 -        cfg.setRestEnabled(false);
 -
+         if (nodeId != null)
+             cfg.setNodeId(nodeId);
+ 
+         if (gridName.contains("NonSharedIpFinder")) {
+             TcpDiscoveryVmIpFinder finder = new TcpDiscoveryVmIpFinder();
+ 
+             finder.setAddresses(Arrays.asList("127.0.0.1:47501"));
+ 
+             spi.setIpFinder(finder);
+         }
+         else if (gridName.contains("MulticastIpFinder")) {
+             TcpDiscoveryMulticastIpFinder finder = new 
TcpDiscoveryMulticastIpFinder();
+ 
+             finder.setAddressRequestAttempts(10);
+             
finder.setMulticastGroup(GridTestUtils.getNextMulticastGroup(getClass()));
+             
finder.setMulticastPort(GridTestUtils.getNextMulticastPort(getClass()));
+ 
+             spi.setIpFinder(finder);
+ 
+             // Loopback multicast discovery is not working on Mac OS
+             // (possibly due to 
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7122846).
+             if (U.isMacOs())
+                 spi.setLocalAddress(F.first(U.allLocalIps()));
+         }
+ 
+         return cfg;
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testSingleNodeStartStop() throws Exception {
+         try {
+             startGrid(1);
+         }
+         finally {
+             stopGrid(1);
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testThreeNodesStartStop() throws Exception {
+         try {
+             startGrid(1);
+             startGrid(2);
+             startGrid(3);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any errors occur.
+      */
+     public void testNodeConnectMessageSize() throws Exception {
+         try {
+             Ignite g1 = startGrid(1);
+ 
+             final AtomicInteger gridNameIdx = new AtomicInteger(1);
+ 
+             GridTestUtils.runMultiThreaded(new Callable<Object>() {
+                 @Nullable @Override public Object call() throws Exception {
+                     startGrid(gridNameIdx.incrementAndGet());
+ 
+                     return null;
+                 }
+             }, 4, "grid-starter");
+ 
+             Collection<TcpDiscoveryNode> nodes = 
discoMap.get(g1.name()).ring().allNodes();
+ 
+             ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ 
+             g1.configuration().getMarshaller().marshal(nodes, bos);
+ 
+             info(">>> Approximate node connect message size [topSize=" + 
nodes.size() +
+                 ", msgSize=" + bos.size() / 1024.0 + "KB]");
+         }
+         finally {
+             stopAllGrids(false);
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testPing() throws Exception {
+         try {
+             startGrid(1);
+             startGrid(2);
+             startGrid(3);
+ 
+             info("Nodes were started");
+ 
+             for (Map.Entry<String, TcpDiscoverySpi> e : discoMap.entrySet()) {
+                 DiscoverySpi spi = e.getValue();
+ 
+                 for (Ignite g : G.allGrids()) {
+                     boolean res = spi.pingNode(g.cluster().localNode().id());
+ 
+                     assert res : e.getKey() + " failed to ping " + 
g.cluster().localNode().id() + " of " + g.name();
+ 
+                     info(e.getKey() + " pinged " + 
g.cluster().localNode().id() + " of " + g.name());
+                 }
+             }
+ 
+             info("All nodes pinged successfully.");
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testFailureDetectionOnNodePing1() throws Exception {
+         try {
+             Ignite g1 = 
startGrid("testFailureDetectionOnNodePingCoordinator");
+             startGrid("testFailureDetectionOnNodePing2");
+             Ignite g3 = startGrid("testFailureDetectionOnNodePing3");
+ 
+             testFailureDetectionOnNodePing(g1, g3);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testFailureDetectionOnNodePing2() throws Exception {
+         try {
+             startGrid("testFailureDetectionOnNodePingCoordinator");
+             Ignite g2 = startGrid("testFailureDetectionOnNodePing2");
+             Ignite g3 = startGrid("testFailureDetectionOnNodePing3");
+ 
+             testFailureDetectionOnNodePing(g3, g2);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testFailureDetectionOnNodePing3() throws Exception {
+         try {
+             Ignite g1 = 
startGrid("testFailureDetectionOnNodePingCoordinator");
+             Ignite g2 = startGrid("testFailureDetectionOnNodePing2");
+             startGrid("testFailureDetectionOnNodePing3");
+ 
+             testFailureDetectionOnNodePing(g2, g1);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     private void testFailureDetectionOnNodePing(Ignite pingingNode, Ignite 
failedNode) throws Exception {
+         final CountDownLatch cnt = new CountDownLatch(1);
+ 
+         pingingNode.events().localListen(
+             new IgnitePredicate<IgniteEvent>() {
+                 @Override public boolean apply(IgniteEvent evt) {
+                     cnt.countDown();
+ 
+                     return true;
+                 }
+             },
+             IgniteEventType.EVT_NODE_FAILED
+         );
+ 
+         info("Nodes were started");
+ 
+         discoMap.get(failedNode.name()).simulateNodeFailure();
+ 
+         TcpDiscoverySpi spi = discoMap.get(pingingNode.name());
+ 
+         boolean res = spi.pingNode(failedNode.cluster().localNode().id());
+ 
+         assertFalse("Ping is ok for node " + 
failedNode.cluster().localNode().id() + ", but had to fail.", res);
+ 
+         // Heartbeat interval is 40 seconds, but we should detect node 
failure faster.
+         assert cnt.await(7, SECONDS);
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testNodeAdded() throws Exception {
+         try {
+             final Ignite g1 = startGrid(1);
+ 
+             final CountDownLatch cnt = new CountDownLatch(2);
+ 
+             g1.events().localListen(
+                 new IgnitePredicate<IgniteEvent>() {
+                     @Override public boolean apply(IgniteEvent evt) {
+                         info("Node joined: " + evt.message());
+ 
+                         IgniteDiscoveryEvent discoEvt = 
(IgniteDiscoveryEvent)evt;
+ 
+                         TcpDiscoveryNode node = 
((TcpDiscoveryNode)discoMap.get(g1.name()).
+                             getNode(discoEvt.eventNode().id()));
+ 
+                         assert node != null && node.visible();
+ 
+                         cnt.countDown();
+ 
+                         return true;
+                     }
+                 },
+                 IgniteEventType.EVT_NODE_JOINED
+             );
+ 
+             startGrid(2);
+             startGrid(3);
+ 
+             info("Nodes were started");
+ 
+             assert cnt.await(1, SECONDS);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testOrdinaryNodeLeave() throws Exception {
+         try {
+             Ignite g1 = startGrid(1);
+             startGrid(2);
+             startGrid(3);
+ 
+             final CountDownLatch cnt = new CountDownLatch(2);
+ 
+             g1.events().localListen(
+                 new IgnitePredicate<IgniteEvent>() {
+                     @Override public boolean apply(IgniteEvent evt) {
+                         cnt.countDown();
+ 
+                         return true;
+                     }
+                 },
+                 EVT_NODE_LEFT
+             );
+ 
+             info("Nodes were started");
+ 
+             stopGrid(3);
+             stopGrid(2);
+ 
+             boolean res = cnt.await(1, SECONDS);
+ 
+             assert res;
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testCoordinatorNodeLeave() throws Exception {
+         try {
+             startGrid(1);
+             Ignite g2 = startGrid(2);
+ 
+             final CountDownLatch cnt = new CountDownLatch(1);
+ 
+             g2.events().localListen(new IgnitePredicate<IgniteEvent>() {
+                 @Override public boolean apply(IgniteEvent evt) {
+                     cnt.countDown();
+ 
+                     return true;
+                 }
+             }, EVT_NODE_LEFT);
+ 
+             info("Nodes were started");
+ 
+             stopGrid(1);
+ 
+             assert cnt.await(1, SECONDS);
+ 
+             // Start new grid, ensure that added to topology
+             final CountDownLatch cnt2 = new CountDownLatch(1);
+ 
+             g2.events().localListen(new IgnitePredicate<IgniteEvent>() {
+                 @Override public boolean apply(IgniteEvent evt) {
+                     cnt2.countDown();
+ 
+                     return true;
+                 }
+             }, EVT_NODE_JOINED);
+ 
+             startGrid(3);
+ 
+             assert cnt2.await(1, SECONDS);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testOrdinaryNodeFailure() throws Exception {
+         try {
+             Ignite g1 = startGrid(1);
+             Ignite g2 = startGrid(2);
+             Ignite g3 = startGrid(3);
+ 
+             final CountDownLatch cnt = new CountDownLatch(2);
+ 
+             g1.events().localListen(
+                 new IgnitePredicate<IgniteEvent>() {
+                     @Override public boolean apply(IgniteEvent evt) {
+                         cnt.countDown();
+ 
+                         return true;
+                     }
+                 },
+                 IgniteEventType.EVT_NODE_FAILED
+             );
+ 
+             info("Nodes were started");
+ 
+             discoMap.get(g2.name()).simulateNodeFailure();
+             discoMap.get(g3.name()).simulateNodeFailure();
+ 
+             assert cnt.await(25, SECONDS);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testCoordinatorNodeFailure() throws Exception {
+         try {
+             Ignite g1 = startGrid(1);
+             Ignite g2 = startGrid(2);
+ 
+             final CountDownLatch cnt = new CountDownLatch(1);
+ 
+             g2.events().localListen(new IgnitePredicate<IgniteEvent>() {
+                 @Override public boolean apply(IgniteEvent evt) {
+                     cnt.countDown();
+ 
+                     return true;
+                 }
+             }, IgniteEventType.EVT_NODE_FAILED);
+ 
+             info("Nodes were started");
+ 
+             discoMap.get(g1.name()).simulateNodeFailure();
+ 
+             assert cnt.await(20, SECONDS);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testMetricsSending() throws Exception {
+         final AtomicBoolean stopping = new AtomicBoolean();
+ 
+         try {
+             final CountDownLatch latch1 = new CountDownLatch(1);
+ 
+             final Ignite g1 = startGrid(1);
+ 
+             IgnitePredicate<IgniteEvent> lsnr1 = new 
IgnitePredicate<IgniteEvent>() {
+                 @Override public boolean apply(IgniteEvent evt) {
+                     info(evt.message());
+ 
+                     latch1.countDown();
+ 
+                     return true;
+                 }
+             };
+ 
+             g1.events().localListen(lsnr1, EVT_NODE_METRICS_UPDATED);
+ 
+             assert latch1.await(10, SECONDS);
+ 
+             g1.events().stopLocalListen(lsnr1);
+ 
+             final CountDownLatch latch1_1 = new CountDownLatch(1);
+             final CountDownLatch latch1_2 = new CountDownLatch(1);
+             final CountDownLatch latch2_1 = new CountDownLatch(1);
+             final CountDownLatch latch2_2 = new CountDownLatch(1);
+ 
+             final Ignite g2 = startGrid(2);
+ 
+             g2.events().localListen(
+                 new IgnitePredicate<IgniteEvent>() {
+                     @Override public boolean apply(IgniteEvent evt) {
+                         if (stopping.get())
+                             return true;
+ 
+                         info(evt.message());
+ 
+                         UUID id = ((IgniteDiscoveryEvent) 
evt).eventNode().id();
+ 
+                         if (id.equals(g1.cluster().localNode().id()))
+                             latch2_1.countDown();
+                         else if (id.equals(g2.cluster().localNode().id()))
+                             latch2_2.countDown();
+                         else
+                             assert false : "Event fired for unknown node.";
+ 
+                         return true;
+                     }
+                 },
+                 EVT_NODE_METRICS_UPDATED
+             );
+ 
+             g1.events().localListen(new IgnitePredicate<IgniteEvent>() {
+                 @Override public boolean apply(IgniteEvent evt) {
+                     if (stopping.get())
+                         return true;
+ 
+                     info(evt.message());
+ 
+                     UUID id = ((IgniteDiscoveryEvent) evt).eventNode().id();
+ 
+                     if (id.equals(g1.cluster().localNode().id()))
+                         latch1_1.countDown();
+                     else if (id.equals(g2.cluster().localNode().id()))
+                         latch1_2.countDown();
+                     else
+                         assert false : "Event fired for unknown node.";
+ 
+                     return true;
+                 }
+             }, EVT_NODE_METRICS_UPDATED);
+ 
+             assert latch1_1.await(10, SECONDS);
+             assert latch1_2.await(10, SECONDS);
+             assert latch2_1.await(10, SECONDS);
+             assert latch2_2.await(10, SECONDS);
+         }
+         finally {
+             stopping.set(true);
+ 
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testFailBeforeNodeAddedSent() throws Exception {
+         try {
+             Ignite g1 = startGrid(1);
+ 
+             final CountDownLatch joinCnt = new CountDownLatch(2);
+             final CountDownLatch failCnt = new CountDownLatch(1);
+ 
+             g1.events().localListen(new IgnitePredicate<IgniteEvent>() {
+                 @Override public boolean apply(IgniteEvent evt) {
+                     if (evt.type() == EVT_NODE_JOINED)
+                         joinCnt.countDown();
+                     else if (evt.type() == EVT_NODE_FAILED)
+                         failCnt.countDown();
+                     else
+                         assert false : "Unexpected event type: " + evt;
+ 
+                     return true;
+                 }
+             }, EVT_NODE_JOINED, EVT_NODE_FAILED);
+ 
+             startGrid("FailBeforeNodeAddedSentSpi");
+ 
+             startGrid(3);
+ 
+             assert joinCnt.await(10, SECONDS);
+             assert failCnt.await(10, SECONDS);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testFailBeforeNodeLeftSent() throws Exception {
+         try {
+             startGrid(1);
+             startGrid(2);
+ 
+             startGrid("FailBeforeNodeLeftSentSpi");
+ 
+             Ignite g3 = startGrid(3);
+ 
+             final CountDownLatch cnt = new CountDownLatch(1);
+ 
+             g3.events().localListen(new IgnitePredicate<IgniteEvent>() {
+                 @Override public boolean apply(IgniteEvent evt) {
+                     cnt.countDown();
+ 
+                     return true;
+                 }
+             }, EVT_NODE_FAILED);
+ 
+             stopGrid(1);
+ 
+             assert cnt.await(20, SECONDS);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testIpFinderCleaning() throws Exception {
+         try {
+             ipFinder.registerAddresses(Arrays.asList(new 
InetSocketAddress("host1", 1024),
+                 new InetSocketAddress("host2", 1024)));
+ 
+             Ignite g1 = startGrid(1);
+ 
+             long timeout = 
(long)(discoMap.get(g1.name()).getIpFinderCleanFrequency() * 1.5);
+ 
+             Thread.sleep(timeout);
+ 
+             assert ipFinder.getRegisteredAddresses().size() == 1 : 
"ipFinder=" + ipFinder.getRegisteredAddresses();
+ 
+             // Check that missing addresses are returned back.
+             ipFinder.unregisterAddresses(ipFinder.getRegisteredAddresses()); 
// Unregister valid address.
+ 
+             ipFinder.registerAddresses(Arrays.asList(new 
InetSocketAddress("host1", 1024),
+                 new InetSocketAddress("host2", 1024)));
+ 
+             Thread.sleep(timeout);
+ 
+             assert ipFinder.getRegisteredAddresses().size() == 1 : 
"ipFinder=" + ipFinder.getRegisteredAddresses();
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testNonSharedIpFinder() throws Exception {
+         try {
+             GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+                 @Override public Object call() throws Exception {
+                     Thread.sleep(4000);
+ 
+                     return startGrid("NonSharedIpFinder-2");
+                 }
+             }, 1, "grid-starter");
+ 
+             // This node should wait until any node "from ipFinder" appears, 
see log messages.
+             Ignite g = startGrid("NonSharedIpFinder-1");
+ 
+             assert g.cluster().localNode().order() == 2;
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testMulticastIpFinder() throws Exception {
+         try {
+             for (int i = 0; i < 5; i++) {
+                 Ignite g = startGrid("MulticastIpFinder-" + i);
+ 
+                 assertEquals(i + 1, g.cluster().nodes().size());
+ 
+                 TcpDiscoverySpi spi = 
(TcpDiscoverySpi)g.configuration().getDiscoverySpi();
+ 
+                 TcpDiscoveryMulticastIpFinder ipFinder = 
(TcpDiscoveryMulticastIpFinder)spi.getIpFinder();
+ 
+                 boolean found = false;
+ 
+                 for (GridPortRecord rec : ((IgniteKernal) 
g).context().ports().records()) {
+                     if ((rec.protocol() == UDP) && rec.port() == 
ipFinder.getMulticastPort()) {
+                         found = true;
+ 
+                         break;
+                     }
+                 }
+ 
+                 assertTrue("GridTcpDiscoveryMulticastIpFinder should register 
port." , found);
+             }
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testInvalidAddressIpFinder() throws Exception {
+         ipFinder.setShared(false);
+ 
+         ipFinder.setAddresses(Collections.singletonList("some-host"));
+ 
+         try {
+             GridTestUtils.assertThrows(
+                 log,
+                 new Callable<Object>() {
+                     @Nullable @Override public Object call() throws Exception 
{
+                         startGrid(1);
+ 
+                         return null;
+                     }
+                 },
+                 IgniteCheckedException.class,
+                 null);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testJoinTimeout() throws Exception {
+         try {
+             // This start will fail as expected.
+             Throwable t = GridTestUtils.assertThrows(log, new 
Callable<Object>() {
+                 @Override public Object call() throws Exception {
+                     startGrid("NonSharedIpFinder-1");
+ 
+                     return null;
+                 }
+             }, IgniteCheckedException.class, null);
+ 
+             assert X.hasCause(t, IgniteSpiException.class) : "Unexpected 
exception: " + t;
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If failed.
+      */
+     public void testDirtyIpFinder() throws Exception {
+         try {
+             // Dirty IP finder
+             for (int i = 47500; i < 47520; i++)
+                 ipFinder.registerAddresses(Arrays.asList(new 
InetSocketAddress("127.0.0.1", i),
+                     new InetSocketAddress("unknown-host", i)));
+ 
+             assert ipFinder.isShared();
+ 
+             startGrid(1);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testDuplicateId() throws Exception {
+         try {
+             // Random ID.
+             startGrid(1);
+ 
+             nodeId = UUID.randomUUID();
+ 
+             startGrid(2);
+ 
+             // Duplicate ID.
+             GridTestUtils.assertThrows(
+                 log,
+                 new Callable<Object>() {
+                     @Nullable @Override public Object call() throws Exception 
{
+                         // Exception will be thrown and output to log.
+                         startGrid(3);
+ 
+                         return null;
+                     }
+                 },
+                 IgniteCheckedException.class,
+                 null);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testLoopbackProblemFirstNodeOnLoopback() throws Exception {
+         // On Windows and Mac machines two nodes can reside on the same port
+         // (if one node has localHost="127.0.0.1" and another has 
localHost="0.0.0.0").
+         // So two nodes do not even discover each other.
+         if (U.isWindows() || U.isMacOs())
+             return;
+ 
+         try {
+             startGridNoOptimize(1);
+ 
+             GridTestUtils.assertThrows(
+                 log,
+                 new Callable<Object>() {
+                     @Nullable @Override public Object call() throws Exception 
{
+                         // Exception will be thrown because we start node 
which does not use loopback address,
+                         // but the first node does.
+                         startGridNoOptimize("LoopbackProblemTest");
+ 
+                         return null;
+                     }
+                 },
+                 IgniteException.class,
+                 null);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testLoopbackProblemSecondNodeOnLoopback() throws Exception {
+         if (U.isWindows() || U.isMacOs())
+             return;
+ 
+         try {
+             startGridNoOptimize("LoopbackProblemTest");
+ 
+             GridTestUtils.assertThrows(
+                 log,
+                 new Callable<Object>() {
+                     @Nullable @Override public Object call() throws Exception 
{
+                         // Exception will be thrown because we start node 
which uses loopback address,
+                         // but the first node does not.
+                         startGridNoOptimize(1);
+ 
+                         return null;
+                     }
+                 },
+                 IgniteException.class,
+                 null);
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * @throws Exception If any error occurs.
+      */
+     public void testGridStartTime() throws Exception {
+         try {
+             startGridsMultiThreaded(5);
+ 
+             Long startTime = null;
+ 
+             IgniteKernal firstGrid = null;
+ 
+             Collection<IgniteKernal> grids = new ArrayList<>();
+ 
+             for (int i = 0; i < 5 ; i++) {
+                 IgniteKernal grid = (IgniteKernal)grid(i);
+ 
+                 assertTrue(grid.context().discovery().gridStartTime() > 0);
+ 
+                 if (i > 0)
+                     assertEquals(startTime, 
(Long)grid.context().discovery().gridStartTime());
+                 else
+                     startTime = grid.context().discovery().gridStartTime();
+ 
+                 if (grid.localNode().order() == 1)
+                     firstGrid = grid;
+                 else
+                     grids.add(grid);
+             }
+ 
+             assertNotNull(firstGrid);
+ 
+             stopGrid(firstGrid.name());
+ 
+             for (IgniteKernal grid : grids)
+                 assertEquals(startTime, 
(Long)grid.context().discovery().gridStartTime());
+ 
+             grids.add((IgniteKernal) startGrid(5));
+ 
+             for (IgniteKernal grid : grids)
+                 assertEquals(startTime, 
(Long)grid.context().discovery().gridStartTime());
+         }
+         finally {
+             stopAllGrids();
+         }
+     }
+ 
+     /**
+      * Starts new grid with given index. Method optimize is not invoked.
+      *
+      * @param idx Index of the grid to start.
+      * @return Started grid.
+      * @throws Exception If anything failed.
+      */
+     private Ignite startGridNoOptimize(int idx) throws Exception {
+         return startGridNoOptimize(getTestGridName(idx));
+     }
+ 
+     /**
+      * Starts new grid with given name. Method optimize is not invoked.
+      *
+      * @param gridName Grid name.
+      * @return Started grid.
+      * @throws Exception If failed.
+      */
+     private Ignite startGridNoOptimize(String gridName) throws Exception {
+         return G.start(getConfiguration(gridName));
+     }
+ 
+     /**
+      *
+      */
+     private static class FailBeforeNodeAddedSentSpi extends TcpDiscoverySpi {
+         /** */
+         private int i;
+ 
+         /** {@inheritDoc} */
+         @Override void onBeforeMessageSentAcrossRing(Serializable msg) {
+             if (msg instanceof TcpDiscoveryNodeAddedMessage)
+                 if (++i == 2) {
+                     simulateNodeFailure();
+ 
+                     throw new RuntimeException("Avoid message sending: " + 
msg.getClass());
+                 }
+         }
+     }
+ 
+     /**
+      *
+      */
+     private static class FailBeforeNodeLeftSentSpi extends TcpDiscoverySpi {
+         /** {@inheritDoc} */
+         @Override void onBeforeMessageSentAcrossRing(Serializable msg) {
+             if (msg instanceof TcpDiscoveryNodeLeftMessage) {
+                 simulateNodeFailure();
+ 
+                 throw new RuntimeException("Avoid message sending: " + 
msg.getClass());
+             }
+         }
+     }
+ }

Reply via email to