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/11/06 18:13:01 UTC
[21/21] ignite git commit: Merge branch 'master' into ignite-426-2
Merge branch 'master' into ignite-426-2
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/602292a2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/602292a2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/602292a2
Branch: refs/heads/ignite-426-2
Commit: 602292a29ed4a47d9bf566c1e7e3b8809c250ade
Parents: e281e34 242d988
Author: Tikhonov Nikolay <ti...@gmail.com>
Authored: Fri Nov 6 19:01:38 2015 +0300
Committer: Tikhonov Nikolay <ti...@gmail.com>
Committed: Fri Nov 6 19:01:38 2015 +0300
----------------------------------------------------------------------
.../java8/messaging/MessagingExample.java | 7 +-
.../src/main/java/org/apache/ignite/Ignite.java | 12 +-
.../configuration/CacheConfiguration.java | 54 +-
.../configuration/IgniteConfiguration.java | 32 +-
.../apache/ignite/internal/IgniteKernal.java | 48 +-
.../org/apache/ignite/internal/IgnitionEx.java | 3 +
.../communication/GridIoMessageFactory.java | 8 +-
.../affinity/GridAffinityAssignmentCache.java | 13 +
.../cache/GridCacheAffinityManager.java | 10 +
.../processors/cache/GridCacheIoManager.java | 19 +-
.../processors/cache/GridCacheMapEntry.java | 38 +-
.../GridCachePartitionExchangeManager.java | 188 ++-
.../processors/cache/GridCachePreloader.java | 60 +-
.../cache/GridCachePreloaderAdapter.java | 45 +-
.../processors/cache/GridCacheProcessor.java | 74 +-
.../distributed/dht/GridDhtCacheEntry.java | 11 +-
.../distributed/dht/GridDhtLocalPartition.java | 65 +-
.../dht/GridDhtPartitionsReservation.java | 2 +-
.../dht/preloader/GridDhtForceKeysFuture.java | 14 +
.../GridDhtPartitionDemandMessage.java | 14 +-
.../preloader/GridDhtPartitionDemandPool.java | 1192 ---------------
.../dht/preloader/GridDhtPartitionDemander.java | 1389 ++++++++++++++++++
.../dht/preloader/GridDhtPartitionSupplier.java | 1034 +++++++++++++
.../GridDhtPartitionSupplyMessageV2.java | 380 +++++
.../preloader/GridDhtPartitionSupplyPool.java | 555 -------
.../GridDhtPartitionsExchangeFuture.java | 8 +
.../dht/preloader/GridDhtPreloader.java | 299 +++-
.../CacheContinuousQueryBatchAck.java | 2 +-
.../datastructures/DataStructuresProcessor.java | 3 +
.../processors/job/GridJobProcessor.java | 96 +-
.../processors/task/GridTaskWorker.java | 4 +-
.../ignite/internal/util/lang/GridTuple4.java | 2 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 21 +-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 2 +-
.../TcpDiscoveryClientReconnectMessage.java | 1 +
.../messages/TcpDiscoveryDiscardMessage.java | 1 +
.../GridTaskFailoverAffinityRunTest.java | 3 +
.../processors/cache/CacheNamesSelfTest.java | 69 +
.../IgniteCacheP2pUnmarshallingErrorTest.java | 2 +-
...niteCacheClientNodeChangingTopologyTest.java | 4 +-
.../dht/GridCacheTxNodeFailureSelfTest.java | 21 +-
.../near/GridCacheNearTxExceptionSelfTest.java | 11 +
.../GridCacheRebalancingAsyncSelfTest.java | 68 +
.../GridCacheRebalancingSyncSelfTest.java | 506 +++++++
...eRebalancingUnmarshallingFailedSelfTest.java | 147 ++
.../GridCacheReplicatedPreloadSelfTest.java | 22 +-
...gniteClientReconnectMassiveShutdownTest.java | 84 +-
.../tcp/TcpDiscoveryMultiThreadedTest.java | 5 +-
.../spi/discovery/tcp/TcpDiscoverySelfTest.java | 17 -
.../spi/discovery/tcp/TestTcpDiscoverySpi.java | 46 +
.../testframework/junits/GridAbstractTest.java | 3 +-
.../ignite/testframework/junits/IgniteMock.java | 5 +
.../junits/common/GridCommonAbstractTest.java | 21 +-
.../junits/multijvm/IgniteProcessProxy.java | 7 +-
.../ignite/testsuites/IgniteCacheTestSuite.java | 2 +
.../testsuites/IgniteCacheTestSuite3.java | 4 +
.../tcp/GridOrderedMessageCancelSelfTest.java | 18 +-
modules/rest-http/pom.xml | 6 +
.../http/jetty/GridJettyRestProtocol.java | 4 +-
.../scala/org/apache/ignite/spark/Entity.scala | 2 +-
.../org/apache/ignite/spark/IgniteRDDSpec.scala | 249 ++++
.../org/apache/ignite/spark/IgniteRddSpec.scala | 249 ----
.../org/apache/ignite/IgniteSpringBean.java | 10 +-
modules/ssh/pom.xml | 2 +-
64 files changed, 4939 insertions(+), 2354 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/602292a2/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
index 6f71d57,ae8c753..5405abc
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
@@@ -686,11 -686,11 +687,16 @@@ public class GridIoMessageFactory imple
break;
case 114:
+ msg = new GridDhtPartitionSupplyMessageV2();
+
+ break;
+
- // [-3..114] - this
++ case 115:
+ msg = new CacheContinuousQueryBatchAck();
+
+ break;
+
+ // [-3..115] - this
// [120..123] - DR
// [-4..-22] - SQL
default:
http://git-wip-us.apache.org/repos/asf/ignite/blob/602292a2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/602292a2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/602292a2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index 7b81989,1516ee4..63e2899
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@@ -17,6 -17,17 +17,18 @@@
package org.apache.ignite.internal.processors.cache.distributed.dht;
+ import java.util.Collection;
+ import java.util.HashMap;
+ import java.util.Iterator;
+ import java.util.Map;
+ import java.util.Set;
+ import java.util.concurrent.ConcurrentMap;
+ import java.util.concurrent.CopyOnWriteArrayList;
++import java.util.concurrent.atomic.AtomicLong;
+ import java.util.concurrent.atomic.AtomicReference;
+ import java.util.concurrent.atomic.AtomicStampedReference;
+ import java.util.concurrent.locks.ReentrantLock;
+ import javax.cache.CacheException;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.internal.IgniteInternalFuture;
http://git-wip-us.apache.org/repos/asf/ignite/blob/602292a2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/602292a2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryBatchAck.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryBatchAck.java
index 9ffadd5,0000000..87e2ff5
mode 100644,000000..100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryBatchAck.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryBatchAck.java
@@@ -1,163 -1,0 +1,163 @@@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.query.continuous;
+
+import java.nio.ByteBuffer;
+import java.util.Map;
+import java.util.UUID;
+import org.apache.ignite.internal.GridDirectMap;
+import org.apache.ignite.internal.processors.cache.GridCacheMessage;
+import org.apache.ignite.internal.util.tostring.GridToStringInclude;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
+import org.apache.ignite.plugin.extensions.communication.MessageReader;
+import org.apache.ignite.plugin.extensions.communication.MessageWriter;
+
+/**
+ * Batch acknowledgement.
+ */
+public class CacheContinuousQueryBatchAck extends GridCacheMessage {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ /** Routine ID. */
+ private UUID routineId;
+
+ /** Update counters. */
+ @GridToStringInclude
+ @GridDirectMap(keyType = Integer.class, valueType = Long.class)
+ private Map<Integer, Long> updateCntrs;
+
+ /**
+ * Default constructor.
+ */
+ public CacheContinuousQueryBatchAck() {
+ // No-op.
+ }
+
+ /**
+ * @param cacheId Cache ID.
+ * @param routineId Routine ID.
+ * @param updateCntrs Update counters.
+ */
+ CacheContinuousQueryBatchAck(int cacheId, UUID routineId, Map<Integer, Long> updateCntrs) {
+ this.cacheId = cacheId;
+ this.routineId = routineId;
+ this.updateCntrs = updateCntrs;
+ }
+
+ /**
+ * @return Routine ID.
+ */
+ UUID routineId() {
+ return routineId;
+ }
+
+ /**
+ * @return Update counters.
+ */
+ Map<Integer, Long> updateCntrs() {
+ return updateCntrs;
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
+ writer.setBuffer(buf);
+
+ if (!super.writeTo(buf, writer))
+ return false;
+
+ if (!writer.isHeaderWritten()) {
+ if (!writer.writeHeader(directType(), fieldsCount()))
+ return false;
+
+ writer.onHeaderWritten();
+ }
+
+ switch (writer.state()) {
+ case 3:
+ if (!writer.writeUuid("routineId", routineId))
+ return false;
+
+ writer.incrementState();
+
+ case 4:
+ if (!writer.writeMap("updateCntrs", updateCntrs, MessageCollectionItemType.INT,
+ MessageCollectionItemType.LONG))
+ return false;
+
+ writer.incrementState();
+
+ }
+
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
+ reader.setBuffer(buf);
+
+ if (!reader.beforeMessageRead())
+ return false;
+
+ if (!super.readFrom(buf, reader))
+ return false;
+
+ switch (reader.state()) {
+ case 3:
+ routineId = reader.readUuid("routineId");
+
+ if (!reader.isLastRead())
+ return false;
+
+ reader.incrementState();
+
+ case 4:
+ updateCntrs = reader.readMap("updateCntrs", MessageCollectionItemType.INT,
+ MessageCollectionItemType.LONG, false);
+
+ if (!reader.isLastRead())
+ return false;
+
+ reader.incrementState();
+
+ }
+
+ return reader.afterMessageRead(CacheContinuousQueryBatchAck.class);
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean addDeploymentInfo() {
+ return false;
+ }
+
+ /** {@inheritDoc} */
+ @Override public byte directType() {
- return 114;
++ return 115;
+ }
+
+ /** {@inheritDoc} */
+ @Override public byte fieldsCount() {
+ return 5;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(CacheContinuousQueryBatchAck.class, this);
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/602292a2/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/602292a2/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------