code: public Set<CassandraHost> discoverNodes() {
      Cluster cluster =  HFactory.getCluster(connectionManager.getClusterName());
      if (cluster == null) {
        return null;
      }
  
      Set<CassandraHost> existingHosts = connectionManager.getHosts();
      Set<CassandraHost> foundHosts = new HashSet<CassandraHost>();
  
      if (log.isDebugEnabled()) {
        log.debug("using existing hosts {}", existingHosts);
      }
  
      try {
  
        for (KeyspaceDefinition keyspaceDefinition : cluster.describeKeyspaces()) {
          if (!keyspaceDefinition.getName().equals(Keyspace.KEYSPACE_SYSTEM)) {
            List<TokenRange> tokenRanges = cluster.describeRing(keyspaceDefinition.getName());
            for (TokenRange tokenRange : tokenRanges) {
  
              for (EndpointDetails endPointDetail : tokenRange.getEndpoint_details()) {
                // Check if we are allowed to include this Data
                // Center.
                if (dataCenterValidator == null
                    || dataCenterValidator.validate(endPointDetail.getDatacenter())) {
                  // Maybe add this host if it's a new host.
                  CassandraHost foundHost = new CassandraHost(endPointDetail.getHost(),
                      cassandraHostConfigurator.getPort());
                  if (!existingHosts.contains(foundHost)) {
                    log.info("Found a node we don't know about {} for TokenRange {}", foundHost,
                        tokenRange);
                    foundHosts.add(foundHost);
                  }
                }
              }
  
            }
            break;
          }
        }
      } catch (Exception e) {
        log.error("Discovery Service failed attempt to connect CassandraHost", e);
      }
  
      return foundHosts;
    }
docs: Find any unknown nodes in the cassandra ring