Repository: ignite
Updated Branches:
  refs/heads/master ed2435c81 -> 447a8a9d0


IGNITE-7773 Add 'rebalanceClearingPartitionsLeft' metric to .NET - Fixes #3613.

Signed-off-by: Alexey Goncharuk <alexey.goncha...@gmail.com>


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

Branch: refs/heads/master
Commit: 447a8a9d0da87128b28d37f4ebaa2e3040e5febb
Parents: ed2435c
Author: Pavel Kovalenko <jokse...@gmail.com>
Authored: Mon Mar 12 18:16:34 2018 +0300
Committer: Alexey Goncharuk <alexey.goncha...@gmail.com>
Committed: Mon Mar 12 18:16:34 2018 +0300

----------------------------------------------------------------------
 .../internal/processors/platform/cache/PlatformCache.java   | 1 +
 .../dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs        | 9 +++++++++
 .../Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs       | 7 +++++++
 3 files changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/447a8a9d/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
index 86774c1..19dac83 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
@@ -1482,6 +1482,7 @@ public class PlatformCache extends PlatformAbstractTarget 
{
         writer.writeLong(metrics.getHeapEntriesCount());
         writer.writeLong(metrics.getEstimatedRebalancingFinishTime());
         writer.writeLong(metrics.getRebalancingStartTime());
+        writer.writeLong(metrics.getRebalanceClearingPartitionsLeft());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/447a8a9d/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs 
b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs
index 43a54c7..a328cf5 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs
@@ -637,5 +637,14 @@ namespace Apache.Ignite.Core.Cache
         /// Rebalancing start time.
         /// </returns>
         long RebalancingStartTime { get; }
+
+        /// <summary>
+        /// Gets number of partitions.
+        /// need to be cleared before actual rebalance start.
+        /// </summary>
+        /// <returns>
+        /// Number of clearing partitions for rebalance.
+        /// </returns>
+        long RebalanceClearingPartitionsLeft { get; }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/447a8a9d/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs 
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
index 1a3f0dc..fbc5d4c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
@@ -241,6 +241,9 @@ namespace Apache.Ignite.Core.Impl.Cache
         /** */
         private readonly long _rebalancingStartTime;
 
+        /** */
+        private readonly long _rebalancingClearingPartitionsLeft;
+
         /// <summary>
         /// Initializes a new instance of the <see cref="CacheMetricsImpl"/> 
class.
         /// </summary>
@@ -319,6 +322,7 @@ namespace Apache.Ignite.Core.Impl.Cache
             _heapEntriesCount = reader.ReadLong();
             _estimatedRebalancingFinishTime = reader.ReadLong();
             _rebalancingStartTime = reader.ReadLong();
+            _rebalancingClearingPartitionsLeft = reader.ReadLong();
         }
 
         /** <inheritDoc /> */
@@ -536,5 +540,8 @@ namespace Apache.Ignite.Core.Impl.Cache
 
         /** <inheritDoc /> */
         public long RebalancingStartTime { get { return _rebalancingStartTime; 
} }
+
+        /** <inheritDoc /> */
+        public long RebalanceClearingPartitionsLeft { get { return 
_rebalancingClearingPartitionsLeft; } }
     }
 }
\ No newline at end of file

Reply via email to