public class FileSystemBasedLockProvider extends Object implements LockProvider<String>, Serializable
LockProvider implementation allows to lock table operations
using DFS. Users might need to manually clean the Locker's path if writeClient crash and never run again.
NOTE: This only works for DFS with atomic create/delete operation| Modifier and Type | Field and Description |
|---|---|
protected LockConfiguration |
lockConfiguration |
| Constructor and Description |
|---|
FileSystemBasedLockProvider(LockConfiguration lockConfiguration,
org.apache.hadoop.conf.Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected String |
generateLogStatement(LockState state) |
String |
getLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
void |
unlock() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlock, lockInterruptibly, newCondition, tryLockprotected LockConfiguration lockConfiguration
public FileSystemBasedLockProvider(LockConfiguration lockConfiguration, org.apache.hadoop.conf.Configuration configuration)
public void close()
close in interface AutoCloseableclose in interface LockProvider<String>public String getLock()
getLock in interface LockProvider<String>Copyright © 2022 The Apache Software Foundation. All rights reserved.