Class ZkLockFactory
java.lang.Object
org.apache.iceberg.flink.maintenance.api.ZkLockFactory
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable,TriggerLockFactory
Zookeeper backed implementation of the
TriggerLockFactory.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.iceberg.flink.maintenance.api.TriggerLockFactory
TriggerLockFactory.Lock -
Constructor Summary
ConstructorsConstructorDescriptionZkLockFactory(String connectString, String lockId, int sessionTimeoutMs, int connectionTimeoutMs, int baseSleepTimeMs, int maxRetries) Create Zookeeper lock factory -
Method Summary
-
Constructor Details
-
ZkLockFactory
public ZkLockFactory(String connectString, String lockId, int sessionTimeoutMs, int connectionTimeoutMs, int baseSleepTimeMs, int maxRetries) Create Zookeeper lock factory- Parameters:
connectString- Zookeeper connection stringlockId- which should identify the job and the tablesessionTimeoutMs- Session timeout in millisecondsconnectionTimeoutMs- Connection timeout in millisecondsbaseSleepTimeMs- Base sleep time in millisecondsmaxRetries- Maximum number of retries
-
-
Method Details
-
open
public void open()- Specified by:
openin interfaceTriggerLockFactory
-
createLock
- Specified by:
createLockin interfaceTriggerLockFactory
-
createRecoveryLock
- Specified by:
createRecoveryLockin interfaceTriggerLockFactory
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-