@Override
  public HiveLock lock(HiveLockObject key, HiveLockMode mode, boolean keepAlive)
      throws LockException {
    LOG.debug("Acquiring lock for {} with mode {} {}", key.getName(), mode,
        key.getData().getLockMode());
    return lock(key, mode, numRetriesForLock, sleepTime);
  }
shared lock manager for dedicated hive server. all locks are managed in memory
ql/src/java/org/apache/hadoop/hive/ql/lockmgr/EmbeddedLockManager.java