new HiveLockObjectData(lockTbl.getQueryId(),
String.valueOf(System.currentTimeMillis()),
"EXPLICIT");
if (partSpec == null) {
HiveLock lck = lockMgr.lock(new HiveLockObject(tbl, lockData), mode, true, 0, 0);
if (lck == null) {
return 1;
}
return 0;
}
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;
}