protected HiveLockManager getAndCheckLockManager() throws HiveException {
    HiveLockManager lockMgr = getLockManager();
    if (lockMgr == null) {
      throw new HiveException("LockManager cannot be acquired");
    }

    if (!supportsExplicitLock()) {
      throw new HiveException(ErrorMsg.LOCK_REQUEST_UNSUPPORTED,
          conf.getVar(HiveConf.ConfVars.HIVE_TXN_MANAGER));
    }

    return lockMgr;
  }
Gets the lock manager and verifies if the explicit lock is supported
@return  the lock manager
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManagerImpl.java