HiveLockManager lockMgr = ctx.getHiveLockMgr();
if (lockMgr == null) {
throw new HiveException("lock Table LockManager not specified");
}
HiveLockMode mode = HiveLockMode.valueOf(lockTbl.getMode());
String tabName = lockTbl.getTableName();
Table tbl = db.getTable(MetaStoreUtils.DEFAULT_DATABASE_NAME, tabName);
if (tbl == null) {
throw new HiveException("Table " + tabName + " does not exist ");
}