public class EmbeddedLockManager extends Object implements HiveLockManager
Constructor and Description |
---|
EmbeddedLockManager() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
List<HiveLock> |
getLocks(boolean verifyTablePartitions,
boolean fetchData) |
List<HiveLock> |
getLocks(boolean verifyTablePartitions,
boolean fetchData,
HiveConf conf) |
List<HiveLock> |
getLocks(HiveLockObject key,
boolean verifyTablePartitions,
boolean fetchData) |
List<HiveLock> |
getLocks(HiveLockObject key,
boolean verifyTablePartitions,
boolean fetchData,
HiveConf conf) |
HiveLock |
lock(HiveLockObject key,
HiveLockMode mode,
boolean keepAlive) |
HiveLock |
lock(HiveLockObject key,
HiveLockMode mode,
int numRetriesForLock,
long sleepTime) |
List<HiveLock> |
lock(List<HiveLockObj> objs,
boolean keepAlive) |
List<HiveLock> |
lock(List<HiveLockObj> objs,
int numRetriesForLock,
long sleepTime) |
void |
prepareRetry() |
void |
refresh()
refresh to enable new configurations.
|
void |
releaseLocks(List<HiveLock> hiveLocks) |
void |
releaseLocks(List<HiveLock> hiveLocks,
int numRetriesForUnLock,
long sleepTime) |
void |
setContext(HiveLockManagerCtx ctx) |
void |
unlock(HiveLock hiveLock) |
void |
unlock(HiveLock hiveLock,
int numRetriesForUnLock,
long sleepTime) |
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 void prepareRetry()
prepareRetry
in interface HiveLockManager
public void refresh()
HiveLockManager
refresh
in interface HiveLockManager
public HiveLock lock(HiveLockObject key, HiveLockMode mode, int numRetriesForLock, long sleepTime) throws LockException
LockException
public List<HiveLock> lock(List<HiveLockObj> objs, int numRetriesForLock, long sleepTime) throws LockException
LockException
public void unlock(HiveLock hiveLock, int numRetriesForUnLock, long sleepTime) throws LockException
LockException
public void releaseLocks(List<HiveLock> hiveLocks, int numRetriesForUnLock, long sleepTime)
public List<HiveLock> getLocks(boolean verifyTablePartitions, boolean fetchData, HiveConf conf) throws LockException
LockException
public List<HiveLock> getLocks(HiveLockObject key, boolean verifyTablePartitions, boolean fetchData, HiveConf conf) throws LockException
LockException
public void close()
close
in interface HiveLockManager
Copyright © 2017 The Apache Software Foundation. All rights reserved.