in flink-connector-aws/flink-connector-dynamodb/src/main/java/org/apache/flink/connector/dynamodb/sink/DynamoDbSink.java [89:123]
protected DynamoDbSink(
ElementConverter<InputT, DynamoDbWriteRequest> elementConverter,
int maxBatchSize,
int maxInFlightRequests,
int maxBufferedRequests,
long maxBatchSizeInBytes,
long maxTimeInBufferMS,
long maxRecordSizeInBytes,
boolean failOnError,
String tableName,
List<String> overwriteByPartitionKeys,
Properties dynamoDbClientProperties) {
super(
elementConverter,
maxBatchSize,
maxInFlightRequests,
maxBufferedRequests,
maxBatchSizeInBytes,
maxTimeInBufferMS,
maxRecordSizeInBytes);
checkNotNull(
tableName,
"Destination table name must be set when initializing the DynamoDB Sink.");
checkArgument(
!tableName.isEmpty(),
"Destination table name must be set when initializing the DynamoDB Sink.");
checkArgument(
maxBatchSize <= 25,
"DynamoDB client supports only up to 25 elements in the batch.");
checkNotNull(dynamoDbClientProperties, "DynamoDB client properties must be set.");
this.failOnError = failOnError;
this.tableName = tableName;
this.overwriteByPartitionKeys = overwriteByPartitionKeys;
this.dynamoDbClientProperties = dynamoDbClientProperties;
}