Skip to content

Commit

Permalink
Revert "Change fields recently converted to string back to number (lo…
Browse files Browse the repository at this point in the history
…ng)"

This reverts commit 2520440.
  • Loading branch information
gobradovic committed Nov 9, 2024
1 parent 2520440 commit 22670ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal static LoadMetricInformation GetFromJsonProperties(JsonReader reader)
var deviationAfter = default(double?);
var balancingThreshold = default(double?);
var action = default(string);
var activityThreshold = default(long?);
var activityThreshold = default(string);
var clusterCapacity = default(string);
var clusterLoad = default(string);
var currentClusterLoad = default(double?);
Expand All @@ -50,7 +50,7 @@ internal static LoadMetricInformation GetFromJsonProperties(JsonReader reader)
var nodeBufferPercentage = default(double?);
var clusterBufferedCapacity = default(string);
var bufferedClusterCapacityRemaining = default(double?);
var clusterRemainingBufferedCapacity = default(long?);
var clusterRemainingBufferedCapacity = default(string);
var minNodeLoadValue = default(string);
var minimumNodeLoad = default(double?);
var minNodeLoadNodeId = default(NodeId);
Expand Down Expand Up @@ -92,7 +92,7 @@ internal static LoadMetricInformation GetFromJsonProperties(JsonReader reader)
}
else if (string.Compare("ActivityThreshold", propName, StringComparison.OrdinalIgnoreCase) == 0)
{
activityThreshold = reader.ReadValueAsLong();
activityThreshold = reader.ReadValueAsString();
}
else if (string.Compare("ClusterCapacity", propName, StringComparison.OrdinalIgnoreCase) == 0)
{
Expand Down Expand Up @@ -132,7 +132,7 @@ internal static LoadMetricInformation GetFromJsonProperties(JsonReader reader)
}
else if (string.Compare("ClusterRemainingBufferedCapacity", propName, StringComparison.OrdinalIgnoreCase) == 0)
{
clusterRemainingBufferedCapacity = reader.ReadValueAsLong();
clusterRemainingBufferedCapacity = reader.ReadValueAsString();
}
else if (string.Compare("MinNodeLoadValue", propName, StringComparison.OrdinalIgnoreCase) == 0)
{
Expand Down Expand Up @@ -243,7 +243,7 @@ internal static void Serialize(JsonWriter writer, LoadMetricInformation obj)

if (obj.ActivityThreshold != null)
{
writer.WriteProperty(obj.ActivityThreshold, "ActivityThreshold", JsonWriterExtensions.WriteLongValue);
writer.WriteProperty(obj.ActivityThreshold, "ActivityThreshold", JsonWriterExtensions.WriteStringValue);
}

if (obj.ClusterCapacity != null)
Expand Down Expand Up @@ -293,7 +293,7 @@ internal static void Serialize(JsonWriter writer, LoadMetricInformation obj)

if (obj.ClusterRemainingBufferedCapacity != null)
{
writer.WriteProperty(obj.ClusterRemainingBufferedCapacity, "ClusterRemainingBufferedCapacity", JsonWriterExtensions.WriteLongValue);
writer.WriteProperty(obj.ClusterRemainingBufferedCapacity, "ClusterRemainingBufferedCapacity", JsonWriterExtensions.WriteStringValue);
}

if (obj.MinNodeLoadValue != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public LoadMetricInformation(
double? deviationAfter = default(double?),
double? balancingThreshold = default(double?),
string action = default(string),
long? activityThreshold = default(long?),
string activityThreshold = default(string),
string clusterCapacity = default(string),
string clusterLoad = default(string),
double? currentClusterLoad = default(double?),
Expand All @@ -74,7 +74,7 @@ public LoadMetricInformation(
double? nodeBufferPercentage = default(double?),
string clusterBufferedCapacity = default(string),
double? bufferedClusterCapacityRemaining = default(double?),
long? clusterRemainingBufferedCapacity = default(long?),
string clusterRemainingBufferedCapacity = default(string),
string minNodeLoadValue = default(string),
double? minimumNodeLoad = default(double?),
NodeId minNodeLoadNodeId = default(NodeId),
Expand Down Expand Up @@ -148,7 +148,7 @@ public LoadMetricInformation(
/// <summary>
/// Gets the Activity Threshold specified for this metric in the system Cluster Manifest.
/// </summary>
public long? ActivityThreshold { get; }
public string ActivityThreshold { get; }

/// <summary>
/// Gets the total cluster capacity for a given metric
Expand Down Expand Up @@ -201,7 +201,7 @@ public LoadMetricInformation(
/// <summary>
/// Gets the remaining percentage of cluster total capacity for this metric.
/// </summary>
public long? ClusterRemainingBufferedCapacity { get; }
public string ClusterRemainingBufferedCapacity { get; }

/// <summary>
/// Gets the minimum load on any node for this metric. In future releases of Service Fabric this parameter will be
Expand Down

0 comments on commit 22670ce

Please sign in to comment.