code: private DatanodeDescriptor getDatanode(DatanodeID node) {
      if (node == null) {
        return null;
      }
      DatanodeDescriptor ds = null;
      try {
        ds = namesystem.getDatanode(node);
      } catch (Exception e) {
        // probably dead on unregistered datanode
        LOG.warn("Failover - caught exception when getting datanode", e);
        return null;
      }
      return ds;
    }
docs: Get datanode descriptor from namesystem.
  Return null for unregistered/dead/error nodes.