You can filter cluster nodes based on the node's metric values. The ClusterMetrics class offers a bucket-load of methods to examine node statistics such as CPU load. Some of the metric methods are as follows:
You can filter cluster nodes based on metric values such as this:
ClusterGroup workerNodes = cluster.forPredicate((node) -> node.metrics().getAverageCpuLoad() < 0.5);