code: public DatanodeDescriptor getDatanode(DatanodeID nodeID) throws IOException {
      UnregisteredDatanodeException e = null;
      DatanodeDescriptor node = datanodeMap.get(nodeID.getStorageID());
      if (node == null) {
        return null;
      }
      if (!node.getName().equals(nodeID.getName())) {
        e = new UnregisteredDatanodeException(nodeID, node);
        NameNode.stateChangeLog.fatal("BLOCK* NameSystem.getDatanode: "
          + e.getLocalizedMessage());
        throw e;
      }
      return node;
    }
docs: Get data node by storage ID.
  
  @param nodeID
  @return DatanodeDescriptor or null if the node is not found.
  @throws IOException