You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2017/04/11 07:15:01 UTC

ignite git commit: .NET: Remove TcpDiscoverySpi.HeartbeatFrequency

Repository: ignite
Updated Branches:
  refs/heads/ignite-4799 1a684e9e9 -> a4ba8a9a1


.NET: Remove TcpDiscoverySpi.HeartbeatFrequency


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

Branch: refs/heads/ignite-4799
Commit: a4ba8a9a18ab5d7f5ad0910b761ef8f46c83e884
Parents: 1a684e9
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Tue Apr 11 10:14:51 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Tue Apr 11 10:14:51 2017 +0300

----------------------------------------------------------------------
 .../Cache/CacheMetricsTest.cs                        |  3 +--
 .../Cache/CacheSwapSpaceTest.cs                      |  3 +--
 .../IgniteConfigurationSerializerTest.cs             |  1 -
 .../IgniteConfigurationTest.cs                       |  1 -
 .../Discovery/Tcp/TcpDiscoverySpi.cs                 | 15 ---------------
 .../IgniteConfigurationSection.xsd                   |  5 -----
 .../Datagrid/MultiTieredCacheExample.cs              |  2 +-
 7 files changed, 3 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a4ba8a9a/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 9c29fbf..86d8775 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
@@ -21,7 +21,6 @@ namespace Apache.Ignite.Core.Tests.Cache
     using System.Threading;
     using Apache.Ignite.Core.Cache;
     using Apache.Ignite.Core.Cache.Configuration;
-    using Apache.Ignite.Core.Discovery.Tcp;
     using Apache.Ignite.Core.Impl;
     using Apache.Ignite.Core.Impl.Cache;
     using NUnit.Framework;
@@ -236,7 +235,7 @@ namespace Apache.Ignite.Core.Tests.Cache
             localCache.Get(1);
             
             // Wait for metrics to propagate.
-            Thread.Sleep(TcpDiscoverySpi.DefaultHeartbeatFrequency);
+            Thread.Sleep(IgniteConfiguration.DefaultMetricsUpdateFrequency);
 
             var localMetrics = func(localCache);
             Assert.IsTrue(localMetrics.IsStatisticsEnabled);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4ba8a9a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheSwapSpaceTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheSwapSpaceTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheSwapSpaceTest.cs
index 7b93815..c7279dc 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheSwapSpaceTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheSwapSpaceTest.cs
@@ -23,7 +23,6 @@ namespace Apache.Ignite.Core.Tests.Cache
     using Apache.Ignite.Core.Cache;
     using Apache.Ignite.Core.Cache.Configuration;
     using Apache.Ignite.Core.Cache.Eviction;
-    using Apache.Ignite.Core.Discovery.Tcp;
     using Apache.Ignite.Core.Impl;
     using Apache.Ignite.Core.SwapSpace.File;
     using NUnit.Framework;
@@ -108,7 +107,7 @@ namespace Apache.Ignite.Core.Tests.Cache
                 CollectionAssert.IsNotEmpty(files);
                 
                 // Wait for metrics update and check metrics.
-                Thread.Sleep(((TcpDiscoverySpi) ignite.GetConfiguration().DiscoverySpi).HeartbeatFrequency);
+                Thread.Sleep(ignite.GetConfiguration().MetricsUpdateFrequency);
 
                 var metrics = cache.GetLocalMetrics();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4ba8a9a/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 1d39e69..7a6f8b5 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
@@ -726,7 +726,6 @@ namespace Apache.Ignite.Core.Tests
                     },
                     ClientReconnectDisabled = true,
                     ForceServerMode = true,
-                    HeartbeatFrequency = TimeSpan.FromSeconds(3),
                     IpFinderCleanFrequency = TimeSpan.FromMinutes(7),
                     LocalAddress = "127.0.0.1",
                     LocalPort = 49900,

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4ba8a9a/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 f9f8a61..8a61360 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
@@ -468,7 +468,6 @@ namespace Apache.Ignite.Core.Tests
                     },
                     ClientReconnectDisabled = true,
                     ForceServerMode = true,
