code: public void removeNode(ClusterNode node) {
      String host = node.getHost();
      NodeContainer container = hostToRunnableNode.get(host);
      if (container != null) {
        if (container.removeNode(node)) {
          runnableNodeCount--;
        }
        if (container.isEmpty()) {
          hostToRunnableNode.remove(host);
        }
      }
      Node rack = topologyCache.getNode(host).getParent();
      container = rackToRunnableNode.get(rack);
      if (container != null) {
        container.removeNode(node);
        if (container.isEmpty()) {
          rackToRunnableNode.remove(rack);
        }
      }
    }
docs: Remove a node from the snapshot.
  @param node The node.