mlbiscoc commented on code in PR #3713:
URL: https://github.com/apache/solr/pull/3713#discussion_r2388437206


##########
solr/core/src/java/org/apache/solr/cluster/placement/impl/AttributeFetcherImpl.java:
##########


Review Comment:
   Might just be me but trying to understand this frustratingly confusing. 
Since system properties strings and numeric metric values (With a conversion 
method in the middle) were all being fetched from the same /admin/metrics call, 
it stitches it all together with many different nested maps. These maps also 
get mutated deep in the calls below making it harder to follow. I rewrote some 
of this to make it flow better and while splitting this logic up since it goes 
to 2 different endpoints now but hopefully I didn't make it worse. I tried my 
best but there could definitely be more improvement I think so added the TODO



##########
solr/core/src/java/org/apache/solr/cluster/placement/impl/ReplicaMetricImpl.java:
##########
@@ -24,18 +24,9 @@
  * reported in <code>solr.core.[collection].[replica]</code> registry)
  */
 public class ReplicaMetricImpl<T> extends MetricImpl<T> implements 
ReplicaMetric<T> {
-
   /** Replica index size in GB. */
   public static final ReplicaMetricImpl<Double> INDEX_SIZE_GB =
-      new ReplicaMetricImpl<>("sizeGB", "INDEX.sizeInBytes", 
BYTES_TO_GB_CONVERTER);
-
-  /** 1-min query rate of the /select handler. */
-  public static final ReplicaMetricImpl<Double> QUERY_RATE_1MIN =
-      new ReplicaMetricImpl<>("queryRate", 
"QUERY./select.requestTimes:1minRate");
-
-  /** 1-min update rate of the /update handler. */
-  public static final ReplicaMetricImpl<Double> UPDATE_RATE_1MIN =
-      new ReplicaMetricImpl<>("updateRate", 
"UPDATE./update.requestTimes:1minRate");

Review Comment:
   These metrics no longer exist



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to