UpdateInPlaceDynamoDbBackfill

abstract class UpdateInPlaceDynamoDbBackfill<I : Any, P : Any>(dynamoDbClient: DynamoDbClient) : DynamoDbBackfill<I, P>

A base class that may make it easier to mutate the items in the DynamoDB store.

If saving fails the batch will fail. If succeeded rows are part of a failed batch they will be retried so implementations must be idempotent.

Constructors

UpdateInPlaceDynamoDbBackfill
Link copied to clipboard
fun UpdateInPlaceDynamoDbBackfill(dynamoDbClient: DynamoDbClient)

Functions

dynamoDbTable
Link copied to clipboard
abstract fun dynamoDbTable(): DynamoDbTable<I>
Provides the table schema so Backfila knows the type and where the table is.
expressionAttributeValues
Link copied to clipboard
open fun expressionAttributeValues(config: BackfillConfig<P>): Map<String, AttributeValue>?
See ScanRequest.
filterExpression
Link copied to clipboard
open fun filterExpression(config: BackfillConfig<P>): String?
See ScanRequest.
fixedSegmentCount
Link copied to clipboard
open fun fixedSegmentCount(config: PrepareBackfillConfig<P>): Int?
Override this to force Backfila to run this number of batches in total, divided among the partitions.
mustHaveProvisionedBillingMode
Link copied to clipboard
open fun mustHaveProvisionedBillingMode(): Boolean
It is rather easy to run a backfill against a dynamo instance that is configured expensively.
partitionCount
Link copied to clipboard
open fun partitionCount(config: PrepareBackfillConfig<P>): Int
The number of independent workers to perform the backfill.
runBatch
Link copied to clipboard
open override fun runBatch(items: List<I>, config: BackfillConfig<P>)
Called for each batch of matching records.
runOne
Link copied to clipboard
abstract fun runOne(item: I, config: BackfillConfig<P>): Boolean
Called for each matching record.
validate
Link copied to clipboard
open fun validate(config: PrepareBackfillConfig<P>)
Override this and throw an exception to prevent the backfill from being created.

Properties

dynamoDbClient
Link copied to clipboard
val dynamoDbClient: DynamoDbClient
dynamoDbTable
Link copied to clipboard
val dynamoDbTable: DynamoDbTable<I>
itemType
Link copied to clipboard
val itemType: KClass<I>