private void getLocks(String[] paths, int index, boolean verify,
        boolean fetchData, List<HiveLock> locks, HiveConf conf) throws LockException {
      lock.lock();
      try {
        if (index == paths.length) {
          getLocks(paths, verify, fetchData, locks, conf);
          return;
        }
        Node child = children.get(paths[index]);
        if (child != null) {
          child.getLocks(paths, index + 1, verify, fetchData, locks, conf);
        }
      } finally {
        lock.unlock();
      }
    }
shared lock manager for dedicated hive server. all locks are managed in memory
ql/src/java/org/apache/hadoop/hive/ql/lockmgr/EmbeddedLockManager.java