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:
open
in interfaceTriggerLockFactory
-
createLock
- Specified by:
createLock
in interfaceTriggerLockFactory
-
createRecoveryLock
- Specified by:
createRecoveryLock
in interfaceTriggerLockFactory
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-