Merge branch 'ignite-164v2stable' into sprint-1
Conflicts:
modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteNodeStartUtils.java
modules/core/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteRemoteStartSpecification.java
modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/IgniteNodeCallableImpl.java
modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.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/22c8fea5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/22c8fea5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/22c8fea5
Branch: refs/heads/ignite-111
Commit: 22c8fea52a795353772d34f0dbcb03d6bdb12e9e
Parents: e4365c3 9ef202a
Author: Artem Shutak <[email protected]>
Authored: Fri Feb 6 15:19:41 2015 +0300
Committer: Artem Shutak <[email protected]>
Committed: Fri Feb 6 15:19:41 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/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 +-
.../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 | 14 +-
.../java/org/apache/ignite/IgniteCompute.java | 16 +-
.../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 | 8 +-
.../configuration/IgniteAddressResolver.java | 2 +-
.../configuration/IgniteConfiguration.java | 110 +-
.../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/IgniteEventsImpl.java | 2 +-
.../org/apache/ignite/internal/IgniteEx.java | 2 +-
.../apache/ignite/internal/IgniteKernal.java | 50 +-
.../ignite/internal/IgniteNodeAttributes.java | 141 ++
.../org/apache/ignite/internal/IgnitionEx.java | 40 +-
.../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 | 84 +-
.../ignite/internal/util/lang/GridFunc.java | 2 +-
.../internal/util/lang/GridPeerDeployAware.java | 2 +-
.../util/lang/GridPeerDeployAwareAdapter.java | 2 +-
.../nio/GridConnectionBytesVerifyFilter.java | 2 +-
.../util/portscanner/GridJmxPortFinder.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 +-
.../visor/node/VisorBasicConfiguration.java | 2 +-
.../node/VisorExecutorServiceConfiguration.java | 18 +-
.../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 +-
.../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 | 6 +-
.../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 +-
.../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 +-
.../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 +-
.../ignite/internal/GridHomePathSelfTest.java | 4 +-
.../GridNodeVisorAttributesSelfTest.java | 4 +-
.../internal/GridReleaseTypeSelfTest.java | 4 +-
.../apache/ignite/internal/GridStartupMain.java | 8 +-
.../apache/ignite/internal/GridStartupTest.java | 8 +-
.../GridTaskCancelSingleNodeSelfTest.java | 2 -
.../GridTopologyBuildVersionSelfTest.java | 8 +-
.../internal/GridUpdateNotifierSelfTest.java | 2 +-
.../communication/GridIoManagerSelfTest.java | 4 +-
.../GridCacheConcurrentTxMultiNodeTest.java | 2 +-
.../cache/GridCacheP2PUndeploySelfTest.java | 2 +-
.../GridCacheQueryInternalKeysSelfTest.java | 2 +-
.../GridCacheMultiNodeDataStructureTest.java | 2 +-
.../GridCacheQueueCleanupSelfTest.java | 2 +-
.../dht/GridCacheAtomicNearCacheSelfTest.java | 2 +-
.../dht/GridCacheDhtPreloadDelayedSelfTest.java | 3 -
.../GridCacheDhtPreloadMessageCountTest.java | 4 -
.../dht/GridCacheDhtPreloadPutGetSelfTest.java | 4 -
...unctionExcludeNeighborsAbstractSelfTest.java | 4 +-
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 2 +-
.../GridCacheDistributedEvictionsSelfTest.java | 2 -
.../continuous/GridEventConsumeSelfTest.java | 4 +-
.../apache/ignite/internal/updatestatus.html | 4 +-
...artupWithSpecifiedWorkDirectorySelfTest.java | 8 +-
...tartupWithUndefinedGridGainHomeSelfTest.java | 106 -
...dStartupWithUndefinedIgniteHomeSelfTest.java | 106 +
.../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/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 +
.../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 +
.../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 | 990 ---------
.../GridTcpDiscoverySnapshotHistoryTest.java | 174 --
.../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 | 990 +++++++++
.../tcp/TcpDiscoverySnapshotHistoryTest.java | 174 ++
.../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 +-
.../ignite/testframework/junits/IgniteMock.java | 2 +-
.../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 +-
.../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 | 2 +-
.../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/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 +-
.../resource/GridResourceProcessorSelfTest.java | 2 +-
.../p2p/GridP2PUserVersionChangeSelfTest.java | 12 +-
.../testsuites/IgniteResourceSelfTestSuite.java | 2 +-
.../internal/IgniteNodeStartUtilsSelfTest.java | 2 +-
...gniteProjectionStartStopRestartSelfTest.java | 58 +-
.../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 | 16 +-
.../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 +-
.../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 +-
630 files changed, 10549 insertions(+), 10617 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22c8fea5/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
index 0350487,45ada5f..800693d
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
@@@ -232,10 -232,10 +232,10 @@@ public interface IgniteCluster extends
* </td>
* </tr>
* <tr>
- * <td><b>ggHome</b></td>
+ * <td><b>igniteHome</b></td>
* <td>String</td>
* <td>
- * Path to GridGain installation folder. If not defined,
IGNITE_HOME
+ * Path to Ignite installation folder. If not defined,
IGNITE_HOME
* environment variable must be set on remote hosts.
* </td>
* </tr>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22c8fea5/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22c8fea5/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22c8fea5/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22c8fea5/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/IgniteOptimizedObjectInputStream.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22c8fea5/modules/scalar/src/main/scala/org/apache/ignite/scalar/ScalarConversions.scala
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22c8fea5/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteNodeStartUtilsSelfTest.java
----------------------------------------------------------------------
diff --cc
modules/ssh/src/test/java/org/apache/ignite/internal/IgniteNodeStartUtilsSelfTest.java
index 46a64c5,0000000..c21f0b1
mode 100644,000000..100644
---
a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteNodeStartUtilsSelfTest.java
+++
b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteNodeStartUtilsSelfTest.java
@@@ -1,88 -1,0 +1,88 @@@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal;
+
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.io.*;
+import java.util.*;
+
+import static
org.apache.ignite.internal.util.nodestart.IgniteNodeStartUtils.*;
+
+/**
+ * Tests for {@link
org.apache.ignite.internal.util.nodestart.IgniteNodeStartUtils}.
+ */
+public class IgniteNodeStartUtilsSelfTest extends GridCommonAbstractTest {
+ /**
+ * @throws Exception If failed.
+ */
+ public void testParseFile() throws Exception {
- File file =
U.resolveGridGainPath("modules/core/src/test/config/start-nodes.ini");
++ File file =
U.resolveIgnitePath("modules/core/src/test/config/start-nodes.ini");
+
+ IgniteBiTuple<Collection<Map<String, Object>>, Map<String, Object>> t
= parseFile(file);
+
+ assert t != null;
+
+ Collection<Map<String, Object>> hosts = t.get1();
+
+ assert hosts != null;
+ assert hosts.size() == 2;
+
+ for (Map<String, Object> host : hosts) {
+ assert host != null;
+
+ assert "192.168.1.1".equals(host.get(HOST)) ||
"192.168.1.2".equals(host.get(HOST));
+
+ if ("192.168.1.1".equals(host.get(HOST))) {
+ assert (Integer)host.get(PORT) == 1;
+ assert "uname1".equals(host.get(UNAME));
+ assert "passwd1".equals(host.get(PASSWD));
+ assert new File("key1").equals(host.get(KEY));
+ assert (Integer)host.get(NODES) == 1;
+ assert "ggHome1".equals(host.get(IGNITE_HOME));
+ assert "cfg1".equals(host.get(CFG));
+ assert "script1".equals(host.get(SCRIPT));
+ }
+ else if ("192.168.1.2".equals(host.get(HOST))) {
+ assert (Integer)host.get(PORT) == 2;
+ assert "uname2".equals(host.get(UNAME));
+ assert "passwd2".equals(host.get(PASSWD));
+ assert new File("key2").equals(host.get(KEY));
+ assert (Integer)host.get(NODES) == 2;
+ assert "ggHome2".equals(host.get(IGNITE_HOME));
+ assert "cfg2".equals(host.get(CFG));
+ assert "script2".equals(host.get(SCRIPT));
+ }
+ }
+
+ Map<String, Object> dflts = t.get2();
+
+ assert dflts != null;
+
+ assert (Integer)dflts.get(PORT) == 3;
+ assert "uname3".equals(dflts.get(UNAME));
+ assert "passwd3".equals(dflts.get(PASSWD));
+ assert new File("key3").equals(dflts.get(KEY));
+ assert (Integer)dflts.get(NODES) == 3;
+ assert "ggHome3".equals(dflts.get(IGNITE_HOME));
+ assert "cfg3".equals(dflts.get(CFG));
+ assert "script3".equals(dflts.get(SCRIPT));
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22c8fea5/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
----------------------------------------------------------------------
diff --cc
modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
index 0e9ee8a,0000000..45642b4
mode 100644,000000..100644
---
a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
+++
b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java
@@@ -1,1032 -1,0 +1,1032 @@@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.events.*;
+import org.apache.ignite.internal.util.lang.*;
+import org.apache.ignite.internal.util.nodestart.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.testframework.junits.common.*;
+import org.jetbrains.annotations.*;
+
+import java.io.*;
+import java.nio.file.*;
+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.internal.util.nodestart.IgniteNodeStartUtils.*;
+
+/**
+ * Tests for {@code startNodes(..)}, {@code stopNodes(..)}
+ * and {@code restartNodes(..)} methods.
+ * <p>
+ * {@code tests.properties} file must specify username ({@code ssh.username}
property)
+ * and one (and only one) of password ({@code ssh.password} property) or
+ * private key path ({@code ssh.key} property).
+ */
+@SuppressWarnings("ConstantConditions")
+public class IgniteProjectionStartStopRestartSelfTest extends
GridCommonAbstractTest {
+ /** */
+ private static final String SSH_UNAME =
System.getenv("test.ssh.username");
+
+ /** */
+ private static final String SSH_PWD = System.getenv("test.ssh.password");
+
+ /** */
+ private static final String SSH_KEY = System.getenv("ssh.key");
+
+ /** */
+ private static final String CUSTOM_SCRIPT_WIN =
"modules/core/src/test/bin/start-nodes-custom.bat";
+
+ /** */
+ private static final String CUSTOM_SCRIPT_LINUX =
"modules/core/src/test/bin/start-nodes-custom.sh";
+
+ /** */
+ private static final String CFG_NO_ATTR =
"modules/core/src/test/config/spring-start-nodes.xml";
+
+ /** */
+ private static final String CFG_ATTR =
"modules/core/src/test/config/spring-start-nodes-attr.xml";
+
+ /** */
+ private static final String CUSTOM_CFG_ATTR_KEY = "grid.node.ssh.started";
+
+ /** */
+ private static final String CUSTOM_CFG_ATTR_VAL = "true";
+
+ /** */
+ private static final long WAIT_TIMEOUT = 40 * 1000;
+
+ /** */
+ private String pwd;
+
+ /** */
+ private File key;
+
+ /** */
+ private Ignite ignite;
+
+ /** */
+ private static final String HOST = "127.0.0.1";
+
+ /** */
+ private final AtomicInteger joinedCnt = new AtomicInteger();
+
+ /** */
+ private final AtomicInteger leftCnt = new AtomicInteger();
+
+ /** */
+ private volatile CountDownLatch joinedLatch;
+
+ /** */
+ private volatile CountDownLatch leftLatch;
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ if (SSH_KEY != null) {
+ key = new File(SSH_KEY);
+
+ assert key.exists() : "Private key doesn't exist: " +
key.getAbsolutePath();
+ assert key.isFile() : "Private key is not a file: " +
key.getAbsolutePath();
+ }
+ else
+ pwd = SSH_PWD;
+
+ log.info("Username: " + SSH_UNAME);
+ log.info("Password: " + pwd);
+ log.info("Key path: " + key);
+
+ G.setDaemon(true);
+
+ ignite = G.start(CFG_NO_ATTR);
+
+ G.setDaemon(false);
+
+ ignite.events().localListen(new IgnitePredicate<IgniteEvent>() {
+ @Override public boolean apply(IgniteEvent evt) {
+ info("Received event: " + evt.shortDisplay());
+
+ if (evt.type() == EVT_NODE_JOINED) {
+ joinedCnt.incrementAndGet();
+
+ if (joinedLatch != null)
+ joinedLatch.countDown();
+ } else if (evt.type() == EVT_NODE_LEFT) {
+ leftCnt.incrementAndGet();
+
+ if (leftLatch != null)
+ leftLatch.countDown();
+ }
+
+ return true;
+ }
+ }, EVT_NODE_JOINED, EVT_NODE_LEFT);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ if (!ignite.cluster().nodes().isEmpty()) {
+ leftLatch = new CountDownLatch(ignite.cluster().nodes().size());
+
+ ignite.cluster().stopNodes();
+
+ assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+ }
+
+ boolean wasEmpty = ignite.cluster().nodes().isEmpty();
+
+ G.stop(true);
+
+ joinedCnt.set(0);
+ leftCnt.set(0);
+
+ joinedLatch = null;
+ leftLatch = null;
+
+ assert wasEmpty : "grid.isEmpty() returned false after all nodes were
stopped [nodes=" + ignite.cluster().nodes() + ']';
+ }
+
+ /** {@inheritDoc} */
+ @Override protected long getTestTimeout() {
+ return 90 * 1000;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStartOneNode() throws Exception {
+ joinedLatch = new CountDownLatch(1);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 1,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 1,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 1;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert joinedCnt.get() == 1;
+ assert leftCnt.get() == 0;
+
+ assert ignite.cluster().nodes().size() == 1;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStartThreeNodes() throws Exception {
+ joinedLatch = new CountDownLatch(3);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, DFLT_TIMEOUT, 1);
+
+ assert res.size() == 3;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert joinedCnt.get() == 3;
+ assert leftCnt.get() == 0;
+
+ assert ignite.cluster().nodes().size() == 3;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStartThreeNodesAndDoEmptyCall() throws Exception {
+ joinedLatch = new CountDownLatch(3);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 3;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert joinedCnt.get() == 3;
+ assert leftCnt.get() == 0;
+
+ assert ignite.cluster().nodes().size() == 3;
+
+ res = startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.isEmpty();
+
+ assert joinedCnt.get() == 3;
+ assert leftCnt.get() == 0;
+
+ assert ignite.cluster().nodes().size() == 3;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStartThreeNodesAndTryToStartOneNode() throws Exception {
+ joinedLatch = new CountDownLatch(3);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 3;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert joinedCnt.get() == 3;
+ assert leftCnt.get() == 0;
+
+ assert ignite.cluster().nodes().size() == 3;
+
+ res = startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 1,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 1,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.isEmpty();
+
+ assert joinedCnt.get() == 3;
+ assert leftCnt.get() == 0;
+
+ assert ignite.cluster().nodes().size() == 3;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStartFiveNodesInTwoCalls() throws Exception {
+ joinedLatch = new CountDownLatch(3);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 3;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert joinedCnt.get() == 3;
+ assert leftCnt.get() == 0;
+
+ assert ignite.cluster().nodes().size() == 3;
+
+ joinedLatch = new CountDownLatch(2);
+
+ res = startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 5,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 5,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 2;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert joinedCnt.get() == 5;
+ assert leftCnt.get() == 0;
+
+ assert ignite.cluster().nodes().size() == 5;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStartFiveWithTwoSpecs() throws Exception {
+ joinedLatch = new CountDownLatch(5);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- F.asList(map(HOST, SSH_UNAME, pwd, key, 2,
U.getGridGainHome(), CFG_NO_ATTR, null),
- map(HOST, SSH_UNAME, pwd, key, 3, U.getGridGainHome(),
CFG_NO_ATTR, null)),
++ F.asList(map(HOST, SSH_UNAME, pwd, key, 2, U.getIgniteHome(),
CFG_NO_ATTR, null),
++ map(HOST, SSH_UNAME, pwd, key, 3, U.getIgniteHome(),
CFG_NO_ATTR, null)),
+ null, false, 0, 16);
+
+ assert res.size() == 5;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert joinedCnt.get() == 5;
+ assert leftCnt.get() == 0;
+
+ assert ignite.cluster().nodes().size() == 5;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStartThreeNodesAndRestart() throws Exception {
+ joinedLatch = new CountDownLatch(3);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 3;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert joinedCnt.get() == 3;
+ assert leftCnt.get() == 0;
+
+ assert ignite.cluster().nodes().size() == 3;
+
+ joinedLatch = new CountDownLatch(3);
+ leftLatch = new CountDownLatch(3);
+
+ res = startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, true, 0, 16);
+
+ assert res.size() == 3;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+ assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert joinedCnt.get() == 6;
+ assert leftCnt.get() == 3;
+
+ assert ignite.cluster().nodes().size() == 3;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testCustomScript() throws Exception {
+ joinedLatch = new CountDownLatch(1);
+
+ String script = U.isWindows() ? CUSTOM_SCRIPT_WIN :
CUSTOM_SCRIPT_LINUX;
+
- script =
Paths.get(U.getGridGainHome()).relativize(U.resolveGridGainPath(script).toPath()).toString();
++ script =
Paths.get(U.getIgniteHome()).relativize(U.resolveIgnitePath(script).toPath()).toString();
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 1,
U.getGridGainHome(), null, script),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 1,
U.getIgniteHome(), null, script),
+ null, false, 0, 16);
+
+ assert res.size() == 1;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert joinedCnt.get() == 1;
+ assert leftCnt.get() == 0;
+
+ assert ignite.cluster().nodes().size() == 1;
+
+ assert
CUSTOM_CFG_ATTR_VAL.equals(F.first(ignite.cluster().nodes()).<String>attribute(CUSTOM_CFG_ATTR_KEY));
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStopNodes() throws Exception {
+ joinedLatch = new CountDownLatch(3);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, null, 3,
U.getGridGainHome(), CFG_NO_ATTR,
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, null, 3,
U.getIgniteHome(), CFG_NO_ATTR,
+ null), null, false, 0, 16);
+
+ assert res.size() == 3;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+
+ leftLatch = new CountDownLatch(3);
+
+ ignite.cluster().stopNodes();
+
+ assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().isEmpty();
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStopNodesFiltered() throws Exception {
+ joinedLatch = new CountDownLatch(2);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 2,
U.getGridGainHome(), CFG_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 2,
U.getIgniteHome(), CFG_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 2;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ joinedLatch = new CountDownLatch(1);
+
+ res = startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 1;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+
+ leftLatch = new CountDownLatch(2);
+
+ Collection<UUID> ids =
F.transform(ignite.cluster().forAttribute(CUSTOM_CFG_ATTR_KEY,
CUSTOM_CFG_ATTR_VAL).nodes(),
+ new IgniteClosure<ClusterNode, UUID>() {
+ @Override public UUID apply(ClusterNode node) {
+ return node.id();
+ }
+ });
+
+ ignite.cluster().forAttribute(CUSTOM_CFG_ATTR_KEY,
CUSTOM_CFG_ATTR_VAL).nodes();
+
+ ignite.cluster().stopNodes(ids);
+
+ assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 1;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStopNodeById() throws Exception {
+ joinedLatch = new CountDownLatch(3);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 3;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+
+ leftLatch = new CountDownLatch(1);
+
+
ignite.cluster().stopNodes(Collections.singleton(F.first(ignite.cluster().forRemotes().nodes()).id()));
+
+ assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 2;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStopNodesByIds() throws Exception {
+ joinedLatch = new CountDownLatch(3);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 3;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+
+ leftLatch = new CountDownLatch(2);
+
+ Iterator<ClusterNode> it = ignite.cluster().nodes().iterator();
+
+ Collection<UUID> ids = new HashSet<>();
+
+ ids.add(it.next().id());
+ ids.add(it.next().id());
+
+ ignite.cluster().stopNodes(ids);
+
+ assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 1;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testStopNodesByIdsC() throws Exception {
+ joinedLatch = new CountDownLatch(3);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 3;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+
+ leftLatch = new CountDownLatch(2);
+
+ Iterator<ClusterNode> it = ignite.cluster().nodes().iterator();
+
+ ignite.cluster().stopNodes(F.asList(it.next().id(), it.next().id()));
+
+ assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 1;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testRestartNodes() throws Exception {
+ joinedLatch = new CountDownLatch(3);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 3;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+
+ joinedLatch = new CountDownLatch(3);
+ leftLatch = new CountDownLatch(3);
+
+ ignite.cluster().restartNodes();
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+ assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testRestartNodesFiltered() throws Exception {
+ joinedLatch = new CountDownLatch(2);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 2,
U.getGridGainHome(), CFG_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 2,
U.getIgniteHome(), CFG_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 2;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ joinedLatch = new CountDownLatch(1);
+
+ res = startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 1;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+
+ joinedLatch = new CountDownLatch(2);
+ leftLatch = new CountDownLatch(2);
+
+ X.println("Restarting nodes with " + CUSTOM_CFG_ATTR_KEY);
+
+ Collection<UUID> ids =
F.transform(ignite.cluster().forAttribute(CUSTOM_CFG_ATTR_KEY,
CUSTOM_CFG_ATTR_VAL).nodes(),
+ new IgniteClosure<ClusterNode, UUID>() {
+ @Override public UUID apply(ClusterNode node) {
+ return node.id();
+ }
+ }
+ );
+
+ ignite.cluster().restartNodes(ids);
+
+ assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testRestartNodeById() throws Exception {
+ joinedLatch = new CountDownLatch(3);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 3;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+
+ joinedLatch = new CountDownLatch(1);
+ leftLatch = new CountDownLatch(1);
+
+
ignite.cluster().restartNodes(Collections.singleton(F.first(ignite.cluster().forRemotes().nodes()).id()));
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+ assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testRestartNodesByIds() throws Exception {
+ joinedLatch = new CountDownLatch(3);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 3;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+
+ joinedLatch = new CountDownLatch(2);
+ leftLatch = new CountDownLatch(2);
+
+ Iterator<ClusterNode> it = ignite.cluster().nodes().iterator();
+
+ ignite.cluster().restartNodes(F.asList(it.next().id(),
it.next().id()));
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+ assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testRestartNodesByIdsC() throws Exception {
+ joinedLatch = new CountDownLatch(3);
+
+ Collection<GridTuple3<String, Boolean, String>> res =
+ startNodes(ignite.cluster(),
- maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getGridGainHome(), CFG_NO_ATTR, null),
++ maps(Collections.singleton(HOST), SSH_UNAME, pwd, key, 3,
U.getIgniteHome(), CFG_NO_ATTR, null),
+ null, false, 0, 16);
+
+ assert res.size() == 3;
+
+ F.forEach(res, new CI1<GridTuple3<String, Boolean, String>>() {
+ @Override public void apply(GridTuple3<String, Boolean, String>
t) {
+ assert t.get1().equals(HOST);
+
+ if (!t.get2())
+ throw new IgniteException(t.get3());
+ }
+ });
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+
+ joinedLatch = new CountDownLatch(2);
+ leftLatch = new CountDownLatch(2);
+
+ Iterator<ClusterNode> it = ignite.cluster().nodes().iterator();
+
+ ignite.cluster().restartNodes(F.asList(it.next().id(),
it.next().id()));
+
+ assert joinedLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+ assert leftLatch.await(WAIT_TIMEOUT, MILLISECONDS);
+
+ assert ignite.cluster().nodes().size() == 3;
+ }
+
+ /**
+ * @param host Hostname.
+ * @param uname Username.
+ * @param passwd Password.
+ * @param key Private key file.
+ * @param nodes Number of nodes.
- * @param igniteHome GridGain home.
++ * @param igniteHome Ignite home.
+ * @param cfg Configuration file path.
+ * @param script Startup script path.
+ * @return Parameters map.
+ */
+ private Map<String, Object> map(
+ String host,
+ @Nullable String uname,
+ @Nullable String passwd,
+ @Nullable File key,
+ @Nullable Integer nodes,
+ @Nullable String igniteHome,
+ @Nullable String cfg,
+ @Nullable String script) {
+ assert host != null;
+
+ Map<String, Object> params = new HashMap<>();
+
+ params.put(IgniteNodeStartUtils.HOST, host);
+ params.put(UNAME, uname);
+ params.put(PASSWD, passwd);
+ params.put(KEY, key);
+ params.put(NODES, nodes);
+ params.put(IGNITE_HOME, igniteHome);
+ params.put(CFG, cfg);
+ params.put(SCRIPT, script);
+
+ return params;
+ }
+
+ /**
+ * @param hosts Hostnames.
+ * @param uname Username.
+ * @param passwd Password.
+ * @param key Private key file.
+ * @param nodes Number of nodes.
- * @param igniteHome GridGain home.
++ * @param igniteHome Ignite home.
+ * @param cfg Configuration file path.
+ * @param script Startup script path.
+ * @return Parameters map.
+ */
+ private Collection<Map<String, Object>> maps(
+ Collection<String> hosts,
+ @Nullable String uname,
+ @Nullable String passwd,
+ @Nullable File key,
+ @Nullable Integer nodes,
+ @Nullable String igniteHome,
+ @Nullable String cfg,
+ @Nullable String script) {
+ assert HOST != null;
+
+ Collection<Map<String, Object>> maps = new ArrayList<>(hosts.size());
+
+ for (String host : hosts) {
+ Map<String, Object> params = new HashMap<>();
+
+ params.put(IgniteNodeStartUtils.HOST, host);
+ params.put(UNAME, uname);
+ params.put(PASSWD, passwd);
+ params.put(KEY, key);
+ params.put(NODES, nodes);
+ params.put(IGNITE_HOME, igniteHome);
+ params.put(CFG, cfg);
+ params.put(SCRIPT, script);
+
+ maps.add(params);
+ }
+
+ return maps;
+ }
+
+ /**
+ * @param name Filename.
+ * @return Whether name belongs to log file.
+ */
+ private boolean isSshNodeLogName(String name) {
- return name.matches("gridgain.[0-9a-z-]+.log");
++ return name.matches("ignite.[0-9a-z-]+.log");
+ }
+
+ /**
+ * @param cluster Cluster.
+ * @param hosts Hosts.
+ * @param dflts Default.
+ * @param restart Restart flag.
+ * @param timeout Timeout.
+ * @param maxConn Maximum connections.
+ * @return Results collection.
+ * @throws IgniteCheckedException If failed.
+ */
+ private Collection<GridTuple3<String, Boolean, String>>
startNodes(IgniteCluster cluster,
+ Collection<Map<String, Object>> hosts,
+ @Nullable Map<String, Object> dflts,
+ boolean restart,
+ int timeout,
+ int maxConn) throws IgniteCheckedException {
+ cluster = cluster.withAsync();
+
+ assertNull(cluster.startNodes(hosts, dflts, restart, timeout,
maxConn));
+
+ return cluster.<Collection<GridTuple3<String, Boolean,
String>>>future().get(WAIT_TIMEOUT);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22c8fea5/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala
----------------------------------------------------------------------