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.


Method Summary
 void close()
           
 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)
           
 

Method Detail

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 locked
mode - 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.