You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/03/20 11:27:03 UTC
[01/10] ignite git commit: .NET: Remove unused import
Repository: ignite
Updated Branches:
refs/heads/ignite-4680-sb 883509030 -> e01204d14
.NET: Remove unused import
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/527c045f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/527c045f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/527c045f
Branch: refs/heads/ignite-4680-sb
Commit: 527c045f4f42201ccdb159cffaec7af09a149d17
Parents: 9020d12
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Mon Mar 20 10:07:34 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Mon Mar 20 10:07:34 2017 +0300
----------------------------------------------------------------------
.../platforms/dotnet/Apache.Ignite.Core/Interop/IPlatformTarget.cs | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/527c045f/modules/platforms/dotnet/Apache.Ignite.Core/Interop/IPlatformTarget.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Interop/IPlatformTarget.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Interop/IPlatformTarget.cs
index e8f8bfb..621e604 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Interop/IPlatformTarget.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Interop/IPlatformTarget.cs
@@ -20,7 +20,6 @@ namespace Apache.Ignite.Core.Interop
using System;
using System.Threading.Tasks;
using Apache.Ignite.Core.Binary;
- using Apache.Ignite.Core.Impl.Binary;
/// <summary>
/// Interface to interoperate with
[06/10] ignite git commit: .NET: Fix dictionary property handling in
plugin configuration
Posted by sb...@apache.org.
.NET: Fix dictionary property handling in plugin configuration
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/47189d2d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/47189d2d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/47189d2d
Branch: refs/heads/ignite-4680-sb
Commit: 47189d2d21e59fe3196e30c0a8c098f01e3ed034
Parents: 9dc64fe
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Mon Mar 20 12:39:07 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Mon Mar 20 12:39:07 2017 +0300
----------------------------------------------------------------------
.../Common/IgniteConfigurationXmlSerializer.cs | 22 +++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/47189d2d/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
index 8290329..feb0f9e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
@@ -84,8 +84,14 @@ namespace Apache.Ignite.Core.Impl.Common
private static void WriteElement(object obj, XmlWriter writer, string rootElementName, Type valueType,
PropertyInfo property = null)
{
- if (property != null && (!property.CanWrite || IsObsolete(property)))
- return;
+ if (property != null)
+ {
+ if (!property.CanWrite && !IsKeyValuePair(property.DeclaringType))
+ return;
+
+ if (IsObsolete(property))
+ return;
+ }
if (valueType == typeof(IgniteConfiguration))
writer.WriteStartElement(rootElementName, Schema); // write xmlns for the root element
@@ -416,7 +422,7 @@ namespace Apache.Ignite.Core.Impl.Common
{
Debug.Assert(propertyType != null);
- if (propertyType.IsGenericType && propertyType.GetGenericTypeDefinition() == typeof (KeyValuePair<,>))
+ if (IsKeyValuePair(propertyType))
return false;
return propertyType.IsValueType || propertyType == typeof (string) || propertyType == typeof (Type) ||
@@ -424,6 +430,16 @@ namespace Apache.Ignite.Core.Impl.Common
}
/// <summary>
+ /// Determines whether specified type is KeyValuePair.
+ /// </summary>
+ private static bool IsKeyValuePair(Type propertyType)
+ {
+ Debug.Assert(propertyType != null);
+
+ return propertyType.IsGenericType && propertyType.GetGenericTypeDefinition() == typeof (KeyValuePair<,>);
+ }
+
+ /// <summary>
/// Gets converter for a property.
/// </summary>
private static TypeConverter GetConverter(PropertyInfo property, Type propertyType)
[10/10] ignite git commit: tmp
Posted by sb...@apache.org.
tmp
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e01204d1
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e01204d1
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e01204d1
Branch: refs/heads/ignite-4680-sb
Commit: e01204d14369139e9e5e329d4971c499a2b58d3f
Parents: 5cfea99
Author: sboikov <sb...@gridgain.com>
Authored: Mon Mar 20 13:13:11 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Mar 20 14:26:38 2017 +0300
----------------------------------------------------------------------
.../GridDhtAtomicAbstractUpdateFuture.java | 14 +++++-----
.../dht/atomic/GridDhtAtomicCache.java | 27 +++++++++++++++-----
.../atomic/GridNearAtomicFullUpdateRequest.java | 7 +++--
3 files changed, 30 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/e01204d1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
index 17ee298..fef1dbe 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
@@ -152,7 +152,7 @@ public abstract class GridDhtAtomicAbstractUpdateFuture extends GridFutureAdapte
/**
* @param affAssignment Affinity assignment.
- * @param entry Entry to map.
+ * @param key Key to map.
* @param val Value to write.
* @param entryProcessor Entry processor.
* @param ttl TTL (optional).
@@ -165,7 +165,7 @@ public abstract class GridDhtAtomicAbstractUpdateFuture extends GridFutureAdapte
@SuppressWarnings("ForLoopReplaceableByForEach")
final void addWriteEntry(
AffinityAssignment affAssignment,
- GridDhtCacheEntry entry,
+ KeyCacheObject key,
@Nullable CacheObject val,
EntryProcessor<Object, Object, Object> entryProcessor,
long ttl,
@@ -176,19 +176,19 @@ public abstract class GridDhtAtomicAbstractUpdateFuture extends GridFutureAdapte
long updateCntr) {
AffinityTopologyVersion topVer = updateReq.topologyVersion();
- List<ClusterNode> affNodes = affAssignment.get(entry.partition());
+ List<ClusterNode> affNodes = affAssignment.get(key.partition());
- List<ClusterNode> dhtNodes = cctx.dht().topology().nodes(entry.partition(), affAssignment, affNodes);
+ List<ClusterNode> dhtNodes = cctx.dht().topology().nodes(key.partition(), affAssignment, affNodes);
if (dhtNodes == null)
dhtNodes = affNodes;
if (log.isDebugEnabled())
- log.debug("Mapping entry to DHT nodes [nodes=" + U.nodeIds(dhtNodes) + ", entry=" + entry + ']');
+ log.debug("Mapping entry to DHT nodes [nodes=" + U.nodeIds(dhtNodes) + ", entry=" + key + ']');
CacheWriteSynchronizationMode syncMode = updateReq.writeSynchronizationMode();
- addDhtKey(entry.key(), dhtNodes);
+ addDhtKey(key, dhtNodes);
for (int i = 0; i < dhtNodes.size(); i++) {
ClusterNode node = dhtNodes.get(i);
@@ -212,7 +212,7 @@ public abstract class GridDhtAtomicAbstractUpdateFuture extends GridFutureAdapte
mappings.put(nodeId, updateReq);
}
- updateReq.addWriteValue(entry.key(),
+ updateReq.addWriteValue(key,
val,
entryProcessor,
ttl,
http://git-wip-us.apache.org/repos/asf/ignite/blob/e01204d1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 923b895..516a8a2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -1798,7 +1798,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
Map<Integer, int[]> stripemap = req.stripeMap();
- final GridDhtAtomicAbstractUpdateFuture fut = null;//createDhtFuture(null, req, req.size());
+ final GridDhtAtomicAbstractUpdateFuture fut = createDhtFuture(null, req, req.size());
+
+ ctx.mvcc().addAtomicFuture(fut.id(), fut);
final AffinityAssignment affAssignment = ctx.affinity().assignment(req.topologyVersion());
@@ -1901,8 +1903,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
GridNearAtomicAbstractUpdateRequest req,
int[] stripeIdxs,
UpdateReplyClosure completionCb) throws GridCacheEntryRemovedException {
- fut = createDhtFuture(null, req, req.size());
-
GridNearAtomicUpdateResponse res = new GridNearAtomicUpdateResponse(ctx.cacheId(),
node.id(),
req.futureId(),
@@ -1941,7 +1941,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
res,
locked,
ver,
- fut,
+ null,
ctx.isDrEnabled(),
null,
null,
@@ -1960,7 +1960,20 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
GridNearAtomicUpdateResponse res0 = req.responseHelper().addResponse(res);
if (res0 != null) {
- //fut.onDone();
+ for (int i = 0; i < req.size(); i++) {
+ fut.addWriteEntry(affinityAssignment,
+ req.key(i),
+ req.value(i),
+ null,
+ 0,
+ 0,
+ null,
+ false,
+ null,
+ 1L);
+ }
+
+ fut.onDone();
completionCb.apply(req, res);
}
@@ -2526,7 +2539,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
dhtFut.addWriteEntry(
affAssignment,
- entry,
+ entry.key(),
updRes.newValue(),
entryProcessor,
updRes.newTtl(),
@@ -2796,7 +2809,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
dhtFut.addWriteEntry(
affAssignment,
- entry,
+ entry.key(),
writeVal,
entryProcessor,
updRes.newTtl(),
http://git-wip-us.apache.org/repos/asf/ignite/blob/e01204d1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicFullUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicFullUpdateRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicFullUpdateRequest.java
index 2b461ce..f7a767f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicFullUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicFullUpdateRequest.java
@@ -231,7 +231,7 @@ public class GridNearAtomicFullUpdateRequest extends GridNearAtomicAbstractUpdat
stripeCnt = new int[maxStripes];
if (stripeMap == null)
- stripeMap = new HashMap<>(maxStripes);
+ stripeMap = U.newHashMap(maxStripes);
int[] idxs = stripeMap.get(stripe);
@@ -417,9 +417,8 @@ public class GridNearAtomicFullUpdateRequest extends GridNearAtomicAbstractUpdat
expiryPlcBytes = CU.marshal(cctx, new IgniteExternalizableExpiryPolicy(expiryPlc));
if (stripeMap != null && stripeCnt != null) {
- for (Integer idx : stripeMap.keySet()) {
- stripeMap.put(idx, Arrays.copyOf(stripeMap.get(idx), stripeCnt[idx]));
- }
+ for (Map.Entry<Integer, int[]> e : stripeMap.entrySet())
+ e.setValue(Arrays.copyOf(e.getValue(), stripeCnt[e.getKey()]));
stripeCnt = null;
}
[04/10] ignite git commit: IGNITE-4824 Removed deprecated
AffinityTask.affinityKey method. This closes #1626.
Posted by sb...@apache.org.
IGNITE-4824 Removed deprecated AffinityTask.affinityKey method. This closes #1626.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/837bae68
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/837bae68
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/837bae68
Branch: refs/heads/ignite-4680-sb
Commit: 837bae683931688cf2f8e77b11c1fbcbbdd3c4ed
Parents: 167d82d
Author: tledkov-gridgain <tl...@gridgain.com>
Authored: Mon Mar 20 10:24:01 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Mon Mar 20 10:24:01 2017 +0300
----------------------------------------------------------------------
.../ignite/internal/IgniteComputeImpl.java | 13 ++++----
.../failover/GridFailoverContextImpl.java | 11 ------
.../managers/failover/GridFailoverManager.java | 3 --
.../processors/closure/AffinityTask.java | 6 ----
.../closure/GridClosureProcessor.java | 35 +++-----------------
.../processors/task/GridTaskWorker.java | 7 +---
.../ignite/spi/failover/FailoverContext.java | 10 ------
.../spi/failover/GridFailoverTestContext.java | 7 +---
8 files changed, 12 insertions(+), 80 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/837bae68/modules/core/src/main/java/org/apache/ignite/internal/IgniteComputeImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteComputeImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteComputeImpl.java
index 3900c1f..58ce001 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteComputeImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteComputeImpl.java
@@ -119,8 +119,7 @@ public class IgniteComputeImpl extends AsyncSupportAdapter<IgniteCompute>
throw new IgniteCheckedException("Failed map key to partition: [cache=" + cacheName + " key="
+ affKey + ']');
- saveOrGet(ctx.closure().affinityRun(Collections.singletonList(cacheName), partId, affKey,
- job, prj.nodes()));
+ saveOrGet(ctx.closure().affinityRun(Collections.singletonList(cacheName), partId, job, prj.nodes()));
}
catch (IgniteCheckedException e) {
throw U.convertException(e);
@@ -149,7 +148,7 @@ public class IgniteComputeImpl extends AsyncSupportAdapter<IgniteCompute>
throw new IgniteCheckedException("Failed map key to partition: [cache=" + cacheName + " key="
+ affKey + ']');
- saveOrGet(ctx.closure().affinityRun(cacheNames, partId, affKey, job, prj.nodes()));
+ saveOrGet(ctx.closure().affinityRun(cacheNames, partId, job, prj.nodes()));
}
catch (IgniteCheckedException e) {
throw U.convertException(e);
@@ -168,7 +167,7 @@ public class IgniteComputeImpl extends AsyncSupportAdapter<IgniteCompute>
guard();
try {
- saveOrGet(ctx.closure().affinityRun(cacheNames, partId, null, job, prj.nodes()));
+ saveOrGet(ctx.closure().affinityRun(cacheNames, partId, job, prj.nodes()));
}
catch (IgniteCheckedException e) {
throw U.convertException(e);
@@ -194,7 +193,7 @@ public class IgniteComputeImpl extends AsyncSupportAdapter<IgniteCompute>
throw new IgniteCheckedException("Failed map key to partition: [cache=" + cacheName + " key="
+ affKey + ']');
- return saveOrGet(ctx.closure().affinityCall(Collections.singletonList(cacheName), partId, affKey, job,
+ return saveOrGet(ctx.closure().affinityCall(Collections.singletonList(cacheName), partId, job,
prj.nodes()));
}
catch (IgniteCheckedException e) {
@@ -226,7 +225,7 @@ public class IgniteComputeImpl extends AsyncSupportAdapter<IgniteCompute>
throw new IgniteCheckedException("Failed map key to partition: [cache=" + cacheName + " key="
+ affKey + ']');
- return saveOrGet(ctx.closure().affinityCall(cacheNames, partId, affKey, job, prj.nodes()));
+ return saveOrGet(ctx.closure().affinityCall(cacheNames, partId, job, prj.nodes()));
}
catch (IgniteCheckedException e) {
throw U.convertException(e);
@@ -245,7 +244,7 @@ public class IgniteComputeImpl extends AsyncSupportAdapter<IgniteCompute>
guard();
try {
- return saveOrGet(ctx.closure().affinityCall(cacheNames, partId, null, job, prj.nodes()));
+ return saveOrGet(ctx.closure().affinityCall(cacheNames, partId, job, prj.nodes()));
}
catch (IgniteCheckedException e) {
throw U.convertException(e);
http://git-wip-us.apache.org/repos/asf/ignite/blob/837bae68/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverContextImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverContextImpl.java
index ad77271..735fce9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverContextImpl.java
@@ -46,9 +46,6 @@ public class GridFailoverContextImpl implements FailoverContext {
/** Partition key for affinityCall. */
private final int partId;
- /** Affinity key for affinityCall. */
- private final Object affKey;
-
/** Affinity cache name for affinityCall. */
private final String affCacheName;
@@ -62,7 +59,6 @@ public class GridFailoverContextImpl implements FailoverContext {
* @param jobRes Failed job result.
* @param loadMgr Load manager.
* @param partId Partition.
- * @param affKey Affinity key.
* @param affCacheName Affinity cache name.
* @param topVer Affinity topology version.
*/
@@ -70,7 +66,6 @@ public class GridFailoverContextImpl implements FailoverContext {
ComputeJobResult jobRes,
GridLoadBalancerManager loadMgr,
int partId,
- @Nullable Object affKey,
@Nullable String affCacheName,
@Nullable AffinityTopologyVersion topVer) {
assert taskSes != null;
@@ -81,7 +76,6 @@ public class GridFailoverContextImpl implements FailoverContext {
this.jobRes = jobRes;
this.loadMgr = loadMgr;
this.partId = partId;
- this.affKey = affKey;
this.affCacheName = affCacheName;
this.topVer = topVer;
}
@@ -102,11 +96,6 @@ public class GridFailoverContextImpl implements FailoverContext {
}
/** {@inheritDoc} */
- @Nullable @Override public Object affinityKey() {
- return affKey;
- }
-
- /** {@inheritDoc} */
@Nullable @Override public String affinityCacheName() {
return affCacheName;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/837bae68/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverManager.java
index 52edd1d..d287e63 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/failover/GridFailoverManager.java
@@ -60,7 +60,6 @@ public class GridFailoverManager extends GridManagerAdapter<FailoverSpi> {
* @param jobRes Job result.
* @param top Collection of all topology nodes.
* @param affPartId Partition number.
- * @param affKey Affinity key.
* @param affCacheName Affinity cache name.
* @param topVer Affinity topology version.
* @return New node to route this job to.
@@ -69,14 +68,12 @@ public class GridFailoverManager extends GridManagerAdapter<FailoverSpi> {
ComputeJobResult jobRes,
List<ClusterNode> top,
int affPartId,
- @Nullable Object affKey,
@Nullable String affCacheName,
@Nullable AffinityTopologyVersion topVer) {
return getSpi(taskSes.getFailoverSpi()).failover(new GridFailoverContextImpl(taskSes,
jobRes,
ctx.loadBalancing(),
affPartId,
- affKey,
affCacheName,
topVer),
top);
http://git-wip-us.apache.org/repos/asf/ignite/blob/837bae68/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/AffinityTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/AffinityTask.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/AffinityTask.java
index 9007c8b..a6fd224 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/AffinityTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/AffinityTask.java
@@ -26,12 +26,6 @@ import org.jetbrains.annotations.Nullable;
*/
public interface AffinityTask {
/**
- * @return Affinity key.
- */
- @Deprecated
- @Nullable public Object affinityKey();
-
- /**
* @return Partition.
*/
public int partition();
http://git-wip-us.apache.org/repos/asf/ignite/blob/837bae68/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
index 55f170f..1f21fd2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
@@ -438,7 +438,6 @@ public class GridClosureProcessor extends GridProcessorAdapter {
/**
* @param cacheNames Cache names.
* @param partId Partition.
- * @param affKey Affinity key.
* @param job Closure to execute.
* @param nodes Grid nodes.
* @return Grid future for collection of closure results.
@@ -446,7 +445,6 @@ public class GridClosureProcessor extends GridProcessorAdapter {
*/
public <R> ComputeTaskInternalFuture<R> affinityCall(@NotNull Collection<String> cacheNames,
int partId,
- @Nullable Object affKey,
Callable<R> job,
@Nullable Collection<ClusterNode> nodes) throws IgniteCheckedException {
assert partId >= 0 : partId;
@@ -467,7 +465,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
ctx.task().setThreadContext(TC_SUBGRID, nodes);
- return ctx.task().execute(new T5(node, job, cacheNames, partId, affKey, mapTopVer), null, false);
+ return ctx.task().execute(new T5(node, job, cacheNames, partId, mapTopVer), null, false);
}
finally {
busyLock.readUnlock();
@@ -477,7 +475,6 @@ public class GridClosureProcessor extends GridProcessorAdapter {
/**
* @param cacheNames Cache names.
* @param partId Partition.
- * @param affKey Affinity key.
* @param job Job.
* @param nodes Grid nodes.
* @return Job future.
@@ -485,7 +482,6 @@ public class GridClosureProcessor extends GridProcessorAdapter {
*/
public ComputeTaskInternalFuture<?> affinityRun(@NotNull Collection<String> cacheNames,
int partId,
- @Nullable Object affKey,
Runnable job,
@Nullable Collection<ClusterNode> nodes) throws IgniteCheckedException {
assert partId >= 0 : partId;
@@ -506,7 +502,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
ctx.task().setThreadContext(TC_SUBGRID, nodes);
- return ctx.task().execute(new T4(node, job, cacheNames, partId, affKey, mapTopVer), null, false);
+ return ctx.task().execute(new T4(node, job, cacheNames, partId, mapTopVer), null, false);
}
finally {
busyLock.readUnlock();
@@ -518,6 +514,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
* @param job Closure to execute.
* @param nodes Grid nodes.
* @param sys If {@code true}, then system pool will be used.
+ * @param timeout Timeout.
* @param <R> Type.
* @return Grid future for collection of closure results.
*/
@@ -1324,9 +1321,6 @@ public class GridClosureProcessor extends GridProcessorAdapter {
private Runnable job;
/** */
- private Object affKey;
-
- /** */
private int partId;
/** */
@@ -1335,16 +1329,14 @@ public class GridClosureProcessor extends GridProcessorAdapter {
/** */
private Collection<String> affCacheNames;
-
/**
* @param node Cluster node.
* @param job Job affinity partition.
* @param affCacheNames Affinity caches.
* @param partId Partition.
- * @param affKey Affinity key.
* @param topVer Affinity topology version.
*/
- private T4(ClusterNode node, Runnable job, Collection<String> affCacheNames, int partId, Object affKey,
+ private T4(ClusterNode node, Runnable job, Collection<String> affCacheNames, int partId,
AffinityTopologyVersion topVer) {
super(U.peerDeployAware0(job));
@@ -1354,7 +1346,6 @@ public class GridClosureProcessor extends GridProcessorAdapter {
this.job = job;
this.affCacheNames = affCacheNames;
this.partId = partId;
- this.affKey = affKey;
this.topVer = topVer;
}
@@ -1377,11 +1368,6 @@ public class GridClosureProcessor extends GridProcessorAdapter {
@Nullable @Override public AffinityTopologyVersion topologyVersion() {
return topVer;
}
-
- /** {@inheritDoc} */
- @Nullable @Override public Object affinityKey() {
- return affKey;
- }
}
/**
@@ -1398,9 +1384,6 @@ public class GridClosureProcessor extends GridProcessorAdapter {
private Callable<R> job;
/** */
- private Object affKey;
-
- /** */
private int partId;
/** */
@@ -1409,21 +1392,17 @@ public class GridClosureProcessor extends GridProcessorAdapter {
/** */
private Collection<String> affCacheNames;
-
-
/**
* @param node Cluster node.
* @param job Job affinity partition.
* @param affCacheNames Affinity caches.
* @param partId Partition.
- * @param affKey Affinity key.
* @param topVer Affinity topology version.
*/
private T5(ClusterNode node,
Callable<R> job,
Collection<String> affCacheNames,
int partId,
- Object affKey,
AffinityTopologyVersion topVer) {
super(U.peerDeployAware0(job));
@@ -1431,7 +1410,6 @@ public class GridClosureProcessor extends GridProcessorAdapter {
this.job = job;
this.affCacheNames = affCacheNames;
this.partId = partId;
- this.affKey = affKey;
this.topVer = topVer;
}
@@ -1451,11 +1429,6 @@ public class GridClosureProcessor extends GridProcessorAdapter {
}
/** {@inheritDoc} */
- @Nullable @Override public Object affinityKey() {
- return affKey;
- }
-
- /** {@inheritDoc} */
@Override public int partition() {
return partId;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/837bae68/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
index b8a9e43..6305d23 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
@@ -194,9 +194,6 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject {
private final boolean noFailover;
/** */
- private final Object affKey;
-
- /** */
private final int affPartId;
/** */
@@ -330,7 +327,6 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject {
affPartId = affTask.partition();
affCacheName = F.first(affTask.affinityCacheNames());
- affKey = affTask.affinityKey();
mapTopVer = affTask.topologyVersion();
affCacheIds = new int[affTask.affinityCacheNames().size()];
@@ -343,7 +339,6 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject {
else {
affPartId = -1;
affCacheName = null;
- affKey = null;
mapTopVer = null;
affCacheIds = null;
}
@@ -1175,7 +1170,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject {
ctx.resource().invokeAnnotated(dep, jobRes.getJob(), ComputeJobBeforeFailover.class);
ClusterNode node = ctx.failover().failover(ses, jobRes, new ArrayList<>(top), affPartId,
- affKey, affCacheName, mapTopVer);
+ affCacheName, mapTopVer);
return checkTargetNode(res, jobRes, node);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/837bae68/modules/core/src/main/java/org/apache/ignite/spi/failover/FailoverContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/failover/FailoverContext.java b/modules/core/src/main/java/org/apache/ignite/spi/failover/FailoverContext.java
index b126db1..d9eec04 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/failover/FailoverContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/failover/FailoverContext.java
@@ -59,16 +59,6 @@ public interface FailoverContext {
public ClusterNode getBalancedNode(List<ClusterNode> top) throws IgniteException;
/**
- * Gets affinity key for {@link IgniteCompute#affinityRun(String, Object, IgniteRunnable)},
- * {@link IgniteCompute#affinityRun(Collection, Object, IgniteRunnable)},
- * {@link IgniteCompute#affinityCall(String, Object, IgniteCallable)}
- * and {@link IgniteCompute#affinityCall(Collection, Object, IgniteCallable)}.
- *
- * @return Affinity key.
- */
- @Nullable public Object affinityKey();
-
- /**
* Gets partition for {@link IgniteCompute#affinityRun(Collection, int, IgniteRunnable)}
* and {@link IgniteCompute#affinityCall(Collection, int, IgniteCallable)}.
*
http://git-wip-us.apache.org/repos/asf/ignite/blob/837bae68/modules/core/src/test/java/org/apache/ignite/spi/failover/GridFailoverTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/failover/GridFailoverTestContext.java b/modules/core/src/test/java/org/apache/ignite/spi/failover/GridFailoverTestContext.java
index 97a3e0b..c004fa2 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/failover/GridFailoverTestContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/failover/GridFailoverTestContext.java
@@ -70,12 +70,7 @@ public class GridFailoverTestContext implements FailoverContext {
}
/** {@inheritDoc} */
- @Override public Object affinityKey() {
- return null;
- }
-
- /** {@inheritDoc} */
- @Nullable @Override public int partition() {
+ @Override public int partition() {
return -1;
}
[08/10] ignite git commit: Merge remote-tracking branch
'origin/ignite-2.0' into ignite-2.0
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-2.0' into ignite-2.0
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/09f64e5a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/09f64e5a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/09f64e5a
Branch: refs/heads/ignite-4680-sb
Commit: 09f64e5a9b43bec3340ca4f6b14b0e49293b6111
Parents: 81c1964 47189d2
Author: sboikov <sb...@gridgain.com>
Authored: Mon Mar 20 12:49:49 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Mar 20 12:49:49 2017 +0300
----------------------------------------------------------------------
.../Apache.Ignite.AspNet.Tests/App.config | 6 ++--
.../IgniteOutputCacheProviderTest.cs | 2 +-
.../IgniteSessionStateStoreProviderTest.cs | 2 +-
.../Apache.Ignite.AspNet/Impl/ConfigUtil.cs | 4 +--
.../Binary/BinaryBuilderSelfTest.cs | 2 +-
.../Cache/Affinity/AffinityFieldTest.cs | 2 +-
.../Cache/Affinity/AffinityFunctionTest.cs | 4 +--
.../Cache/Affinity/AffinityTest.cs | 2 +-
.../Cache/CacheAbstractTest.cs | 2 +-
.../Cache/CacheConfigurationTest.cs | 2 +-
.../Cache/CacheDynamicStartTest.cs | 2 +-
.../Cache/CacheMetricsTest.cs | 2 +-
.../Cache/CacheNearTest.cs | 4 +--
.../Cache/Query/CacheLinqTest.cs | 2 +-
.../Cache/Query/CacheQueriesTest.cs | 2 +-
.../Continuous/ContinuousQueryAbstractTest.cs | 4 +--
.../Continuous/ContinuousQueryJavaFilterTest.cs | 2 +-
.../Cache/Store/CacheStoreSessionTest.cs | 2 +-
.../Cache/Store/CacheStoreTest.cs | 2 +-
.../Compute/ComputeApiTest.cs | 2 +-
.../Cache/Affinity/affinity-function2.xml | 2 +-
.../Config/Compute/compute-grid1.xml | 2 +-
.../Config/Compute/compute-grid2.xml | 2 +-
.../Config/Compute/compute-grid3.xml | 2 +-
.../Config/Lifecycle/lifecycle-beans.xml | 2 +-
.../Config/Lifecycle/lifecycle-no-beans.xml | 2 +-
.../Config/start-test-grid1.xml | 2 +-
.../Config/start-test-grid2.xml | 2 +-
.../ConsoleRedirectTest.cs | 2 +-
.../Dataload/DataStreamerTest.cs | 2 +-
.../Dataload/DataStreamerTestTopologyChange.cs | 2 +-
.../Apache.Ignite.Core.Tests/ExceptionsTest.cs | 2 +-
.../IgniteConfigurationSectionTest.cs | 2 +-
.../IgniteConfigurationSerializerTest.cs | 19 ++++++-----
.../IgniteConfigurationTest.cs | 10 +++---
.../Log/CustomLoggerTest.cs | 2 +-
.../Plugin/Cache/CachePluginTest.cs | 4 +--
.../Apache.Ignite.Core.Tests/ReconnectTest.cs | 2 +-
.../SerializationTest.cs | 2 +-
.../dotnet/Apache.Ignite.Core.Tests/app.config | 4 +--
.../Apache.Ignite.Core.Tests/custom_app.config | 2 +-
.../Apache.Ignite.Core/IgniteConfiguration.cs | 24 ++++++++++++--
.../IgniteConfigurationSection.xsd | 2 +-
.../dotnet/Apache.Ignite.Core/Ignition.cs | 2 +-
.../Common/IgniteConfigurationXmlSerializer.cs | 34 +++++++++++++++++---
.../App.config | 4 +--
.../EntityFrameworkCacheInitializationTest.cs | 2 +-
.../EntityFrameworkCacheTest.cs | 2 +-
.../IgniteDbConfiguration.cs | 4 +--
.../Misc/ClientReconnectExample.cs | 2 +-
50 files changed, 123 insertions(+), 76 deletions(-)
----------------------------------------------------------------------
[03/10] ignite git commit: Merge remote-tracking branch
'origin/ignite-2.0' into ignite-2.0
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-2.0' into ignite-2.0
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/167d82d9
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/167d82d9
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/167d82d9
Branch: refs/heads/ignite-4680-sb
Commit: 167d82d98610cad2b9256f978319df09b1bd7ac2
Parents: 61c845d 527c045
Author: devozerov <vo...@gridgain.com>
Authored: Mon Mar 20 10:16:55 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Mon Mar 20 10:16:55 2017 +0300
----------------------------------------------------------------------
.../platforms/dotnet/Apache.Ignite.Core/Interop/IPlatformTarget.cs | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
[07/10] ignite git commit: For GridNearAtomicUpdateResponse moved
fields related to near cache to separate class.
Posted by sb...@apache.org.
For GridNearAtomicUpdateResponse moved fields related to near cache to separate class.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/81c1964b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/81c1964b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/81c1964b
Branch: refs/heads/ignite-4680-sb
Commit: 81c1964b8a2e8af56747e173003fed97c58fcbfa
Parents: 837bae6
Author: sboikov <sb...@gridgain.com>
Authored: Mon Mar 20 12:46:32 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Mar 20 12:46:32 2017 +0300
----------------------------------------------------------------------
.../communication/GridIoMessageFactory.java | 6 +
.../atomic/GridNearAtomicUpdateResponse.java | 192 ++---------
.../dht/atomic/NearCacheUpdates.java | 332 +++++++++++++++++++
3 files changed, 374 insertions(+), 156 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/81c1964b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
index 0548581..07e8941 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
@@ -77,6 +77,7 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNe
import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateInvokeRequest;
import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateRequest;
import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateResponse;
+import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.NearCacheUpdates;
import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.UpdateErrors;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtForceKeysRequest;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtForceKeysResponse;
@@ -176,6 +177,11 @@ public class GridIoMessageFactory implements MessageFactory {
Message msg = null;
switch (type) {
+ case -48:
+ msg = new NearCacheUpdates();
+
+ break;
+
case -47:
msg = new GridNearAtomicCheckUpdateRequest();
http://git-wip-us.apache.org/repos/asf/ignite/blob/81c1964b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
index 4e20fc7..8b52ba8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.distributed.dht.atomic;
import java.io.Externalizable;
import java.nio.ByteBuffer;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.UUID;
@@ -36,7 +35,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheReturn;
import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
import org.apache.ignite.internal.processors.cache.KeyCacheObject;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
-import org.apache.ignite.internal.util.GridLongList;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
@@ -71,27 +69,8 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
/** */
private AffinityTopologyVersion remapTopVer;
- /** Indexes of keys for which values were generated on primary node (used if originating node has near cache). */
- @GridDirectCollection(int.class)
- private List<Integer> nearValsIdxs;
-
- /** Indexes of keys for which update was skipped (used if originating node has near cache). */
- @GridDirectCollection(int.class)
- private List<Integer> nearSkipIdxs;
-
- /** Values generated on primary node which should be put to originating node's near cache. */
- @GridToStringInclude
- @GridDirectCollection(CacheObject.class)
- private List<CacheObject> nearVals;
-
- /** Version generated on primary node to be used for originating node's near cache update. */
- private GridCacheVersion nearVer;
-
- /** Near TTLs. */
- private GridLongList nearTtls;
-
- /** Near expire times. */
- private GridLongList nearExpireTimes;
+ /** Data for near cache update. */
+ private NearCacheUpdates nearUpdates;
/** Partition ID. */
private int partId = -1;
@@ -235,6 +214,14 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
}
/**
+ *
+ */
+ private void initNearUpdates() {
+ if (nearUpdates == null)
+ nearUpdates = new NearCacheUpdates();
+ }
+
+ /**
* Adds value to be put in near cache on originating node.
*
* @param keyIdx Key index.
@@ -246,15 +233,9 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
@Nullable CacheObject val,
long ttl,
long expireTime) {
- if (nearValsIdxs == null) {
- nearValsIdxs = new ArrayList<>();
- nearVals = new ArrayList<>();
- }
-
- addNearTtl(keyIdx, ttl, expireTime);
+ initNearUpdates();
- nearValsIdxs.add(keyIdx);
- nearVals.add(val);
+ nearUpdates.addNearValue(keyIdx, val, ttl, expireTime);
}
/**
@@ -264,29 +245,9 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
*/
@SuppressWarnings("ForLoopReplaceableByForEach")
void addNearTtl(int keyIdx, long ttl, long expireTime) {
- if (ttl >= 0) {
- if (nearTtls == null) {
- nearTtls = new GridLongList(16);
-
- for (int i = 0; i < keyIdx; i++)
- nearTtls.add(-1L);
- }
- }
-
- if (nearTtls != null)
- nearTtls.add(ttl);
-
- if (expireTime >= 0) {
- if (nearExpireTimes == null) {
- nearExpireTimes = new GridLongList(16);
+ initNearUpdates();
- for (int i = 0; i < keyIdx; i++)
- nearExpireTimes.add(-1);
- }
- }
-
- if (nearExpireTimes != null)
- nearExpireTimes.add(expireTime);
+ nearUpdates.addNearTtl(keyIdx, ttl, expireTime);
}
/**
@@ -294,13 +255,7 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
* @return Expire time for near cache update.
*/
public long nearExpireTime(int idx) {
- if (nearExpireTimes != null) {
- assert idx >= 0 && idx < nearExpireTimes.size();
-
- return nearExpireTimes.get(idx);
- }
-
- return -1L;
+ return nearUpdates != null ? nearUpdates.nearExpireTime(idx) : -1L;
}
/**
@@ -308,53 +263,46 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
* @return TTL for near cache update.
*/
public long nearTtl(int idx) {
- if (nearTtls != null) {
- assert idx >= 0 && idx < nearTtls.size();
-
- return nearTtls.get(idx);
- }
-
- return -1L;
+ return nearUpdates != null ? nearUpdates.nearTtl(idx) : -1L;
}
/**
* @param nearVer Version generated on primary node to be used for originating node's near cache update.
*/
void nearVersion(GridCacheVersion nearVer) {
- this.nearVer = nearVer;
+ initNearUpdates();
+
+ nearUpdates.nearVersion(nearVer);
}
/**
* @return Version generated on primary node to be used for originating node's near cache update.
*/
public GridCacheVersion nearVersion() {
- return nearVer;
+ return nearUpdates != null ? nearUpdates.nearVersion() : null;
}
/**
* @param keyIdx Index of key for which update was skipped
*/
void addSkippedIndex(int keyIdx) {
- if (nearSkipIdxs == null)
- nearSkipIdxs = new ArrayList<>();
-
- nearSkipIdxs.add(keyIdx);
+ initNearUpdates();
- addNearTtl(keyIdx, -1L, -1L);
+ nearUpdates.addSkippedIndex(keyIdx);
}
/**
* @return Indexes of keys for which update was skipped
*/
@Nullable public List<Integer> skippedIndexes() {
- return nearSkipIdxs;
+ return nearUpdates != null ? nearUpdates.skippedIndexes() : null;
}
/**
* @return Indexes of keys for which values were generated on primary node.
*/
@Nullable public List<Integer> nearValuesIndexes() {
- return nearValsIdxs;
+ return nearUpdates != null ? nearUpdates.nearValuesIndexes() : null;
}
/**
@@ -362,7 +310,7 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
* @return Value generated on primary node which should be put to originating node's near cache.
*/
@Nullable public CacheObject nearValue(int idx) {
- return nearVals.get(idx);
+ return nearUpdates != null ? nearUpdates.nearValue(idx) : null;
}
/**
@@ -401,7 +349,8 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
if (errs != null)
errs.prepareMarshal(this, cctx);
- prepareMarshalCacheObjects(nearVals, cctx);
+ if (nearUpdates != null)
+ prepareMarshalCacheObjects(nearUpdates.nearValues(), cctx);
if (ret != null)
ret.prepareMarshal(cctx);
@@ -416,7 +365,8 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
if (errs != null)
errs.finishUnmarshal(this, cctx, ldr);
- finishUnmarshalCacheObjects(nearVals, cctx, ldr);
+ if (nearUpdates != null)
+ finishUnmarshalCacheObjects(nearUpdates.nearValues(), cctx, ldr);
if (ret != null)
ret.finishUnmarshal(cctx, ldr);
@@ -471,54 +421,24 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
writer.incrementState();
case 6:
- if (!writer.writeMessage("nearExpireTimes", nearExpireTimes))
+ if (!writer.writeMessage("nearUpdates", nearUpdates))
return false;
writer.incrementState();
case 7:
- if (!writer.writeCollection("nearSkipIdxs", nearSkipIdxs, MessageCollectionItemType.INT))
- return false;
-
- writer.incrementState();
-
- case 8:
- if (!writer.writeMessage("nearTtls", nearTtls))
- return false;
-
- writer.incrementState();
-
- case 9:
- if (!writer.writeCollection("nearVals", nearVals, MessageCollectionItemType.MSG))
- return false;
-
- writer.incrementState();
-
- case 10:
- if (!writer.writeCollection("nearValsIdxs", nearValsIdxs, MessageCollectionItemType.INT))
- return false;
-
- writer.incrementState();
-
- case 11:
- if (!writer.writeMessage("nearVer", nearVer))
- return false;
-
- writer.incrementState();
-
- case 12:
if (!writer.writeInt("partId", partId))
return false;
writer.incrementState();
- case 13:
+ case 8:
if (!writer.writeMessage("remapTopVer", remapTopVer))
return false;
writer.incrementState();
- case 14:
+ case 9:
if (!writer.writeMessage("ret", ret))
return false;
@@ -565,7 +485,7 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
reader.incrementState();
case 6:
- nearExpireTimes = reader.readMessage("nearExpireTimes");
+ nearUpdates = reader.readMessage("nearUpdates");
if (!reader.isLastRead())
return false;
@@ -573,46 +493,6 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
reader.incrementState();
case 7:
- nearSkipIdxs = reader.readCollection("nearSkipIdxs", MessageCollectionItemType.INT);
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 8:
- nearTtls = reader.readMessage("nearTtls");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 9:
- nearVals = reader.readCollection("nearVals", MessageCollectionItemType.MSG);
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 10:
- nearValsIdxs = reader.readCollection("nearValsIdxs", MessageCollectionItemType.INT);
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 11:
- nearVer = reader.readMessage("nearVer");
-
- if (!reader.isLastRead())
- return false;
-
- reader.incrementState();
-
- case 12:
partId = reader.readInt("partId");
if (!reader.isLastRead())
@@ -620,7 +500,7 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
reader.incrementState();
- case 13:
+ case 8:
remapTopVer = reader.readMessage("remapTopVer");
if (!reader.isLastRead())
@@ -628,7 +508,7 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
reader.incrementState();
- case 14:
+ case 9:
ret = reader.readMessage("ret");
if (!reader.isLastRead())
@@ -648,7 +528,7 @@ public class GridNearAtomicUpdateResponse extends GridCacheMessage implements Gr
/** {@inheritDoc} */
@Override public byte fieldsCount() {
- return 15;
+ return 10;
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/81c1964b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/NearCacheUpdates.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/NearCacheUpdates.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/NearCacheUpdates.java
new file mode 100644
index 0000000..f4ecedf
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/NearCacheUpdates.java
@@ -0,0 +1,332 @@
+/*
+ * 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.atomic;
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.ignite.internal.GridDirectCollection;
+import org.apache.ignite.internal.processors.cache.CacheObject;
+import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.util.GridLongList;
+import org.apache.ignite.internal.util.tostring.GridToStringInclude;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
+import org.apache.ignite.plugin.extensions.communication.MessageReader;
+import org.apache.ignite.plugin.extensions.communication.MessageWriter;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ *
+ */
+public class NearCacheUpdates implements Message {
+ /** Indexes of keys for which values were generated on primary node (used if originating node has near cache). */
+ @GridDirectCollection(int.class)
+ private List<Integer> nearValsIdxs;
+
+ /** Indexes of keys for which update was skipped (used if originating node has near cache). */
+ @GridDirectCollection(int.class)
+ private List<Integer> nearSkipIdxs;
+
+ /** Values generated on primary node which should be put to originating node's near cache. */
+ @GridToStringInclude
+ @GridDirectCollection(CacheObject.class)
+ private List<CacheObject> nearVals;
+
+ /** Version generated on primary node to be used for originating node's near cache update. */
+ private GridCacheVersion nearVer;
+
+ /** Near TTLs. */
+ private GridLongList nearTtls;
+
+ /** Near expire times. */
+ private GridLongList nearExpireTimes;
+
+ /**
+ * @return Values.
+ */
+ List<CacheObject> nearValues() {
+ return nearVals;
+ }
+
+ /**
+ * Adds value to be put in near cache on originating node.
+ *
+ * @param keyIdx Key index.
+ * @param val Value.
+ * @param ttl TTL for near cache update.
+ * @param expireTime Expire time for near cache update.
+ */
+ void addNearValue(int keyIdx,
+ @Nullable CacheObject val,
+ long ttl,
+ long expireTime) {
+ if (nearValsIdxs == null) {
+ nearValsIdxs = new ArrayList<>();
+ nearVals = new ArrayList<>();
+ }
+
+ addNearTtl(keyIdx, ttl, expireTime);
+
+ nearValsIdxs.add(keyIdx);
+ nearVals.add(val);
+ }
+
+ /**
+ * @param keyIdx Key index.
+ * @param ttl TTL for near cache update.
+ * @param expireTime Expire time for near cache update.
+ */
+ @SuppressWarnings("ForLoopReplaceableByForEach")
+ void addNearTtl(int keyIdx, long ttl, long expireTime) {
+ if (ttl >= 0) {
+ if (nearTtls == null) {
+ nearTtls = new GridLongList(16);
+
+ for (int i = 0; i < keyIdx; i++)
+ nearTtls.add(-1L);
+ }
+ }
+
+ if (nearTtls != null)
+ nearTtls.add(ttl);
+
+ if (expireTime >= 0) {
+ if (nearExpireTimes == null) {
+ nearExpireTimes = new GridLongList(16);
+
+ for (int i = 0; i < keyIdx; i++)
+ nearExpireTimes.add(-1);
+ }
+ }
+
+ if (nearExpireTimes != null)
+ nearExpireTimes.add(expireTime);
+ }
+
+ /**
+ * @param idx Index.
+ * @return Expire time for near cache update.
+ */
+ long nearExpireTime(int idx) {
+ if (nearExpireTimes != null) {
+ assert idx >= 0 && idx < nearExpireTimes.size();
+
+ return nearExpireTimes.get(idx);
+ }
+
+ return -1L;
+ }
+
+ /**
+ * @param idx Index.
+ * @return TTL for near cache update.
+ */
+ long nearTtl(int idx) {
+ if (nearTtls != null) {
+ assert idx >= 0 && idx < nearTtls.size();
+
+ return nearTtls.get(idx);
+ }
+
+ return -1L;
+ }
+
+ /**
+ * @param nearVer Version generated on primary node to be used for originating node's near cache update.
+ */
+ void nearVersion(GridCacheVersion nearVer) {
+ this.nearVer = nearVer;
+ }
+
+ /**
+ * @return Version generated on primary node to be used for originating node's near cache update.
+ */
+ GridCacheVersion nearVersion() {
+ return nearVer;
+ }
+
+ /**
+ * @param keyIdx Index of key for which update was skipped
+ */
+ void addSkippedIndex(int keyIdx) {
+ if (nearSkipIdxs == null)
+ nearSkipIdxs = new ArrayList<>();
+
+ nearSkipIdxs.add(keyIdx);
+
+ addNearTtl(keyIdx, -1L, -1L);
+ }
+
+ /**
+ * @return Indexes of keys for which update was skipped
+ */
+ @Nullable List<Integer> skippedIndexes() {
+ return nearSkipIdxs;
+ }
+
+ /**
+ * @return Indexes of keys for which values were generated on primary node.
+ */
+ @Nullable List<Integer> nearValuesIndexes() {
+ return nearValsIdxs;
+ }
+
+ /**
+ * @param idx Index.
+ * @return Value generated on primary node which should be put to originating node's near cache.
+ */
+ @Nullable CacheObject nearValue(int idx) {
+ return nearVals.get(idx);
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
+ writer.setBuffer(buf);
+
+ if (!writer.isHeaderWritten()) {
+ if (!writer.writeHeader(directType(), fieldsCount()))
+ return false;
+
+ writer.onHeaderWritten();
+ }
+
+ switch (writer.state()) {
+ case 0:
+ if (!writer.writeMessage("nearExpireTimes", nearExpireTimes))
+ return false;
+
+ writer.incrementState();
+
+ case 1:
+ if (!writer.writeCollection("nearSkipIdxs", nearSkipIdxs, MessageCollectionItemType.INT))
+ return false;
+
+ writer.incrementState();
+
+ case 2:
+ if (!writer.writeMessage("nearTtls", nearTtls))
+ return false;
+
+ writer.incrementState();
+
+ case 3:
+ if (!writer.writeCollection("nearVals", nearVals, MessageCollectionItemType.MSG))
+ return false;
+
+ writer.incrementState();
+
+ case 4:
+ if (!writer.writeCollection("nearValsIdxs", nearValsIdxs, MessageCollectionItemType.INT))
+ return false;
+
+ writer.incrementState();
+
+ case 5:
+ if (!writer.writeMessage("nearVer", nearVer))
+ return false;
+
+ writer.incrementState();
+
+ }
+
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
+ reader.setBuffer(buf);
+
+ if (!reader.beforeMessageRead())
+ return false;
+
+ switch (reader.state()) {
+ case 0:
+ nearExpireTimes = reader.readMessage("nearExpireTimes");
+
+ if (!reader.isLastRead())
+ return false;
+
+ reader.incrementState();
+
+ case 1:
+ nearSkipIdxs = reader.readCollection("nearSkipIdxs", MessageCollectionItemType.INT);
+
+ if (!reader.isLastRead())
+ return false;
+
+ reader.incrementState();
+
+ case 2:
+ nearTtls = reader.readMessage("nearTtls");
+
+ if (!reader.isLastRead())
+ return false;
+
+ reader.incrementState();
+
+ case 3:
+ nearVals = reader.readCollection("nearVals", MessageCollectionItemType.MSG);
+
+ if (!reader.isLastRead())
+ return false;
+
+ reader.incrementState();
+
+ case 4:
+ nearValsIdxs = reader.readCollection("nearValsIdxs", MessageCollectionItemType.INT);
+
+ if (!reader.isLastRead())
+ return false;
+
+ reader.incrementState();
+
+ case 5:
+ nearVer = reader.readMessage("nearVer");
+
+ if (!reader.isLastRead())
+ return false;
+
+ reader.incrementState();
+
+ }
+
+ return reader.afterMessageRead(NearCacheUpdates.class);
+ }
+
+ /** {@inheritDoc} */
+ @Override public byte directType() {
+ return -48;
+ }
+
+ /** {@inheritDoc} */
+ @Override public byte fieldsCount() {
+ return 6;
+ }
+
+ /** {@inheritDoc} */
+ @Override public void onAckReceived() {
+ // No-op.
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(NearCacheUpdates.class, this);
+ }
+}
[05/10] ignite git commit: IGNITE-4576 .NET: Rename
IgniteConfiguration.GridName to IgniteInstanceName
Posted by sb...@apache.org.
IGNITE-4576 .NET: Rename IgniteConfiguration.GridName to IgniteInstanceName
This closes #1639
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9dc64fea
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9dc64fea
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9dc64fea
Branch: refs/heads/ignite-4680-sb
Commit: 9dc64feade44d91e5cbe44f3b26b272c05b6718e
Parents: 837bae6
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Mon Mar 20 11:41:50 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Mon Mar 20 11:42:21 2017 +0300
----------------------------------------------------------------------
.../Apache.Ignite.AspNet.Tests/App.config | 6 ++---
.../IgniteOutputCacheProviderTest.cs | 2 +-
.../IgniteSessionStateStoreProviderTest.cs | 2 +-
.../Apache.Ignite.AspNet/Impl/ConfigUtil.cs | 4 ++--
.../Binary/BinaryBuilderSelfTest.cs | 2 +-
.../Cache/Affinity/AffinityFieldTest.cs | 2 +-
.../Cache/Affinity/AffinityFunctionTest.cs | 4 ++--
.../Cache/Affinity/AffinityTest.cs | 2 +-
.../Cache/CacheAbstractTest.cs | 2 +-
.../Cache/CacheConfigurationTest.cs | 2 +-
.../Cache/CacheDynamicStartTest.cs | 2 +-
.../Cache/CacheMetricsTest.cs | 2 +-
.../Cache/CacheNearTest.cs | 4 ++--
.../Cache/Query/CacheLinqTest.cs | 2 +-
.../Cache/Query/CacheQueriesTest.cs | 2 +-
.../Continuous/ContinuousQueryAbstractTest.cs | 4 ++--
.../Continuous/ContinuousQueryJavaFilterTest.cs | 2 +-
.../Cache/Store/CacheStoreSessionTest.cs | 2 +-
.../Cache/Store/CacheStoreTest.cs | 2 +-
.../Compute/ComputeApiTest.cs | 2 +-
.../Cache/Affinity/affinity-function2.xml | 2 +-
.../Config/Compute/compute-grid1.xml | 2 +-
.../Config/Compute/compute-grid2.xml | 2 +-
.../Config/Compute/compute-grid3.xml | 2 +-
.../Config/Lifecycle/lifecycle-beans.xml | 2 +-
.../Config/Lifecycle/lifecycle-no-beans.xml | 2 +-
.../Config/start-test-grid1.xml | 2 +-
.../Config/start-test-grid2.xml | 2 +-
.../ConsoleRedirectTest.cs | 2 +-
.../Dataload/DataStreamerTest.cs | 2 +-
.../Dataload/DataStreamerTestTopologyChange.cs | 2 +-
.../Apache.Ignite.Core.Tests/ExceptionsTest.cs | 2 +-
.../IgniteConfigurationSectionTest.cs | 2 +-
.../IgniteConfigurationSerializerTest.cs | 19 +++++++++-------
.../IgniteConfigurationTest.cs | 10 ++++----
.../Log/CustomLoggerTest.cs | 2 +-
.../Plugin/Cache/CachePluginTest.cs | 4 ++--
.../Apache.Ignite.Core.Tests/ReconnectTest.cs | 2 +-
.../SerializationTest.cs | 2 +-
.../dotnet/Apache.Ignite.Core.Tests/app.config | 4 ++--
.../Apache.Ignite.Core.Tests/custom_app.config | 2 +-
.../Apache.Ignite.Core/IgniteConfiguration.cs | 24 +++++++++++++++++---
.../IgniteConfigurationSection.xsd | 2 +-
.../dotnet/Apache.Ignite.Core/Ignition.cs | 2 +-
.../Common/IgniteConfigurationXmlSerializer.cs | 14 ++++++++++--
.../App.config | 4 ++--
.../EntityFrameworkCacheInitializationTest.cs | 2 +-
.../EntityFrameworkCacheTest.cs | 2 +-
.../IgniteDbConfiguration.cs | 4 ++--
.../Misc/ClientReconnectExample.cs | 2 +-
50 files changed, 105 insertions(+), 74 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/App.config
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/App.config b/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/App.config
index 7d2c1d0..016078e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/App.config
+++ b/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/App.config
@@ -29,7 +29,7 @@
<gcServer enabled="true"/>
</runtime>
- <igniteConfiguration xmlns="http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection" gridName="myGrid1">
+ <igniteConfiguration xmlns="http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection" igniteInstanceName="myGrid1">
<discoverySpi type="TcpDiscoverySpi">
<ipFinder type="TcpDiscoveryStaticIpFinder">
<endpoints>
@@ -43,7 +43,7 @@
</cacheConfiguration>
</igniteConfiguration>
- <igniteConfiguration2 gridName="myGrid2" localhost="127.0.0.1">
+ <igniteConfiguration2 igniteInstanceName="myGrid2" localhost="127.0.0.1">
<discoverySpi type="TcpDiscoverySpi">
<ipFinder type="TcpDiscoveryStaticIpFinder">
<endpoints>
@@ -57,7 +57,7 @@
</cacheConfiguration>
</igniteConfiguration2>
- <igniteConfiguration3 gridName="myGrid3" localhost="127.0.0.1">
+ <igniteConfiguration3 igniteInstanceName="myGrid3" localhost="127.0.0.1">
<discoverySpi type="TcpDiscoverySpi">
<ipFinder type="TcpDiscoveryStaticIpFinder">
<endpoints>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteOutputCacheProviderTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteOutputCacheProviderTest.cs b/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteOutputCacheProviderTest.cs
index bf2fd7e..017b48d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteOutputCacheProviderTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteOutputCacheProviderTest.cs
@@ -51,7 +51,7 @@ namespace Apache.Ignite.AspNet.Tests
[TestFixtureSetUp]
public void TestFixtureSetUp()
{
- Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration()) {GridName = GridName});
+ Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration()) {IgniteInstanceName = GridName});
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteSessionStateStoreProviderTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteSessionStateStoreProviderTest.cs b/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteSessionStateStoreProviderTest.cs
index c6e3b30..25700c6 100644
--- a/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteSessionStateStoreProviderTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteSessionStateStoreProviderTest.cs
@@ -64,7 +64,7 @@ namespace Apache.Ignite.AspNet.Tests
[TestFixtureSetUp]
public void TestFixtureSetUp()
{
- Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration()) { GridName = GridName });
+ Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration()) { IgniteInstanceName = GridName });
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.AspNet/Impl/ConfigUtil.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.AspNet/Impl/ConfigUtil.cs b/modules/platforms/dotnet/Apache.Ignite.AspNet/Impl/ConfigUtil.cs
index b967518..bad1470 100644
--- a/modules/platforms/dotnet/Apache.Ignite.AspNet/Impl/ConfigUtil.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.AspNet/Impl/ConfigUtil.cs
@@ -93,10 +93,10 @@ namespace Apache.Ignite.AspNet.Impl
typeof(IgniteConfigurationSection).Name, sectionName));
}
else
- config = new IgniteConfiguration {GridName = gridName};
+ config = new IgniteConfiguration {IgniteInstanceName = gridName};
// Check if already started.
- var ignite = Ignition.TryGetIgnite(config.GridName);
+ var ignite = Ignition.TryGetIgnite(config.IgniteInstanceName);
if (ignite != null)
return ignite;
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryBuilderSelfTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryBuilderSelfTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryBuilderSelfTest.cs
index 7475f5a..e9ca852 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryBuilderSelfTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryBuilderSelfTest.cs
@@ -1718,7 +1718,7 @@ namespace Apache.Ignite.Core.Tests.Binary
var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
{
- GridName = "grid2",
+ IgniteInstanceName = "grid2",
BinaryConfiguration = new BinaryConfiguration
{
CompactFooter = GetCompactFooter()
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFieldTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFieldTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFieldTest.cs
index ceb04cd..71883b1 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFieldTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFieldTest.cs
@@ -159,7 +159,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
{
return new IgniteConfiguration(TestUtils.GetTestConfiguration())
{
- GridName = gridName,
+ IgniteInstanceName = gridName,
BinaryConfiguration = new BinaryConfiguration
{
TypeConfigurations = new[]
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionTest.cs
index d4b6680..9348449 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionTest.cs
@@ -90,7 +90,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
_ignite = Ignition.Start(cfg);
- _ignite2 = Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration()) {GridName = "grid2"});
+ _ignite2 = Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration()) {IgniteInstanceName = "grid2"});
}
/// <summary>
@@ -218,7 +218,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
using (var ignite = Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration())
{
- GridName = "grid3",
+ IgniteInstanceName = "grid3",
}))
{
expectedNodeId = ignite.GetCluster().GetLocalNode().Id;
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityTest.cs
index e38668b..9bd639b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityTest.cs
@@ -42,7 +42,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
JvmClasspath = TestUtils.CreateTestClasspath(),
JvmOptions = TestUtils.TestJavaOptions(),
SpringConfigUrl = "config\\native-client-test-cache-affinity.xml",
- GridName = "grid-" + i
+ IgniteInstanceName = "grid-" + i
};
Ignition.Start(cfg);
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
index 1bc0f02..f97741a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
@@ -306,7 +306,7 @@ namespace Apache.Ignite.Core.Tests.Cache
cfg.SpringConfigUrl = "config\\native-client-test-cache.xml";
for (int i = 0; i < GridCount(); i++) {
- cfg.GridName = "grid-" + i;
+ cfg.IgniteInstanceName = "grid-" + i;
Ignition.Start(cfg);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
index 118e115..02c0fc3 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
@@ -65,7 +65,7 @@ namespace Apache.Ignite.Core.Tests.Cache
GetCustomCacheConfiguration(),
GetCustomCacheConfiguration2()
},
- GridName = CacheName,
+ IgniteInstanceName = CacheName,
BinaryConfiguration = new BinaryConfiguration(typeof (Entity))
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs
index 7c18a34..5f07c3a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs
@@ -92,7 +92,7 @@ namespace Apache.Ignite.Core.Tests.Cache
portCfg.TypeConfigurations = portTypeCfgs;
- cfg.GridName = name;
+ cfg.IgniteInstanceName = name;
cfg.BinaryConfiguration = portCfg;
cfg.JvmClasspath = TestUtils.CreateTestClasspath();
cfg.JvmOptions = TestUtils.TestJavaOptions();
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
index 9da037c..9c29fbf 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
@@ -41,7 +41,7 @@ namespace Apache.Ignite.Core.Tests.Cache
public void FixtureSetUp()
{
Ignition.Start(TestUtils.GetTestConfiguration());
- Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration()) {GridName = SecondGridName });
+ Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration()) {IgniteInstanceName = SecondGridName });
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheNearTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheNearTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheNearTest.cs
index f5a1337..24dc971 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheNearTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheNearTest.cs
@@ -115,7 +115,7 @@ namespace Apache.Ignite.Core.Tests.Cache
var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
{
ClientMode = true,
- GridName = "clientGrid"
+ IgniteInstanceName = "clientGrid"
};
using (var clientGrid = Ignition.Start(cfg))
@@ -139,7 +139,7 @@ namespace Apache.Ignite.Core.Tests.Cache
var cfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
{
ClientMode = true,
- GridName = "clientGrid",
+ IgniteInstanceName = "clientGrid",
IncludedEventTypes = new[] {EventType.CacheEntryCreated}
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheLinqTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheLinqTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheLinqTest.cs
index 931fdd4..8730e37 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheLinqTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheLinqTest.cs
@@ -125,7 +125,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
{
BinaryConfiguration = new BinaryConfiguration(typeof(Person),
typeof(Organization), typeof(Address), typeof(Role), typeof(RoleKey), typeof(Numerics)),
- GridName = gridName
+ IgniteInstanceName = gridName
};
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
index 20fd93a..4061ac2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
@@ -76,7 +76,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
for (int i = 0; i < GridCnt; i++)
{
- cfg.GridName = "grid-" + i;
+ cfg.IgniteInstanceName = "grid-" + i;
Ignition.Start(cfg);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
index 270c3fc..40d8525 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
@@ -111,11 +111,11 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
cfg.JvmOptions = TestUtils.TestJavaOptions();
cfg.SpringConfigUrl = "config\\cache-query-continuous.xml";
- cfg.GridName = "grid-1";
+ cfg.IgniteInstanceName = "grid-1";
grid1 = Ignition.Start(cfg);
cache1 = grid1.GetCache<int, BinarizableEntry>(cacheName);
- cfg.GridName = "grid-2";
+ cfg.IgniteInstanceName = "grid-2";
grid2 = Ignition.Start(cfg);
cache2 = grid2.GetCache<int, BinarizableEntry>(cacheName);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
index de829e2..4b5db93 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
@@ -91,7 +91,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
JvmClasspath = TestUtils.CreateTestClasspath(),
JvmOptions = jvmOpts,
SpringConfigUrl = SpringConfig2,
- GridName = "dotNet2"
+ IgniteInstanceName = "dotNet2"
});
// Java-only node
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreSessionTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreSessionTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreSessionTest.cs
index 54e0414..d01726a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreSessionTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreSessionTest.cs
@@ -56,7 +56,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
IgniteConfiguration cfg = new IgniteConfiguration
{
- GridName = IgniteName,
+ IgniteInstanceName = IgniteName,
JvmClasspath = TestUtils.CreateTestClasspath(),
JvmOptions = TestUtils.TestJavaOptions(),
SpringConfigUrl = @"config\cache\store\cache-store-session.xml"
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
index a66aea8..4b13b9f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
@@ -52,7 +52,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
{
var cfg = new IgniteConfiguration
{
- GridName = GridName,
+ IgniteInstanceName = GridName,
JvmClasspath = TestUtils.CreateTestClasspath(),
JvmOptions = TestUtils.TestJavaOptions(),
SpringConfigUrl = "config\\native-client-test-cache-store.xml",
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs
index 0125466..e82e238 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs
@@ -545,7 +545,7 @@ namespace Apache.Ignite.Core.Tests.Compute
using (var ignite = Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration())
{
SpringConfigUrl = GetConfigs().Item1,
- GridName = "daemonGrid",
+ IgniteInstanceName = "daemonGrid",
IsDaemon = true
})
)
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Cache/Affinity/affinity-function2.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Cache/Affinity/affinity-function2.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Cache/Affinity/affinity-function2.xml
index cab34b5..5b320a3 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Cache/Affinity/affinity-function2.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Cache/Affinity/affinity-function2.xml
@@ -28,7 +28,7 @@
<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="localHost" value="127.0.0.1"/>
<property name="connectorConfiguration"><null/></property>
- <property name="gridName" value="grid2" />
+ <property name="igniteInstanceName" value="grid2" />
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid1.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid1.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid1.xml
index e627b54..f01bd57 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid1.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid1.xml
@@ -28,7 +28,7 @@
<property name="localHost" value="127.0.0.1"/>
<property name="connectorConfiguration"><null/></property>
- <property name="gridName" value="grid1"/>
+ <property name="igniteInstanceName" value="grid1"/>
<property name="metricsUpdateFrequency" value="1000"/>
<property name="metricsLogFrequency" value="0"/>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid2.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid2.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid2.xml
index 3ed8042..d7f86f4 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid2.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid2.xml
@@ -25,7 +25,7 @@
<property name="localHost" value="127.0.0.1"/>
<property name="connectorConfiguration"><null/></property>
- <property name="gridName" value="grid2"/>
+ <property name="igniteInstanceName" value="grid2"/>
<property name="metricsUpdateFrequency" value="1000"/>
<property name="metricsLogFrequency" value="0"/>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid3.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid3.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid3.xml
index a93e01a..f61f281 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid3.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Compute/compute-grid3.xml
@@ -27,7 +27,7 @@
<property name="clientMode" value="true"/>
- <property name="gridName" value="grid3"/>
+ <property name="igniteInstanceName" value="grid3"/>
<property name="metricsUpdateFrequency" value="1000"/>
<property name="metricsLogFrequency" value="0"/>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-beans.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-beans.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-beans.xml
index 71b7072..5c2cfd2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-beans.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-beans.xml
@@ -25,7 +25,7 @@
<property name="localHost" value="127.0.0.1"/>
<property name="connectorConfiguration"><null/></property>
- <property name="gridName" value="grid"/>
+ <property name="igniteInstanceName" value="grid"/>
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-no-beans.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-no-beans.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-no-beans.xml
index e83c4e8..1e74a77 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-no-beans.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Lifecycle/lifecycle-no-beans.xml
@@ -25,7 +25,7 @@
<property name="localHost" value="127.0.0.1"/>
<property name="connectorConfiguration"><null/></property>
- <property name="gridName" value="grid"/>
+ <property name="igniteInstanceName" value="grid"/>
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/start-test-grid1.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/start-test-grid1.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/start-test-grid1.xml
index c61ecde..6f113e9 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/start-test-grid1.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/start-test-grid1.xml
@@ -25,7 +25,7 @@
<property name="localHost" value="127.0.0.1"/>
<property name="connectorConfiguration"><null/></property>
- <property name="gridName" value="grid1"/>
+ <property name="igniteInstanceName" value="grid1"/>
<property name="cacheConfiguration">
<list>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/start-test-grid2.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/start-test-grid2.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/start-test-grid2.xml
index 432d318..9b7ae31 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/start-test-grid2.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/start-test-grid2.xml
@@ -25,7 +25,7 @@
<property name="localHost" value="127.0.0.1"/>
<property name="connectorConfiguration"><null/></property>
- <property name="gridName" value="grid2"/>
+ <property name="igniteInstanceName" value="grid2"/>
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ConsoleRedirectTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ConsoleRedirectTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ConsoleRedirectTest.cs
index 3884cab..5a59a37 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ConsoleRedirectTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ConsoleRedirectTest.cs
@@ -168,7 +168,7 @@ namespace Apache.Ignite.Core.Tests
{
var ignite = Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration())
{
- GridName = "newDomainGrid"
+ IgniteInstanceName = "newDomainGrid"
});
Ignition.Stop(ignite.Name, true);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTest.cs
index f5a04c1..33c7704 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTest.cs
@@ -465,7 +465,7 @@ namespace Apache.Ignite.Core.Tests.Dataload
{
return new IgniteConfiguration
{
- GridName = gridName,
+ IgniteInstanceName = gridName,
SpringConfigUrl = "config\\native-client-test-cache.xml",
JvmClasspath = TestUtils.CreateTestClasspath(),
BinaryConfiguration = new BinaryConfiguration
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTestTopologyChange.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTestTopologyChange.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTestTopologyChange.cs
index 9e80c08..5e9f892 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTestTopologyChange.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTestTopologyChange.cs
@@ -37,7 +37,7 @@ namespace Apache.Ignite.Core.Tests.Dataload
var cacheNodeCfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
{
SpringConfigUrl = @"Config\cache-local-node.xml",
- GridName = "cacheGrid"
+ IgniteInstanceName = "cacheGrid"
};
using (var gridNoCache = Ignition.Start(TestUtils.GetTestConfiguration()))
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExceptionsTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExceptionsTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExceptionsTest.cs
index 7afb10f..7217e1a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExceptionsTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExceptionsTest.cs
@@ -421,7 +421,7 @@ namespace Apache.Ignite.Core.Tests
SpringConfigUrl = "config\\native-client-test-cache.xml",
JvmOptions = TestUtils.TestJavaOptions(),
JvmClasspath = TestUtils.CreateTestClasspath(),
- GridName = gridName,
+ IgniteInstanceName = gridName,
BinaryConfiguration = new BinaryConfiguration
{
TypeConfigurations = new[]
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSectionTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSectionTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSectionTest.cs
index 13bd9a2..fc43f46 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSectionTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSectionTest.cs
@@ -36,7 +36,7 @@ namespace Apache.Ignite.Core.Tests
{
var section = (IgniteConfigurationSection) ConfigurationManager.GetSection("igniteConfiguration");
- Assert.AreEqual("myGrid1", section.IgniteConfiguration.GridName);
+ Assert.AreEqual("myGrid1", section.IgniteConfiguration.IgniteInstanceName);
Assert.AreEqual("cacheName", section.IgniteConfiguration.CacheConfiguration.Single().Name);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
index 95c0289..2f9366e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
@@ -294,6 +294,9 @@ namespace Apache.Ignite.Core.Tests
if (!prop.CanWrite)
continue; // Read-only properties are not configured in XML.
+ if (prop.GetCustomAttributes(typeof(ObsoleteAttribute), true).Any())
+ continue; // Skip deprecated.
+
var propType = prop.PropertyType;
var isCollection = propType.IsGenericType &&
@@ -348,7 +351,7 @@ namespace Apache.Ignite.Core.Tests
// Some properties
var cfg = new IgniteConfiguration
{
- GridName = "myGrid",
+ IgniteInstanceName = "myGrid",
ClientMode = true,
CacheConfiguration = new[]
{
@@ -370,7 +373,7 @@ namespace Apache.Ignite.Core.Tests
};
Assert.AreEqual(FixLineEndings(@"<?xml version=""1.0"" encoding=""utf-16""?>
-<igniteConfiguration clientMode=""true"" gridName=""myGrid"" xmlns=""http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection"">
+<igniteConfiguration clientMode=""true"" igniteInstanceName=""myGrid"" xmlns=""http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection"">
<cacheConfiguration>
<cacheConfiguration cacheMode=""Replicated"" name=""myCache"">
<queryEntities>
@@ -400,7 +403,7 @@ namespace Apache.Ignite.Core.Tests
}
Assert.AreEqual(FixLineEndings(@"<?xml version=""1.0"" encoding=""utf-16""?>
-<igCfg clientMode=""true"" gridName=""myGrid"" xmlns=""http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection"">
+<igCfg clientMode=""true"" igniteInstanceName=""myGrid"" xmlns=""http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection"">
<cacheConfiguration>
<cacheConfiguration cacheMode=""Replicated"" name=""myCache"">
<queryEntities>
@@ -431,8 +434,8 @@ namespace Apache.Ignite.Core.Tests
AssertReflectionEqual(new IgniteConfiguration(), cfg);
// Simple test.
- cfg = IgniteConfiguration.FromXml(@"<igCfg gridName=""myGrid"" clientMode=""true"" />");
- AssertReflectionEqual(new IgniteConfiguration {GridName = "myGrid", ClientMode = true}, cfg);
+ cfg = IgniteConfiguration.FromXml(@"<igCfg igniteInstanceName=""myGrid"" clientMode=""true"" />");
+ AssertReflectionEqual(new IgniteConfiguration {IgniteInstanceName = "myGrid", ClientMode = true}, cfg);
// Invalid xml.
var ex = Assert.Throws<ConfigurationErrorsException>(() =>
@@ -443,11 +446,11 @@ namespace Apache.Ignite.Core.Tests
// Xml reader.
using (var xmlReader = XmlReader.Create(
- new StringReader(@"<igCfg gridName=""myGrid"" clientMode=""true"" />")))
+ new StringReader(@"<igCfg igniteInstanceName=""myGrid"" clientMode=""true"" />")))
{
cfg = IgniteConfiguration.FromXml(xmlReader);
}
- AssertReflectionEqual(new IgniteConfiguration { GridName = "myGrid", ClientMode = true }, cfg);
+ AssertReflectionEqual(new IgniteConfiguration { IgniteInstanceName = "myGrid", ClientMode = true }, cfg);
}
/// <summary>
@@ -566,7 +569,7 @@ namespace Apache.Ignite.Core.Tests
{
return new IgniteConfiguration
{
- GridName = "gridName",
+ IgniteInstanceName = "gridName",
JvmOptions = new[] {"1", "2"},
Localhost = "localhost11",
JvmClasspath = "classpath",
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
index 3d9732d..5063c21 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
@@ -122,7 +122,7 @@ namespace Apache.Ignite.Core.Tests
// There can be extra IPv6 endpoints
Assert.AreEqual(ip.Endpoints, resIp.Endpoints.Take(2).Select(x => x.Trim('/')).ToArray());
- Assert.AreEqual(cfg.GridName, resCfg.GridName);
+ Assert.AreEqual(cfg.IgniteInstanceName, resCfg.IgniteInstanceName);
Assert.AreEqual(cfg.IncludedEventTypes, resCfg.IncludedEventTypes);
Assert.AreEqual(cfg.MetricsExpireTime, resCfg.MetricsExpireTime);
Assert.AreEqual(cfg.MetricsHistorySize, resCfg.MetricsHistorySize);
@@ -244,7 +244,7 @@ namespace Apache.Ignite.Core.Tests
{
Localhost = "127.0.0.1",
DiscoverySpi = TestUtils.GetStaticDiscovery(),
- GridName = "client",
+ IgniteInstanceName = "client",
ClientMode = true
}))
{
@@ -284,7 +284,7 @@ namespace Apache.Ignite.Core.Tests
using (var ignite = Ignition.Start(cfg))
{
- cfg.GridName = "ignite2";
+ cfg.IgniteInstanceName = "ignite2";
using (var ignite2 = Ignition.Start(cfg))
{
Assert.AreEqual(2, ignite.GetCluster().GetNodes().Count);
@@ -383,7 +383,7 @@ namespace Apache.Ignite.Core.Tests
using (var ignite = Ignition.Start(cfg))
{
// Start with the same endpoint
- cfg.GridName = "ignite2";
+ cfg.IgniteInstanceName = "ignite2";
using (var ignite2 = Ignition.Start(cfg))
{
Assert.AreEqual(2, ignite.GetCluster().GetNodes().Count);
@@ -472,7 +472,7 @@ namespace Apache.Ignite.Core.Tests
ThreadPriority = 6,
TopologyHistorySize = 1234567
},
- GridName = "gridName1",
+ IgniteInstanceName = "gridName1",
IncludedEventTypes = EventType.SwapspaceAll,
MetricsExpireTime = TimeSpan.FromMinutes(7),
MetricsHistorySize = 125,
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Log/CustomLoggerTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Log/CustomLoggerTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Log/CustomLoggerTest.cs
index 13e7854..68d107a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Log/CustomLoggerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Log/CustomLoggerTest.cs
@@ -127,7 +127,7 @@ namespace Apache.Ignite.Core.Tests.Log
{
// Start 2 nodes: PlatformNativeException does not occur in local scenario
using (var ignite = Ignition.Start(GetConfigWithLogger()))
- using (Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration()) {GridName = "1"}))
+ using (Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration()) {IgniteInstanceName = "1"}))
{
var compute = ignite.GetCluster().ForRemotes().GetCompute();
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/Cache/CachePluginTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/Cache/CachePluginTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/Cache/CachePluginTest.cs
index 0fc8877..2ef8bb2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/Cache/CachePluginTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Plugin/Cache/CachePluginTest.cs
@@ -172,7 +172,7 @@ namespace Apache.Ignite.Core.Tests.Plugin.Cache
Assert.IsNull(plugin.IgniteStopped);
var ctx = plugin.Context;
- Assert.AreEqual(ignite.Name, ctx.IgniteConfiguration.GridName);
+ Assert.AreEqual(ignite.Name, ctx.IgniteConfiguration.IgniteInstanceName);
Assert.AreEqual(cacheName, ctx.CacheConfiguration.Name);
Assert.AreEqual(propValue, ctx.CachePluginConfiguration.TestProperty);
@@ -186,7 +186,7 @@ namespace Apache.Ignite.Core.Tests.Plugin.Cache
{
return new IgniteConfiguration(TestUtils.GetTestConfiguration())
{
- GridName = name,
+ IgniteInstanceName = name,
CacheConfiguration = new[]
{
new CacheConfiguration(CacheName)
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ReconnectTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ReconnectTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ReconnectTest.cs
index 5a2d2d0..4013b5a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ReconnectTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ReconnectTest.cs
@@ -48,7 +48,7 @@ namespace Apache.Ignite.Core.Tests
var clientCfg = new IgniteConfiguration(TestUtils.GetTestConfiguration())
{
- GridName = "client",
+ IgniteInstanceName = "client",
ClientMode = true
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/SerializationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/SerializationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/SerializationTest.cs
index a36e30f..2812468 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/SerializationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/SerializationTest.cs
@@ -45,7 +45,7 @@ namespace Apache.Ignite.Core.Tests
{
var cfg = new IgniteConfiguration
{
- GridName = GridName,
+ IgniteInstanceName = GridName,
JvmClasspath = TestUtils.CreateTestClasspath(),
JvmOptions = TestUtils.TestJavaOptions(),
SpringConfigUrl = "config\\native-client-test-cache.xml"
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/app.config
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/app.config b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/app.config
index f928ed4..be08e61 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/app.config
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/app.config
@@ -28,7 +28,7 @@
<gcServer enabled="true"/>
</runtime>
- <igniteConfiguration xmlns="http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection" gridName="myGrid1">
+ <igniteConfiguration xmlns="http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection" igniteInstanceName="myGrid1">
<discoverySpi type="TcpDiscoverySpi">
<ipFinder type="TcpDiscoveryStaticIpFinder">
<endpoints>
@@ -42,7 +42,7 @@
</cacheConfiguration>
</igniteConfiguration>
- <igniteConfiguration2 gridName="myGrid2" localhost="127.0.0.1">
+ <igniteConfiguration2 igniteInstanceName="myGrid2" localhost="127.0.0.1">
<discoverySpi type="TcpDiscoverySpi">
<ipFinder type="TcpDiscoveryStaticIpFinder">
<endpoints>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core.Tests/custom_app.config
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/custom_app.config b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/custom_app.config
index aec91dc..cb3af7c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/custom_app.config
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/custom_app.config
@@ -23,7 +23,7 @@
<section name="igniteConfigurationMissing" type="Apache.Ignite.Core.IgniteConfigurationSection, Apache.Ignite.Core" />
</configSections>
- <igniteConfiguration3 gridName="myGrid3" localhost="127.0.0.1">
+ <igniteConfiguration3 igniteInstanceName="myGrid3" localhost="127.0.0.1">
<discoverySpi type="TcpDiscoverySpi">
<ipFinder type="TcpDiscoveryStaticIpFinder">
<endpoints>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
index 563eea0..d3bd50c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
@@ -500,7 +500,7 @@
/// </summary>
private void CopyLocalProperties(IgniteConfiguration cfg)
{
- GridName = cfg.GridName;
+ IgniteInstanceName = cfg.IgniteInstanceName;
if (BinaryConfiguration != null && cfg.BinaryConfiguration != null)
{
@@ -523,9 +523,27 @@
}
/// <summary>
- /// Grid name which is used if not provided in configuration file.
+ /// Gets or sets optional local instance name.
+ /// <para />
+ /// This name only works locally and has no effect on topology.
+ /// <para />
+ /// This property is used to when there are multiple Ignite nodes in one process to distinguish them.
/// </summary>
- public string GridName { get; set; }
+ public string IgniteInstanceName { get; set; }
+
+ /// <summary>
+ /// Gets or sets optional local instance name.
+ /// <para />
+ /// This name only works locally and has no effect on topology.
+ /// <para />
+ /// This property is used to when there are multiple Ignite nodes in one process to distinguish them.
+ /// </summary>
+ [Obsolete("Use IgniteInstanceName instead.")]
+ public string GridName
+ {
+ get { return IgniteInstanceName; }
+ set { IgniteInstanceName = value; }
+ }
/// <summary>
/// Gets or sets the binary configuration.
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
index 5a49790..629a41b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
@@ -1228,7 +1228,7 @@
</xs:complexType>
</xs:element>
</xs:all>
- <xs:attribute name="gridName" type="xs:string">
+ <xs:attribute name="igniteInstanceName" type="xs:string">
<xs:annotation>
<xs:documentation>Local Ignite instance name to be used with Ignition.GetIgnite.</xs:documentation>
</xs:annotation>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
index 515902f..1190c14 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
@@ -231,7 +231,7 @@ namespace Apache.Ignite.Core
IgniteManager.CreateJvmContext(cfg, cbs, log);
log.Debug("JVM started.");
- var gridName = cfg.GridName;
+ var gridName = cfg.IgniteInstanceName;
// 3. Create startup object which will guide us through the rest of the process.
_startup = new Startup(cfg, cbs);
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
index a87ff18..8290329 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
@@ -84,7 +84,7 @@ namespace Apache.Ignite.Core.Impl.Common
private static void WriteElement(object obj, XmlWriter writer, string rootElementName, Type valueType,
PropertyInfo property = null)
{
- if (property != null && !property.CanWrite)
+ if (property != null && (!property.CanWrite || IsObsolete(property)))
return;
if (valueType == typeof(IgniteConfiguration))
@@ -152,7 +152,7 @@ namespace Apache.Ignite.Core.Impl.Common
writer.WriteAttributeString(TypNameAttribute, TypeStringConverter.Convert(obj.GetType()));
// Write attributes
- foreach (var prop in props.Where(p => IsBasicType(p.PropertyType)))
+ foreach (var prop in props.Where(p => IsBasicType(p.PropertyType) && !IsObsolete(p)))
{
var converter = GetConverter(prop, prop.PropertyType);
var stringValue = converter.ConvertToInvariantString(prop.GetValue(obj, null));
@@ -482,5 +482,15 @@ namespace Apache.Ignite.Core.Impl.Common
return null;
}
+
+ /// <summary>
+ /// Determines whether the specified property is obsolete.
+ /// </summary>
+ private static bool IsObsolete(PropertyInfo property)
+ {
+ Debug.Assert(property != null);
+
+ return property.GetCustomAttributes(typeof(ObsoleteAttribute), true).Any();
+ }
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/App.config
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/App.config b/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/App.config
index 3527920..0e0da8d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/App.config
+++ b/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/App.config
@@ -25,7 +25,7 @@
<gcServer enabled="true" />
</runtime>
- <igniteConfiguration xmlns="http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection" gridName="myGrid1">
+ <igniteConfiguration xmlns="http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection" igniteInstanceName="myGrid1">
<discoverySpi type="TcpDiscoverySpi">
<ipFinder type="TcpDiscoveryStaticIpFinder">
<endpoints>
@@ -38,7 +38,7 @@
</cacheConfiguration>
</igniteConfiguration>
- <igniteConfiguration2 gridName="myGrid2" localhost="127.0.0.1">
+ <igniteConfiguration2 igniteInstanceName="myGrid2" localhost="127.0.0.1">
<discoverySpi type="TcpDiscoverySpi">
<ipFinder type="TcpDiscoveryStaticIpFinder">
<endpoints>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheInitializationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheInitializationTest.cs b/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheInitializationTest.cs
index 36b1c2b..bef8b78 100644
--- a/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheInitializationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheInitializationTest.cs
@@ -64,7 +64,7 @@ namespace Apache.Ignite.EntityFramework.Tests
CheckCacheAndStop("myGrid3", "myCache",
new IgniteDbConfiguration(new IgniteConfiguration
{
- GridName = "myGrid3",
+ IgniteInstanceName = "myGrid3",
}, new CacheConfiguration("myCache_metadata")
{
CacheMode = CacheMode.Replicated,
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheTest.cs b/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheTest.cs
index 158df12..d34e330 100644
--- a/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheTest.cs
@@ -70,7 +70,7 @@ namespace Apache.Ignite.EntityFramework.Tests
var cfg = TestUtils.GetTestConfiguration();
var ignite = Ignition.Start(cfg);
- Ignition.Start(new IgniteConfiguration(cfg) {GridName = "grid2"});
+ Ignition.Start(new IgniteConfiguration(cfg) {IgniteInstanceName = "grid2"});
// Create SQL CE database in a temp file.
using (var ctx = GetDbContext())
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/Apache.Ignite.EntityFramework/IgniteDbConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.EntityFramework/IgniteDbConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.EntityFramework/IgniteDbConfiguration.cs
index 55ecd40..773e59f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.EntityFramework/IgniteDbConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.EntityFramework/IgniteDbConfiguration.cs
@@ -74,7 +74,7 @@ namespace Apache.Ignite.EntityFramework
/// <summary>
/// Initializes a new instance of the <see cref="IgniteDbConfiguration"/> class.
/// <para />
- /// This constructor uses default Ignite instance (with null <see cref="IgniteConfiguration.GridName"/>)
+ /// This constructor uses default Ignite instance (with null <see cref="IgniteConfiguration.IgniteInstanceName"/>)
/// and a cache with <see cref="DefaultCacheNamePrefix"/> name.
/// <para />
/// Ignite instance will be started automatically, if it is not started yet.
@@ -277,7 +277,7 @@ namespace Apache.Ignite.EntityFramework
{
cfg = cfg ?? new IgniteConfiguration();
- return Ignition.TryGetIgnite(cfg.GridName) ?? Ignition.Start(cfg);
+ return Ignition.TryGetIgnite(cfg.IgniteInstanceName) ?? Ignition.Start(cfg);
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc64fea/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs
index 7ea6e0a..fca0f9f 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs
@@ -113,7 +113,7 @@ namespace Apache.Ignite.Examples.Misc
var cfg = new IgniteConfiguration
{
// Nodes within a single process are distinguished by GridName property.
- GridName = "serverNode",
+ IgniteInstanceName = "serverNode",
// Discovery settings are the same as in app.config.
DiscoverySpi = new TcpDiscoverySpi
[02/10] ignite git commit: IGNITE-4834: Added ability to execute
custom tasks from exchange thread.
Posted by sb...@apache.org.
IGNITE-4834: Added ability to execute custom tasks from exchange thread.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/61c845d6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/61c845d6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/61c845d6
Branch: refs/heads/ignite-4680-sb
Commit: 61c845d66b82463bfad71c28093f2cbf54d99eb0
Parents: 9020d12
Author: devozerov <vo...@gridgain.com>
Authored: Mon Mar 20 10:16:36 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Mon Mar 20 10:16:36 2017 +0300
----------------------------------------------------------------------
.../cache/CachePartitionExchangeWorkerTask.java | 29 ++++
.../GridCachePartitionExchangeManager.java | 171 +++++++++++++------
.../processors/cache/GridCacheProcessor.java | 19 +++
.../GridDhtPartitionsExchangeFuture.java | 8 +-
4 files changed, 176 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/61c845d6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartitionExchangeWorkerTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartitionExchangeWorkerTask.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartitionExchangeWorkerTask.java
new file mode 100644
index 0000000..80ef9f5
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CachePartitionExchangeWorkerTask.java
@@ -0,0 +1,29 @@
+/*
+ * 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;
+
+/**
+ * Cache partition exchange worker task marker interface.
+ */
+public interface CachePartitionExchangeWorkerTask {
+ /**
+ * @return {@code True) if task denotes standard exchange task, {@code false} if this is a custom task which
+ * must be executed from within exchange thread.
+ */
+ boolean isExchange();
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/61c845d6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index 3e72efb..f7edb08 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -32,7 +32,6 @@ import java.util.Map;
import java.util.NavigableMap;
import java.util.TreeMap;
import java.util.UUID;
-import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.LinkedBlockingDeque;
@@ -55,6 +54,7 @@ import org.apache.ignite.internal.IgniteInterruptedCheckedException;
import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
import org.apache.ignite.internal.events.DiscoveryCustomEvent;
import org.apache.ignite.internal.managers.discovery.DiscoCache;
+import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
import org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache;
@@ -222,10 +222,10 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
exchFut = exchangeFuture(exchId, evt, cache,null, null);
}
else {
- DiscoveryCustomEvent customEvt = (DiscoveryCustomEvent)evt;
+ DiscoveryCustomMessage customMsg = ((DiscoveryCustomEvent)evt).customMessage();
- if (customEvt.customMessage() instanceof DynamicCacheChangeBatch) {
- DynamicCacheChangeBatch batch = (DynamicCacheChangeBatch)customEvt.customMessage();
+ if (customMsg instanceof DynamicCacheChangeBatch) {
+ DynamicCacheChangeBatch batch = (DynamicCacheChangeBatch)customMsg;
Collection<DynamicCacheChangeRequest> valid = new ArrayList<>(batch.requests().size());
@@ -257,8 +257,8 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
exchFut = exchangeFuture(exchId, evt, cache, valid, null);
}
}
- else if (customEvt.customMessage() instanceof CacheAffinityChangeMessage) {
- CacheAffinityChangeMessage msg = (CacheAffinityChangeMessage)customEvt.customMessage();
+ else if (customMsg instanceof CacheAffinityChangeMessage) {
+ CacheAffinityChangeMessage msg = (CacheAffinityChangeMessage)customMsg;
if (msg.exchangeId() == null) {
if (msg.exchangeNeeded()) {
@@ -267,8 +267,18 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
exchFut = exchangeFuture(exchId, evt, cache, null, msg);
}
}
- else
- exchangeFuture(msg.exchangeId(), null, null, null, null).onAffinityChangeMessage(customEvt.eventNode(), msg);
+ else {
+ exchangeFuture(msg.exchangeId(), null, null, null, null)
+ .onAffinityChangeMessage(evt.eventNode(), msg);
+ }
+ }
+ else {
+ // Process event as custom discovery task if needed.
+ CachePartitionExchangeWorkerTask task =
+ cctx.cache().exchangeTaskForCustomDiscoveryMessage(customMsg);
+
+ if (task != null)
+ exchWorker.addCustomTask(task);
}
}
@@ -369,7 +379,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
if (reconnect)
reconnectExchangeFut = new GridFutureAdapter<>();
- exchWorker.futQ.addFirst(fut);
+ exchWorker.addFirstExchangeFuture(fut);
if (!cctx.kernalContext().clientNode()) {
for (int cnt = 0; cnt < cctx.gridConfig().getRebalanceThreadPoolSize(); cnt++) {
@@ -684,7 +694,18 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
* @return {@code True} if pending future queue is empty.
*/
public boolean hasPendingExchange() {
- return !exchWorker.futQ.isEmpty();
+ return exchWorker.hasPendingExchange();
+ }
+
+ /**
+ * Add custom task.
+ *
+ * @param task Task.
+ */
+ public void addCustomTask(CachePartitionExchangeWorkerTask task) {
+ assert !task.isExchange();
+
+ exchWorker.addCustomTask(task);
}
/**
@@ -704,7 +725,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
*/
public void forceDummyExchange(boolean reassign,
GridDhtPartitionsExchangeFuture exchFut) {
- exchWorker.addFuture(
+ exchWorker.addExchangeFuture(
new GridDhtPartitionsExchangeFuture(cctx, reassign, exchFut.discoveryEvent(), exchFut.exchangeId()));
}
@@ -716,7 +737,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
public IgniteInternalFuture<Boolean> forceRebalance(GridDhtPartitionsExchangeFuture exchFut) {
GridFutureAdapter<Boolean> fut = new GridFutureAdapter<>();
- exchWorker.addFuture(
+ exchWorker.addExchangeFuture(
new GridDhtPartitionsExchangeFuture(cctx, exchFut.discoveryEvent(), exchFut.exchangeId(), fut));
return fut;
@@ -1192,7 +1213,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
*/
private boolean addFuture(GridDhtPartitionsExchangeFuture fut) {
if (fut.onAdded()) {
- exchWorker.addFuture(fut);
+ exchWorker.addExchangeFuture(fut);
return true;
}
@@ -1345,10 +1366,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
U.warn(log, "Last exchange future: " + lastInitializedFut);
- U.warn(log, "Pending exchange futures:");
-
- for (GridDhtPartitionsExchangeFuture fut : exchWorker.futQ)
- U.warn(log, ">>> " + fut);
+ exchWorker.dumpExchangeDebugInfo();
if (!readyFuts.isEmpty()) {
U.warn(log, "Pending affinity ready futures:");
@@ -1547,28 +1565,6 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
}
/**
- * @param deque Deque to poll from.
- * @param time Time to wait.
- * @param w Worker.
- * @return Polled item.
- * @throws InterruptedException If interrupted.
- */
- @Nullable private <T> T poll(BlockingQueue<T> deque, long time, GridWorker w) throws InterruptedException {
- assert w != null;
-
- // There is currently a case where {@code interrupted}
- // flag on a thread gets flipped during stop which causes the pool to hang. This check
- // will always make sure that interrupted flag gets reset before going into wait conditions.
- // The true fix should actually make sure that interrupted flag does not get reset or that
- // interrupted exception gets propagated. Until we find a real fix, this method should
- // always work to make sure that there is no hanging during stop.
- if (w.isCancelled())
- Thread.currentThread().interrupt();
-
- return deque.poll(time, MILLISECONDS);
- }
-
- /**
* @param node Target node.
* @return {@code True} if can use compression for partition map messages.
*/
@@ -1592,32 +1588,94 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
*/
private class ExchangeWorker extends GridWorker {
/** Future queue. */
- private final LinkedBlockingDeque<GridDhtPartitionsExchangeFuture> futQ =
+ private final LinkedBlockingDeque<CachePartitionExchangeWorkerTask> futQ =
new LinkedBlockingDeque<>();
/** Busy flag used as performance optimization to stop current preloading. */
private volatile boolean busy;
/**
- *
+ * Constructor.
*/
private ExchangeWorker() {
super(cctx.igniteInstanceName(), "partition-exchanger", GridCachePartitionExchangeManager.this.log);
}
/**
+ * Add first exchange future.
+ *
+ * @param exchFut Exchange future.
+ */
+ void addFirstExchangeFuture(GridDhtPartitionsExchangeFuture exchFut) {
+ futQ.addFirst(exchFut);
+ }
+
+ /**
* @param exchFut Exchange future.
*/
- void addFuture(GridDhtPartitionsExchangeFuture exchFut) {
+ void addExchangeFuture(GridDhtPartitionsExchangeFuture exchFut) {
assert exchFut != null;
- if (!exchFut.dummy() || (futQ.isEmpty() && !busy))
+ if (!exchFut.dummy() || (!hasPendingExchange() && !busy))
futQ.offer(exchFut);
if (log.isDebugEnabled())
log.debug("Added exchange future to exchange worker: " + exchFut);
}
+ /**
+ * Add custom exchange task.
+ *
+ * @param task Task.
+ */
+ void addCustomTask(CachePartitionExchangeWorkerTask task) {
+ assert task != null;
+
+ assert !task.isExchange();
+
+ futQ.offer(task);
+ }
+
+ /**
+ * Process custom exchange task.
+ *
+ * @param task Task.
+ */
+ void processCustomTask(CachePartitionExchangeWorkerTask task) {
+ try {
+ cctx.cache().processCustomExchangeTask(task);
+ }
+ catch (Exception e) {
+ U.warn(log, "Failed to process custom exchange task: " + task, e);
+ }
+ }
+
+ /**
+ * @return Whether pending exchange future exists.
+ */
+ boolean hasPendingExchange() {
+ if (!futQ.isEmpty()) {
+ for (CachePartitionExchangeWorkerTask task : futQ) {
+ if (task.isExchange())
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Dump debug info.
+ */
+ void dumpExchangeDebugInfo() {
+ U.warn(log, "Pending exchange futures:");
+
+ for (CachePartitionExchangeWorkerTask task: futQ) {
+ if (task.isExchange())
+ U.warn(log, ">>> " + task);
+ }
+ }
+
/** {@inheritDoc} */
@Override protected void body() throws InterruptedException, IgniteInterruptedCheckedException {
long timeout = cctx.gridConfig().getNetworkTimeout();
@@ -1625,7 +1683,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
int cnt = 0;
while (!isCancelled()) {
- GridDhtPartitionsExchangeFuture exchFut = null;
+ CachePartitionExchangeWorkerTask task = null;
cnt++;
@@ -1640,7 +1698,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
}
// If not first preloading and no more topology events present.
- if (!cctx.kernalContext().clientNode() && futQ.isEmpty() && preloadFinished)
+ if (!cctx.kernalContext().clientNode() && !hasPendingExchange() && preloadFinished)
timeout = cctx.gridConfig().getNetworkTimeout();
// After workers line up and before preloading starts we initialize all futures.
@@ -1656,11 +1714,24 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
}
// Take next exchange future.
- exchFut = poll(futQ, timeout, this);
+ if (isCancelled())
+ Thread.currentThread().interrupt();
- if (exchFut == null)
+ task = futQ.poll(timeout, MILLISECONDS);
+
+ if (task == null)
continue; // Main while loop.
+ if (!task.isExchange()) {
+ processCustomTask(task);
+
+ continue;
+ }
+
+ assert task instanceof GridDhtPartitionsExchangeFuture;
+
+ GridDhtPartitionsExchangeFuture exchFut = (GridDhtPartitionsExchangeFuture)task;
+
busy = true;
Map<Integer, GridDhtPreloaderAssignments> assignsMap = null;
@@ -1727,7 +1798,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
changed |= cacheCtx.topology().afterExchange(exchFut);
}
- if (!cctx.kernalContext().clientNode() && changed && futQ.isEmpty())
+ if (!cctx.kernalContext().clientNode() && changed && !hasPendingExchange())
refreshPartitions();
}
else {
@@ -1824,7 +1895,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
U.log(log, "Rebalancing scheduled [order=" + rebList + "]");
- if (futQ.isEmpty()) {
+ if (!hasPendingExchange()) {
U.log(log, "Rebalancing started " +
"[top=" + exchFut.topologyVersion() + ", evt=" + exchFut.discoveryEvent().name() +
", node=" + exchFut.discoveryEvent().eventNode().id() + ']');
@@ -1850,7 +1921,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
}
catch (IgniteCheckedException e) {
U.error(log, "Failed to wait for completion of partition map exchange " +
- "(preloading will not start): " + exchFut, e);
+ "(preloading will not start): " + task, e);
}
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/61c845d6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index c7ac31a..a7d38a7 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -367,6 +367,25 @@ public class GridCacheProcessor extends GridProcessorAdapter {
}
/**
+ * Create exchange worker task for custom discovery message.
+ *
+ * @param msg Custom discovery message.
+ * @return Task or {@code null} if message doesn't require any special processing.
+ */
+ public CachePartitionExchangeWorkerTask exchangeTaskForCustomDiscoveryMessage(DiscoveryCustomMessage msg) {
+ return null;
+ }
+
+ /**
+ * Process custom exchange task.
+ *
+ * @param task Task.
+ */
+ public void processCustomExchangeTask(CachePartitionExchangeWorkerTask task) {
+ // No-op.
+ }
+
+ /**
* @param c Ignite configuration.
* @param cc Configuration to validate.
* @param cacheType Cache type.
http://git-wip-us.apache.org/repos/asf/ignite/blob/61c845d6/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 46fb144..50937a8 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
@@ -48,6 +48,7 @@ import org.apache.ignite.internal.managers.discovery.DiscoCache;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache;
import org.apache.ignite.internal.processors.cache.CacheAffinityChangeMessage;
+import org.apache.ignite.internal.processors.cache.CachePartitionExchangeWorkerTask;
import org.apache.ignite.internal.processors.cache.DynamicCacheChangeRequest;
import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
@@ -84,7 +85,7 @@ import static org.apache.ignite.internal.managers.communication.GridIoPolicy.SYS
* Future for exchanging partition maps.
*/
public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityTopologyVersion>
- implements Comparable<GridDhtPartitionsExchangeFuture>, GridDhtTopologyFuture {
+ implements Comparable<GridDhtPartitionsExchangeFuture>, GridDhtTopologyFuture, CachePartitionExchangeWorkerTask {
/** */
public static final int DUMP_PENDING_OBJECTS_THRESHOLD =
IgniteSystemProperties.getInteger(IgniteSystemProperties.IGNITE_DUMP_PENDING_OBJECTS_THRESHOLD, 10);
@@ -1677,6 +1678,11 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
}
/** {@inheritDoc} */
+ @Override public boolean isExchange() {
+ return true;
+ }
+
+ /** {@inheritDoc} */
@Override public int compareTo(GridDhtPartitionsExchangeFuture fut) {
return exchId.compareTo(fut.exchId);
}
[09/10] ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-2.0' into ignite-4680-sb
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-2.0' into ignite-4680-sb
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5cfea992
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5cfea992
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5cfea992
Branch: refs/heads/ignite-4680-sb
Commit: 5cfea9926fe97b2e31a994d074ca40929a0d840d
Parents: 8835090 09f64e5
Author: sboikov <sb...@gridgain.com>
Authored: Mon Mar 20 12:54:09 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Mar 20 12:54:09 2017 +0300
----------------------------------------------------------------------
.../ignite/internal/IgniteComputeImpl.java | 13 +-
.../communication/GridIoMessageFactory.java | 6 +
.../failover/GridFailoverContextImpl.java | 11 -
.../managers/failover/GridFailoverManager.java | 3 -
.../cache/CachePartitionExchangeWorkerTask.java | 29 ++
.../GridCachePartitionExchangeManager.java | 171 +++++++---
.../processors/cache/GridCacheProcessor.java | 19 ++
.../atomic/GridNearAtomicUpdateResponse.java | 192 ++---------
.../dht/atomic/NearCacheUpdates.java | 332 +++++++++++++++++++
.../GridDhtPartitionsExchangeFuture.java | 8 +-
.../processors/closure/AffinityTask.java | 6 -
.../closure/GridClosureProcessor.java | 35 +-
.../processors/task/GridTaskWorker.java | 7 +-
.../ignite/spi/failover/FailoverContext.java | 10 -
.../spi/failover/GridFailoverTestContext.java | 7 +-
.../Apache.Ignite.AspNet.Tests/App.config | 6 +-
.../IgniteOutputCacheProviderTest.cs | 2 +-
.../IgniteSessionStateStoreProviderTest.cs | 2 +-
.../Apache.Ignite.AspNet/Impl/ConfigUtil.cs | 4 +-
.../Binary/BinaryBuilderSelfTest.cs | 2 +-
.../Cache/Affinity/AffinityFieldTest.cs | 2 +-
.../Cache/Affinity/AffinityFunctionTest.cs | 4 +-
.../Cache/Affinity/AffinityTest.cs | 2 +-
.../Cache/CacheAbstractTest.cs | 2 +-
.../Cache/CacheConfigurationTest.cs | 2 +-
.../Cache/CacheDynamicStartTest.cs | 2 +-
.../Cache/CacheMetricsTest.cs | 2 +-
.../Cache/CacheNearTest.cs | 4 +-
.../Cache/Query/CacheLinqTest.cs | 2 +-
.../Cache/Query/CacheQueriesTest.cs | 2 +-
.../Continuous/ContinuousQueryAbstractTest.cs | 4 +-
.../Continuous/ContinuousQueryJavaFilterTest.cs | 2 +-
.../Cache/Store/CacheStoreSessionTest.cs | 2 +-
.../Cache/Store/CacheStoreTest.cs | 2 +-
.../Compute/ComputeApiTest.cs | 2 +-
.../Cache/Affinity/affinity-function2.xml | 2 +-
.../Config/Compute/compute-grid1.xml | 2 +-
.../Config/Compute/compute-grid2.xml | 2 +-
.../Config/Compute/compute-grid3.xml | 2 +-
.../Config/Lifecycle/lifecycle-beans.xml | 2 +-
.../Config/Lifecycle/lifecycle-no-beans.xml | 2 +-
.../Config/start-test-grid1.xml | 2 +-
.../Config/start-test-grid2.xml | 2 +-
.../ConsoleRedirectTest.cs | 2 +-
.../Dataload/DataStreamerTest.cs | 2 +-
.../Dataload/DataStreamerTestTopologyChange.cs | 2 +-
.../Apache.Ignite.Core.Tests/ExceptionsTest.cs | 2 +-
.../IgniteConfigurationSectionTest.cs | 2 +-
.../IgniteConfigurationSerializerTest.cs | 19 +-
.../IgniteConfigurationTest.cs | 10 +-
.../Log/CustomLoggerTest.cs | 2 +-
.../Plugin/Cache/CachePluginTest.cs | 4 +-
.../Apache.Ignite.Core.Tests/ReconnectTest.cs | 2 +-
.../SerializationTest.cs | 2 +-
.../dotnet/Apache.Ignite.Core.Tests/app.config | 4 +-
.../Apache.Ignite.Core.Tests/custom_app.config | 2 +-
.../Apache.Ignite.Core/IgniteConfiguration.cs | 24 +-
.../IgniteConfigurationSection.xsd | 2 +-
.../dotnet/Apache.Ignite.Core/Ignition.cs | 2 +-
.../Common/IgniteConfigurationXmlSerializer.cs | 34 +-
.../Interop/IPlatformTarget.cs | 1 -
.../App.config | 4 +-
.../EntityFrameworkCacheInitializationTest.cs | 2 +-
.../EntityFrameworkCacheTest.cs | 2 +-
.../IgniteDbConfiguration.cs | 4 +-
.../Misc/ClientReconnectExample.cs | 2 +-
66 files changed, 685 insertions(+), 364 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5cfea992/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
----------------------------------------------------------------------