-                    HeartbeatFrequency = TimeSpan.FromSeconds(3),
                     IpFinderCleanFrequency = TimeSpan.FromMinutes(7),
                     LocalAddress = "127.0.0.1",
                     LocalPort = 49900,

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4ba8a9a/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/TcpDiscoverySpi.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/TcpDiscoverySpi.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/TcpDiscoverySpi.cs
index a99f7b0..bdf5780 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/TcpDiscoverySpi.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/TcpDiscoverySpi.cs
@@ -88,11 +88,6 @@ namespace Apache.Ignite.Core.Discovery.Tcp
         public const int DefaultThreadPriority = 10;
 
         /// <summary>
-        /// Default value for the <see cref="HeartbeatFrequency"/> property.
-        /// </summary>
-        public static readonly TimeSpan DefaultHeartbeatFrequency = TimeSpan.FromSeconds(2);
-        
-        /// <summary>
         /// Default value for the <see cref="TopologyHistorySize"/> property.
         /// </summary>
         public const int DefaultTopologyHistorySize = 1000;
@@ -114,7 +109,6 @@ namespace Apache.Ignite.Core.Discovery.Tcp
             MaxMissedClientHeartbeats = DefaultMaxMissedClientHeartbeats;
             IpFinderCleanFrequency = DefaultIpFinderCleanFrequency;
             ThreadPriority = DefaultThreadPriority;
-            HeartbeatFrequency = DefaultHeartbeatFrequency;
             TopologyHistorySize = DefaultTopologyHistorySize;
         }
 
@@ -143,7 +137,6 @@ namespace Apache.Ignite.Core.Discovery.Tcp
             StatisticsPrintFrequency = reader.ReadLongAsTimespan();
             IpFinderCleanFrequency = reader.ReadLongAsTimespan();
             ThreadPriority = reader.ReadInt();
-            HeartbeatFrequency = reader.ReadLongAsTimespan();
             TopologyHistorySize = reader.ReadInt();
         }
 
@@ -248,13 +241,6 @@ namespace Apache.Ignite.Core.Discovery.Tcp
         public int ThreadPriority { get; set; }
 
         /// <summary>
-        /// Gets or sets delay between issuing of heartbeat messages. SPI sends heartbeat messages
-        /// in configurable time interval to other nodes to notify them about its state.
-        /// </summary>
-        [DefaultValue(typeof(TimeSpan), "0:0:2")]
-        public TimeSpan HeartbeatFrequency { get; set; }
-
-        /// <summary>
         /// Gets or sets the size of topology snapshots history.
         /// </summary>
         [DefaultValue(DefaultTopologyHistorySize)]
@@ -298,7 +284,6 @@ namespace Apache.Ignite.Core.Discovery.Tcp
             writer.WriteLong((long) StatisticsPrintFrequency.TotalMilliseconds);
             writer.WriteLong((long) IpFinderCleanFrequency.TotalMilliseconds);
             writer.WriteInt(ThreadPriority);
-            writer.WriteLong((long) HeartbeatFrequency.TotalMilliseconds);
             writer.WriteInt(TopologyHistorySize);
         }
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4ba8a9a/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 3691aa0..950fff8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
@@ -911,11 +911,6 @@
                                 </xs:documentation>
                             </xs:annotation>
                         </xs:attribute>
-                        <xs:attribute name="heartbeatFrequency" type="xs:string">
-                            <xs:annotation>
-                                <xs:documentation>Delay between issuing of heartbeat messages. SPI sends heartbeat messages in configurable time interval to other nodes to notify them about its state.</xs:documentation>
-                            </xs:annotation>
-                        </xs:attribute>
                         <xs:attribute name="ipFinderCleanFrequency" type="xs:string">
                             <xs:annotation>
                                 <xs:documentation>IP finder clean frequency.</xs:documentation>

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4ba8a9a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
index f905d86..9871821 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
@@ -113,7 +113,7 @@ namespace Apache.Ignite.Examples.Datagrid
 
                 Console.WriteLine(">>> Waiting for metrics final update...");
 
-                Thread.Sleep(TcpDiscoverySpi.DefaultHeartbeatFrequency);
+                Thread.Sleep(IgniteConfiguration.DefaultMetricsUpdateFrequency);
 
                 PrintCacheMetrics(cache);