public List<Integer> filterDataNodeThroughStatus(Function<NodeStatus, Boolean> statusPredicate) {
    return nodeCacheMap.entrySet().stream()
        .filter(
            nodeCacheEntry ->
                nodeCacheEntry.getValue() instanceof DataNodeHeartbeatCache
                    && statusPredicate.apply(nodeCacheEntry.getValue().getNodeStatus()))
        .map(Map.Entry::getKey)
        .collect(Collectors.toList());
  }
Filter DataNodes through the NodeStatus predicate.

@param statusPredicate The NodeStatus predicate
@return Filtered DataNodes with the predicate
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/cache/LoadCache.java