You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by nt...@apache.org on 2015/07/20 14:26:22 UTC

[2/2] incubator-ignite git commit: Merge branch 'master' into ignite-323

Merge branch 'master' into ignite-323

Conflicts:
	modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.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/c8478452
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c8478452
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c8478452

Branch: refs/heads/ignite-323
Commit: c84784525a660a45f3326beac17303e2279f5e5b
Parents: 730b104 3194415
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Jul 20 15:26:15 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Jul 20 15:26:15 2015 +0300

----------------------------------------------------------------------
 assembly/LICENSE_FABRIC                         |   17 +-
 assembly/LICENSE_HADOOP                         |   11 -
 modules/apache-license-gen/pom.xml              |    2 +-
 .../src/main/resources/META-INF/licenses.txt.vm |    4 +-
 modules/core/licenses/jsr166-license.txt        |    3 +
 modules/core/licenses/snaptree-bsd-license.txt  |    2 +-
 .../IgniteClientDisconnectedException.java      |   61 +
 .../java/org/apache/ignite/IgniteCluster.java   |    8 +
 .../ignite/compute/ComputeJobResultPolicy.java  |    3 +-
 .../apache/ignite/internal/GridComponent.java   |   18 +
 .../ignite/internal/GridJobSiblingImpl.java     |    2 +-
 .../ignite/internal/GridKernalContext.java      |    5 +
 .../ignite/internal/GridKernalContextImpl.java  |   31 +-
 .../ignite/internal/GridKernalGateway.java      |   46 +-
 .../ignite/internal/GridKernalGatewayImpl.java  |   85 +-
 .../apache/ignite/internal/GridKernalState.java |    3 +
 .../ignite/internal/GridPluginComponent.java    |   11 +
 ...gniteClientDisconnectedCheckedException.java |   49 +
 .../apache/ignite/internal/IgniteKernal.java    |  234 +++-
 .../cluster/IgniteClusterAsyncImpl.java         |    5 +
 .../internal/cluster/IgniteClusterImpl.java     |   18 +
 .../internal/managers/GridManagerAdapter.java   |   19 +-
 .../deployment/GridDeploymentCommunication.java |    2 +-
 .../deployment/GridDeploymentManager.java       |   95 +-
 .../discovery/GridDiscoveryManager.java         |  163 ++-
 .../failover/GridFailoverContextImpl.java       |   28 +-
 .../managers/failover/GridFailoverManager.java  |   13 +-
 .../processors/GridProcessorAdapter.java        |   11 +
 .../affinity/GridAffinityAssignmentCache.java   |   26 +-
 .../cache/CacheOsConflictResolutionManager.java |    6 +
 .../cache/DynamicCacheChangeBatch.java          |   17 +
 .../processors/cache/GridCacheAdapter.java      |   27 +-
 .../cache/GridCacheAffinityManager.java         |   21 +-
 .../cache/GridCacheConcurrentMap.java           |   15 +-
 .../processors/cache/GridCacheContext.java      |   45 +-
 .../processors/cache/GridCacheGateway.java      |  116 +-
 .../processors/cache/GridCacheIoManager.java    |    8 +
 .../processors/cache/GridCacheManager.java      |    6 +
 .../cache/GridCacheManagerAdapter.java          |    6 +
 .../processors/cache/GridCacheMvccManager.java  |   43 +-
 .../GridCachePartitionExchangeManager.java      |  134 +-
 .../processors/cache/GridCachePreloader.java    |    5 +
 .../cache/GridCachePreloaderAdapter.java        |    5 +
 .../processors/cache/GridCacheProcessor.java    |  311 ++++-
 .../cache/GridCacheSharedContext.java           |  113 +-
 .../cache/GridCacheSharedManager.java           |   11 +-
 .../cache/GridCacheSharedManagerAdapter.java    |   20 +-
 .../processors/cache/GridCacheUtils.java        |    9 +
 .../processors/cache/IgniteCacheFutureImpl.java |    5 +
 .../processors/cache/IgniteCacheProxy.java      |    4 +-
 .../processors/cache/IgniteInternalCache.java   |    1 +
 .../CacheDataStructuresManager.java             |   35 +
 .../distributed/GridCacheTxFinishSync.java      |   46 +
 .../distributed/dht/GridDhtCacheAdapter.java    |   14 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |   24 +
 .../distributed/dht/GridDhtTopologyFuture.java  |   14 -
 .../distributed/dht/GridDhtTxPrepareFuture.java |    9 +-
 .../dht/GridPartitionedGetFuture.java           |   13 +-
 .../dht/atomic/GridDhtAtomicCache.java          |    4 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |   11 +-
 .../GridDhtPartitionsExchangeFuture.java        |   31 +-
 .../dht/preloader/GridDhtPreloader.java         |   16 +-
 .../distributed/near/GridNearCacheAdapter.java  |    8 +
 .../distributed/near/GridNearGetFuture.java     |   13 +-
 .../cache/dr/GridOsCacheDrManager.java          |    7 +-
 .../query/GridCacheDistributedQueryManager.java |   22 +
 .../cache/query/GridCacheQueryAdapter.java      |   11 +-
 .../query/GridCacheQueryFutureAdapter.java      |    2 +-
 .../continuous/CacheContinuousQueryHandler.java |    5 +
 .../transactions/IgniteTransactionsImpl.java    |   59 +-
 .../cache/transactions/IgniteTxManager.java     |   23 +-
 .../transactions/TransactionProxyImpl.java      |    2 +-
 .../cache/version/GridCacheVersionManager.java  |    9 +-
 .../clock/GridClockSyncProcessor.java           |    6 +-
 .../processors/closure/AffinityTask.java        |   35 +
 .../closure/GridClosureProcessor.java           |   63 +-
 .../processors/cluster/ClusterProcessor.java    |   11 +
 .../continuous/GridContinuousHandler.java       |    9 +-
 .../continuous/GridContinuousProcessor.java     |  127 +-
 .../datastreamer/DataStreamProcessor.java       |   24 +-
 .../datastreamer/DataStreamerImpl.java          |   90 +-
 .../datastructures/DataStructuresProcessor.java |   33 +-
 .../datastructures/GridCacheAtomicLongImpl.java |   33 +-
 .../GridCacheAtomicReferenceImpl.java           |   34 +-
 .../GridCacheAtomicSequenceImpl.java            |   33 +-
 .../GridCacheAtomicStampedImpl.java             |   33 +-
 .../GridCacheCountDownLatchImpl.java            |   51 +-
 .../datastructures/GridCacheRemovable.java      |    6 +-
 .../datastructures/GridCacheSetImpl.java        |   15 +-
 .../datastructures/GridCacheSetProxy.java       |   47 +-
 .../processors/job/GridJobProcessor.java        |    2 +-
 .../internal/processors/job/GridJobWorker.java  |    2 +-
 .../processors/query/GridQueryIndexing.java     |    7 +
 .../processors/query/GridQueryProcessor.java    |    6 +
 .../service/GridServiceProcessor.java           |   45 +-
 .../processors/service/GridServiceProxy.java    |   13 +-
 .../processors/task/GridTaskProcessor.java      |   55 +-
 .../processors/task/GridTaskWorker.java         |   83 +-
 .../ignite/internal/util/IgniteUtils.java       |   30 +-
 .../shmem/IpcSharedMemoryClientEndpoint.java    |    5 +-
 .../ignite/internal/util/lang/GridFunc.java     |    2 +
 .../plugin/security/SecurityPermission.java     |    7 +-
 .../java/org/apache/ignite/spi/IgniteSpi.java   |   15 +
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |   51 +-
 .../communication/tcp/TcpCommunicationSpi.java  |  358 ++++--
 .../spi/discovery/DiscoverySpiDataExchange.java |    3 +-
 .../ignite/spi/discovery/tcp/ClientImpl.java    |  408 ++++--
 .../ignite/spi/discovery/tcp/ServerImpl.java    |  177 ++-
 .../spi/discovery/tcp/TcpDiscoveryImpl.java     |    9 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |   33 +-
 .../tcp/internal/TcpDiscoveryNode.java          |   19 +
 .../messages/TcpDiscoveryAbstractMessage.java   |    3 +
 .../messages/TcpDiscoveryClientAckResponse.java |   64 +
 .../messages/TcpDiscoveryHandshakeResponse.java |   14 +
 .../ignite/spi/failover/FailoverContext.java    |   18 +
 .../spi/failover/always/AlwaysFailoverSpi.java  |   25 +
 .../spi/swapspace/file/FileSwapSpaceSpi.java    |    2 +-
 .../internal/GridUpdateNotifierSelfTest.java    |   15 +-
 .../IgniteClientReconnectAbstractTest.java      |  363 ++++++
 .../IgniteClientReconnectApiExceptionTest.java  |  846 ++++++++++++
 .../IgniteClientReconnectAtomicsTest.java       |  672 ++++++++++
 .../IgniteClientReconnectCacheTest.java         | 1202 ++++++++++++++++++
 .../IgniteClientReconnectCollectionsTest.java   |  443 +++++++
 .../IgniteClientReconnectComputeTest.java       |  192 +++
 ...eClientReconnectContinuousProcessorTest.java |  372 ++++++
 ...IgniteClientReconnectDiscoveryStateTest.java |  123 ++
 ...niteClientReconnectFailoverAbstractTest.java |  231 ++++
 .../IgniteClientReconnectFailoverTest.java      |  227 ++++
 .../IgniteClientReconnectServicesTest.java      |  260 ++++
 .../internal/IgniteClientReconnectStopTest.java |  106 ++
 .../IgniteClientReconnectStreamerTest.java      |  233 ++++
 .../IgniteSlowClientDetectionSelfTest.java      |    1 +
 .../GridDeploymentManagerStopSelfTest.java      |    7 +
 .../cache/CacheAffinityCallSelfTest.java        |  172 +++
 .../cache/GridCacheAffinityRoutingSelfTest.java |  157 ++-
 .../IgniteCacheAbstractStopBusySelfTest.java    |    2 +-
 .../cache/IgniteCacheDynamicStopSelfTest.java   |    6 +-
 .../cache/IgniteCacheNearLockValueSelfTest.java |    2 +
 .../IgniteTxExceptionAbstractSelfTest.java      |    1 +
 .../distributed/IgniteCache150ClientsTest.java  |    1 +
 .../IgniteCacheClientReconnectTest.java         |  175 +++
 .../IgniteCacheServerNodeConcurrentStart.java   |   96 ++
 .../IgniteCacheSystemTransactionsSelfTest.java  |    2 +-
 .../IgniteCachePutRetryAbstractSelfTest.java    |   52 +-
 ...gniteCachePutRetryTransactionalSelfTest.java |   17 +-
 ...achePartitionedMultiNodeFullApiSelfTest.java |    4 +-
 .../GridCacheReplicatedInvalidateSelfTest.java  |    3 +-
 .../loadtests/hashmap/GridCacheTestContext.java |    4 +-
 .../tcp/TcpClientDiscoverySpiSelfTest.java      |  562 +++++++-
 .../tcp/TcpDiscoveryMultiThreadedTest.java      |  140 +-
 .../spi/failover/GridFailoverTestContext.java   |   10 +
 .../testframework/junits/GridAbstractTest.java  |    5 +
 .../multijvm/IgniteClusterProcessProxy.java     |    5 +
 .../ignite/testsuites/IgniteCacheTestSuite.java |    1 +
 .../testsuites/IgniteCacheTestSuite2.java       |    2 +-
 .../testsuites/IgniteCacheTestSuite4.java       |    2 -
 .../testsuites/IgniteClientNodesTestSuite.java  |   42 +
 .../IgniteClientReconnectTestSuite.java         |   48 +
 .../processors/query/h2/IgniteH2Indexing.java   |    5 +
 .../query/h2/twostep/GridMergeIndex.java        |   45 +-
 .../h2/twostep/GridReduceQueryExecutor.java     |   70 +-
 ...ClientReconnectCacheQueriesFailoverTest.java |  225 ++++
 .../cache/IgniteClientReconnectQueriesTest.java |  427 +++++++
 ...dCacheAbstractReduceFieldsQuerySelfTest.java |    4 +
 .../IgniteCacheWithIndexingTestSuite.java       |    1 +
 modules/jta/licenses/jta-license.txt            |    2 +
 .../ignite/schema/ui/SchemaImportApp.java       |   36 +-
 modules/yarn/pom.xml                            |    4 +-
 pom.xml                                         |    2 -
 169 files changed, 10975 insertions(+), 1037 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c8478452/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c8478452/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index 52eeb65,e9fd696..29aa3e2
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@@ -2291,16 -2261,10 +2347,16 @@@ public class TcpCommunicationSpi extend
                      else if (log.isDebugEnabled())
                          log.debug("Received remote node ID: " + rmtNodeId0);
  
 -                    ch.write(ByteBuffer.wrap(U.IGNITE_HEADER));
 +                    if (isSslEnabled() ) {
 +                        assert sslHnd != null;
 +
 +                        ch.write(sslHnd.encrypt(ByteBuffer.wrap(U.IGNITE_HEADER)));
 +                    }
 +                    else
 +                        ch.write(ByteBuffer.wrap(U.IGNITE_HEADER));
  
                      if (recovery != null) {
-                         HandshakeMessage msg = new HandshakeMessage(getLocalNodeId(),
+                         HandshakeMessage msg = new HandshakeMessage(getLocalNode().id(),
                              recovery.incrementConnectCount(),
                              recovery.receivedCount());
  
@@@ -2317,23 -2281,10 +2373,23 @@@
  
                          buf.flip();
  
 -                        ch.write(buf);
 +                        if (isSslEnabled()) {
 +                            assert sslHnd != null;
 +
 +                            ch.write(sslHnd.encrypt(buf));
 +                        }
 +                        else
 +                            ch.write(buf);
 +                    }
 +                    else {
 +                        if (isSslEnabled()) {
 +                            assert sslHnd != null;
 +
-                             ch.write(sslHnd.encrypt(ByteBuffer.wrap(nodeIdMsg.nodeIdBytesWithType)));
++                            ch.write(sslHnd.encrypt(ByteBuffer.wrap(nodeIdMessage().nodeIdBytesWithType)));
 +                        }
 +                        else
-                             ch.write(ByteBuffer.wrap(nodeIdMsg.nodeIdBytesWithType));
++                            ch.write(ByteBuffer.wrap(nodeIdMessage().nodeIdBytesWithType));
                      }
 -                    else
 -                        ch.write(ByteBuffer.wrap(nodeIdMessage().nodeIdBytesWithType));
  
                      if (recovery != null) {
                          if (log.isDebugEnabled())