murblanc commented on a change in pull request #2133:
URL: https://github.com/apache/lucene-solr/pull/2133#discussion_r547954091



##########
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:
       One option (simpler than a factory and less verbose) is to define an 
enum with metrics in interface `NodeMetric` and have the implementation convert 
these to the actual instances (in some `if... else` succession ugliness, like 
was done for example for the `Registry` enum to not leak the actual registry 
values).




----------------------------------------------------------------
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

Reply via email to