code: public void verifyRequest(DatanodeRegistration nodeReg) throws IOException {
      verifyVersion(nodeReg.getVersion(), LAYOUT_VERSION, "layout");
      // The ctime of the namenode has to be greater than or equal to the ctime of
      // the datanode. The ctime of the namenode is updated when it is upgraded
      // and only then the ctime of the datanode is updated. Hence the datanode's
      // ctime should never be greater than the namenode's ctime.
      if (getNamespaceID() != nodeReg.storageInfo.namespaceID
          || getCTime() < nodeReg.storageInfo.cTime) {
        LOG.warn("Invalid Request : NN namespaceId, cTime : " + getNamespaceID()
            + ", " + getCTime() + " DN namespaceId, cTime : "
            + nodeReg.storageInfo.namespaceID + ", " + nodeReg.storageInfo.cTime);
        throw new UnregisteredDatanodeException(nodeReg);
      }
      myMetrics.numVersionRequest.inc();
    }
docs: Verify request.
  
  Verifies correctness of the datanode layout version, namespace ID and cTime
  . We support a higher layout version for the datanode and a lower or equal
  cTime for the datanode, but the namespace Id has to match.
  
  @param nodeReg data node registration
  @throws IOException