Partition par = db.getPartition(tbl, partSpec, false);
if (par == null) {
throw new HiveException("Partition " + partSpec + " for table " + tabName + " does not exist");
}
HiveLock lck = lockMgr.lock(new HiveLockObject(par, lockData), mode, true, 0, 0);
if (lck == null) {
return 1;
}
return 0;
}