public final class DbLockManager extends Object implements HiveLockManager
DbTxnManager.
Note, this lock manager is not meant to be stand alone. It cannot be used without the DbTxnManager.
See DbTxnManager.getMS() for important concurrency/metastore access notes.| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.hadoop.hive.metastore.api.ShowLocksResponse |
getLocks() |
List<HiveLock> |
getLocks(boolean verifyTablePartitions,
boolean fetchData) |
List<HiveLock> |
getLocks(HiveLockObject key,
boolean verifyTablePartitions,
boolean fetchData) |
org.apache.hadoop.hive.metastore.api.ShowLocksResponse |
getLocks(org.apache.hadoop.hive.metastore.api.ShowLocksRequest showLocksRequest) |
HiveLock |
lock(HiveLockObject key,
HiveLockMode mode,
boolean keepAlive) |
List<HiveLock> |
lock(List<HiveLockObj> objs,
boolean keepAlive,
Driver.LockedDriverState lDrvState) |
void |
prepareRetry() |
void |
refresh()
refresh to enable new configurations.
|
void |
releaseLocks(List<HiveLock> hiveLocks) |
void |
setContext(HiveLockManagerCtx ctx) |
void |
unlock(HiveLock hiveLock) |
public void setContext(HiveLockManagerCtx ctx) throws LockException
setContext in interface HiveLockManagerLockExceptionpublic HiveLock lock(HiveLockObject key, HiveLockMode mode, boolean keepAlive) throws LockException
lock in interface HiveLockManagerkey - object to be lockedmode - mode of the lock (SHARED/EXCLUSIVE)keepAlive - if the lock needs to be persisted after the statementLockExceptionpublic List<HiveLock> lock(List<HiveLockObj> objs, boolean keepAlive, Driver.LockedDriverState lDrvState) throws LockException
lock in interface HiveLockManagerLockExceptionpublic void unlock(HiveLock hiveLock) throws LockException
unlock in interface HiveLockManagerLockExceptionpublic void releaseLocks(List<HiveLock> hiveLocks)
releaseLocks in interface HiveLockManagerpublic List<HiveLock> getLocks(boolean verifyTablePartitions, boolean fetchData) throws LockException
getLocks in interface HiveLockManagerLockExceptionpublic List<HiveLock> getLocks(HiveLockObject key, boolean verifyTablePartitions, boolean fetchData) throws LockException
getLocks in interface HiveLockManagerLockExceptionpublic org.apache.hadoop.hive.metastore.api.ShowLocksResponse getLocks()
throws LockException
LockExceptionpublic org.apache.hadoop.hive.metastore.api.ShowLocksResponse getLocks(org.apache.hadoop.hive.metastore.api.ShowLocksRequest showLocksRequest)
throws LockException
LockExceptionpublic void close()
throws LockException
close in interface HiveLockManagerLockExceptionpublic void prepareRetry()
throws LockException
prepareRetry in interface HiveLockManagerLockExceptionpublic void refresh()
HiveLockManagerrefresh in interface HiveLockManagerCopyright © 2019 The Apache Software Foundation. All Rights Reserved.