You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2017/03/20 10:37:27 UTC

[1/7] ignite git commit: IGNITE-4576 .NET: Rename IgniteConfiguration.GridName to IgniteInstanceName

Repository: ignite
Updated Branches:
  refs/heads/ignite-4565-ddl ae2ad1925 -> c5dc40754


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-4565-ddl
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


[3/7] ignite git commit: For GridNearAtomicUpdateResponse moved fields related to near cache to separate class.

Posted by vo...@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-4565-ddl
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);
+    }
+}


[6/7] ignite git commit: Merge branch 'ignite-2.0' into ignite-4565-ddl

Posted by vo...@apache.org.
Merge branch 'ignite-2.0' into ignite-4565-ddl

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b8d815f9
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b8d815f9
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b8d815f9

Branch: refs/heads/ignite-4565-ddl
Commit: b8d815f90a45c13715703dc9f3030cce2d8541f5
Parents: ae2ad19 ea8c95a
Author: devozerov <vo...@gridgain.com>
Authored: Mon Mar 20 13:35:26 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Mon Mar 20 13:35:26 2017 +0300

----------------------------------------------------------------------
 .../communication/GridIoMessageFactory.java     |   6 +
 .../cache/GridCacheDeploymentManager.java       |   6 -
 .../atomic/GridNearAtomicUpdateResponse.java    | 192 ++---------
 .../dht/atomic/NearCacheUpdates.java            | 332 +++++++++++++++++++
 .../cache/query/GridCacheQueryManager.java      |  22 --
 .../processors/query/GridQueryProcessor.java    |  58 ----
 .../cache/CacheIndexingOffheapCleanupTest.java  |  21 --
 .../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 +-
 57 files changed, 497 insertions(+), 339 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b8d815f9/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/b8d815f9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index 6277b8e,546be37..87454f4
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@@ -512,53 -509,6 +512,31 @@@ public abstract class GridCacheQueryMan
      }
  
      /**
 +     * Create index dynamically.
 +     *
 +     * @param tblName Table name.
 +     * @param idx Index.
 +     * @param ifNotExists When set to {@code true} operation will fail if index already exists.
 +     * @return Future completed when index is created.
 +     */
 +    public IgniteInternalFuture<?> dynamicIndexCreate(String tblName, QueryIndex idx, boolean ifNotExists) {
 +        if (!enterBusy())
 +            return new GridFinishedFuture<>(new IgniteException("Failed to create index because " +
 +                "local node is stopping."));
 +
 +        try {
 +            return qryProc.createIndex(space, tblName, idx, ifNotExists);
 +        }
 +        catch (Exception e) {
 +            return new GridFinishedFuture<>(
 +                new IgniteException("Index creation failed due to unexpected exception.", e));
 +        }
 +        finally {
 +            leaveBusy();
 +        }
 +    }
 +
 +    /**
-      * Undeploys given class loader.
-      *
-      * @param ldr Class loader to undeploy.
-      */
-     public void onUndeploy(ClassLoader ldr) {
-         if (!enterBusy())
-             return; // Ignore index update when node is stopping.
- 
-         try {
-             qryProc.onUndeploy(space, ldr);
-         }
-         catch (IgniteCheckedException e) {
-             throw new IgniteException(e);
-         }
-         finally {
-             invalidateResultCache();
- 
-             leaveBusy();
-         }
-     }
- 
-     /**
       * Executes local query.
       *
       * @param qry Query.

http://git-wip-us.apache.org/repos/asf/ignite/blob/b8d815f9/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------


[7/7] ignite git commit: Removed onUndeploy() traits.

Posted by vo...@apache.org.
Removed onUndeploy() traits.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c5dc4075
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c5dc4075
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c5dc4075

Branch: refs/heads/ignite-4565-ddl
Commit: c5dc407541e305d8dee63bc23e8d619712fff409
Parents: b8d815f
Author: devozerov <vo...@gridgain.com>
Authored: Mon Mar 20 13:37:05 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Mon Mar 20 13:37:05 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/query/GridCacheQueryManager.java     |  1 -
 .../internal/processors/query/GridQueryProcessor.java     | 10 +++-------
 .../internal/processors/query/QueryIndexClientFuture.java |  7 -------
 3 files changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c5dc4075/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index 87454f4..da43cbc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -86,7 +86,6 @@ import org.apache.ignite.internal.processors.query.GridQueryIndexDescriptor;
 import org.apache.ignite.internal.processors.query.GridQueryProcessor;
 import org.apache.ignite.internal.processors.query.GridQueryTypeDescriptor;
 import org.apache.ignite.internal.processors.query.QueryUtils;
-import org.apache.ignite.internal.processors.query.ddl.IndexProposeDiscoveryMessage;
 import org.apache.ignite.internal.processors.task.GridInternal;
 import org.apache.ignite.internal.util.GridBoundedPriorityQueue;
 import org.apache.ignite.internal.util.GridCloseableIteratorAdapter;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c5dc4075/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 80ae032..490d872 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -575,9 +575,8 @@ public class GridQueryProcessor extends GridProcessorAdapter {
      * Complete index client futures in case of cache stop or type unregistration.
      *
      * @param space Space.
-     * @param cacheStop {@code True} if completion caused by cache stop.
      */
