core/src/main/java/com/orientechnologies/orient/core/sql/executor/OSelectExecutionPlanner.java
private Set<String> getServersThatHasAllClusters(Map<String, Set<String>> clusterMap, Set<String> queryClusters) {
    Set<String> remainingServers = clusterMap.keySet();
    for (String cluster : queryClusters) {
      for (Map.Entry<String, Set<String>> serverConfig : clusterMap.entrySet()) {
        if (!serverConfig.getValue().contains(cluster)) {
          remainingServers.remove(serverConfig.getKey());
        }
      }
    }
    return remainingServers;
  }
private Set<String> getServersThatHasAllClusters(Map<String, Set<String>> clusterMap, Set<String> queryClusters) {
    Set<String> remainingServers = clusterMap.keySet();
    for (String cluster : queryClusters) {
      for (Map.Entry<String, Set<String>> serverConfig : clusterMap.entrySet()) {
        if (!serverConfig.getValue().contains(cluster)) {
          remainingServers.remove(serverConfig.getKey());
        }
      }
    }
    return remainingServers;
  }
private Set < String > getServersThatHasAllClusters ( Map < String , Set < String > > clusterMap , Set < String > queryClusters ) { Set < String > remainingServers = clusterMap . keySet ( ) ; for ( String cluster : queryClusters ) { for ( Map . Entry < String , Set < String > > serverConfig : clusterMap . entrySet ( ) ) { if ( ! serverConfig . getValue ( ) . contains ( cluster ) ) { remainingServers . remove ( serverConfig . getKey ( ) ) ; } } } return remainingServers ; }
@param clusterMap    the cluster map for current sharding configuration
@param queryClusters the clusters that are target of the query

@return
@param clusterMap the cluster map for current sharding configuration @param queryClusters the clusters that are target of the query