murblanc commented on a change in pull request #2133: URL: https://github.com/apache/lucene-solr/pull/2133#discussion_r547952921
########## File path: solr/core/src/java/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactory.java ########## @@ -194,7 +195,9 @@ public PlacementPlan computePlacement(Cluster cluster, PlacementRequest request, // Request all needed attributes attributeFetcher.requestNodeSystemProperty(AVAILABILITY_ZONE_SYSPROP).requestNodeSystemProperty(REPLICA_TYPE_SYSPROP); - attributeFetcher.requestNodeCoreCount().requestNodeFreeDisk(); + attributeFetcher + .requestNodeMetric(NodeMetricImpl.NUM_CORES) Review comment: Leaking implementation to the plugin code here. Something that I think we managed to avoid until now. Shall we continue to try? And expose these metric instances through a factory that will have an interface visible to the client? Or consider it's not worth the trouble? From `NodeMetricImpl` dependencies go to `ImplicitSnitch` to `ZkStateReader` and to basically the whole codebase. ---------------------------------------------------------------- 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