Package org.apache.iceberg.aws.dynamodb
Class DynamoDbLockManager
java.lang.Object
org.apache.iceberg.util.LockManagers.BaseLockManager
org.apache.iceberg.aws.dynamodb.DynamoDbLockManager
- All Implemented Interfaces:
- AutoCloseable,- LockManager
DynamoDB implementation for the lock manager.
- 
Constructor SummaryConstructorsConstructorDescriptionconstructor for dynamic initialization,initialize(Map)must be called later.DynamoDbLockManager(software.amazon.awssdk.services.dynamodb.DynamoDbClient dynamo, String lockTableName) constructor used for testing purpose
- 
Method SummaryModifier and TypeMethodDescriptionbooleanTry to acquire a lockvoidclose()voidinitialize(Map<String, String> properties) Initialize lock manager from catalog properties.static List<software.amazon.awssdk.services.dynamodb.model.AttributeDefinition> The lock table column definition, for users who whould like to create the table separatelystatic List<software.amazon.awssdk.services.dynamodb.model.KeySchemaElement> The lock table schema, for users who would like to create the table separatelybooleanRelease a lockMethods inherited from class org.apache.iceberg.util.LockManagers.BaseLockManageracquireIntervalMs, acquireTimeoutMs, heartbeatIntervalMs, heartbeatThreads, heartbeatTimeoutMs, scheduler
- 
Constructor Details- 
DynamoDbLockManagerpublic DynamoDbLockManager()constructor for dynamic initialization,initialize(Map)must be called later.
- 
DynamoDbLockManagerpublic DynamoDbLockManager(software.amazon.awssdk.services.dynamodb.DynamoDbClient dynamo, String lockTableName) constructor used for testing purpose- Parameters:
- dynamo- dynamo client
- lockTableName- lock table name
 
 
- 
- 
Method Details- 
initializeDescription copied from interface:LockManagerInitialize lock manager from catalog properties.- Specified by:
- initializein interface- LockManager
- Overrides:
- initializein class- LockManagers.BaseLockManager
- Parameters:
- properties- catalog properties
 
- 
acquireDescription copied from interface:LockManagerTry to acquire a lock- Parameters:
- entityId- ID of the entity to lock
- ownerId- ID of the owner if the lock
- Returns:
- if the lock for the entity is acquired by the owner
 
- 
releaseDescription copied from interface:LockManagerRelease a lockexception must not be thrown for this method. - Parameters:
- entityId- ID of the entity to lock
- ownerId- ID of the owner if the lock
- Returns:
- if the owner held the lock and successfully released it.
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Overrides:
- closein class- LockManagers.BaseLockManager
- Throws:
- Exception
 
- 
lockTableSchemapublic static List<software.amazon.awssdk.services.dynamodb.model.KeySchemaElement> lockTableSchema()The lock table schema, for users who would like to create the table separately- Returns:
- lock table schema
 
- 
lockTableColDefinitionspublic static List<software.amazon.awssdk.services.dynamodb.model.AttributeDefinition> lockTableColDefinitions()The lock table column definition, for users who whould like to create the table separately- Returns:
- lock table column definition
 
 
-