code: public static DatanodeInfo bestNode(LocatedBlock blk) throws IOException {
      DatanodeInfo [] nodes = blk.getLocations();
      return bestNode(nodes, true).get(0);
    }
docs: return a random node from the replicas of this block