-    private void completeIndexClientFuturesOnSpaceUnregister(String space, boolean cacheStop) {
+    private void completeIndexClientFuturesOnSpaceUnregister(String space) {
         Iterator<Map.Entry<UUID, QueryIndexClientFuture>> idxCliFutIt = idxCliFuts.entrySet().iterator();
 
         while (idxCliFutIt.hasNext()) {
@@ -586,10 +585,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             QueryIndexClientFuture idxCliFut = idxCliFutEntry.getValue();
 
             if (F.eq(space, idxCliFut.key().space())) {
-                if (cacheStop)
-                    idxCliFut.onCacheStopped();
-                else
-                    idxCliFut.onTypeUnregistered();
+                idxCliFut.onCacheStopped();
 
                 idxCliFutIt.remove();
             }
@@ -1321,7 +1317,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             // TODO: Correct implementation.
             removeIndexesOnSpaceUnregister(task.space());
 
-            completeIndexClientFuturesOnSpaceUnregister(task.space(), true);
+            completeIndexClientFuturesOnSpaceUnregister(task.space());
         }
 
         /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/c5dc4075/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryIndexClientFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryIndexClientFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryIndexClientFuture.java
index 58f4121..9de63bb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryIndexClientFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryIndexClientFuture.java
@@ -65,13 +65,6 @@ public class QueryIndexClientFuture extends GridFutureAdapter<Object> {
         onDone(new IgniteException("Operation failed because cache was stopped."));
     }
 
-    /**
-     * Handle type undeploy.
-     */
-    public void onTypeUnregistered() {
-        onDone(new IgniteException("Operation failed because type was undeployed."));
-    }
-
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(QueryIndexClientFuture.class, this);


[2/7] ignite git commit: .NET: Fix dictionary property handling in plugin configuration

Posted by vo...@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-4565-ddl
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)


[5/7] ignite git commit: IGNITE-4840: Removed unnecessary GridQueryProcessor.onUndeploy() method what will significantly simplify types concurrency.

Posted by vo...@apache.org.
IGNITE-4840: Removed unnecessary GridQueryProcessor.onUndeploy() method what will significantly simplify types concurrency.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ea8c95ae
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ea8c95ae
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ea8c95ae

Branch: refs/heads/ignite-4565-ddl
Commit: ea8c95ae7d7f8775b99edd61aa57c66d1b4b7f22
Parents: 09f64e5
Author: devozerov <vo...@gridgain.com>
Authored: Mon Mar 20 13:27:03 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Mon Mar 20 13:27:03 2017 +0300

----------------------------------------------------------------------
 .../cache/GridCacheDeploymentManager.java       |  6 ---
 .../cache/query/GridCacheQueryManager.java      | 22 -----------
 .../processors/query/GridQueryProcessor.java    | 41 --------------------
 .../cache/CacheIndexingOffheapCleanupTest.java  | 21 ----------
 4 files changed, 90 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ea8c95ae/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
index 30a7302..39a7b36 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java
@@ -39,7 +39,6 @@ import org.apache.ignite.internal.managers.deployment.GridDeploymentInfo;
 import org.apache.ignite.internal.managers.deployment.GridDeploymentInfoBean;
 import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapter;
-import org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager;
 import org.apache.ignite.internal.util.IgniteUtils;
 import org.apache.ignite.internal.util.lang.GridPeerDeployAware;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
@@ -268,11 +267,6 @@ public class GridCacheDeploymentManager<K, V> extends GridCacheSharedManagerAdap
         if (cacheCtx.isNear())
             cacheCtx.near().dht().clearLocally(keys, true);
 
-        GridCacheQueryManager<K, V> qryMgr = cacheCtx.queries();
-
-        if (qryMgr != null)
-            qryMgr.onUndeploy(ldr);
-
         // Examine swap for entries to undeploy.
         int swapUndeployCnt = cacheCtx.isNear() ?
             cacheCtx.near().dht().context().swap().onUndeploy(ldr) :

http://git-wip-us.apache.org/repos/asf/ignite/blob/ea8c95ae/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index de9cabe..546be37 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -509,28 +509,6 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
     }
 
     /**
-     * Undeploys given class loader.
-     *
-     * @param ldr Class loader to undeploy.
-     */
-    public void onUndeploy(ClassLoader ldr) {
-        if (!enterBusy())
-            return; // Ignore index update when node is stopping.
-
-        try {
-            qryProc.onUndeploy(space, ldr);
-        }
-        catch (IgniteCheckedException e) {
-            throw new IgniteException(e);
-        }
-        finally {
-            invalidateResultCache();
-
-            leaveBusy();
-        }
-    }
-
-    /**
      * Executes local query.
      *
      * @param qry Query.

http://git-wip-us.apache.org/repos/asf/ignite/blob/ea8c95ae/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 219373c..a58ca53 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -764,47 +764,6 @@ public class GridQueryProcessor extends GridProcessorAdapter {
     }
 
     /**
-     * Removes index tables for all classes belonging to given class loader.
-     *
-     * @param space Space name.
-     * @param ldr Class loader to undeploy.
-     * @throws IgniteCheckedException If undeploy failed.
-     */
-    public void onUndeploy(@Nullable String space, ClassLoader ldr) throws IgniteCheckedException {
-        if (log.isDebugEnabled())
-            log.debug("Undeploy [space=" + space + "]");
-
-        if (idx == null)
-            return;
-
-        if (!busyLock.enterBusy())
-            throw new IllegalStateException("Failed to process undeploy event (grid is stopping).");
-
-        try {
-            Iterator<Map.Entry<QueryTypeIdKey, QueryTypeDescriptorImpl>> it = types.entrySet().iterator();
-
-            while (it.hasNext()) {
-                Map.Entry<QueryTypeIdKey, QueryTypeDescriptorImpl> e = it.next();
-
-                if (!F.eq(e.getKey().space(), space))
-                    continue;
-
-                QueryTypeDescriptorImpl desc = e.getValue();
-
-                if (ldr.equals(U.detectClassLoader(desc.valueClass())) ||
-                    ldr.equals(U.detectClassLoader(desc.keyClass()))) {
-                    idx.unregisterType(e.getKey().space(), desc);
-
-                    it.remove();
-                }
-            }
-        }
-        finally {
-            busyLock.leaveBusy();
-        }
-    }
-
-    /**
      * Gets types for space.
      *
      * @param space Space name.

http://git-wip-us.apache.org/repos/asf/ignite/blob/ea8c95ae/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexingOffheapCleanupTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexingOffheapCleanupTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexingOffheapCleanupTest.java
index 3d7e30a..70c0d49 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexingOffheapCleanupTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexingOffheapCleanupTest.java
@@ -26,7 +26,6 @@ import org.apache.ignite.cache.query.annotations.QueryTextField;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.internal.IgniteKernal;
 import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeMemory;
-import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
@@ -93,26 +92,6 @@ public class CacheIndexingOffheapCleanupTest extends GridCommonAbstractTest {
     }
 
     /**
-     * @throws Exception If failed.
-     */
-    public void testUndeploy() throws Exception {
-        Ignite ignite = ignite(0);
-
-        IgniteCache cache = ignite.createCache(cacheConfiguration());
-
-        for (int k = 0; k < 100; k++)
-            cache.put(k, new TestType());
-
-        GridUnsafeMemory mem = schemaMemory(ignite, cache.getName());
-
-        assertTrue(mem.allocatedSize() > 0);
-
-        ((IgniteKernal)ignite).context().query().onUndeploy("cache", U.detectClassLoader(TestType.class));
-
-        assertEquals(0, mem.allocatedSize());
-    }
-
-    /**
      * @param ignite Node.
      * @param cacheName Cache name.
      * @return Memory.


[4/7] ignite git commit: Merge remote-tracking branch 'origin/ignite-2.0' into ignite-2.0

Posted by vo...@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-4565-ddl
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(-)
----------------------------------------------------------------------