murblanc commented on a change in pull request #2133: URL: https://github.com/apache/lucene-solr/pull/2133#discussion_r545151767
########## File path: solr/core/src/java/org/apache/solr/cluster/placement/AttributeValues.java ########## @@ -65,11 +65,16 @@ /** * For the given node: metric of specific name and registry */ - Optional<Double> getMetric(Node node, String metricName, AttributeFetcher.NodeMetricRegistry registry); + Optional<Object> getMetric(Node node, String metricName, AttributeFetcher.NodeMetricRegistry registry); /** - * Get a non node related metric of specific scope and name + * Get any metric using a fully-qualified metric key. */ - Optional<Double> getMetric(String scope, String metricName); + Optional<Object> getNodeMetric(Node node, String metricKey); + + /** + * + */ + Optional<CollectionMetrics> getCollectionMetrics(String collectionName); Review comment: We have a lack of symmetry now between node metrics that return mere `Object`s and collection/shard/replica metrics that are defined types (eventually resolving to a `ReplicaMetrics` that can return an object or specific typed metrics - currently only replica size GB). Maybe we should call something different the "typed" metric interfaces to distinguish between them and the object being eventually returned? I suggest that rather than calling the interface `CollectionMetrics`, we call it `CollectionMetricContainer` (and similarly for Shard and Replica). That would help me. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org