private static HiveLockMode getLockMode(String path) {

    Matcher shMatcher = shMode.matcher(path);
    Matcher exMatcher = exMode.matcher(path);

    if (shMatcher.matches()) {
      return HiveLockMode.SHARED;
    }

    if (exMatcher.matches()) {
      return HiveLockMode.EXCLUSIVE;
    }

    return null;
  }
Get the object from the path of the lock.
The object may correspond to a table, a partition or a parent to a partition.
For eg: if Table T is partitioned by ds, hr and ds=1/hr=1 is a valid partition,
the lock may also correspond to T@ds=1, which is not a valid object
@param verifyTablePartition
ql/src/java/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ZooKeeperHiveLockManager.java