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() |
ShowLocksResponse |
getLocks() |
List<HiveLock> |
getLocks(boolean verifyTablePartitions,
boolean fetchData) |
List<HiveLock> |
getLocks(HiveLockObject key,
boolean verifyTablePartitions,
boolean fetchData) |
ShowLocksResponse |
getLocks(ShowLocksRequest showLocksRequest) |
HiveLock |
lock(HiveLockObject key,
HiveLockMode mode,
boolean keepAlive) |
List<HiveLock> |
lock(List<HiveLockObj> objs,
boolean keepAlive,
DriverState driverState) |
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 HiveLockManager
LockException
public HiveLock lock(HiveLockObject key, HiveLockMode mode, boolean keepAlive) throws LockException
lock
in interface HiveLockManager
key
- object to be lockedmode
- mode of the lock (SHARED/EXCLUSIVE)keepAlive
- if the lock needs to be persisted after the statementLockException
public List<HiveLock> lock(List<HiveLockObj> objs, boolean keepAlive, DriverState driverState) throws LockException
lock
in interface HiveLockManager
LockException
public void unlock(HiveLock hiveLock) throws LockException
unlock
in interface HiveLockManager
LockException
public void releaseLocks(List<HiveLock> hiveLocks)
releaseLocks
in interface HiveLockManager
public List<HiveLock> getLocks(boolean verifyTablePartitions, boolean fetchData) throws LockException
getLocks
in interface HiveLockManager
LockException
public List<HiveLock> getLocks(HiveLockObject key, boolean verifyTablePartitions, boolean fetchData) throws LockException
getLocks
in interface HiveLockManager
LockException
public ShowLocksResponse getLocks() throws LockException
LockException
public ShowLocksResponse getLocks(ShowLocksRequest showLocksRequest) throws LockException
LockException
public void close() throws LockException
close
in interface HiveLockManager
LockException
public void prepareRetry() throws LockException
prepareRetry
in interface HiveLockManager
LockException
public void refresh()
HiveLockManager
refresh
in interface HiveLockManager
Copyright © 2022 The Apache Software Foundation. All rights reserved.