org.apache.hadoop.hive.ql.lockmgr
Interface HiveLockManager
- All Known Implementing Classes:
- DbLockManager, EmbeddedLockManager, ZooKeeperHiveLockManager
public interface HiveLockManager
Manager for locks in Hive. Users should not instantiate a lock manager
directly. Instead they should get an instance from their instance of
HiveTxnManager
.
setContext
void setContext(HiveLockManagerCtx ctx)
throws LockException
- Throws:
LockException
lock
HiveLock lock(HiveLockObject key,
HiveLockMode mode,
boolean keepAlive)
throws LockException
- Parameters:
key
- object to be lockedmode
- mode of the lock (SHARED/EXCLUSIVE)keepAlive
- if the lock needs to be persisted after the statement
- Throws:
LockException
lock
List<HiveLock> lock(List<HiveLockObj> objs,
boolean keepAlive)
throws LockException
- Throws:
LockException
unlock
void unlock(HiveLock hiveLock)
throws LockException
- Throws:
LockException
releaseLocks
void releaseLocks(List<HiveLock> hiveLocks)
getLocks
List<HiveLock> getLocks(boolean verifyTablePartitions,
boolean fetchData)
throws LockException
- Throws:
LockException
getLocks
List<HiveLock> getLocks(HiveLockObject key,
boolean verifyTablePartitions,
boolean fetchData)
throws LockException
- Throws:
LockException
close
void close()
throws LockException
- Throws:
LockException
prepareRetry
void prepareRetry()
throws LockException
- Throws:
LockException
refresh
void refresh()
- refresh to enable new configurations.
Copyright © 2014 The Apache Software Foundation. All rights reserved.