public void compilationFinishedWithLocking(boolean wasError) {
    lock();
    try {
      driverState = wasError ? State.ERROR : State.COMPILED;
    } finally {
      unlock();
    }
  }
Enumeration of the potential driver states.
ql/src/java/org/apache/hadoop/hive/ql/DriverState.java