You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by yz...@apache.org on 2015/06/10 15:49:55 UTC
[01/50] incubator-ignite git commit: # ignite-883
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-695 393be925e -> 8428193ff
# ignite-883
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e237b00d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e237b00d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e237b00d
Branch: refs/heads/ignite-695
Commit: e237b00d84039383723e00929b639fa62be03de7
Parents: fb827a77
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jun 5 16:12:46 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jun 5 18:10:34 2015 +0300
----------------------------------------------------------------------
.../util/nio/GridNioRecoveryDescriptor.java | 11 ++++++---
.../ignite/spi/discovery/tcp/ServerImpl.java | 9 ++++---
.../tcp/TcpClientDiscoverySpiSelfTest.java | 25 ++++++++++++++++++++
3 files changed, 37 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e237b00d/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java
index 08a9937..3bc81ea 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java
@@ -176,9 +176,11 @@ public class GridNioRecoveryDescriptor {
while (acked < rcvCnt) {
GridNioFuture<?> fut = msgFuts.pollFirst();
- assert fut != null;
+ assert fut != null : "Missed message future [rcvCnt=" + rcvCnt +
+ ", acked=" + acked +
+ ", desc=" + this + ']';
- assert fut.isDone();
+ assert fut.isDone() : fut;
acked++;
}
@@ -239,7 +241,10 @@ public class GridNioRecoveryDescriptor {
* @param rcvCnt Number of messages received by remote node.
*/
public void onHandshake(long rcvCnt) {
- ackReceived(rcvCnt);
+ synchronized (this) {
+ if (!nodeLeft)
+ ackReceived(rcvCnt);
+ }
resendCnt = msgFuts.size();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e237b00d/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index 302b721..0270a7c 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -1752,7 +1752,7 @@ class ServerImpl extends TcpDiscoveryImpl {
@Nullable Collection<TcpDiscoveryAbstractMessage> messages(IgniteUuid lastMsgId) {
assert lastMsgId != null;
- Collection<TcpDiscoveryAbstractMessage> copy = new ArrayList<>(msgs.size());
+ Collection<TcpDiscoveryAbstractMessage> cp = new ArrayList<>(msgs.size());
boolean skip = true;
@@ -1762,10 +1762,10 @@ class ServerImpl extends TcpDiscoveryImpl {
skip = false;
}
else
- copy.add(msg);
+ cp.add(msg);
}
- return !skip ? copy : null;
+ return !skip ? cp : null;
}
/**
@@ -2704,8 +2704,7 @@ class ServerImpl extends TcpDiscoveryImpl {
node.aliveCheck(spi.maxMissedClientHbs);
if (isLocalNodeCoordinator()) {
- Collection<TcpDiscoveryAbstractMessage> pending =
- pendingMsgs.messages(msg.lastMessageId());
+ Collection<TcpDiscoveryAbstractMessage> pending = pendingMsgs.messages(msg.lastMessageId());
if (pending != null) {
msg.pendingMessages(pending);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e237b00d/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
index f7be340..7333020 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java
@@ -469,6 +469,31 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ public void testClientReconnectOneServerOneClient() throws Exception {
+ clientsPerSrv = 1;
+
+ startServerNodes(1);
+ startClientNodes(1);
+
+ checkNodes(1, 1);
+
+ srvLeftLatch = new CountDownLatch(1);
+ srvFailedLatch = new CountDownLatch(1);
+
+ attachListeners(1, 0);
+
+ ((TcpDiscoverySpi)G.ignite("client-0").configuration().getDiscoverySpi()).brakeConnection();
+
+ assertFalse(srvFailedLatch.await(2000, TimeUnit.MILLISECONDS));
+
+ assertEquals(1L, srvLeftLatch.getCount());
+
+ checkNodes(1, 1);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
public void testGetMissedMessagesOnReconnect() throws Exception {
clientsPerSrv = 1;
[43/50] incubator-ignite git commit: # sprint-5 minor
Posted by yz...@apache.org.
# sprint-5 minor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2b056f0b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2b056f0b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2b056f0b
Branch: refs/heads/ignite-695
Commit: 2b056f0bfea7efced660ccb47e7dfd5968e137d8
Parents: eeae5b7
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Jun 10 14:04:03 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Jun 10 14:04:03 2015 +0300
----------------------------------------------------------------------
.../client/memcache/MemcacheRestExample.java | 32 ++++++++++----------
1 file changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2b056f0b/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java b/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java
index 877dadd..a15afd7 100644
--- a/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java
@@ -85,22 +85,22 @@ public class MemcacheRestExample {
// Check that cache is empty.
System.out.println(">>> Current cache size: " + cache.size() + " (expected: 0).");
- // Create atomic long.
- IgniteAtomicLong l = ignite.atomicLong("atomicLong", 10, true);
-
- // Increment atomic long by 5 using Memcache client.
- if (client.incr("atomicLong", 5, 0) == 15)
- System.out.println(">>> Successfully incremented atomic long by 5.");
-
- // Increment atomic long using Ignite API and check that value is correct.
- System.out.println(">>> New atomic long value: " + l.incrementAndGet() + " (expected: 16).");
-
- // Decrement atomic long by 3 using Memcache client.
- if (client.decr("atomicLong", 3, 0) == 13)
- System.out.println(">>> Successfully decremented atomic long by 3.");
-
- // Decrement atomic long using Ignite API and check that value is correct.
- System.out.println(">>> New atomic long value: " + l.decrementAndGet() + " (expected: 12).");
+ // Create atomic long and close it after test is done.
+ try (IgniteAtomicLong l = ignite.atomicLong("atomicLong", 10, true)) {
+ // Increment atomic long by 5 using Memcache client.
+ if (client.incr("atomicLong", 5, 0) == 15)
+ System.out.println(">>> Successfully incremented atomic long by 5.");
+
+ // Increment atomic long using Ignite API and check that value is correct.
+ System.out.println(">>> New atomic long value: " + l.incrementAndGet() + " (expected: 16).");
+
+ // Decrement atomic long by 3 using Memcache client.
+ if (client.decr("atomicLong", 3, 0) == 13)
+ System.out.println(">>> Successfully decremented atomic long by 3.");
+
+ // Decrement atomic long using Ignite API and check that value is correct.
+ System.out.println(">>> New atomic long value: " + l.decrementAndGet() + " (expected: 12).");
+ }
}
finally {
if (client != null)
[22/50] incubator-ignite git commit: # IGNITE-992 Review.
Posted by yz...@apache.org.
# IGNITE-992 Review.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ea12580d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ea12580d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ea12580d
Branch: refs/heads/ignite-695
Commit: ea12580dabd60dc0c2b1a0e86d7112b409366ba7
Parents: 662f733
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Jun 9 10:15:41 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Jun 9 10:15:41 2015 +0700
----------------------------------------------------------------------
.../apache/ignite/internal/util/IgniteExceptionRegistry.java | 2 +-
.../internal/visor/node/VisorNodeDataCollectorTask.java | 8 ++++----
.../apache/ignite/internal/visor/query/VisorQueryJob.java | 2 +-
.../ignite/internal/visor/util/VisorExceptionWrapper.java | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ea12580d/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
index a56570a..8ad3348 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
@@ -187,7 +187,7 @@ public class IgniteExceptionRegistry {
*/
public ExceptionInfo(long order, Throwable error, String msg, long threadId, String threadName, long time) {
this.order = order;
- this.error = VisorTaskUtils.wrap(error);
+ this.error = new VisorExceptionWrapper(error);
this.threadId = threadId;
this.threadName = threadName;
this.time = time;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ea12580d/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
index 7dbfd39..3b2d45c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
@@ -88,7 +88,7 @@ public class VisorNodeDataCollectorTask extends VisorMultiNodeTask<VisorNodeData
else {
// Ignore nodes that left topology.
if (!(unhandledEx instanceof ClusterGroupEmptyException))
- taskRes.unhandledEx().put(nid, VisorTaskUtils.wrap(unhandledEx));
+ taskRes.unhandledEx().put(nid, new VisorExceptionWrapper(unhandledEx));
}
}
}
@@ -117,13 +117,13 @@ public class VisorNodeDataCollectorTask extends VisorMultiNodeTask<VisorNodeData
taskRes.events().addAll(jobRes.events());
if (jobRes.eventsEx() != null)
- taskRes.eventsEx().put(nid, VisorTaskUtils.wrap(jobRes.eventsEx()));
+ taskRes.eventsEx().put(nid, new VisorExceptionWrapper(jobRes.eventsEx()));
if (!jobRes.caches().isEmpty())
taskRes.caches().put(nid, jobRes.caches());
if (jobRes.cachesEx() != null)
- taskRes.cachesEx().put(nid, VisorTaskUtils.wrap(jobRes.cachesEx()));
+ taskRes.cachesEx().put(nid, new VisorExceptionWrapper(jobRes.cachesEx()));
if (!jobRes.igfss().isEmpty())
taskRes.igfss().put(nid, jobRes.igfss());
@@ -132,6 +132,6 @@ public class VisorNodeDataCollectorTask extends VisorMultiNodeTask<VisorNodeData
taskRes.igfsEndpoints().put(nid, jobRes.igfsEndpoints());
if (jobRes.igfssEx() != null)
- taskRes.igfssEx().put(nid, VisorTaskUtils.wrap(jobRes.igfssEx()));
+ taskRes.igfssEx().put(nid, new VisorExceptionWrapper(jobRes.igfssEx()));
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ea12580d/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
index 82555cc..e977d2e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
@@ -112,7 +112,7 @@ public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? exten
if (meta == null)
return new IgniteBiTuple<>(
- VisorTaskUtils.wrap(new SQLException("Fail to execute query. No metadata available.")), null);
+ new VisorExceptionWrapper(new SQLException("Fail to execute query. No metadata available.")), null);
else {
List<VisorQueryField> names = new ArrayList<>(meta.size());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ea12580d/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
index be6f63c..a2965d7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
@@ -18,7 +18,7 @@
package org.apache.ignite.internal.visor.util;
/**
- * Wrapper of exceptions for transferring to Visor with absent exception classes.
+ * Exception wrapper for safe for transferring to Visor.
*/
public class VisorExceptionWrapper extends Throwable {
/** Detail message string of this throwable */
[14/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-sprint-5' into ignite-gg-10299
Posted by yz...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-gg-10299
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ea215003
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ea215003
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ea215003
Branch: refs/heads/ignite-695
Commit: ea21500336c6d0df5a563eb662367cce7aca0705
Parents: 0fc2d73 8467a3c
Author: avinogradov <av...@gridgain.com>
Authored: Mon Jun 8 12:59:05 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Mon Jun 8 12:59:05 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/IgniteCache.java | 7 +-
.../apache/ignite/internal/IgniteKernal.java | 2 +
.../ignite/internal/IgniteNodeAttributes.java | 5 +-
.../internal/MarshallerContextAdapter.java | 36 +-
.../cache/DynamicCacheDescriptor.java | 17 +
.../processors/cache/GridCacheContext.java | 13 +
.../processors/cache/GridCacheProcessor.java | 37 ++-
.../dht/atomic/GridDhtAtomicCache.java | 4 +
.../transactions/IgniteTxLocalAdapter.java | 28 ++
.../IgniteTxRollbackCheckedException.java | 9 +
...acheReadOnlyTransactionalClientSelfTest.java | 327 +++++++++++++++++++
.../loadtests/hashmap/GridCacheTestContext.java | 1 +
.../testsuites/IgniteCacheTestSuite4.java | 2 +
13 files changed, 476 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
[06/50] incubator-ignite git commit: # ignite-883 javadoc
Posted by yz...@apache.org.
# ignite-883 javadoc
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/50b0b499
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/50b0b499
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/50b0b499
Branch: refs/heads/ignite-695
Commit: 50b0b49987a99fd10691346244f7c60b8d2b6ddd
Parents: 75006b8
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 8 10:05:39 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 8 10:05:39 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/spi/IgniteSpiTimeoutObject.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/50b0b499/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiTimeoutObject.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiTimeoutObject.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiTimeoutObject.java
index f7fbd27f..b3fc28e 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiTimeoutObject.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiTimeoutObject.java
@@ -20,7 +20,11 @@ package org.apache.ignite.spi;
import org.apache.ignite.lang.*;
/**
- *
+ * Provides possibility to schedule delayed execution,
+ * see {@link IgniteSpiContext#addTimeoutObject(IgniteSpiTimeoutObject)}.
+ * <p>
+ * Note: all timeout objects are executed in single dedicated thread, so implementation
+ * of {@link #onTimeout()} should not use time consuming and blocking method.
*/
public interface IgniteSpiTimeoutObject {
/**
[19/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-5' into ignite-sprint-5
Posted by yz...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ff7827e4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ff7827e4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ff7827e4
Branch: refs/heads/ignite-695
Commit: ff7827e479b1fbcb79d934d8f240ae0a2ff9fc3d
Parents: f1cfd29 2a8e2ab
Author: avinogradov <av...@gridgain.com>
Authored: Mon Jun 8 15:18:21 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Mon Jun 8 15:18:21 2015 +0300
----------------------------------------------------------------------
.../DataStreamerMultinodeCreateCacheTest.java | 97 ++++++++++++++++++++
.../ignite/testsuites/IgniteCacheTestSuite.java | 1 +
2 files changed, 98 insertions(+)
----------------------------------------------------------------------
[07/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-sprint-5' into ignite-883_1
Posted by yz...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-883_1
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0a4e7dd4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0a4e7dd4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0a4e7dd4
Branch: refs/heads/ignite-695
Commit: 0a4e7dd4c8321bb163cd8568494c97a1a4aef437
Parents: 50b0b49 59db4a5
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 8 10:10:59 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 8 10:10:59 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/IgniteCache.java | 11 +
.../apache/ignite/internal/IgniteKernal.java | 2 +
.../ignite/internal/IgniteNodeAttributes.java | 5 +-
.../cache/DynamicCacheDescriptor.java | 17 +
.../processors/cache/GridCacheAdapter.java | 17 +-
.../processors/cache/GridCacheContext.java | 13 +
.../processors/cache/GridCacheProcessor.java | 37 ++-
.../processors/cache/GridCacheProxyImpl.java | 14 +-
.../processors/cache/IgniteCacheProxy.java | 23 ++
.../processors/cache/IgniteInternalCache.java | 11 +-
.../dht/atomic/GridDhtAtomicCache.java | 4 +
.../transactions/IgniteTxLocalAdapter.java | 28 ++
.../processors/igfs/IgfsMetaManager.java | 2 +-
.../IgniteTxRollbackCheckedException.java | 9 +
...acheReadOnlyTransactionalClientSelfTest.java | 327 +++++++++++++++++++
.../cache/GridCacheAbstractFullApiSelfTest.java | 83 +++++
.../GridCacheExAbstractFullApiSelfTest.java | 103 ------
.../GridCacheExColocatedFullApiSelfTest.java | 33 --
.../near/GridCacheExNearFullApiSelfTest.java | 39 ---
.../GridCacheExReplicatedFullApiSelfTest.java | 33 --
.../local/GridCacheExLocalFullApiSelfTest.java | 30 --
.../loadtests/hashmap/GridCacheTestContext.java | 1 +
.../IgniteCacheFullApiSelfTestSuite.java | 6 -
.../testsuites/IgniteCacheTestSuite4.java | 2 +
24 files changed, 591 insertions(+), 259 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0a4e7dd4/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0a4e7dd4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0a4e7dd4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
[11/50] incubator-ignite git commit: # ignite-sprint-5 javadoc warning
Posted by yz...@apache.org.
# ignite-sprint-5 javadoc warning
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a5b5ec70
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a5b5ec70
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a5b5ec70
Branch: refs/heads/ignite-695
Commit: a5b5ec703dbcb593a945c8eb1d37e1261e55e834
Parents: 59db4a5
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 8 11:32:14 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 8 11:32:14 2015 +0300
----------------------------------------------------------------------
modules/core/src/main/java/org/apache/ignite/IgniteCache.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a5b5ec70/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index 07f4f3f..a54adc9 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -325,7 +325,12 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
@IgniteAsyncSupported
@Override public boolean containsKey(K key);
- /** {@inheritDoc} */
+ /**
+ * Determines if the {@link Cache} contains entries for the specified keys.
+ *
+ * @param keys Key whose presence in this cache is to be tested.
+ * @return {@code True} if this cache contains a mapping for the specified keys.
+ */
@IgniteAsyncSupported
public boolean containsKeys(Set<? extends K> keys);
[28/50] incubator-ignite git commit: ignite-999 ignore duplicated
discovery custom messages
Posted by yz...@apache.org.
ignite-999 ignore duplicated discovery custom messages
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/80c6cf0b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/80c6cf0b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/80c6cf0b
Branch: refs/heads/ignite-695
Commit: 80c6cf0b3d763e3fcfab37653de3f2c6dddf30e8
Parents: 14bb076
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jun 9 11:14:09 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jun 9 11:14:09 2015 +0300
----------------------------------------------------------------------
.../discovery/DiscoveryCustomMessage.java | 6 ++++
.../discovery/GridDiscoveryManager.java | 32 ++++++++++++++++++++
.../cache/DynamicCacheChangeBatch.java | 19 +++++++++---
.../continuous/AbstractContinuousMessage.java | 9 ++++++
.../DataStreamerMultinodeCreateCacheTest.java | 4 +--
5 files changed, 63 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80c6cf0b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryCustomMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryCustomMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryCustomMessage.java
index 693bbef..401486d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryCustomMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryCustomMessage.java
@@ -18,6 +18,7 @@
package org.apache.ignite.internal.managers.discovery;
import org.apache.ignite.internal.processors.affinity.*;
+import org.apache.ignite.lang.*;
import org.jetbrains.annotations.*;
import java.io.*;
@@ -27,6 +28,11 @@ import java.io.*;
*/
public interface DiscoveryCustomMessage extends Serializable {
/**
+ * @return Unique custom message ID.
+ */
+ public IgniteUuid id();
+
+ /**
* Whether or not minor version of topology should be increased on message receive.
*
* @return {@code true} if minor topology version should be increased.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80c6cf0b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 142dbaa..71fbc61 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -178,6 +178,9 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
/** */
private final GridSpinBusyLock busyLock = new GridSpinBusyLock();
+ /** Received custom messages history. */
+ private final ArrayDeque<IgniteUuid> rcvdCustomMsgs = new ArrayDeque<>();
+
/** @param ctx Context. */
public GridDiscoveryManager(GridKernalContext ctx) {
super(ctx, ctx.config().getDiscoverySpi());
@@ -359,6 +362,9 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
DiscoveryCustomMessage customMsg = spiCustomMsg == null ? null
: ((CustomMessageWrapper)spiCustomMsg).delegate();
+ if (skipMessage(type, customMsg))
+ return;
+
final ClusterNode locNode = localNode();
if (snapshots != null)
@@ -515,6 +521,32 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
}
/**
+ * @param type Message type.
+ * @param customMsg Custom message.
+ * @return {@code True} if should not process message.
+ */
+ private boolean skipMessage(int type, @Nullable DiscoveryCustomMessage customMsg) {
+ if (type == DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT) {
+ assert customMsg != null && customMsg.id() != null : customMsg;
+
+ if (rcvdCustomMsgs.contains(customMsg.id())) {
+ if (log.isDebugEnabled())
+ log.debug("Received duplicated custom message, will ignore [msg=" + customMsg + "]");
+
+ return true;
+ }
+
+ rcvdCustomMsgs.addLast(customMsg.id());
+
+ while (rcvdCustomMsgs.size() > DISCOVERY_HISTORY_SIZE)
+ rcvdCustomMsgs.pollFirst();
+ }
+
+ return false;
+ }
+
+ /**
+ * @param msgCls Message class.
* @param lsnr Custom event listener.
*/
public <T extends DiscoveryCustomMessage> void setCustomEventListener(Class<T> msgCls, CustomEventListener<T> lsnr) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80c6cf0b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeBatch.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeBatch.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeBatch.java
index 5fcd0e2..dfc39c1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeBatch.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheChangeBatch.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache;
import org.apache.ignite.internal.managers.discovery.*;
import org.apache.ignite.internal.util.tostring.*;
import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
import org.jetbrains.annotations.*;
import java.util.*;
@@ -39,6 +40,9 @@ public class DynamicCacheChangeBatch implements DiscoveryCustomMessage {
@GridToStringInclude
private Map<String, Map<UUID, Boolean>> clientNodes;
+ /** Custom message ID. */
+ private IgniteUuid id = IgniteUuid.randomUuid();
+
/**
* @param reqs Requests.
*/
@@ -48,6 +52,11 @@ public class DynamicCacheChangeBatch implements DiscoveryCustomMessage {
this.reqs = reqs;
}
+ /** {@inheritDoc} */
+ @Override public IgniteUuid id() {
+ return id;
+ }
+
/**
* @return Collection of change requests.
*/
@@ -70,11 +79,6 @@ public class DynamicCacheChangeBatch implements DiscoveryCustomMessage {
}
/** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(DynamicCacheChangeBatch.class, this);
- }
-
- /** {@inheritDoc} */
@Override public boolean incrementMinorTopologyVersion() {
return true;
}
@@ -88,4 +92,9 @@ public class DynamicCacheChangeBatch implements DiscoveryCustomMessage {
@Override public boolean isMutable() {
return false;
}
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(DynamicCacheChangeBatch.class, this);
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80c6cf0b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/AbstractContinuousMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/AbstractContinuousMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/AbstractContinuousMessage.java
index f375777..91768a6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/AbstractContinuousMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/AbstractContinuousMessage.java
@@ -18,6 +18,7 @@
package org.apache.ignite.internal.processors.continuous;
import org.apache.ignite.internal.managers.discovery.*;
+import org.apache.ignite.lang.*;
import java.util.*;
@@ -28,6 +29,9 @@ public abstract class AbstractContinuousMessage implements DiscoveryCustomMessag
/** Routine ID. */
protected final UUID routineId;
+ /** Custom message ID. */
+ private final IgniteUuid id = IgniteUuid.randomUuid();
+
/**
* @param id Id.
*/
@@ -35,6 +39,11 @@ public abstract class AbstractContinuousMessage implements DiscoveryCustomMessag
routineId = id;
}
+ /** {@inheritDoc} */
+ @Override public IgniteUuid id() {
+ return id;
+ }
+
/**
* @return Routine ID.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80c6cf0b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
index 2d19d6f..d258a33 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
@@ -42,8 +42,8 @@ public class DataStreamerMultinodeCreateCacheTest extends GridCommonAbstractTest
((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
- ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setSocketTimeout(5000);
- ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setAckTimeout(5000);
+ ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setSocketTimeout(50);
+ ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setAckTimeout(50);
return cfg;
}
[03/50] incubator-ignite git commit: #ignite-990: Add method
getAllOutTx to IgniteCache.
Posted by yz...@apache.org.
#ignite-990: Add method getAllOutTx to IgniteCache.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ab20fd90
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ab20fd90
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ab20fd90
Branch: refs/heads/ignite-695
Commit: ab20fd9059c21c65f3b34da67d75fc94098850e3
Parents: 5f06f57
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri Jun 5 19:06:10 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri Jun 5 19:06:10 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/IgniteCache.java | 11 ++
.../processors/cache/GridCacheAdapter.java | 17 ++-
.../processors/cache/GridCacheProxyImpl.java | 14 ++-
.../processors/cache/IgniteCacheProxy.java | 23 +++++
.../processors/cache/IgniteInternalCache.java | 11 +-
.../processors/igfs/IgfsMetaManager.java | 2 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 83 +++++++++++++++
.../GridCacheExAbstractFullApiSelfTest.java | 103 -------------------
.../GridCacheExColocatedFullApiSelfTest.java | 33 ------
.../near/GridCacheExNearFullApiSelfTest.java | 39 -------
.../GridCacheExReplicatedFullApiSelfTest.java | 33 ------
.../local/GridCacheExLocalFullApiSelfTest.java | 30 ------
.../IgniteCacheFullApiSelfTestSuite.java | 6 --
13 files changed, 155 insertions(+), 250 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index f9007a2..07f4f3f 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -311,10 +311,21 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
@IgniteAsyncSupported
@Override public Map<K, V> getAll(Set<? extends K> keys);
+ /**
+ * Gets values from cache. Will bypass started transaction, if any, i.e. will not enlist entries
+ * and will not lock any keys if pessimistic transaction is started by thread.
+ *
+ * @param keys The keys whose associated values are to be returned.
+ * @return A map of entries that were found for the given keys.
+ */
+ @IgniteAsyncSupported
+ public Map<K, V> getAllOutTx(Set<? extends K> keys);
+
/** {@inheritDoc} */
@IgniteAsyncSupported
@Override public boolean containsKey(K key);
+ /** {@inheritDoc} */
@IgniteAsyncSupported
public boolean containsKeys(Set<? extends K> keys);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 9d98ce7..56b5c15 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -1220,11 +1220,22 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
}
/** {@inheritDoc} */
- @Nullable @Override public Map<K, V> getAllOutTx(List<K> keys) throws IgniteCheckedException {
+ @Nullable @Override public Map<K, V> getAllOutTx(Set<? extends K> keys) throws IgniteCheckedException {
+ return getAllOutTxAsync(keys).get();
+ }
+
+ /** {@inheritDoc} */
+ @Override public IgniteInternalFuture<Map<K, V>> getAllOutTxAsync(Set<? extends K> keys) {
String taskName = ctx.kernalContext().job().currentTaskName();
- return getAllAsync(keys, !ctx.config().isReadFromBackup(), /*skip tx*/true, null, null, taskName, true, false)
- .get();
+ return getAllAsync(keys,
+ !ctx.config().isReadFromBackup(),
+ /*skip tx*/true,
+ null,
+ null,
+ taskName,
+ !ctx.keepPortable(),
+ false);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index 9a6d08a..63ba242 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -329,7 +329,7 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
}
/** {@inheritDoc} */
- @Nullable @Override public Map<K, V> getAllOutTx(List<K> keys) throws IgniteCheckedException {
+ @Nullable @Override public Map<K, V> getAllOutTx(Set<? extends K> keys) throws IgniteCheckedException {
CacheOperationContext prev = gate.enter(opCtx);
try {
@@ -341,6 +341,18 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte
}
/** {@inheritDoc} */
+ @Nullable @Override public IgniteInternalFuture<Map<K, V>> getAllOutTxAsync(Set<? extends K> keys) {
+ CacheOperationContext prev = gate.enter(opCtx);
+
+ try {
+ return delegate.getAllOutTxAsync(keys);
+ }
+ finally {
+ gate.leave(prev);
+ }
+ }
+
+ /** {@inheritDoc} */
@Override public boolean isIgfsDataCache() {
CacheOperationContext prev = gate.enter(opCtx);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index f840015..4390993 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -699,6 +699,29 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
}
}
+ /** {@inheritDoc} */
+ @Override public Map<K, V> getAllOutTx(Set<? extends K> keys) {
+ try {
+ CacheOperationContext prev = onEnter(opCtx);
+
+ try {
+ if (isAsync()) {
+ setFuture(delegate.getAllOutTxAsync(keys));
+
+ return null;
+ }
+ else
+ return delegate.getAllOutTx(keys);
+ }
+ finally {
+ onLeave(prev);
+ }
+ }
+ catch (IgniteCheckedException e) {
+ throw cacheException(e);
+ }
+ }
+
/**
* @param keys Keys.
* @return Values map.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
index ccce1b7..d98379c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
@@ -1623,7 +1623,16 @@ public interface IgniteInternalCache<K, V> extends Iterable<Cache.Entry<K, V>> {
* @return Value.
* @throws IgniteCheckedException If failed.
*/
- @Nullable public Map<K, V> getAllOutTx(List<K> keys) throws IgniteCheckedException;
+ public Map<K, V> getAllOutTx(Set<? extends K> keys) throws IgniteCheckedException;
+
+ /**
+ * Gets values from cache. Will bypass started transaction, if any, i.e. will not enlist entries
+ * and will not lock any keys if pessimistic transaction is started by thread.
+ *
+ * @param keys Keys to get values for.
+ * @return Future for getAllOutTx operation.
+ */
+ public IgniteInternalFuture<Map<K, V>> getAllOutTxAsync(Set<? extends K> keys);
/**
* Checks whether this cache is IGFS data cache.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
index e33e0d4..b98c5d8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
@@ -669,7 +669,7 @@ public class IgfsMetaManager extends IgfsManager {
private Map<String, IgfsListingEntry> directoryListing(IgniteUuid fileId, boolean skipTx) throws IgniteCheckedException {
assert fileId != null;
- IgfsFileInfo info = skipTx ? id2InfoPrj.getAllOutTx(Collections.singletonList(fileId)).get(fileId) :
+ IgfsFileInfo info = skipTx ? id2InfoPrj.getAllOutTx(Collections.singleton(fileId)).get(fileId) :
id2InfoPrj.get(fileId);
return info == null ? Collections.<String, IgfsListingEntry>emptyMap() : info.listing();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index da20869..9bfbd15 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -4893,6 +4893,89 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
}
/**
+ * @throws Exception If failed.
+ */
+ public void testGetOutTx() throws Exception {
+ checkGetOutTx(false);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testGetOutTxAsync() throws Exception {
+ checkGetOutTx(true);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ private void checkGetOutTx(boolean async) throws Exception {
+ final AtomicInteger lockEvtCnt = new AtomicInteger();
+
+ IgnitePredicate<Event> lsnr = new IgnitePredicate<Event>() {
+ @Override public boolean apply(Event evt) {
+ lockEvtCnt.incrementAndGet();
+
+ return true;
+ }
+ };
+
+ try {
+ IgniteCache<String, Integer> cache = grid(0).cache(null);
+
+ List<String> keys = primaryKeysForCache(cache, 2);
+
+ assertEquals(2, keys.size());
+
+ cache.put(keys.get(0), 0);
+ cache.put(keys.get(1), 1);
+
+ grid(0).events().localListen(lsnr, EVT_CACHE_OBJECT_LOCKED, EVT_CACHE_OBJECT_UNLOCKED);
+
+ if (async)
+ cache = cache.withAsync();
+
+ try (Transaction tx = transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
+ Integer val0 = cache.get(keys.get(0));
+
+ if (async)
+ val0 = cache.<Integer>future().get();
+
+ assertEquals(0, val0.intValue());
+
+ Map<String, Integer> allOutTx = cache.getAllOutTx(F.asSet(keys.get(1)));
+
+ if (async)
+ allOutTx = cache.<Map<String, Integer>>future().get();
+
+ assertEquals(1, allOutTx.size());
+
+ assertTrue(allOutTx.containsKey(keys.get(1)));
+
+ assertEquals(1, allOutTx.get(keys.get(1)).intValue());
+ }
+
+ assertTrue(GridTestUtils.waitForCondition(new PA() {
+ @Override public boolean apply() {
+ info("Lock event count: " + lockEvtCnt.get());
+ if (atomicityMode() == ATOMIC)
+ return lockEvtCnt.get() == 0;
+
+ if (cacheMode() == PARTITIONED && nearEnabled()) {
+ if (!grid(0).configuration().isClientMode())
+ return lockEvtCnt.get() == 4;
+ }
+
+ return lockEvtCnt.get() == 2;
+ }
+ }, 15000));
+ }
+ finally {
+ grid(0).events().stopLocalListen(lsnr, EVT_CACHE_OBJECT_LOCKED, EVT_CACHE_OBJECT_UNLOCKED);
+ }
+ }
+
+ /**
* Sets given value, returns old value.
*/
public static final class SetValueProcessor implements EntryProcessor<String, Integer, Integer> {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheExAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheExAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheExAbstractFullApiSelfTest.java
deleted file mode 100644
index 7a1b7cc..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheExAbstractFullApiSelfTest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.events.*;
-import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.lang.*;
-import org.apache.ignite.testframework.*;
-import org.apache.ignite.transactions.*;
-
-import java.util.concurrent.atomic.*;
-
-import static org.apache.ignite.events.EventType.*;
-import static org.apache.ignite.transactions.TransactionConcurrency.*;
-import static org.apache.ignite.transactions.TransactionIsolation.*;
-
-/**
- * Abstract test for private cache interface.
- */
-public abstract class GridCacheExAbstractFullApiSelfTest extends GridCacheAbstractSelfTest {
- /** {@inheritDoc} */
- @Override protected int gridCount() {
- return 4;
- }
-
- /** {@inheritDoc} */
- @Override protected NearCacheConfiguration nearConfiguration() {
- return null;
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testGetOutTx() throws Exception {
- final AtomicInteger lockEvtCnt = new AtomicInteger();
-
- IgnitePredicate<Event> lsnr = new IgnitePredicate<Event>() {
- @Override public boolean apply(Event evt) {
- lockEvtCnt.incrementAndGet();
-
- return true;
- }
- };
-
- try {
- grid(0).events().localListen(lsnr, EVT_CACHE_OBJECT_LOCKED, EVT_CACHE_OBJECT_UNLOCKED);
-
- GridCacheAdapter<String, Integer> cache = ((IgniteKernal)grid(0)).internalCache();
-
- try (Transaction tx = transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
- int key = 0;
-
- for (int i = 0; i < 1000; i++) {
- if (grid(0).affinity(null).mapKeyToNode("key" + i).id().equals(grid(0).localNode().id())) {
- key = i;
-
- break;
- }
- }
-
- cache.get("key" + key);
-
- for (int i = key + 1; i < 1000; i++) {
- if (grid(0).affinity(null).mapKeyToNode("key" + i).id().equals(grid(0).localNode().id())) {
- key = i;
-
- break;
- }
- }
-
- cache.getAllOutTx(F.asList("key" + key));
- }
-
- assertTrue(GridTestUtils.waitForCondition(new PA() {
- @Override public boolean apply() {
- info("Lock event count: " + lockEvtCnt.get());
-
- return lockEvtCnt.get() == (nearEnabled() ? 4 : 2);
- }
- }, 15000));
- }
- finally {
- grid(0).events().stopLocalListen(lsnr, EVT_CACHE_OBJECT_LOCKED, EVT_CACHE_OBJECT_UNLOCKED);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheExColocatedFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheExColocatedFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheExColocatedFullApiSelfTest.java
deleted file mode 100644
index 55b1f92..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheExColocatedFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.distributed.dht;
-
-import org.apache.ignite.cache.*;
-import org.apache.ignite.internal.processors.cache.*;
-
-import static org.apache.ignite.cache.CacheMode.*;
-
-/**
- * Tests private cache interface on colocated cache.
- */
-public class GridCacheExColocatedFullApiSelfTest extends GridCacheExAbstractFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return PARTITIONED;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheExNearFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheExNearFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheExNearFullApiSelfTest.java
deleted file mode 100644
index 11ec96a..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheExNearFullApiSelfTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.distributed.near;
-
-import org.apache.ignite.cache.*;
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.processors.cache.*;
-
-import static org.apache.ignite.cache.CacheMode.*;
-
-/**
- * Tests private cache interface on partitioned cache with near enabled.
- */
-public class GridCacheExNearFullApiSelfTest extends GridCacheExAbstractFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return PARTITIONED;
- }
-
- /** {@inheritDoc} */
- @Override protected NearCacheConfiguration nearConfiguration() {
- return new NearCacheConfiguration();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheExReplicatedFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheExReplicatedFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheExReplicatedFullApiSelfTest.java
deleted file mode 100644
index 32ee784..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheExReplicatedFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.distributed.replicated;
-
-import org.apache.ignite.cache.*;
-import org.apache.ignite.internal.processors.cache.*;
-
-import static org.apache.ignite.cache.CacheMode.*;
-
-/**
- * Tests private cache interface on replicated cache.
- */
-public class GridCacheExReplicatedFullApiSelfTest extends GridCacheExAbstractFullApiSelfTest {
- /** {@inheritDoc} */
- @Override protected CacheMode cacheMode() {
- return REPLICATED;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheExLocalFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheExLocalFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheExLocalFullApiSelfTest.java
deleted file mode 100644
index 71c0495..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheExLocalFullApiSelfTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.local;
-
-import org.apache.ignite.cache.*;
-import org.apache.ignite.internal.processors.cache.*;
-
-/**
- * Tests private cache interface on local cache.
- */
-public class GridCacheExLocalFullApiSelfTest extends GridCacheExAbstractFullApiSelfTest {
- @Override protected CacheMode cacheMode() {
- return CacheMode.LOCAL;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab20fd90/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
index 369e041..5fa3283 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
@@ -130,12 +130,6 @@ public class IgniteCacheFullApiSelfTestSuite extends TestSuite {
suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.class);
suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.class);
- // Private cache API.
- suite.addTestSuite(GridCacheExLocalFullApiSelfTest.class);
- suite.addTestSuite(GridCacheExReplicatedFullApiSelfTest.class);
- suite.addTestSuite(GridCacheExNearFullApiSelfTest.class);
- suite.addTestSuite(GridCacheExColocatedFullApiSelfTest.class);
-
// Multithreaded // TODO: GG-708
// suite.addTestSuite(GridCacheLocalFullApiMultithreadedSelfTest.class);
// suite.addTestSuite(GridCacheReplicatedFullApiMultithreadedSelfTest.class);
[46/50] incubator-ignite git commit: #sberb-25: IgniteCache.removeAll
ignores tx timeout - add JavaDoc for IgniteCache.removeAll
Posted by yz...@apache.org.
#sberb-25: IgniteCache.removeAll ignores tx timeout - add JavaDoc for IgniteCache.removeAll
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6a155962
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6a155962
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6a155962
Branch: refs/heads/ignite-695
Commit: 6a1559623ed587bd793e922e762b5ec76af024ad
Parents: 8f455a9
Author: ivasilinets <iv...@gridgain.com>
Authored: Wed Jun 10 15:40:49 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Wed Jun 10 15:40:49 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/IgniteCache.java | 25 +++++++++++++++++-
.../processors/cache/IgniteInternalCache.java | 27 ++++++--------------
2 files changed, 32 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6a155962/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index a54adc9..2b97e55 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -30,6 +30,7 @@ import org.jetbrains.annotations.*;
import javax.cache.*;
import javax.cache.configuration.*;
+import javax.cache.event.*;
import javax.cache.expiry.*;
import javax.cache.integration.*;
import javax.cache.processor.*;
@@ -378,7 +379,29 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
@IgniteAsyncSupported
@Override public void removeAll(Set<? extends K> keys);
- /** {@inheritDoc} */
+ /**
+ * Removes all of the mappings from this cache.
+ * <p>
+ * The order that the individual entries are removed is undefined.
+ * <p>
+ * For every mapping that exists the following are called:
+ * <ul>
+ * <li>any registered {@link CacheEntryRemovedListener}s</li>
+ * <li>if the cache is a write-through cache, the {@link CacheWriter}</li>
+ * </ul>
+ * If the cache is empty, the {@link CacheWriter} is not called.
+ * <p>
+ * This operation is not transactional. It calls broadcast closure that
+ * deletes all primary keys from remote nodes.
+ * <p>
+ * This is potentially an expensive operation as listeners are invoked.
+ * Use {@link #clear()} to avoid this.
+ *
+ * @throws IllegalStateException if the cache is {@link #isClosed()}
+ * @throws CacheException if there is a problem during the remove
+ * @see #clear()
+ * @see CacheWriter#deleteAll
+ */
@IgniteAsyncSupported
@Override public void removeAll();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6a155962/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
index d98379c..9972f92 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
@@ -1135,11 +1135,9 @@ public interface IgniteInternalCache<K, V> extends Iterable<Cache.Entry<K, V>> {
public IgniteInternalFuture<Boolean> removeAsync(K key, V val);
/**
- * Removes given key mappings from cache for entries for which the optionally passed in filters do
- * pass.
+ * Removes given key mappings from cache.
* <p>
- * If write-through is enabled, the values will be removed from {@link CacheStore}
- * via <code>@link CacheStore#removeAll(Transaction, Collection)</code> method.
+ * If write-through is enabled, the values will be removed from {@link CacheStore} via {@link IgniteDataStreamer}.
* <h2 class="header">Transactions</h2>
* This method is transactional and will enlist the entry into ongoing transaction
* if there is one.
@@ -1150,11 +1148,9 @@ public interface IgniteInternalCache<K, V> extends Iterable<Cache.Entry<K, V>> {
public void removeAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException;
/**
- * Asynchronously removes given key mappings from cache for entries for which the optionally
- * passed in filters do pass.
+ * Asynchronously removes given key mappings from cache for entries.
* <p>
- * If write-through is enabled, the values will be removed from {@link CacheStore}
- * via <code>@link CacheStore#removeAll(Transaction, Collection)</code> method.
+ * If write-through is enabled, the values will be removed from {@link CacheStore} via {@link IgniteDataStreamer}.
* <h2 class="header">Transactions</h2>
* This method is transactional and will enlist the entry into ongoing transaction
* if there is one.
@@ -1166,20 +1162,13 @@ public interface IgniteInternalCache<K, V> extends Iterable<Cache.Entry<K, V>> {
public IgniteInternalFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys);
/**
- * Removes mappings from cache for entries for which the optionally passed in filters do
- * pass. If passed in filters are {@code null}, then all entries in cache will be enrolled
- * into transaction.
+ * Removes mappings from cache.
* <p>
- * <b>USE WITH CARE</b> - if your cache has many entries that pass through the filter or if filter
- * is empty, then transaction will quickly become very heavy and slow. Also, locks
- * are acquired in undefined order, so it may cause a deadlock when used with
- * other concurrent transactional updates.
+ * <b>USE WITH CARE</b> - if your cache has many entries then transaction will quickly become very heavy and slow.
* <p>
- * If write-through is enabled, the values will be removed from {@link CacheStore}
- * via <code>@link CacheStore#removeAll(Transaction, Collection)</code> method.
+ * If write-through is enabled, the values will be removed from {@link CacheStore} via {@link IgniteDataStreamer}.
* <h2 class="header">Transactions</h2>
- * This method is transactional and will enlist the entry into ongoing transaction
- * if there is one.
+ * This method is not transactional.
*
* @throws IgniteCheckedException If remove failed.
*/
[13/50] incubator-ignite git commit: # IGNITE-992 Review.
Posted by yz...@apache.org.
# IGNITE-992 Review.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/662f7337
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/662f7337
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/662f7337
Branch: refs/heads/ignite-695
Commit: 662f7337f7d03f94373f4ebd083d308823aff50c
Parents: a5b5ec7
Author: AKuznetsov <ak...@gridgain.com>
Authored: Mon Jun 8 16:44:25 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Jun 8 16:44:25 2015 +0700
----------------------------------------------------------------------
.../internal/util/IgniteExceptionRegistry.java | 7 +-
.../visor/node/VisorNodeDataCollectorTask.java | 9 ++-
.../node/VisorNodeDataCollectorTaskResult.java | 17 +++--
.../internal/visor/query/VisorQueryJob.java | 11 +--
.../internal/visor/query/VisorQueryTask.java | 3 +-
.../visor/util/VisorExceptionWrapper.java | 78 ++++++++++++++++++++
.../internal/visor/util/VisorTaskUtils.java | 10 +++
7 files changed, 114 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/662f7337/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
index ab113d7..a56570a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.util;
import org.apache.ignite.*;
import org.apache.ignite.internal.util.tostring.*;
import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.internal.visor.util.*;
import java.io.*;
import java.util.*;
@@ -160,7 +161,7 @@ public class IgniteExceptionRegistry {
/** */
@GridToStringExclude
- private final Throwable error;
+ private final VisorExceptionWrapper error;
/** */
private final long threadId;
@@ -186,7 +187,7 @@ public class IgniteExceptionRegistry {
*/
public ExceptionInfo(long order, Throwable error, String msg, long threadId, String threadName, long time) {
this.order = order;
- this.error = error;
+ this.error = VisorTaskUtils.wrap(error);
this.threadId = threadId;
this.threadName = threadName;
this.time = time;
@@ -210,7 +211,7 @@ public class IgniteExceptionRegistry {
/**
* @return Suppressed error.
*/
- public Throwable error() {
+ public VisorExceptionWrapper error() {
return error;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/662f7337/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
index fde871b..7dbfd39 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java
@@ -23,6 +23,7 @@ import org.apache.ignite.compute.*;
import org.apache.ignite.internal.processors.task.*;
import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.internal.visor.*;
+import org.apache.ignite.internal.visor.util.*;
import org.jetbrains.annotations.*;
import java.util.*;
@@ -87,7 +88,7 @@ public class VisorNodeDataCollectorTask extends VisorMultiNodeTask<VisorNodeData
else {
// Ignore nodes that left topology.
if (!(unhandledEx instanceof ClusterGroupEmptyException))
- taskRes.unhandledEx().put(nid, unhandledEx);
+ taskRes.unhandledEx().put(nid, VisorTaskUtils.wrap(unhandledEx));
}
}
}
@@ -116,13 +117,13 @@ public class VisorNodeDataCollectorTask extends VisorMultiNodeTask<VisorNodeData
taskRes.events().addAll(jobRes.events());
if (jobRes.eventsEx() != null)
- taskRes.eventsEx().put(nid, jobRes.eventsEx());
+ taskRes.eventsEx().put(nid, VisorTaskUtils.wrap(jobRes.eventsEx()));
if (!jobRes.caches().isEmpty())
taskRes.caches().put(nid, jobRes.caches());
if (jobRes.cachesEx() != null)
- taskRes.cachesEx().put(nid, jobRes.cachesEx());
+ taskRes.cachesEx().put(nid, VisorTaskUtils.wrap(jobRes.cachesEx()));
if (!jobRes.igfss().isEmpty())
taskRes.igfss().put(nid, jobRes.igfss());
@@ -131,6 +132,6 @@ public class VisorNodeDataCollectorTask extends VisorMultiNodeTask<VisorNodeData
taskRes.igfsEndpoints().put(nid, jobRes.igfsEndpoints());
if (jobRes.igfssEx() != null)
- taskRes.igfssEx().put(nid, jobRes.igfssEx());
+ taskRes.igfssEx().put(nid, VisorTaskUtils.wrap(jobRes.igfssEx()));
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/662f7337/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java
index 6485978..1a4eb02 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTaskResult.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.visor.node;
import org.apache.ignite.internal.visor.cache.*;
import org.apache.ignite.internal.visor.event.*;
import org.apache.ignite.internal.visor.igfs.*;
+import org.apache.ignite.internal.visor.util.*;
import java.io.*;
import java.util.*;
@@ -32,7 +33,7 @@ public class VisorNodeDataCollectorTaskResult implements Serializable {
private static final long serialVersionUID = 0L;
/** Unhandled exceptions from nodes. */
- private final Map<UUID, Throwable> unhandledEx = new HashMap<>();
+ private final Map<UUID, VisorExceptionWrapper> unhandledEx = new HashMap<>();
/** Nodes grid names. */
private final Map<UUID, String> gridNames = new HashMap<>();
@@ -50,13 +51,13 @@ public class VisorNodeDataCollectorTaskResult implements Serializable {
private final List<VisorGridEvent> evts = new ArrayList<>();
/** Exceptions caught during collecting events from nodes. */
- private final Map<UUID, Throwable> evtsEx = new HashMap<>();
+ private final Map<UUID, VisorExceptionWrapper> evtsEx = new HashMap<>();
/** All caches collected from nodes. */
private final Map<UUID, Collection<VisorCache>> caches = new HashMap<>();
/** Exceptions caught during collecting caches from nodes. */
- private final Map<UUID, Throwable> cachesEx = new HashMap<>();
+ private final Map<UUID, VisorExceptionWrapper> cachesEx = new HashMap<>();
/** All IGFS collected from nodes. */
private final Map<UUID, Collection<VisorIgfs>> igfss = new HashMap<>();
@@ -65,7 +66,7 @@ public class VisorNodeDataCollectorTaskResult implements Serializable {
private final Map<UUID, Collection<VisorIgfsEndpoint>> igfsEndpoints = new HashMap<>();
/** Exceptions caught during collecting IGFS from nodes. */
- private final Map<UUID, Throwable> igfssEx = new HashMap<>();
+ private final Map<UUID, VisorExceptionWrapper> igfssEx = new HashMap<>();
/**
* @return {@code true} If no data was collected.
@@ -88,7 +89,7 @@ public class VisorNodeDataCollectorTaskResult implements Serializable {
/**
* @return Unhandled exceptions from nodes.
*/
- public Map<UUID, Throwable> unhandledEx() {
+ public Map<UUID, VisorExceptionWrapper> unhandledEx() {
return unhandledEx;
}
@@ -123,7 +124,7 @@ public class VisorNodeDataCollectorTaskResult implements Serializable {
/**
* @return Exceptions caught during collecting events from nodes.
*/
- public Map<UUID, Throwable> eventsEx() {
+ public Map<UUID, VisorExceptionWrapper> eventsEx() {
return evtsEx;
}
@@ -137,7 +138,7 @@ public class VisorNodeDataCollectorTaskResult implements Serializable {
/**
* @return Exceptions caught during collecting caches from nodes.
*/
- public Map<UUID, Throwable> cachesEx() {
+ public Map<UUID, VisorExceptionWrapper> cachesEx() {
return cachesEx;
}
@@ -158,7 +159,7 @@ public class VisorNodeDataCollectorTaskResult implements Serializable {
/**
* @return Exceptions caught during collecting IGFS from nodes.
*/
- public Map<UUID, Throwable> igfssEx() {
+ public Map<UUID, VisorExceptionWrapper> igfssEx() {
return igfssEx;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/662f7337/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
index 8915240..82555cc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
@@ -24,6 +24,7 @@ import org.apache.ignite.internal.processors.query.*;
import org.apache.ignite.internal.processors.timeout.*;
import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.internal.visor.*;
+import org.apache.ignite.internal.visor.util.*;
import org.apache.ignite.lang.*;
import javax.cache.*;
@@ -36,7 +37,7 @@ import static org.apache.ignite.internal.visor.query.VisorQueryUtils.*;
/**
* Job for execute SCAN or SQL query and get first page of results.
*/
-public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? extends Exception, VisorQueryResultEx>> {
+public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? extends VisorExceptionWrapper, VisorQueryResultEx>> {
/** */
private static final long serialVersionUID = 0L;
@@ -61,7 +62,7 @@ public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? exten
}
/** {@inheritDoc} */
- @Override protected IgniteBiTuple<? extends Exception, VisorQueryResultEx> run(VisorQueryArg arg) {
+ @Override protected IgniteBiTuple<? extends VisorExceptionWrapper, VisorQueryResultEx> run(VisorQueryArg arg) {
try {
UUID nid = ignite.localNode().id();
@@ -110,8 +111,8 @@ public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? exten
Collection<GridQueryFieldMetadata> meta = cur.fieldsMeta();
if (meta == null)
- return new IgniteBiTuple<Exception, VisorQueryResultEx>(
- new SQLException("Fail to execute query. No metadata available."), null);
+ return new IgniteBiTuple<>(
+ VisorTaskUtils.wrap(new SQLException("Fail to execute query. No metadata available.")), null);
else {
List<VisorQueryField> names = new ArrayList<>(meta.size());
@@ -138,7 +139,7 @@ public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? exten
}
}
catch (Exception e) {
- return new IgniteBiTuple<>(e, null);
+ return new IgniteBiTuple<>(VisorTaskUtils.wrap(e), null);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/662f7337/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
index 4f2fda5..98c876a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
@@ -19,13 +19,14 @@ package org.apache.ignite.internal.visor.query;
import org.apache.ignite.internal.processors.task.*;
import org.apache.ignite.internal.visor.*;
+import org.apache.ignite.internal.visor.util.*;
import org.apache.ignite.lang.*;
/**
* Task for execute SCAN or SQL query and get first page of results.
*/
@GridInternal
-public class VisorQueryTask extends VisorOneNodeTask<VisorQueryArg, IgniteBiTuple<? extends Exception, VisorQueryResultEx>> {
+public class VisorQueryTask extends VisorOneNodeTask<VisorQueryArg, IgniteBiTuple<? extends VisorExceptionWrapper, VisorQueryResultEx>> {
/** */
private static final long serialVersionUID = 0L;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/662f7337/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
new file mode 100644
index 0000000..be6f63c
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
@@ -0,0 +1,78 @@
+/*
+ * 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.visor.util;
+
+/**
+ * Wrapper of exceptions for transferring to Visor with absent exception classes.
+ */
+public class VisorExceptionWrapper extends Throwable {
+ /** Detail message string of this throwable */
+ private String detailMsg;
+
+ /** Simple class name of original throwable */
+ private String originalName;
+
+ /** Full class name of original throwable */
+ private String fullName;
+
+ /**
+ * Wrap throwable by presented on Visor throwable object.
+ *
+ * @param cause Base throwable object.
+ */
+ public VisorExceptionWrapper(Throwable cause) {
+ assert cause != null;
+
+ originalName = cause.getClass().getSimpleName();
+ fullName = cause.getClass().getName();
+
+ detailMsg = cause.getMessage();
+
+ StackTraceElement[] stackTrace = cause.getStackTrace();
+
+ if (stackTrace != null)
+ setStackTrace(stackTrace);
+
+ if (cause.getCause() != null)
+ initCause(new VisorExceptionWrapper(cause.getCause()));
+ }
+
+ /**
+ * @return Simple name of base throwable object.
+ */
+ public String getOriginalName() {
+ return originalName;
+ }
+
+ /**
+ * @return Full name of base throwable object.
+ */
+ public String getFullName() {
+ return fullName;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String getMessage() {
+ return detailMsg;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return (detailMsg != null) ? (fullName + ": " + detailMsg) : fullName;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/662f7337/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
index e8ae76d..b0afbc9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
@@ -867,4 +867,14 @@ public class VisorTaskUtils {
return bos.toByteArray();
}
+
+ /**
+ * Wrap throwable object of any type to presented on Visor throwable object.
+ *
+ * @param e Base throwable object.
+ * @return Wrapped throwable object.
+ */
+ public static VisorExceptionWrapper wrap(Throwable e) {
+ return new VisorExceptionWrapper(e);
+ }
}
[42/50] incubator-ignite git commit: # IGNITE-992 Minor.
Posted by yz...@apache.org.
# IGNITE-992 Minor.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/af120a7a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/af120a7a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/af120a7a
Branch: refs/heads/ignite-695
Commit: af120a7ac00e5dd3b591b21f17d2f38d6f93668d
Parents: eeae5b7
Author: AKuznetsov <ak...@gridgain.com>
Authored: Wed Jun 10 17:38:28 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Wed Jun 10 17:38:28 2015 +0700
----------------------------------------------------------------------
.../ignite/internal/visor/query/VisorQueryJob.java | 2 +-
.../ignite/internal/visor/util/VisorTaskUtils.java | 16 +++++-----------
2 files changed, 6 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af120a7a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
index e977d2e..bd9fb1e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryJob.java
@@ -139,7 +139,7 @@ public class VisorQueryJob extends VisorJob<VisorQueryArg, IgniteBiTuple<? exten
}
}
catch (Exception e) {
- return new IgniteBiTuple<>(VisorTaskUtils.wrap(e), null);
+ return new IgniteBiTuple<>(new VisorExceptionWrapper(e), null);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/af120a7a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
index b0afbc9..6636a08 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
@@ -436,6 +436,7 @@ public class VisorTaskUtils {
* @param file Starting folder
* @param maxDepth Depth of the tree. If 1 - just look in the folder, no sub-folders.
* @param filter file filter.
+ * @return List of found files.
*/
public static List<VisorLogFile> fileTree(File file, int maxDepth, @Nullable FileFilter filter) {
if (file.isDirectory()) {
@@ -506,7 +507,7 @@ public class VisorTaskUtils {
*
* @param f File to process.
* @return File charset.
- * @throws IOException
+ * @throws IOException in case of error.
*/
public static Charset decode(File f) throws IOException {
SortedMap<String, Charset> charsets = Charset.availableCharsets();
@@ -735,8 +736,10 @@ public class VisorTaskUtils {
* Log message.
*
* @param log Logger.
+ * @param msg Message to log.
* @param clazz class.
* @param start start time.
+ * @return Time when message was logged.
*/
public static long log(@Nullable IgniteLogger log, String msg, Class<?> clazz, long start) {
final long end = U.currentTimeMillis();
@@ -791,6 +794,7 @@ public class VisorTaskUtils {
*
* @param args A string array containing the program and its arguments.
* @return Started process.
+ * @throws IOException in case of error.
*/
public static Process openInConsole(String... args) throws IOException {
return openInConsole(null, args);
@@ -867,14 +871,4 @@ public class VisorTaskUtils {
return bos.toByteArray();
}
-
- /**
- * Wrap throwable object of any type to presented on Visor throwable object.
- *
- * @param e Base throwable object.
- * @return Wrapped throwable object.
- */
- public static VisorExceptionWrapper wrap(Throwable e) {
- return new VisorExceptionWrapper(e);
- }
}
[12/50] incubator-ignite git commit: # ignite-sprint-5 sanity check
for classname.properies load
Posted by yz...@apache.org.
# ignite-sprint-5 sanity check for classname.properies load
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8467a3c3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8467a3c3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8467a3c3
Branch: refs/heads/ignite-695
Commit: 8467a3c36414192268b8d852715fc501f53b4772
Parents: a5b5ec7
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 8 12:42:36 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 8 12:42:36 2015 +0300
----------------------------------------------------------------------
.../internal/MarshallerContextAdapter.java | 36 ++++++++++++++++++--
1 file changed, 34 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8467a3c3/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
index 5dca2f2..21f2264 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
@@ -18,6 +18,7 @@
package org.apache.ignite.internal;
import org.apache.ignite.*;
+import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*;
import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.marshaller.*;
import org.jsr166.*;
@@ -49,10 +50,29 @@ public abstract class MarshallerContextAdapter implements MarshallerContext {
Enumeration<URL> urls = ldr.getResources(CLS_NAMES_FILE);
- while (urls.hasMoreElements())
+ boolean foundClsNames = false;
+
+ while (urls.hasMoreElements()) {
processResource(urls.nextElement());
- processResource(ldr.getResource(JDK_CLS_NAMES_FILE));
+ foundClsNames = true;
+ }
+
+ if (!foundClsNames)
+ throw new IgniteException("Failed to load class names properties file packaged with ignite binaries " +
+ "[file=" + CLS_NAMES_FILE + ", ldr=" + ldr + ']');
+
+ URL jdkClsNames = ldr.getResource(JDK_CLS_NAMES_FILE);
+
+ if (jdkClsNames == null)
+ throw new IgniteException("Failed to load class names properties file packaged with ignite binaries " +
+ "[file=" + JDK_CLS_NAMES_FILE + ", ldr=" + ldr + ']');
+
+ processResource(jdkClsNames);
+
+ checkHasClassName(GridDhtPartitionFullMap.class.getName(), ldr, CLS_NAMES_FILE);
+ checkHasClassName(GridDhtPartitionMap.class.getName(), ldr, CLS_NAMES_FILE);
+ checkHasClassName(HashMap.class.getName(), ldr, JDK_CLS_NAMES_FILE);
}
catch (IOException e) {
throw new IllegalStateException("Failed to initialize marshaller context.", e);
@@ -60,6 +80,18 @@ public abstract class MarshallerContextAdapter implements MarshallerContext {
}
/**
+ * @param clsName Class name.
+ * @param ldr Class loader used to get properties file.
+ * @param fileName File name.
+ */
+ private void checkHasClassName(String clsName, ClassLoader ldr, String fileName) {
+ if (!map.containsKey(clsName.hashCode()))
+ throw new IgniteException("Failed to read class name from class names properties file. " +
+ "Make sure class names properties file packaged with ignite binaries is not corrupted " +
+ "[clsName=" + clsName + ", fileName=" + fileName + ", ldr=" + ldr + ']');
+ }
+
+ /**
* @param url Resource URL.
* @throws IOException In case of error.
*/
[50/50] incubator-ignite git commit: # i-695 merge sp-5
Posted by yz...@apache.org.
# i-695 merge sp-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8428193f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8428193f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8428193f
Branch: refs/heads/ignite-695
Commit: 8428193ff273dfec1cf159819157e9179de0e2af
Parents: 393be92 addc91b
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Jun 10 16:49:35 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Jun 10 16:49:35 2015 +0300
----------------------------------------------------------------------
DEVNOTES.txt | 42 +-
.../client/memcache/MemcacheRestExample.java | 32 +-
.../java/org/apache/ignite/IgniteCache.java | 41 +-
.../apache/ignite/internal/IgniteKernal.java | 30 +-
.../ignite/internal/IgniteNodeAttributes.java | 5 +-
.../org/apache/ignite/internal/IgnitionEx.java | 8 +-
.../internal/MarshallerContextAdapter.java | 36 +-
.../internal/managers/GridManagerAdapter.java | 9 +
.../checkpoint/GridCheckpointManager.java | 52 +-
.../discovery/DiscoveryCustomMessage.java | 6 +
.../discovery/GridDiscoveryManager.java | 60 +-
.../managers/indexing/GridIndexingManager.java | 4 -
.../affinity/GridAffinityAssignment.java | 12 +
.../affinity/GridAffinityAssignmentCache.java | 9 +-
.../affinity/GridAffinityProcessor.java | 23 +-
.../cache/DynamicCacheChangeBatch.java | 19 +-
.../cache/DynamicCacheDescriptor.java | 17 +
.../processors/cache/GridCacheAdapter.java | 21 +-
.../processors/cache/GridCacheContext.java | 13 +
.../GridCachePartitionExchangeManager.java | 26 +-
.../processors/cache/GridCacheProcessor.java | 37 +-
.../processors/cache/GridCacheProxyImpl.java | 14 +-
.../processors/cache/GridCacheTtlManager.java | 9 +-
.../processors/cache/IgniteCacheProxy.java | 23 +
.../processors/cache/IgniteInternalCache.java | 38 +-
.../dht/atomic/GridDhtAtomicCache.java | 22 +-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 6 +-
.../dht/preloader/GridDhtForceKeysFuture.java | 40 +-
.../GridDhtPartitionsExchangeFuture.java | 64 ++-
.../transactions/IgniteTxLocalAdapter.java | 28 +
.../cache/transactions/IgniteTxManager.java | 3 -
.../continuous/AbstractContinuousMessage.java | 9 +
.../continuous/GridContinuousProcessor.java | 2 +
.../datastreamer/DataStreamerImpl.java | 92 ++-
.../datastructures/DataStructuresProcessor.java | 107 +++-
.../processors/hadoop/HadoopTaskContext.java | 14 +-
.../processors/igfs/IgfsMetaManager.java | 2 +-
.../igfs/IgfsSecondaryFileSystemImpl.java | 2 +-
.../service/GridServiceProcessor.java | 4 +-
.../timeout/GridSpiTimeoutObject.java | 73 +++
.../timeout/GridTimeoutProcessor.java | 105 +++-
.../IgniteTxRollbackCheckedException.java | 9 +
.../util/nio/GridCommunicationClient.java | 30 +-
.../util/nio/GridNioDelimitedBuffer.java | 2 +-
.../util/nio/GridNioRecoveryDescriptor.java | 13 +-
.../util/nio/GridTcpCommunicationClient.java | 554 -------------------
.../util/nio/GridTcpNioCommunicationClient.java | 8 -
.../ignite/internal/visor/cache/VisorCache.java | 2 +-
.../VisorCacheConfigurationCollectorJob.java | 6 +-
.../internal/visor/cache/VisorCacheMetrics.java | 19 +-
.../cache/VisorCacheMetricsCollectorTask.java | 10 +-
.../cache/VisorCacheStoreConfiguration.java | 5 +-
.../visor/node/VisorNodeDataCollectorTask.java | 9 +-
.../node/VisorNodeDataCollectorTaskResult.java | 17 +-
.../node/VisorNodeSuppressedErrorsTask.java | 12 +-
.../internal/visor/query/VisorQueryJob.java | 11 +-
.../internal/visor/query/VisorQueryTask.java | 3 +-
.../visor/util/VisorExceptionWrapper.java | 81 +++
.../internal/visor/util/VisorTaskUtils.java | 6 +-
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 33 +-
.../org/apache/ignite/spi/IgniteSpiContext.java | 10 +
.../ignite/spi/IgniteSpiTimeoutObject.java | 44 ++
.../spi/checkpoint/noop/NoopCheckpointSpi.java | 3 +-
.../communication/tcp/TcpCommunicationSpi.java | 438 ++++-----------
.../tcp/TcpCommunicationSpiMBean.java | 2 -
.../ignite/spi/discovery/tcp/ClientImpl.java | 3 -
.../ignite/spi/discovery/tcp/ServerImpl.java | 16 +-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 158 +-----
.../RoundRobinGlobalLoadBalancer.java | 2 +-
...acheReadOnlyTransactionalClientSelfTest.java | 327 +++++++++++
.../cache/GridCacheAbstractFullApiSelfTest.java | 83 +++
.../GridCacheExAbstractFullApiSelfTest.java | 103 ----
.../IgniteCountDownLatchAbstractSelfTest.java | 102 ++++
.../GridCacheExColocatedFullApiSelfTest.java | 33 --
.../near/GridCacheExNearFullApiSelfTest.java | 39 --
.../GridCacheExReplicatedFullApiSelfTest.java | 33 --
.../IgniteCacheClientNearCacheExpiryTest.java | 103 ++++
.../IgniteCacheExpiryPolicyTestSuite.java | 2 +
.../local/GridCacheExLocalFullApiSelfTest.java | 30 -
.../continuous/GridEventConsumeSelfTest.java | 7 +-
.../DataStreamerMultiThreadedSelfTest.java | 59 +-
.../DataStreamerMultinodeCreateCacheTest.java | 97 ++++
.../nio/GridNioDelimitedBufferSelfTest.java | 112 ++++
.../util/nio/GridNioDelimitedBufferTest.java | 112 ----
.../internal/util/nio/GridNioSelfTest.java | 2 +-
.../loadtests/hashmap/GridCacheTestContext.java | 1 +
.../IgniteMessagingWithClientTest.java | 2 +
.../GridTcpCommunicationSpiAbstractTest.java | 4 +-
...mmunicationSpiConcurrentConnectSelfTest.java | 2 +-
.../GridTcpCommunicationSpiConfigSelfTest.java | 2 -
...cpCommunicationSpiMultithreadedSelfTest.java | 2 +-
.../discovery/AbstractDiscoverySelfTest.java | 13 +-
.../tcp/TcpClientDiscoverySpiSelfTest.java | 25 +
.../stream/socket/SocketStreamerSelfTest.java | 29 +-
.../testframework/GridSpiTestContext.java | 10 +
.../ignite/testframework/GridTestUtils.java | 2 +-
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../IgniteCacheFullApiSelfTestSuite.java | 6 -
.../ignite/testsuites/IgniteCacheTestSuite.java | 1 +
.../testsuites/IgniteCacheTestSuite4.java | 2 +
.../testsuites/IgniteStreamSelfTestSuite.java | 39 ++
.../testsuites/IgniteStreamTestSuite.java | 39 --
.../testsuites/IgniteUtilSelfTestSuite.java | 2 +-
.../fs/IgniteHadoopFileSystemCounterWriter.java | 14 +-
.../hadoop/fs/v1/IgniteHadoopFileSystem.java | 70 +--
.../hadoop/fs/v2/IgniteHadoopFileSystem.java | 2 +-
.../processors/hadoop/HadoopDefaultJobInfo.java | 2 +-
.../internal/processors/hadoop/HadoopUtils.java | 282 +++++++++-
.../hadoop/SecondaryFileSystemProvider.java | 4 +-
.../hadoop/taskexecutor/HadoopRunnableTask.java | 20 +-
.../processors/hadoop/v2/HadoopV2Job.java | 31 +-
.../hadoop/v2/HadoopV2JobResourceManager.java | 26 +-
.../hadoop/v2/HadoopV2TaskContext.java | 48 +-
.../hadoop/HadoopClientProtocolSelfTest.java | 6 +-
.../hadoop/HadoopAbstractSelfTest.java | 14 +-
.../hadoop/HadoopCommandLineTest.java | 14 +-
.../processors/hadoop/HadoopMapReduceTest.java | 176 +++++-
.../hadoop/HadoopTaskExecutionSelfTest.java | 2 +-
.../hadoop/HadoopTasksAllVersionsTest.java | 15 +-
.../processors/hadoop/HadoopTasksV1Test.java | 5 +-
.../processors/hadoop/HadoopTasksV2Test.java | 5 +-
.../processors/hadoop/HadoopV2JobSelfTest.java | 6 +-
.../collections/HadoopAbstractMapTest.java | 12 +
.../cache/GridCacheOffheapIndexGetSelfTest.java | 62 ++-
124 files changed, 2973 insertions(+), 1934 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8428193f/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
index 0754a5a,5fa3283..8ceb7e7
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
@@@ -130,16 -130,10 +130,10 @@@ public class IgniteCacheFullApiSelfTest
suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.class);
suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.class);
- // Private cache API.
- suite.addTestSuite(GridCacheExLocalFullApiSelfTest.class);
- suite.addTestSuite(GridCacheExReplicatedFullApiSelfTest.class);
- suite.addTestSuite(GridCacheExNearFullApiSelfTest.class);
- suite.addTestSuite(GridCacheExColocatedFullApiSelfTest.class);
-
-// Multithreaded // TODO: GG-708
-// suite.addTestSuite(GridCacheLocalFullApiMultithreadedSelfTest.class);
-// suite.addTestSuite(GridCacheReplicatedFullApiMultithreadedSelfTest.class);
-// suite.addTestSuite(GridCachePartitionedFullApiMultithreadedSelfTest.class);
+ // Multithreaded
+ suite.addTestSuite(GridCacheLocalFullApiMultithreadedSelfTest.class);
+ suite.addTestSuite(GridCacheReplicatedFullApiMultithreadedSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedFullApiMultithreadedSelfTest.class);
return suite;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8428193f/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8428193f/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
----------------------------------------------------------------------
[02/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-sprint-5' into ignite-883_1
Posted by yz...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-883_1
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/75006b80
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/75006b80
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/75006b80
Branch: refs/heads/ignite-695
Commit: 75006b805a9997354ea9a1c645ad11ab8f9ba631
Parents: e237b00 5f06f57
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jun 5 18:11:06 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jun 5 18:11:06 2015 +0300
----------------------------------------------------------------------
.../affinity/GridAffinityProcessor.java | 23 ++++-
.../datastreamer/DataStreamerImpl.java | 92 ++++++++++++++------
.../DataStreamerMultiThreadedSelfTest.java | 59 +++++++++----
.../IgniteMessagingWithClientTest.java | 2 +
4 files changed, 131 insertions(+), 45 deletions(-)
----------------------------------------------------------------------
[40/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-5' into ignite-sprint-5
Posted by yz...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e0426f0f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e0426f0f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e0426f0f
Branch: refs/heads/ignite-695
Commit: e0426f0f92d8700fee7db667c5fccf7db89d81ad
Parents: ac908e9 928be42
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jun 10 10:10:35 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jun 10 10:10:35 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/managers/indexing/GridIndexingManager.java | 4 ----
1 file changed, 4 deletions(-)
----------------------------------------------------------------------
[16/50] incubator-ignite git commit: # ignite-sprint-5 added test for
ignite-999
Posted by yz...@apache.org.
# ignite-sprint-5 added test for ignite-999
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/837462f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/837462f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/837462f5
Branch: refs/heads/ignite-695
Commit: 837462f5dade1930a8faaffb466c7bf05f9e06f9
Parents: a5b5ec7
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 8 14:55:20 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 8 14:55:20 2015 +0300
----------------------------------------------------------------------
.../DataStreamerMultinodeCreateCacheTest.java | 97 ++++++++++++++++++++
.../ignite/testsuites/IgniteCacheTestSuite.java | 1 +
2 files changed, 98 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/837462f5/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
new file mode 100644
index 0000000..2d19d6f
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
@@ -0,0 +1,97 @@
+/*
+ * 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.datastreamer;
+
+import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.*;
+
+/**
+ *
+ */
+public class DataStreamerMultinodeCreateCacheTest extends GridCommonAbstractTest {
+ /** */
+ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
+
+ ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setSocketTimeout(5000);
+ ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setAckTimeout(5000);
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @Override protected void afterTest() throws Exception {
+ stopAllGrids();
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testCreateCacheAndStream() throws Exception {
+ final int THREADS = 5;
+
+ startGrids(THREADS);
+
+ final AtomicInteger idx = new AtomicInteger();
+
+ IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+ @Override public Object call() throws Exception {
+ int threadIdx = idx.getAndIncrement();
+
+ long stopTime = System.currentTimeMillis() + 60_000;
+
+ Ignite ignite = grid(threadIdx);
+
+ int iter = 0;
+
+ while (System.currentTimeMillis() < stopTime) {
+ String cacheName = "cache-" + threadIdx + "-" + iter;
+
+ try (IgniteCache<Integer, String> cache = ignite.getOrCreateCache(cacheName)) {
+ try (IgniteDataStreamer<Object, Object> stmr = ignite.dataStreamer(cacheName)) {
+ ((DataStreamerImpl<Object, Object>)stmr).maxRemapCount(0);
+
+ for (int i = 0; i < 1000; i++)
+ stmr.addData(i, i);
+ }
+ }
+
+ iter++;
+ }
+
+ return null;
+ }
+ }, THREADS, "create-cache");
+
+ fut.get(2 * 60_000);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/837462f5/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
index 9634e9a..7e4409d 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
@@ -111,6 +111,7 @@ public class IgniteCacheTestSuite extends TestSuite {
suite.addTestSuite(GridCacheStoreValueBytesSelfTest.class);
suite.addTestSuite(DataStreamProcessorSelfTest.class);
suite.addTestSuite(DataStreamerMultiThreadedSelfTest.class);
+ suite.addTestSuite(DataStreamerMultinodeCreateCacheTest.class);
suite.addTestSuite(DataStreamerImplSelfTest.class);
suite.addTestSuite(GridCacheEntryMemorySizeSelfTest.class);
suite.addTestSuite(GridCacheClearAllSelfTest.class);
[41/50] incubator-ignite git commit: # sprint-5 minor
Posted by yz...@apache.org.
# sprint-5 minor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/eeae5b7c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/eeae5b7c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/eeae5b7c
Branch: refs/heads/ignite-695
Commit: eeae5b7c047da373f1f2b167b42e34418b450c2b
Parents: e0426f0
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Jun 10 13:23:15 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Jun 10 13:23:15 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eeae5b7c/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index 0270a7c..5aceaae 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -5,9 +5,9 @@
* 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.
@@ -420,7 +420,7 @@ class ServerImpl extends TcpDiscoveryImpl {
assert nodeId != null;
if (log.isDebugEnabled())
- log.debug("Pinging node: " + nodeId + "].");
+ log.debug("Pinging node: " + nodeId + "]");
if (nodeId == getLocalNodeId())
return true;
[49/50] incubator-ignite git commit: # ignite-sprint-5 more info in
error message
Posted by yz...@apache.org.
# ignite-sprint-5 more info in error message
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/addc91b6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/addc91b6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/addc91b6
Branch: refs/heads/ignite-695
Commit: addc91b6518c4982d3410e3989b7d43c4db6e0c1
Parents: 8e26c48
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jun 10 16:38:21 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jun 10 16:38:21 2015 +0300
----------------------------------------------------------------------
.../processors/affinity/GridAffinityAssignmentCache.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/addc91b6/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
index c46490e..47f222e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
@@ -406,7 +406,10 @@ public class GridAffinityAssignmentCache {
if (cache == null) {
throw new IllegalStateException("Getting affinity for topology version earlier than affinity is " +
- "calculated [locNodeId=" + ctx.localNodeId() + ", topVer=" + topVer +
+ "calculated [locNodeId=" + ctx.localNodeId() +
+ ", cache=" + cacheName +
+ ", history=" + affCache.keySet() +
+ ", topVer=" + topVer +
", head=" + head.get().topologyVersion() + ']');
}
}
[30/50] incubator-ignite git commit: # ignite-sprint-5 more debug
info in test
Posted by yz...@apache.org.
# ignite-sprint-5 more debug info in test
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/410c1d79
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/410c1d79
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/410c1d79
Branch: refs/heads/ignite-695
Commit: 410c1d7941fd0283bc6c419e3fc54bce89f59e3f
Parents: e7d8b5a
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jun 9 11:43:52 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jun 9 11:43:52 2015 +0300
----------------------------------------------------------------------
.../processors/continuous/GridEventConsumeSelfTest.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/410c1d79/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
index 2c9e513..9ffef4b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
@@ -114,8 +114,11 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest {
GridContinuousProcessor proc = grid.context().continuous();
try {
- if (!noAutoUnsubscribe)
- assertEquals(0, U.<Map>field(proc, "rmtInfos").size());
+ if (!noAutoUnsubscribe) {
+ Map rmtInfos = U.field(proc, "rmtInfos");
+
+ assertTrue("Unexpected remote infos: " + rmtInfos, rmtInfos.isEmpty());
+ }
}
finally {
U.<Map>field(proc, "rmtInfos").clear();
[05/50] incubator-ignite git commit: Merge branches 'ignite-941' and
'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
into ignite-941
Posted by yz...@apache.org.
Merge branches 'ignite-941' and 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-941
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/59db4a5e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/59db4a5e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/59db4a5e
Branch: refs/heads/ignite-695
Commit: 59db4a5e0f1dd83d56cb95f0a4184451f0a387fd
Parents: b4d1915 ab20fd9
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Fri Jun 5 13:55:21 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Fri Jun 5 13:55:21 2015 -0700
----------------------------------------------------------------------
.../java/org/apache/ignite/IgniteCache.java | 11 ++
.../affinity/GridAffinityProcessor.java | 23 ++++-
.../processors/cache/GridCacheAdapter.java | 17 ++-
.../processors/cache/GridCacheProxyImpl.java | 14 ++-
.../processors/cache/IgniteCacheProxy.java | 23 +++++
.../processors/cache/IgniteInternalCache.java | 11 +-
.../datastreamer/DataStreamerImpl.java | 92 ++++++++++++-----
.../processors/igfs/IgfsMetaManager.java | 2 +-
.../ignite/internal/visor/cache/VisorCache.java | 2 +-
.../VisorCacheConfigurationCollectorJob.java | 6 +-
.../internal/visor/cache/VisorCacheMetrics.java | 19 ++--
.../cache/VisorCacheMetricsCollectorTask.java | 10 +-
.../cache/VisorCacheStoreConfiguration.java | 5 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 83 +++++++++++++++
.../GridCacheExAbstractFullApiSelfTest.java | 103 -------------------
.../GridCacheExColocatedFullApiSelfTest.java | 33 ------
.../near/GridCacheExNearFullApiSelfTest.java | 39 -------
.../GridCacheExReplicatedFullApiSelfTest.java | 33 ------
.../local/GridCacheExLocalFullApiSelfTest.java | 30 ------
.../DataStreamerMultiThreadedSelfTest.java | 59 ++++++++---
.../IgniteMessagingWithClientTest.java | 2 +
.../IgniteCacheFullApiSelfTestSuite.java | 6 --
22 files changed, 309 insertions(+), 314 deletions(-)
----------------------------------------------------------------------
[44/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-5' into ignite-sprint-5_
Posted by yz...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5_
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/eb415ba8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/eb415ba8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/eb415ba8
Branch: refs/heads/ignite-695
Commit: eb415ba89513d50f6b690e79d3d99186c057f2e1
Parents: 2b056f0 af120a7
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Jun 10 14:04:18 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Jun 10 14:04:18 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/visor/query/VisorQueryJob.java | 2 +-
.../ignite/internal/visor/util/VisorTaskUtils.java | 16 +++++-----------
2 files changed, 6 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
[38/50] incubator-ignite git commit: # spring-5 - Removed confusing
warning
Posted by yz...@apache.org.
# spring-5 - Removed confusing warning
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/928be42c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/928be42c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/928be42c
Branch: refs/heads/ignite-695
Commit: 928be42cf309293a3cd9947b8614eb1bc045ddef
Parents: 91104a2
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Tue Jun 9 23:40:22 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Tue Jun 9 23:40:22 2015 -0700
----------------------------------------------------------------------
.../ignite/internal/managers/indexing/GridIndexingManager.java | 4 ----
1 file changed, 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/928be42c/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java
index 9a81cd1..f1561bd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java
@@ -21,7 +21,6 @@ import org.apache.ignite.*;
import org.apache.ignite.internal.*;
import org.apache.ignite.internal.managers.*;
import org.apache.ignite.internal.util.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.indexing.*;
@@ -46,9 +45,6 @@ public class GridIndexingManager extends GridManagerAdapter<IndexingSpi> {
* @throws IgniteCheckedException Thrown in case of any errors.
*/
@Override public void start() throws IgniteCheckedException {
- if (!enabled())
- U.warn(log, "Indexing is disabled (to enable please configure GridIndexingSpi).");
-
startSpi();
if (log.isDebugEnabled())
[32/50] incubator-ignite git commit: Merge branch 'ignite-992' into
ignite-sprint-5
Posted by yz...@apache.org.
Merge branch 'ignite-992' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/abeddc9c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/abeddc9c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/abeddc9c
Branch: refs/heads/ignite-695
Commit: abeddc9c49d5e38d26e35dbf2e662bc7a11bfd0c
Parents: 638dd31 8740b6e
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Jun 9 16:38:25 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Jun 9 16:38:25 2015 +0700
----------------------------------------------------------------------
.../visor/node/VisorNodeDataCollectorTask.java | 9 ++-
.../node/VisorNodeDataCollectorTaskResult.java | 17 ++--
.../node/VisorNodeSuppressedErrorsTask.java | 12 ++-
.../internal/visor/query/VisorQueryJob.java | 11 +--
.../internal/visor/query/VisorQueryTask.java | 3 +-
.../visor/util/VisorExceptionWrapper.java | 81 ++++++++++++++++++++
.../internal/visor/util/VisorTaskUtils.java | 10 +++
7 files changed, 124 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
[25/50] incubator-ignite git commit: # IGNITE-992 Review.
Posted by yz...@apache.org.
# IGNITE-992 Review.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8740b6e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8740b6e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8740b6e7
Branch: refs/heads/ignite-695
Commit: 8740b6e76107eeb2885e9454f670044edf11e619
Parents: e934bca
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Jun 9 12:20:23 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Jun 9 12:20:23 2015 +0700
----------------------------------------------------------------------
.../internal/util/IgniteExceptionRegistry.java | 7 +++----
.../visor/node/VisorNodeSuppressedErrorsTask.java | 12 +++++++++++-
.../internal/visor/util/VisorExceptionWrapper.java | 17 ++++++++++-------
3 files changed, 24 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8740b6e7/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
index 8ad3348..ab113d7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.util;
import org.apache.ignite.*;
import org.apache.ignite.internal.util.tostring.*;
import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.internal.visor.util.*;
import java.io.*;
import java.util.*;
@@ -161,7 +160,7 @@ public class IgniteExceptionRegistry {
/** */
@GridToStringExclude
- private final VisorExceptionWrapper error;
+ private final Throwable error;
/** */
private final long threadId;
@@ -187,7 +186,7 @@ public class IgniteExceptionRegistry {
*/
public ExceptionInfo(long order, Throwable error, String msg, long threadId, String threadName, long time) {
this.order = order;
- this.error = new VisorExceptionWrapper(error);
+ this.error = error;
this.threadId = threadId;
this.threadName = threadName;
this.time = time;
@@ -211,7 +210,7 @@ public class IgniteExceptionRegistry {
/**
* @return Suppressed error.
*/
- public VisorExceptionWrapper error() {
+ public Throwable error() {
return error;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8740b6e7/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeSuppressedErrorsTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeSuppressedErrorsTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeSuppressedErrorsTask.java
index 8b39d09..9fc1cc4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeSuppressedErrorsTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeSuppressedErrorsTask.java
@@ -22,6 +22,7 @@ import org.apache.ignite.internal.processors.task.*;
import org.apache.ignite.internal.util.*;
import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.internal.visor.*;
+import org.apache.ignite.internal.visor.util.*;
import org.apache.ignite.lang.*;
import org.jetbrains.annotations.*;
@@ -83,12 +84,21 @@ public class VisorNodeSuppressedErrorsTask extends VisorMultiNodeTask<Map<UUID,
List<IgniteExceptionRegistry.ExceptionInfo> errors = ignite.context().exceptionRegistry().getErrors(order);
+ List<IgniteExceptionRegistry.ExceptionInfo> wrapped = new ArrayList<>(errors.size());
+
for (IgniteExceptionRegistry.ExceptionInfo error : errors) {
if (error.order() > order)
order = error.order();
+
+ wrapped.add(new IgniteExceptionRegistry.ExceptionInfo(error.order(),
+ new VisorExceptionWrapper(error.error()),
+ error.message(),
+ error.threadId(),
+ error.threadName(),
+ error.time()));
}
- return new IgniteBiTuple<>(order, errors);
+ return new IgniteBiTuple<>(order, wrapped);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8740b6e7/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
index e253dcf..d2ae0e1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
@@ -21,14 +21,17 @@ package org.apache.ignite.internal.visor.util;
* Exception wrapper for safe for transferring to Visor.
*/
public class VisorExceptionWrapper extends Throwable {
+ /** */
+ private static final long serialVersionUID = 0L;
+
/** Detail message string of this throwable */
private String detailMsg;
/** Simple class name of base throwable object. */
- private String classSimpleName;
+ private String clsSimpleName;
/** Class name of base throwable object. */
- private String className;
+ private String clsName;
/**
* Wrap throwable by presented on Visor throwable object.
@@ -38,8 +41,8 @@ public class VisorExceptionWrapper extends Throwable {
public VisorExceptionWrapper(Throwable cause) {
assert cause != null;
- classSimpleName = cause.getClass().getSimpleName();
- className = cause.getClass().getName();
+ clsSimpleName = cause.getClass().getSimpleName();
+ clsName = cause.getClass().getName();
detailMsg = cause.getMessage();
@@ -56,14 +59,14 @@ public class VisorExceptionWrapper extends Throwable {
* @return Class simple name of base throwable object.
*/
public String getClassSimpleName() {
- return classSimpleName;
+ return clsSimpleName;
}
/**
* @return Class name of base throwable object.
*/
public String getClassName() {
- return className;
+ return clsName;
}
/** {@inheritDoc} */
@@ -73,6 +76,6 @@ public class VisorExceptionWrapper extends Throwable {
/** {@inheritDoc} */
@Override public String toString() {
- return (detailMsg != null) ? (className + ": " + detailMsg) : className;
+ return (detailMsg != null) ? (clsName + ": " + detailMsg) : clsName;
}
}
[33/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-883_1' into ignite-sprint-5
Posted by yz...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-883_1' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e3fe8ce5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e3fe8ce5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e3fe8ce5
Branch: refs/heads/ignite-695
Commit: e3fe8ce581b20d3e378876e3c5b94ff6e22baff8
Parents: abeddc9 eb0e2db
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jun 9 13:44:56 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jun 9 13:44:56 2015 +0300
----------------------------------------------------------------------
.../processors/affinity/GridAffinityAssignment.java | 12 ++++++++++++
.../affinity/GridAffinityAssignmentCache.java | 4 ++--
.../dht/atomic/GridNearAtomicUpdateFuture.java | 6 +++++-
.../preloader/GridDhtPartitionsExchangeFuture.java | 14 +++++++++-----
4 files changed, 28 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
[17/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-5' into ignite-sprint-5
Posted by yz...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2a8e2abe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2a8e2abe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2a8e2abe
Branch: refs/heads/ignite-695
Commit: 2a8e2abe4081334802f9950757b7d3776a3a6179
Parents: 837462f 015afdb
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 8 14:55:48 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 8 14:55:48 2015 +0300
----------------------------------------------------------------------
.../apache/ignite/internal/IgniteKernal.java | 26 +-
.../org/apache/ignite/internal/IgnitionEx.java | 8 +-
.../internal/MarshallerContextAdapter.java | 36 +-
.../internal/managers/GridManagerAdapter.java | 9 +
.../checkpoint/GridCheckpointManager.java | 52 +-
.../discovery/GridDiscoveryManager.java | 28 +-
.../processors/cache/GridCacheAdapter.java | 4 +
.../GridCachePartitionExchangeManager.java | 26 +-
.../processors/cache/GridCacheTtlManager.java | 9 +-
.../dht/atomic/GridDhtAtomicCache.java | 18 +-
.../GridDhtPartitionsExchangeFuture.java | 50 +-
.../cache/transactions/IgniteTxManager.java | 3 -
.../datastructures/DataStructuresProcessor.java | 107 +++-
.../service/GridServiceProcessor.java | 4 +-
.../timeout/GridSpiTimeoutObject.java | 73 +++
.../timeout/GridTimeoutProcessor.java | 105 +++-
.../util/nio/GridCommunicationClient.java | 30 +-
.../util/nio/GridNioRecoveryDescriptor.java | 13 +-
.../util/nio/GridTcpCommunicationClient.java | 554 -------------------
.../util/nio/GridTcpNioCommunicationClient.java | 8 -
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 27 +-
.../org/apache/ignite/spi/IgniteSpiContext.java | 10 +
.../ignite/spi/IgniteSpiTimeoutObject.java | 44 ++
.../spi/checkpoint/noop/NoopCheckpointSpi.java | 3 +-
.../communication/tcp/TcpCommunicationSpi.java | 438 ++++-----------
.../tcp/TcpCommunicationSpiMBean.java | 2 -
.../ignite/spi/discovery/tcp/ClientImpl.java | 3 -
.../ignite/spi/discovery/tcp/ServerImpl.java | 10 +-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 156 +-----
.../IgniteCountDownLatchAbstractSelfTest.java | 102 ++++
.../IgniteCacheClientNearCacheExpiryTest.java | 103 ++++
.../IgniteCacheExpiryPolicyTestSuite.java | 2 +
.../internal/util/nio/GridNioSelfTest.java | 2 +-
.../GridTcpCommunicationSpiAbstractTest.java | 4 +-
...mmunicationSpiConcurrentConnectSelfTest.java | 2 +-
.../GridTcpCommunicationSpiConfigSelfTest.java | 2 -
...cpCommunicationSpiMultithreadedSelfTest.java | 2 +-
.../discovery/AbstractDiscoverySelfTest.java | 13 +-
.../tcp/TcpClientDiscoverySpiSelfTest.java | 25 +
.../testframework/GridSpiTestContext.java | 10 +
40 files changed, 920 insertions(+), 1203 deletions(-)
----------------------------------------------------------------------
[31/50] incubator-ignite git commit: #sberb-23: Get caused exception
for indexed entity in offheap mode. Add test for bug
Posted by yz...@apache.org.
#sberb-23: Get caused exception for indexed entity in offheap mode.
Add test for bug
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/638dd313
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/638dd313
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/638dd313
Branch: refs/heads/ignite-695
Commit: 638dd313eded4946adcf3dc3d309db1c59ae8ce3
Parents: 410c1d7
Author: ivasilinets <iv...@gridgain.com>
Authored: Tue Jun 9 12:13:51 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Tue Jun 9 12:13:51 2015 +0300
----------------------------------------------------------------------
.../cache/GridCacheOffheapIndexGetSelfTest.java | 62 +++++++++++++++++++-
1 file changed, 61 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/638dd313/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
index 41eb45a..4e613ae 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
@@ -19,14 +19,17 @@ package org.apache.ignite.internal.processors.cache;
import org.apache.ignite.*;
import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.spi.discovery.tcp.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.apache.ignite.spi.swapspace.file.*;
import org.apache.ignite.testframework.junits.common.*;
+import org.apache.ignite.transactions.*;
import javax.cache.*;
+import java.io.*;
import java.util.*;
import static org.apache.ignite.cache.CacheAtomicityMode.*;
@@ -71,7 +74,7 @@ public class GridCacheOffheapIndexGetSelfTest extends GridCommonAbstractTest {
cacheCfg.setAtomicityMode(TRANSACTIONAL);
cacheCfg.setMemoryMode(OFFHEAP_TIERED);
cacheCfg.setEvictionPolicy(null);
- cacheCfg.setIndexedTypes(Long.class, Long.class);
+ cacheCfg.setIndexedTypes(Long.class, Long.class, String.class, TestEntity.class);
cfg.setCacheConfiguration(cacheCfg);
@@ -120,4 +123,61 @@ public class GridCacheOffheapIndexGetSelfTest extends GridCommonAbstractTest {
assertNotNull(e.getValue());
}
}
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testPutGet() throws Exception {
+ IgniteCache<Object, Object> cache = grid(0).cache(null);
+
+ Map map = new HashMap();
+
+ try (Transaction tx = grid(0).transactions().txStart(TransactionConcurrency.PESSIMISTIC,
+ TransactionIsolation.REPEATABLE_READ, 100000, 1000)) {
+
+ for (int i = 4; i < 400; i++) {
+ map.put("key" + i, new TestEntity("value"));
+ map.put(i, "value");
+ }
+
+ cache.putAll(map);
+
+ tx.commit();
+ }
+
+ for (int i = 0; i < 100; i++) {
+ cache.get("key" + i);
+ cache.get(i);
+ }
+ }
+
+ /**
+ * Test entry class.
+ */
+ private static class TestEntity implements Serializable {
+ /** Value. */
+ @QuerySqlField(index = true)
+ private String val;
+
+ /**
+ * @param value Value.
+ */
+ public TestEntity(String value) {
+ this.val = value;
+ }
+
+ /**
+ * @return Value.
+ */
+ public String getValue() {
+ return val;
+ }
+
+ /**
+ * @param val Value
+ */
+ public void setValue(String val) {
+ this.val = val;
+ }
+ }
}
[09/50] incubator-ignite git commit: # ignite-883 fix
ConcurrentModificationException during DiscoCache initialization from the
GridDiscoveryManager.start
Posted by yz...@apache.org.
# ignite-883 fix ConcurrentModificationException during DiscoCache initialization from the GridDiscoveryManager.start
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f4da46cd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f4da46cd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f4da46cd
Branch: refs/heads/ignite-695
Commit: f4da46cd25b61b3d7b55b6fba3884c8fa05f5cb8
Parents: 730ef10
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 8 10:27:04 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 8 10:27:04 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/managers/discovery/GridDiscoveryManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f4da46cd/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 142dbaa..5983553 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -173,7 +173,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
new ConcurrentHashMap8<>();
/** Map of dynamic cache filters. */
- private Map<String, CachePredicate> registeredCaches = new HashMap<>();
+ private Map<String, CachePredicate> registeredCaches = new ConcurrentHashMap<>();
/** */
private final GridSpinBusyLock busyLock = new GridSpinBusyLock();
[39/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-999' into ignite-sprint-5
Posted by yz...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-999' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ac908e9c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ac908e9c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ac908e9c
Branch: refs/heads/ignite-695
Commit: ac908e9cdaccdcd55812360b3392eebb20bea62b
Parents: 91104a2 d4f7a9a
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jun 10 10:09:11 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jun 10 10:09:11 2015 +0300
----------------------------------------------------------------------
.../discovery/DiscoveryCustomMessage.java | 6 ++++
.../discovery/GridDiscoveryManager.java | 32 ++++++++++++++++++++
.../cache/DynamicCacheChangeBatch.java | 19 +++++++++---
.../continuous/AbstractContinuousMessage.java | 9 ++++++
.../DataStreamerMultinodeCreateCacheTest.java | 6 ++--
5 files changed, 64 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
[34/50] incubator-ignite git commit: # ignite-999 minor
Posted by yz...@apache.org.
# ignite-999 minor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d4f7a9af
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d4f7a9af
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d4f7a9af
Branch: refs/heads/ignite-695
Commit: d4f7a9af7dc63263cfb0cda01ba2de7cb30065ef
Parents: 80c6cf0
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jun 9 13:47:35 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jun 9 13:47:35 2015 +0300
----------------------------------------------------------------------
.../datastreamer/DataStreamerMultinodeCreateCacheTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4f7a9af/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
index d258a33..12b6458 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java
@@ -74,7 +74,7 @@ public class DataStreamerMultinodeCreateCacheTest extends GridCommonAbstractTest
int iter = 0;
while (System.currentTimeMillis() < stopTime) {
- String cacheName = "cache-" + threadIdx + "-" + iter;
+ String cacheName = "cache-" + threadIdx + "-" + (iter % 10);
try (IgniteCache<Integer, String> cache = ignite.getOrCreateCache(cacheName)) {
try (IgniteDataStreamer<Object, Object> stmr = ignite.dataStreamer(cacheName)) {
[10/50] incubator-ignite git commit: ignite-883
Posted by yz...@apache.org.
ignite-883
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c7bc598a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c7bc598a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c7bc598a
Branch: refs/heads/ignite-695
Commit: c7bc598a32c06cd1acc6f3e1b162d059d80a53f2
Parents: f4da46c
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 8 11:16:57 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 8 11:16:57 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/managers/discovery/GridDiscoveryManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7bc598a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 5983553..142dbaa 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -173,7 +173,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
new ConcurrentHashMap8<>();
/** Map of dynamic cache filters. */
- private Map<String, CachePredicate> registeredCaches = new ConcurrentHashMap<>();
+ private Map<String, CachePredicate> registeredCaches = new HashMap<>();
/** */
private final GridSpinBusyLock busyLock = new GridSpinBusyLock();
[47/50] incubator-ignite git commit: # ignite-sprint-5 NPE in
RoundRobinGlobalLoadBalancer
Posted by yz...@apache.org.
# ignite-sprint-5 NPE in RoundRobinGlobalLoadBalancer
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/308b0c0c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/308b0c0c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/308b0c0c
Branch: refs/heads/ignite-695
Commit: 308b0c0c9cfff7f8615cbeedd2e0ccfa8288407b
Parents: 8f455a9
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jun 10 16:30:29 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jun 10 16:30:29 2015 +0300
----------------------------------------------------------------------
.../spi/loadbalancing/roundrobin/RoundRobinGlobalLoadBalancer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/308b0c0c/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinGlobalLoadBalancer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinGlobalLoadBalancer.java b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinGlobalLoadBalancer.java
index 8dba0db..a47a17f 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinGlobalLoadBalancer.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinGlobalLoadBalancer.java
@@ -45,7 +45,7 @@ class RoundRobinGlobalLoadBalancer {
private final IgniteLogger log;
/** Current snapshot of nodes which participated in load balancing. */
- private volatile GridNodeList nodeList = new GridNodeList(0, null);
+ private volatile GridNodeList nodeList = new GridNodeList(0, new ArrayList<UUID>(0));
/** Mutex for updating current topology. */
private final Object mux = new Object();
[21/50] incubator-ignite git commit: ignite-10299
Posted by yz...@apache.org.
ignite-10299
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d0e47298
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d0e47298
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d0e47298
Branch: refs/heads/ignite-695
Commit: d0e472987969cec87995dbb36887326b56bd7535
Parents: ea21500
Author: Anton Vinogradov <av...@gridgain.com>
Authored: Tue Jun 9 01:11:28 2015 +0300
Committer: Anton Vinogradov <av...@gridgain.com>
Committed: Tue Jun 9 01:11:28 2015 +0300
----------------------------------------------------------------------
.../spi/discovery/tcp/TcpDiscoverySpi.java | 54 ++++++++++++--------
1 file changed, 32 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d0e47298/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index 70bc9fb..48abcf4 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -18,34 +18,44 @@
package org.apache.ignite.spi.discovery.tcp;
import org.apache.ignite.*;
-import org.apache.ignite.cluster.*;
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.util.*;
-import org.apache.ignite.internal.util.io.*;
-import org.apache.ignite.internal.util.tostring.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.lang.*;
-import org.apache.ignite.marshaller.*;
-import org.apache.ignite.marshaller.jdk.*;
-import org.apache.ignite.resources.*;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.AddressResolver;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteInterruptedCheckedException;
+import org.apache.ignite.internal.util.GridConcurrentSkipListSet;
+import org.apache.ignite.internal.util.io.GridByteArrayOutputStream;
+import org.apache.ignite.internal.util.tostring.GridToStringExclude;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.X;
+import org.apache.ignite.internal.util.typedef.internal.LT;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteBiTuple;
+import org.apache.ignite.lang.IgniteInClosure;
+import org.apache.ignite.lang.IgniteProductVersion;
+import org.apache.ignite.marshaller.Marshaller;
+import org.apache.ignite.marshaller.jdk.JdkMarshaller;
+import org.apache.ignite.resources.IgniteInstanceResource;
+import org.apache.ignite.resources.LoggerResource;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.discovery.*;
-import org.apache.ignite.spi.discovery.tcp.internal.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode;
+import org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryStatistics;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.TcpDiscoveryJdbcIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.spi.discovery.tcp.messages.*;
-import org.jetbrains.annotations.*;
+import org.jetbrains.annotations.Nullable;
import java.io.*;
import java.net.*;
import java.util.*;
-import java.util.concurrent.*;
-import java.util.concurrent.atomic.*;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicLong;
/**
* Discovery SPI implementation that uses TCP/IP for node discovery.
@@ -824,7 +834,7 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi, T
/**
* @param srvPort Server port.
*/
- void initLocalNode(int srvPort, boolean addExtAddrAttr) {
+ protected void initLocalNode(int srvPort, boolean addExtAddrAttr) {
// Init local node.
IgniteBiTuple<Collection<String>, Collection<String>> addrs;
[45/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-gg-10299' into ignite-sprint-5
Posted by yz...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-gg-10299' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8f455a9e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8f455a9e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8f455a9e
Branch: refs/heads/ignite-695
Commit: 8f455a9ee27144adc2f3fe7cd8c5516d3da15fed
Parents: eb415ba 2796bcc
Author: avinogradov <av...@gridgain.com>
Authored: Wed Jun 10 14:09:05 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Wed Jun 10 14:09:05 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java | 2 +-
.../test/java/org/apache/ignite/testframework/GridTestUtils.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[15/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-883_1' into ignite-sprint-5
Posted by yz...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-883_1' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/015afdbf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/015afdbf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/015afdbf
Branch: refs/heads/ignite-695
Commit: 015afdbf1921e6ae5e8cd2f92efc8b4a695f05ca
Parents: 8467a3c c7bc598
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 8 13:38:48 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 8 13:38:48 2015 +0300
----------------------------------------------------------------------
.../apache/ignite/internal/IgniteKernal.java | 26 +-
.../org/apache/ignite/internal/IgnitionEx.java | 8 +-
.../internal/managers/GridManagerAdapter.java | 9 +
.../checkpoint/GridCheckpointManager.java | 52 +-
.../discovery/GridDiscoveryManager.java | 28 +-
.../processors/cache/GridCacheAdapter.java | 4 +
.../GridCachePartitionExchangeManager.java | 26 +-
.../processors/cache/GridCacheTtlManager.java | 9 +-
.../dht/atomic/GridDhtAtomicCache.java | 18 +-
.../GridDhtPartitionsExchangeFuture.java | 50 +-
.../cache/transactions/IgniteTxManager.java | 3 -
.../datastructures/DataStructuresProcessor.java | 107 +++-
.../service/GridServiceProcessor.java | 4 +-
.../timeout/GridSpiTimeoutObject.java | 73 +++
.../timeout/GridTimeoutProcessor.java | 105 +++-
.../util/nio/GridCommunicationClient.java | 30 +-
.../util/nio/GridNioRecoveryDescriptor.java | 13 +-
.../util/nio/GridTcpCommunicationClient.java | 554 -------------------
.../util/nio/GridTcpNioCommunicationClient.java | 8 -
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 27 +-
.../org/apache/ignite/spi/IgniteSpiContext.java | 10 +
.../ignite/spi/IgniteSpiTimeoutObject.java | 44 ++
.../spi/checkpoint/noop/NoopCheckpointSpi.java | 3 +-
.../communication/tcp/TcpCommunicationSpi.java | 438 ++++-----------
.../tcp/TcpCommunicationSpiMBean.java | 2 -
.../ignite/spi/discovery/tcp/ClientImpl.java | 3 -
.../ignite/spi/discovery/tcp/ServerImpl.java | 10 +-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 156 +-----
.../IgniteCountDownLatchAbstractSelfTest.java | 102 ++++
.../IgniteCacheClientNearCacheExpiryTest.java | 103 ++++
.../IgniteCacheExpiryPolicyTestSuite.java | 2 +
.../internal/util/nio/GridNioSelfTest.java | 2 +-
.../GridTcpCommunicationSpiAbstractTest.java | 4 +-
...mmunicationSpiConcurrentConnectSelfTest.java | 2 +-
.../GridTcpCommunicationSpiConfigSelfTest.java | 2 -
...cpCommunicationSpiMultithreadedSelfTest.java | 2 +-
.../discovery/AbstractDiscoverySelfTest.java | 13 +-
.../tcp/TcpClientDiscoverySpiSelfTest.java | 25 +
.../testframework/GridSpiTestContext.java | 10 +
39 files changed, 886 insertions(+), 1201 deletions(-)
----------------------------------------------------------------------
[48/50] incubator-ignite git commit: Merge remote-tracking branch
'origin/ignite-sprint-5' into ignite-sprint-5
Posted by yz...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/8e26c48a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/8e26c48a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/8e26c48a
Branch: refs/heads/ignite-695
Commit: 8e26c48a5c838edbf3815c5585a69d03e5b4da9c
Parents: 308b0c0 6a15596
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jun 10 16:30:57 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jun 10 16:30:57 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/IgniteCache.java | 25 +++++++++++++++++-
.../processors/cache/IgniteInternalCache.java | 27 ++++++--------------
2 files changed, 32 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
[23/50] incubator-ignite git commit: # ignite-992 Review.
Posted by yz...@apache.org.
# ignite-992 Review.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0eee664c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0eee664c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0eee664c
Branch: refs/heads/ignite-695
Commit: 0eee664c0e9a2a0376aa840a5aaf52d6f82a38be
Parents: ea12580
Author: Andrey <an...@gridgain.com>
Authored: Tue Jun 9 11:11:32 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Tue Jun 9 11:11:32 2015 +0700
----------------------------------------------------------------------
.../visor/util/VisorExceptionWrapper.java | 26 ++++++++++----------
1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0eee664c/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
index a2965d7..e253dcf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
@@ -24,11 +24,11 @@ public class VisorExceptionWrapper extends Throwable {
/** Detail message string of this throwable */
private String detailMsg;
- /** Simple class name of original throwable */
- private String originalName;
+ /** Simple class name of base throwable object. */
+ private String classSimpleName;
- /** Full class name of original throwable */
- private String fullName;
+ /** Class name of base throwable object. */
+ private String className;
/**
* Wrap throwable by presented on Visor throwable object.
@@ -38,8 +38,8 @@ public class VisorExceptionWrapper extends Throwable {
public VisorExceptionWrapper(Throwable cause) {
assert cause != null;
- originalName = cause.getClass().getSimpleName();
- fullName = cause.getClass().getName();
+ classSimpleName = cause.getClass().getSimpleName();
+ className = cause.getClass().getName();
detailMsg = cause.getMessage();
@@ -53,17 +53,17 @@ public class VisorExceptionWrapper extends Throwable {
}
/**
- * @return Simple name of base throwable object.
+ * @return Class simple name of base throwable object.
*/
- public String getOriginalName() {
- return originalName;
+ public String getClassSimpleName() {
+ return classSimpleName;
}
/**
- * @return Full name of base throwable object.
+ * @return Class name of base throwable object.
*/
- public String getFullName() {
- return fullName;
+ public String getClassName() {
+ return className;
}
/** {@inheritDoc} */
@@ -73,6 +73,6 @@ public class VisorExceptionWrapper extends Throwable {
/** {@inheritDoc} */
@Override public String toString() {
- return (detailMsg != null) ? (fullName + ": " + detailMsg) : fullName;
+ return (detailMsg != null) ? (className + ": " + detailMsg) : className;
}
}
[04/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-sprint-5' into ignite-gg-10299
Posted by yz...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-gg-10299
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0fc2d738
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0fc2d738
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0fc2d738
Branch: refs/heads/ignite-695
Commit: 0fc2d7384966fc13b7ba6f3e6adfc91068c489c9
Parents: 98176fe ab20fd9
Author: avinogradov <av...@gridgain.com>
Authored: Fri Jun 5 21:38:02 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Fri Jun 5 21:38:02 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/IgniteCache.java | 11 ++
.../affinity/GridAffinityProcessor.java | 23 ++++-
.../processors/cache/GridCacheAdapter.java | 17 ++-
.../processors/cache/GridCacheProxyImpl.java | 14 ++-
.../processors/cache/IgniteCacheProxy.java | 23 +++++
.../processors/cache/IgniteInternalCache.java | 11 +-
.../datastreamer/DataStreamerImpl.java | 92 ++++++++++++-----
.../processors/igfs/IgfsMetaManager.java | 2 +-
.../ignite/internal/visor/cache/VisorCache.java | 2 +-
.../VisorCacheConfigurationCollectorJob.java | 6 +-
.../internal/visor/cache/VisorCacheMetrics.java | 19 ++--
.../cache/VisorCacheMetricsCollectorTask.java | 10 +-
.../cache/VisorCacheStoreConfiguration.java | 5 +-
.../cache/GridCacheAbstractFullApiSelfTest.java | 83 +++++++++++++++
.../GridCacheExAbstractFullApiSelfTest.java | 103 -------------------
.../GridCacheExColocatedFullApiSelfTest.java | 33 ------
.../near/GridCacheExNearFullApiSelfTest.java | 39 -------
.../GridCacheExReplicatedFullApiSelfTest.java | 33 ------
.../local/GridCacheExLocalFullApiSelfTest.java | 30 ------
.../DataStreamerMultiThreadedSelfTest.java | 59 ++++++++---
.../IgniteMessagingWithClientTest.java | 2 +
.../IgniteCacheFullApiSelfTestSuite.java | 6 --
22 files changed, 309 insertions(+), 314 deletions(-)
----------------------------------------------------------------------
[20/50] incubator-ignite git commit: # ignite-sprint-5 minor
optimization in force keys future
Posted by yz...@apache.org.
# ignite-sprint-5 minor optimization in force keys future
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0fa2853e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0fa2853e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0fa2853e
Branch: refs/heads/ignite-695
Commit: 0fa2853e060fee7c9c8c8484be412e91d30c52da
Parents: ff7827e
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 8 16:31:31 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 8 16:31:31 2015 +0300
----------------------------------------------------------------------
.../dht/preloader/GridDhtForceKeysFuture.java | 40 +++++++++++++-------
1 file changed, 26 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0fa2853e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
index 9637fd1..1d57ef7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
@@ -208,21 +208,21 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
* @return {@code True} if some mapping was added.
*/
private boolean map(Iterable<KeyCacheObject> keys, Collection<ClusterNode> exc) {
- Map<ClusterNode, Set<KeyCacheObject>> mappings = new HashMap<>();
-
- ClusterNode loc = cctx.localNode();
-
- int curTopVer = topCntr.get();
+ Map<ClusterNode, Set<KeyCacheObject>> mappings = null;
for (KeyCacheObject key : keys)
- map(key, mappings, exc);
+ mappings = map(key, mappings, exc);
if (isDone())
return false;
boolean ret = false;
- if (!mappings.isEmpty()) {
+ if (mappings != null) {
+ ClusterNode loc = cctx.localNode();
+
+ int curTopVer = topCntr.get();
+
preloader.addFuture(this);
trackable = true;
@@ -275,22 +275,27 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
* @param key Key.
* @param exc Exclude nodes.
* @param mappings Mappings.
+ * @return Mappings.
*/
- private void map(KeyCacheObject key, Map<ClusterNode, Set<KeyCacheObject>> mappings, Collection<ClusterNode> exc) {
+ private Map<ClusterNode, Set<KeyCacheObject>> map(KeyCacheObject key,
+ @Nullable Map<ClusterNode, Set<KeyCacheObject>> mappings,
+ Collection<ClusterNode> exc)
+ {
ClusterNode loc = cctx.localNode();
- int part = cctx.affinity().partition(key);
-
GridCacheEntryEx e = cctx.dht().peekEx(key);
try {
if (e != null && !e.isNewLocked()) {
- if (log.isDebugEnabled())
+ if (log.isDebugEnabled()) {
+ int part = cctx.affinity().partition(key);
+
log.debug("Will not rebalance key (entry is not new) [cacheName=" + cctx.name() +
", key=" + key + ", part=" + part + ", locId=" + cctx.nodeId() + ']');
+ }
// Key has been rebalanced or retrieved already.
- return;
+ return mappings;
}
}
catch (GridCacheEntryRemovedException ignore) {
@@ -299,6 +304,8 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
", locId=" + cctx.nodeId() + ']');
}
+ int part = cctx.affinity().partition(key);
+
List<ClusterNode> owners = F.isEmpty(exc) ? top.owners(part, topVer) :
new ArrayList<>(F.view(top.owners(part, topVer), F.notIn(exc)));
@@ -308,7 +315,7 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
"topVer=" + topVer + ", locId=" + cctx.nodeId() + ']');
// Key is already rebalanced.
- return;
+ return mappings;
}
// Create partition.
@@ -337,9 +344,12 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
log.debug("Will not rebalance key (no nodes to request from with rebalancing disabled) [key=" +
key + ", part=" + part + ", locId=" + cctx.nodeId() + ']');
- return;
+ return mappings;
}
+ if (mappings == null)
+ mappings = U.newHashMap(keys.size());
+
Collection<KeyCacheObject> mappedKeys = F.addIfAbsent(mappings, pick, F.<KeyCacheObject>newSet());
assert mappedKeys != null;
@@ -357,6 +367,8 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
log.debug("Will not rebalance key (local partition is not MOVING) [cacheName=" + cctx.name() +
", key=" + key + ", part=" + locPart + ", locId=" + cctx.nodeId() + ']');
}
+
+ return mappings;
}
/**
[37/50] incubator-ignite git commit: ignite-1002 Inject Ignite before
applying predicate
Posted by yz...@apache.org.
ignite-1002 Inject Ignite before applying predicate
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/91104a29
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/91104a29
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/91104a29
Branch: refs/heads/ignite-695
Commit: 91104a29bc32b6d73e7bf4c70eafa9f777b62352
Parents: e3fe8ce
Author: agura <ag...@gridgain.com>
Authored: Mon Jun 8 18:41:43 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Tue Jun 9 20:17:33 2015 +0300
----------------------------------------------------------------------
.../continuous/GridContinuousProcessor.java | 2 +
.../util/nio/GridNioDelimitedBuffer.java | 2 +-
.../nio/GridNioDelimitedBufferSelfTest.java | 112 +++++++++++++++++++
.../util/nio/GridNioDelimitedBufferTest.java | 112 -------------------
.../stream/socket/SocketStreamerSelfTest.java | 29 ++---
.../ignite/testsuites/IgniteBasicTestSuite.java | 1 +
.../testsuites/IgniteStreamSelfTestSuite.java | 39 +++++++
.../testsuites/IgniteStreamTestSuite.java | 39 -------
.../testsuites/IgniteUtilSelfTestSuite.java | 2 +-
9 files changed, 168 insertions(+), 170 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/91104a29/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
index 67b32a6..38d970b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
@@ -710,6 +710,8 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
try {
IgnitePredicate<ClusterNode> prjPred = data.projectionPredicate();
+ ctx.resource().injectGeneric(prjPred);
+
if (prjPred == null || prjPred.apply(ctx.discovery().node(ctx.localNodeId()))) {
registered = registerHandler(node.id(), routineId, hnd, data.bufferSize(), data.interval(),
data.autoUnsubscribe(), false);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/91104a29/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBuffer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBuffer.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBuffer.java
index 2b764ec..44ab4a5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBuffer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBuffer.java
@@ -85,7 +85,7 @@ public class GridNioDelimitedBuffer {
idx++;
}
else {
- pos = cnt - idx;
+ pos = cnt - (i - pos) - 1;
idx = 0;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/91104a29/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java
new file mode 100644
index 0000000..cbf7d89
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferSelfTest.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.util.nio;
+
+import junit.framework.TestCase;
+
+import java.nio.*;
+import java.util.*;
+
+/**
+ * Tests for {@link GridNioDelimitedBuffer}.
+ */
+public class GridNioDelimitedBufferSelfTest extends TestCase {
+ /** */
+ private static final String ASCII = "ASCII";
+
+ /**
+ * Tests simple delimiter (excluded from alphabet)
+ */
+ public void testReadZString() throws Exception {
+ Random rnd = new Random();
+
+ int buffSize = 0;
+
+ byte[] delim = new byte[] {0};
+
+ List<String> strs = new ArrayList<>(50);
+
+ for (int i = 0; i < 50; i++) {
+ int len = rnd.nextInt(128) + 1;
+
+ buffSize += len + delim.length;
+
+ StringBuilder sb = new StringBuilder(len);
+
+ for (int j = 0; j < len; j++)
+ sb.append((char)(rnd.nextInt(26) + 'a'));
+
+
+ strs.add(sb.toString());
+ }
+
+ ByteBuffer buff = ByteBuffer.allocate(buffSize);
+
+ for (String str : strs) {
+ buff.put(str.getBytes(ASCII));
+ buff.put(delim);
+ }
+
+ buff.flip();
+
+ byte[] msg;
+
+ GridNioDelimitedBuffer delimBuff = new GridNioDelimitedBuffer(delim);
+
+ List<String> res = new ArrayList<>(strs.size());
+
+ while ((msg = delimBuff.read(buff)) != null)
+ res.add(new String(msg, ASCII));
+
+ assertEquals(strs, res);
+ }
+
+ /**
+ * Tests compound delimiter (included to alphabet)
+ */
+ public void testDelim() throws Exception {
+ byte[] delim = "aabb".getBytes(ASCII);
+
+ List<String> strs = Arrays.asList("za", "zaa", "zaab", "zab", "zaabaababbbbabaab");
+
+ int buffSize = 0;
+
+ for (String str : strs)
+ buffSize += str.length() + delim.length;
+
+ ByteBuffer buff = ByteBuffer.allocate(buffSize);
+
+ for (String str : strs) {
+ buff.put(str.getBytes(ASCII));
+ buff.put(delim);
+ }
+
+ buff.flip();
+
+ byte[] msg;
+
+ GridNioDelimitedBuffer delimBuff = new GridNioDelimitedBuffer(delim);
+
+ List<String> res = new ArrayList<>(strs.size());
+
+ while ((msg = delimBuff.read(buff)) != null)
+ res.add(new String(msg, ASCII));
+
+ assertEquals(strs, res);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/91104a29/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferTest.java
deleted file mode 100644
index a0dd2e5..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioDelimitedBufferTest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.util.nio;
-
-import junit.framework.TestCase;
-
-import java.nio.*;
-import java.util.*;
-
-/**
- * Tests for {@link GridNioDelimitedBuffer}.
- */
-public class GridNioDelimitedBufferTest extends TestCase {
- /** */
- private static final String ASCII = "ASCII";
-
- /**
- * Tests simple delimiter (excluded from alphabet)
- */
- public void testReadZString() throws Exception {
- Random rnd = new Random();
-
- int buffSize = 0;
-
- byte[] delim = new byte[] {0};
-
- List<String> strs = new ArrayList<>(50);
-
- for (int i = 0; i < 50; i++) {
- int len = rnd.nextInt(128) + 1;
-
- buffSize += len + delim.length;
-
- StringBuilder sb = new StringBuilder(len);
-
- for (int j = 0; j < len; j++)
- sb.append((char)(rnd.nextInt(26) + 'a'));
-
-
- strs.add(sb.toString());
- }
-
- ByteBuffer buff = ByteBuffer.allocate(buffSize);
-
- for (String str : strs) {
- buff.put(str.getBytes(ASCII));
- buff.put(delim);
- }
-
- buff.flip();
-
- byte[] msg;
-
- GridNioDelimitedBuffer delimBuff = new GridNioDelimitedBuffer(delim);
-
- List<String> res = new ArrayList<>(strs.size());
-
- while ((msg = delimBuff.read(buff)) != null)
- res.add(new String(msg, ASCII));
-
- assertEquals(strs, res);
- }
-
- /**
- * Tests compound delimiter (included to alphabet)
- */
- public void testDelim() throws Exception {
- byte[] delim = "aabb".getBytes(ASCII);
-
- List<String> strs = Arrays.asList("za", "zaa", "zaab", "zab", "zaabaababbbbabaab");
-
- int buffSize = 0;
-
- for (String str : strs)
- buffSize += str.length() + delim.length;
-
- ByteBuffer buff = ByteBuffer.allocate(buffSize);
-
- for (String str : strs) {
- buff.put(str.getBytes(ASCII));
- buff.put(delim);
- }
-
- buff.flip();
-
- byte[] msg;
-
- GridNioDelimitedBuffer delimBuff = new GridNioDelimitedBuffer(delim);
-
- List<String> res = new ArrayList<>(strs.size());
-
- while ((msg = delimBuff.read(buff)) != null)
- res.add(new String(msg, ASCII));
-
- assertEquals(strs, res);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/91104a29/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerSelfTest.java
index 752e43c..04f9b41 100644
--- a/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/stream/socket/SocketStreamerSelfTest.java
@@ -58,14 +58,11 @@ public class SocketStreamerSelfTest extends GridCommonAbstractTest {
/** Port. */
private static int port;
- /** Ignite. */
- private static Ignite ignite;
-
/** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration() throws Exception {
- IgniteConfiguration cfg = super.getConfiguration();
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
- CacheConfiguration ccfg = cacheConfiguration(cfg, null);
+ CacheConfiguration ccfg = defaultCacheConfiguration();
cfg.setCacheConfiguration(ccfg);
@@ -81,8 +78,7 @@ public class SocketStreamerSelfTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
- ignite = startGrids(GRID_CNT);
- ignite.<Integer, String>getOrCreateCache(defaultCacheConfiguration());
+ startGrids(GRID_CNT);
try (ServerSocket sock = new ServerSocket(0)) {
port = sock.getLocalPort();
@@ -94,11 +90,6 @@ public class SocketStreamerSelfTest extends GridCommonAbstractTest {
stopAllGrids();
}
- /** {@inheritDoc} */
- @Override protected void beforeTest() throws Exception {
- ignite.cache(null).clear();
- }
-
/**
* @throws Exception If failed.
*/
@@ -235,6 +226,12 @@ public class SocketStreamerSelfTest extends GridCommonAbstractTest {
{
SocketStreamer<Tuple, Integer, String> sockStmr = null;
+ Ignite ignite = grid(0);
+
+ IgniteCache<Integer, String> cache = ignite.cache(null);
+
+ cache.clear();
+
try (IgniteDataStreamer<Integer, String> stmr = ignite.dataStreamer(null)) {
stmr.allowOverwrite(true);
@@ -242,8 +239,6 @@ public class SocketStreamerSelfTest extends GridCommonAbstractTest {
sockStmr = new SocketStreamer<>();
- IgniteCache<Integer, String> cache = ignite.cache(null);
-
sockStmr.setIgnite(ignite);
sockStmr.setStreamer(stmr);
@@ -279,10 +274,10 @@ public class SocketStreamerSelfTest extends GridCommonAbstractTest {
latch.await();
- assertEquals(CNT, cache.size(CachePeekMode.PRIMARY));
-
for (int i = 0; i < CNT; i++)
assertEquals(Integer.toString(i), cache.get(i));
+
+ assertEquals(CNT, cache.size(CachePeekMode.PRIMARY));
}
finally {
if (sockStmr != null)
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/91104a29/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index e0a1e6e..cc3abb4 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -49,6 +49,7 @@ public class IgniteBasicTestSuite extends TestSuite {
suite.addTest(IgniteExternalizableSelfTestSuite.suite());
suite.addTest(IgniteP2PSelfTestSuite.suite());
suite.addTest(IgniteCacheP2pUnmarshallingErrorTestSuite.suite());
+ suite.addTest(IgniteStreamSelfTestSuite.suite());
suite.addTest(new TestSuite(GridSelfTest.class));
suite.addTest(new TestSuite(GridProjectionSelfTest.class));
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/91104a29/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java
new file mode 100644
index 0000000..a277fc8
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamSelfTestSuite.java
@@ -0,0 +1,39 @@
+/*
+ * 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.testsuites;
+
+import org.apache.ignite.stream.socket.*;
+
+import junit.framework.*;
+
+/**
+ * Stream test suite.
+ */
+public class IgniteStreamSelfTestSuite extends TestSuite {
+ /**
+ * @return Stream tests suite.
+ * @throws Exception If failed.
+ */
+ public static TestSuite suite() throws Exception {
+ TestSuite suite = new TestSuite("Ignite Stream Test Suite");
+
+ suite.addTest(new TestSuite(SocketStreamerSelfTest.class));
+
+ return suite;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/91104a29/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamTestSuite.java
deleted file mode 100644
index 61be976..0000000
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStreamTestSuite.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.testsuites;
-
-import org.apache.ignite.stream.socket.*;
-
-import junit.framework.*;
-
-/**
- * Stream test suite.
- */
-public class IgniteStreamTestSuite extends TestSuite {
- /**
- * @return Stream tests suite.
- * @throws Exception If failed.
- */
- public static TestSuite suite() throws Exception {
- TestSuite suite = new TestSuite("Ignite Stream Test Suite");
-
- suite.addTest(new TestSuite(SocketStreamerSelfTest.class));
-
- return suite;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/91104a29/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
index 32cd038..1c75a7f 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
@@ -67,7 +67,7 @@ public class IgniteUtilSelfTestSuite extends TestSuite {
suite.addTestSuite(GridNioSelfTest.class);
suite.addTestSuite(GridNioFilterChainSelfTest.class);
suite.addTestSuite(GridNioSslSelfTest.class);
- suite.addTestSuite(GridNioDelimitedBufferTest.class);
+ suite.addTestSuite(GridNioDelimitedBufferSelfTest.class);
return suite;
}
[26/50] incubator-ignite git commit: # ignite-sprint-5 fixed javadoc
Posted by yz...@apache.org.
# ignite-sprint-5 fixed javadoc
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/14bb076c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/14bb076c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/14bb076c
Branch: refs/heads/ignite-695
Commit: 14bb076c2ff6343c1681279d867c2a2bc56b4714
Parents: 0fa2853
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jun 9 09:00:04 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jun 9 09:00:04 2015 +0300
----------------------------------------------------------------------
.../main/java/org/apache/ignite/spi/IgniteSpiAdapter.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/14bb076c/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
index d095491..6e7a706 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
@@ -543,12 +543,18 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement
return U.spiAttribute(this, attrName);
}
- /** {@inheritDoc} */
+ /**
+ * @param obj Timeout object.
+ * @see IgniteSpiContext#addTimeoutObject(IgniteSpiTimeoutObject)
+ */
protected void addTimeoutObject(IgniteSpiTimeoutObject obj) {
spiCtx.addTimeoutObject(obj);
}
- /** {@inheritDoc} */
+ /**
+ * @param obj Timeout object.
+ * @see IgniteSpiContext#removeTimeoutObject(IgniteSpiTimeoutObject)
+ */
protected void removeTimeoutObject(IgniteSpiTimeoutObject obj) {
spiCtx.removeTimeoutObject(obj);
}
[24/50] incubator-ignite git commit: Merge branches 'ignite-992' and
'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
into ignite-992
Posted by yz...@apache.org.
Merge branches 'ignite-992' and 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-992
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e934bcad
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e934bcad
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e934bcad
Branch: refs/heads/ignite-695
Commit: e934bcad4235494986a0dd30352210255beb927e
Parents: 0eee664 0fa2853
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Jun 9 12:10:23 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Jun 9 12:10:23 2015 +0700
----------------------------------------------------------------------
DEVNOTES.txt | 42 +-
.../apache/ignite/internal/IgniteKernal.java | 26 +-
.../org/apache/ignite/internal/IgnitionEx.java | 8 +-
.../internal/MarshallerContextAdapter.java | 36 +-
.../internal/managers/GridManagerAdapter.java | 9 +
.../checkpoint/GridCheckpointManager.java | 52 +-
.../discovery/GridDiscoveryManager.java | 28 +-
.../processors/cache/GridCacheAdapter.java | 4 +
.../GridCachePartitionExchangeManager.java | 26 +-
.../processors/cache/GridCacheTtlManager.java | 9 +-
.../dht/atomic/GridDhtAtomicCache.java | 18 +-
.../dht/preloader/GridDhtForceKeysFuture.java | 40 +-
.../GridDhtPartitionsExchangeFuture.java | 50 +-
.../cache/transactions/IgniteTxManager.java | 3 -
.../datastructures/DataStructuresProcessor.java | 107 +++-
.../service/GridServiceProcessor.java | 4 +-
.../timeout/GridSpiTimeoutObject.java | 73 +++
.../timeout/GridTimeoutProcessor.java | 105 +++-
.../util/nio/GridCommunicationClient.java | 30 +-
.../util/nio/GridNioRecoveryDescriptor.java | 13 +-
.../util/nio/GridTcpCommunicationClient.java | 554 -------------------
.../util/nio/GridTcpNioCommunicationClient.java | 8 -
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 27 +-
.../org/apache/ignite/spi/IgniteSpiContext.java | 10 +
.../ignite/spi/IgniteSpiTimeoutObject.java | 44 ++
.../spi/checkpoint/noop/NoopCheckpointSpi.java | 3 +-
.../communication/tcp/TcpCommunicationSpi.java | 438 ++++-----------
.../tcp/TcpCommunicationSpiMBean.java | 2 -
.../ignite/spi/discovery/tcp/ClientImpl.java | 3 -
.../ignite/spi/discovery/tcp/ServerImpl.java | 10 +-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 156 +-----
.../IgniteCountDownLatchAbstractSelfTest.java | 102 ++++
.../IgniteCacheClientNearCacheExpiryTest.java | 103 ++++
.../IgniteCacheExpiryPolicyTestSuite.java | 2 +
.../DataStreamerMultinodeCreateCacheTest.java | 97 ++++
.../internal/util/nio/GridNioSelfTest.java | 2 +-
.../GridTcpCommunicationSpiAbstractTest.java | 4 +-
...mmunicationSpiConcurrentConnectSelfTest.java | 2 +-
.../GridTcpCommunicationSpiConfigSelfTest.java | 2 -
...cpCommunicationSpiMultithreadedSelfTest.java | 2 +-
.../discovery/AbstractDiscoverySelfTest.java | 13 +-
.../tcp/TcpClientDiscoverySpiSelfTest.java | 25 +
.../testframework/GridSpiTestContext.java | 10 +
.../ignite/testsuites/IgniteCacheTestSuite.java | 1 +
44 files changed, 1073 insertions(+), 1230 deletions(-)
----------------------------------------------------------------------
[36/50] incubator-ignite git commit: ignite-10299
Posted by yz...@apache.org.
ignite-10299
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2796bcc9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2796bcc9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2796bcc9
Branch: refs/heads/ignite-695
Commit: 2796bcc9c9abea0257c10cd1f90b48d46dcf9fc5
Parents: ea41b30
Author: avinogradov <av...@gridgain.com>
Authored: Tue Jun 9 15:29:34 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Tue Jun 9 15:29:34 2015 +0300
----------------------------------------------------------------------
.../spi/discovery/tcp/TcpDiscoverySpi.java | 52 ++++++++------------
1 file changed, 21 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2796bcc9/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index dab81ec..e4ef744 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -18,44 +18,34 @@
package org.apache.ignite.spi.discovery.tcp;
import org.apache.ignite.*;
-import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.configuration.AddressResolver;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteInterruptedCheckedException;
-import org.apache.ignite.internal.util.GridConcurrentSkipListSet;
-import org.apache.ignite.internal.util.io.GridByteArrayOutputStream;
-import org.apache.ignite.internal.util.tostring.GridToStringExclude;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.X;
-import org.apache.ignite.internal.util.typedef.internal.LT;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteBiTuple;
-import org.apache.ignite.lang.IgniteInClosure;
-import org.apache.ignite.lang.IgniteProductVersion;
-import org.apache.ignite.marshaller.Marshaller;
-import org.apache.ignite.marshaller.jdk.JdkMarshaller;
-import org.apache.ignite.resources.IgniteInstanceResource;
-import org.apache.ignite.resources.LoggerResource;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.util.*;
+import org.apache.ignite.internal.util.io.*;
+import org.apache.ignite.internal.util.tostring.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
+import org.apache.ignite.resources.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.discovery.*;
-import org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode;
-import org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryStatistics;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.TcpDiscoveryJdbcIpFinder;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinder;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.spi.discovery.tcp.internal.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import org.apache.ignite.spi.discovery.tcp.messages.*;
-import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.*;
import java.io.*;
import java.net.*;
import java.util.*;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.*;
/**
* Discovery SPI implementation that uses TCP/IP for node discovery.
[35/50] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-sprint-5' into ignite-gg-10299
Posted by yz...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-gg-10299
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ea41b307
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ea41b307
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ea41b307
Branch: refs/heads/ignite-695
Commit: ea41b307722cd7794f64491937f648547d3aade1
Parents: d0e4729 e3fe8ce
Author: avinogradov <av...@gridgain.com>
Authored: Tue Jun 9 15:25:37 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Tue Jun 9 15:25:37 2015 +0300
----------------------------------------------------------------------
DEVNOTES.txt | 42 +-
.../apache/ignite/internal/IgniteKernal.java | 28 +-
.../org/apache/ignite/internal/IgnitionEx.java | 8 +-
.../internal/managers/GridManagerAdapter.java | 9 +
.../checkpoint/GridCheckpointManager.java | 52 +-
.../discovery/GridDiscoveryManager.java | 28 +-
.../affinity/GridAffinityAssignment.java | 12 +
.../affinity/GridAffinityAssignmentCache.java | 4 +-
.../processors/cache/GridCacheAdapter.java | 4 +
.../GridCachePartitionExchangeManager.java | 26 +-
.../processors/cache/GridCacheTtlManager.java | 9 +-
.../dht/atomic/GridDhtAtomicCache.java | 18 +-
.../dht/atomic/GridNearAtomicUpdateFuture.java | 6 +-
.../dht/preloader/GridDhtForceKeysFuture.java | 40 +-
.../GridDhtPartitionsExchangeFuture.java | 64 ++-
.../cache/transactions/IgniteTxManager.java | 3 -
.../datastructures/DataStructuresProcessor.java | 107 +++-
.../service/GridServiceProcessor.java | 4 +-
.../timeout/GridSpiTimeoutObject.java | 73 +++
.../timeout/GridTimeoutProcessor.java | 105 +++-
.../util/nio/GridCommunicationClient.java | 30 +-
.../util/nio/GridNioRecoveryDescriptor.java | 13 +-
.../util/nio/GridTcpCommunicationClient.java | 554 -------------------
.../util/nio/GridTcpNioCommunicationClient.java | 8 -
.../visor/node/VisorNodeDataCollectorTask.java | 9 +-
.../node/VisorNodeDataCollectorTaskResult.java | 17 +-
.../node/VisorNodeSuppressedErrorsTask.java | 12 +-
.../internal/visor/query/VisorQueryJob.java | 11 +-
.../internal/visor/query/VisorQueryTask.java | 3 +-
.../visor/util/VisorExceptionWrapper.java | 81 +++
.../internal/visor/util/VisorTaskUtils.java | 10 +
.../org/apache/ignite/spi/IgniteSpiAdapter.java | 33 +-
.../org/apache/ignite/spi/IgniteSpiContext.java | 10 +
.../ignite/spi/IgniteSpiTimeoutObject.java | 44 ++
.../spi/checkpoint/noop/NoopCheckpointSpi.java | 3 +-
.../communication/tcp/TcpCommunicationSpi.java | 438 ++++-----------
.../tcp/TcpCommunicationSpiMBean.java | 2 -
.../ignite/spi/discovery/tcp/ClientImpl.java | 3 -
.../ignite/spi/discovery/tcp/ServerImpl.java | 10 +-
.../spi/discovery/tcp/TcpDiscoverySpi.java | 156 +-----
.../IgniteCountDownLatchAbstractSelfTest.java | 102 ++++
.../IgniteCacheClientNearCacheExpiryTest.java | 103 ++++
.../IgniteCacheExpiryPolicyTestSuite.java | 2 +
.../continuous/GridEventConsumeSelfTest.java | 7 +-
.../DataStreamerMultinodeCreateCacheTest.java | 97 ++++
.../internal/util/nio/GridNioSelfTest.java | 2 +-
.../GridTcpCommunicationSpiAbstractTest.java | 4 +-
...mmunicationSpiConcurrentConnectSelfTest.java | 2 +-
.../GridTcpCommunicationSpiConfigSelfTest.java | 2 -
...cpCommunicationSpiMultithreadedSelfTest.java | 2 +-
.../discovery/AbstractDiscoverySelfTest.java | 13 +-
.../tcp/TcpClientDiscoverySpiSelfTest.java | 25 +
.../testframework/GridSpiTestContext.java | 10 +
.../ignite/testsuites/IgniteCacheTestSuite.java | 1 +
.../cache/GridCacheOffheapIndexGetSelfTest.java | 62 ++-
55 files changed, 1264 insertions(+), 1259 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ea41b307/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
[29/50] incubator-ignite git commit: # ignite-sprint-5 added
clientMode flag in node start message
Posted by yz...@apache.org.
# ignite-sprint-5 added clientMode flag in node start message
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e7d8b5ab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e7d8b5ab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e7d8b5ab
Branch: refs/heads/ignite-695
Commit: e7d8b5abf922a69edd7a4a17d15a6d4ded8075b8
Parents: 14bb076
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jun 9 11:35:46 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jun 9 11:35:46 2015 +0300
----------------------------------------------------------------------
.../src/main/java/org/apache/ignite/internal/IgniteKernal.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7d8b5ab/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 1c12402..4f5e365 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -1550,7 +1550,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
">>> Grid name: " + gridName + NL +
">>> Local node [" +
"ID=" + locNode.id().toString().toUpperCase() +
- ", order=" + locNode.order() +
+ ", order=" + locNode.order() + ", clientMode=" + ctx.clientNode() +
"]" + NL +
">>> Local node addresses: " + U.addressesAsString(locNode) + NL +
">>> Local ports: " + sb + NL;
[27/50] incubator-ignite git commit: # ignite-883
Posted by yz...@apache.org.
# ignite-883
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/eb0e2db5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/eb0e2db5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/eb0e2db5
Branch: refs/heads/ignite-695
Commit: eb0e2db5718d36693952bad897fcd31bae74d37d
Parents: 14bb076
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jun 9 10:02:24 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jun 9 10:11:58 2015 +0300
----------------------------------------------------------------------
.../processors/affinity/GridAffinityAssignment.java | 12 ++++++++++++
.../affinity/GridAffinityAssignmentCache.java | 4 ++--
.../dht/atomic/GridNearAtomicUpdateFuture.java | 6 +++++-
.../preloader/GridDhtPartitionsExchangeFuture.java | 14 +++++++++-----
4 files changed, 28 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eb0e2db5/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignment.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignment.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignment.java
index e9df8b8..5373e46 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignment.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignment.java
@@ -68,6 +68,18 @@ class GridAffinityAssignment implements Serializable {
}
/**
+ * @param topVer Topology version.
+ * @param aff Assignment to copy from.
+ */
+ GridAffinityAssignment(AffinityTopologyVersion topVer, GridAffinityAssignment aff) {
+ this.topVer = topVer;
+
+ assignment = aff.assignment;
+ primary = aff.primary;
+ backup = aff.backup;
+ }
+
+ /**
* @return Affinity assignment.
*/
public List<List<ClusterNode>> assignment() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eb0e2db5/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
index 0969a57..c46490e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
@@ -235,7 +235,7 @@ public class GridAffinityAssignmentCache {
assert evt.type() == EVT_DISCOVERY_CUSTOM_EVT || aff.primaryPartitions(evt.eventNode().id()).isEmpty() : evt;
assert evt.type() == EVT_DISCOVERY_CUSTOM_EVT || aff.backupPartitions(evt.eventNode().id()).isEmpty() : evt;
- GridAffinityAssignment assignmentCpy = new GridAffinityAssignment(topVer, aff.assignment());
+ GridAffinityAssignment assignmentCpy = new GridAffinityAssignment(topVer, aff);
affCache.put(topVer, assignmentCpy);
head.set(assignmentCpy);
@@ -244,7 +244,7 @@ public class GridAffinityAssignmentCache {
if (entry.getKey().compareTo(topVer) <= 0) {
if (log.isDebugEnabled())
log.debug("Completing topology ready future (use previous affinity) " +
- "[locNodeId=" + ctx.localNodeId() + ", futVer=" + entry.getKey() + ", topVer=" + topVer + ']');
+ "[locNodeId=" + ctx.localNodeId() + ", futVer=" + entry.getKey() + ", topVer=" + topVer + ']');
entry.getValue().onDone(topVer);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eb0e2db5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index 55cc027..07f5ecf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -463,7 +463,11 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
if (waitTopFut) {
fut.listen(new CI1<IgniteInternalFuture<AffinityTopologyVersion>>() {
@Override public void apply(IgniteInternalFuture<AffinityTopologyVersion> t) {
- mapOnTopology(keys, remap, oldNodeId, waitTopFut);
+ cctx.kernalContext().closure().runLocalSafe(new Runnable() {
+ @Override public void run() {
+ mapOnTopology(keys, remap, oldNodeId, waitTopFut);
+ }
+ });
}
});
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eb0e2db5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 05f5eaf..9f18c98 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -976,14 +976,18 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
/** {@inheritDoc} */
@Override public boolean onDone(AffinityTopologyVersion res, Throwable err) {
- Map<Integer, Boolean> m = new HashMap<>();
+ Map<Integer, Boolean> m = null;
for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
- if (cacheCtx.config().getTopologyValidator() != null && !CU.isSystemCache(cacheCtx.name()))
+ if (cacheCtx.config().getTopologyValidator() != null && !CU.isSystemCache(cacheCtx.name())) {
+ if (m == null)
+ m = new HashMap<>();
+
m.put(cacheCtx.cacheId(), cacheCtx.config().getTopologyValidator().validate(discoEvt.topologyNodes()));
+ }
}
- cacheValidRes = m;
+ cacheValidRes = m != null ? m : Collections.<Integer, Boolean>emptyMap();
cctx.cache().onExchangeDone(exchId.topologyVersion(), reqs, err);
@@ -1001,8 +1005,8 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
if (timeoutObj != null)
cctx.kernalContext().timeout().removeTimeoutObject(timeoutObj);
- for (GridCacheContext cacheCtx : cctx.cacheContexts()) {
- if (exchId.event() == EventType.EVT_NODE_FAILED || exchId.event() == EventType.EVT_NODE_LEFT)
+ if (exchId.isLeft()) {
+ for (GridCacheContext cacheCtx : cctx.cacheContexts())
cacheCtx.config().getAffinity().removeNode(exchId.nodeId());
}
[08/50] incubator-ignite git commit: # ignite-883 minor
Posted by yz...@apache.org.
# ignite-883 minor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/730ef104
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/730ef104
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/730ef104
Branch: refs/heads/ignite-695
Commit: 730ef104ad8938c88793c374abd2396cf8899f17
Parents: 0a4e7dd
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jun 8 10:19:46 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jun 8 10:19:46 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/util/nio/GridNioRecoveryDescriptor.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/730ef104/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java
index 3bc81ea..733ae81 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioRecoveryDescriptor.java
@@ -244,9 +244,9 @@ public class GridNioRecoveryDescriptor {
synchronized (this) {
if (!nodeLeft)
ackReceived(rcvCnt);
- }
- resendCnt = msgFuts.size();
+ resendCnt = msgFuts.size();
+ }
}
/**
[18/50] incubator-ignite git commit: Devnotes sprint-5
Posted by yz...@apache.org.
Devnotes sprint-5
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f1cfd298
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f1cfd298
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f1cfd298
Branch: refs/heads/ignite-695
Commit: f1cfd2985803c8b05462737b847f956ea043341a
Parents: 015afdb
Author: avinogradov <av...@gridgain.com>
Authored: Mon Jun 8 15:17:54 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Mon Jun 8 15:17:54 2015 +0300
----------------------------------------------------------------------
DEVNOTES.txt | 42 +++++++++++++++++++++++++++++-------------
1 file changed, 29 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f1cfd298/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/DEVNOTES.txt b/DEVNOTES.txt
index 1562dc4..b7fea83 100644
--- a/DEVNOTES.txt
+++ b/DEVNOTES.txt
@@ -24,12 +24,14 @@ NOTE: JDK version should be 1.7.0-* or >= 1.8.0-u40.
Ignite Release Instructions
===========================
-Use people.apache.org/keys/committer/<username>.asc key to generate KEYS file.
-Execute these commands at source root:
+Use your people.apache.org/keys/committer/<username>.asc key to generate KEYS file.
+Download https://dist.apache.org/repos/dist/release/incubator/ignite/KEYS and append you key using commands:
gpg --list-sigs <keyname> >> KEYS
gpg --armor --export <keyname> >> KEYS
+Upload modified KEYS file.
+
Specify gpg profile at settings.xml. It will be used to sign sources and artifacts.
<profile>
@@ -43,24 +45,38 @@ Specify gpg profile at settings.xml. It will be used to sign sources and artifac
Ensure you have RELEASE (not SNAPSHOT) version at Ignite poms.
Maven release plugin release:prepare goal can be used to make release tag.
-Deploy Ignite release candidate to maven repository and dev-svn:
+Deploy Ignite release candidate to maven repository and dev-svn, make tag:
+
+ Following command deploys Ignite to maven repository, prepares sources and fabric edition binaries.
+ mvn deploy -P apache-release,gpg,release,scala,lgpl,deploy-ignite-site -Dignite.edition=fabric -DskipTests -B
+
+ In case you want to release both fabric and hadoop editions you have to build hadoop edition first using command
+ mvn package -P apache-release,gpg,release,scala,lgpl -Dignite.edition=hadoop -DskipTests -B
+ save /target/bin/*.zip, make "mvn clean" and restore saved files before deploying fabric.
- mvn deploy -P apache-release,gpg,release,scala,lgpl,deploy-ignite-site -Dignite.edition=fabric -DskipTests -B
+ Binary artifact name can be changed by setting additional property -Dignite.zip.pattern. Binary artifact will be
+ created inside /target/bin folder when release profile is used.
- Binary artifact name can be changed by setting additional property -Dignite.zip.pattern.
- Sources package name is fixed. Sources package zip will be created automatically when apache-release profile used.
+ Sources artifact name is fixed. Sources artifact will be created inside /target dir when apache-release profile is used.
- In case you want to release both fabric and hadoop editions you have to build hadoop first, save /target/bin/*.zip,
- make "mvn clean" and restore them before deploy step.
+ Nexus staging (repository.apache.org) should be closed with appropriate comment contains release version and
+ release candidate number, for example "Apache Ignite 1.0.0-rc7", when mvn deploy finished.
- Nexus staging (repository.apache.org) should be closed when mvn deploy finished.
- Checkout https://dist.apache.org/repos/dist/dev/incubator/ignite svn. Create new folder with name equals to released
- version at svn root. Copy target/site folder content to svn/ignite/<version> folder and commit.
+ Checkout https://dist.apache.org/repos/dist/dev/incubator/ignite svn. Create release candidate folder with name
+ equals to release version with "-rc*" ending, for example "1.0.0-rc7", at svn root.
+ Copy /target/site folder content to svn/ignite/<rc-version> folder and commit with appropriate comment.
-Start vote based on https://dist.apache.org/repos/dist/dev/incubator/ignite/<version>.
+ Make appropriate git tag for release candidate, for example "ignite-1.0.0-incubating-rc7".
-Release nexus staging and copy binaries and sources from https://dist.apache.org/repos/dist/dev/incubator/ignite/<version>
+Start vote based on https://dist.apache.org/repos/dist/dev/incubator/ignite/<rc-version>.
+
+Release nexus staging, move binaries and sources from https://dist.apache.org/repos/dist/dev/incubator/ignite/<rc-version>
to https://dist.apache.org/repos/dist/release/incubator/ignite/<version> when version accepted.
+Use svn mv ^/dev/incubator/ignite/<rc-version> ^/release/incubator/ignite/<version> command for proper moving.
+
+Make appropriate git tag for released version, for example "ignite-1.0.0-incubating".
+
+Send an email to dev@ignite.incubator.apache.org contains release svn url.
JCache TCK compliance