public class DbLockManager extends Object implements HiveLockManager
DbTxnManager
.
Note, this lock manager is not meant to stand alone. It cannot be used
without the DbTxnManager.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) |
HiveLock |
lock(HiveLockObject key,
HiveLockMode mode,
boolean keepAlive) |
List<HiveLock> |
lock(List<HiveLockObj> objs,
boolean keepAlive) |
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) 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 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 © 2017 The Apache Software Foundation. All rights reserved.