public void unlock(HiveLock hiveLock, int numRetriesForUnLock, long sleepTime)
      throws LockException {
    String[] paths = hiveLock.getHiveLockObject().getPaths();
    HiveLockObjectData data = hiveLock.getHiveLockObject().getData();
    for (int i = 0; i <= numRetriesForUnLock; i++) {
      if (i > 0) {
        sleep(sleepTime);
      }
      if (root.unlock(paths, data)) {
        return;
      }
    }
    throw new LockException("Failed to release lock " + hiveLock);
  }
shared lock manager for dedicated hive server. all locks are managed in memory
ql/src/java/org/apache/hadoop/hive/ql/lockmgr/EmbeddedLockManager.java