code: @Deprecated
    DatanodeDescriptor getDatanodeByHost(String host) {
      if (host==null) {
        return null;
      }
        
      hostmapLock.readLock().lock();
      try {
        DatanodeDescriptor[] nodes = map.get(host);
        // no entry
        if (nodes== null) {
          return null;
        }
        // one node
        if (nodes.length == 1) {
          return nodes[0];
        }
        // more than one node
        return nodes[r.nextInt(nodes.length)];
      } finally {
        hostmapLock.readLock().unlock();
      }
    }
docs: get a data node by its host.
  @deprecated use {@link #getDataNodeByIpPort(String)}
  @return DatanodeDescriptor if found; otherwise null.