code: public DatanodeInfo chooseTargetNodes(Set<DatanodeInfo> excludedNodes) 
        throws IOException {
      DatanodeInfo target = cluster.getNodeOnDifferentRack(excludedNodes);
      if (target == null) {
        throw new IOException ("Error choose datanode");
      }
      return target;
    }
docs: explicitly choose the target nodes.
  @throws IOException