public void lockAndRespond() throws CommandProcessorException {
    // Assumes the query has already been compiled
    if (driverContext.getPlan() == null) {
      throw new IllegalStateException(
          "No previously compiled query for driver - queryId=" + driverContext.getQueryState().getQueryId());
    }

    try {
      driverTxnHandler.acquireLocksIfNeeded();
    } catch (CommandProcessorException cpe) {
      driverTxnHandler.rollback(cpe);
      saveErrorMessageAndRethrow(cpe);
    }
  }
Checks if the recorded snapshot is up-to-date
ql/src/java/org/apache/hadoop/hive/ql/Driver.java