DynamoDB Enhanced Client: batch writes
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Java
- Sterne
- 2.6k
- Forks
- 1k
- Ø Merge
- 2 T. 9 Std.
- Gemergte PRs (30 T.)
- 51
Beschreibung
### Describe the feature
Requested feature: `batchPutItem(Collection)` and `batchUpdateItem(Collection)` methods on `DynamoDbTable`.
### Use Case
The low-level client supports batch transactional writes, and the Enhanced client works by mapping POJOs onto low-level operations. I would like to write a series of records transactionally from POJOs, but the Enhanced client only supports single-record operations. Instead, I want to prepare the records to be saved and save them as a batch.
### Proposed Solution
`PutItemOperation` (with the other `TableOperation`s) generates a `PutItemRequest`, and the low-level client already supports the `batchWriteItem` operation that takes multiple `PutItemRequest`s and batches them. All of the existing logic for the Enhanced client could remain in place with a scatter-gather implementation that collects the generated requests and executes them via `batchWriteItem`.
### Other Information
_No response_
### Acknowledgements
- [x] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS Java SDK version used
2.17.260
### JDK version used
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)
### Operating System and version
Gentoo Linux
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem Lesen von DynamoDbTable sowie der bestehenden PutItemOperation und anderer TableOperation-Implementierungen und vergleiche anschließend deren generierte Requests mit der Low-Level-Operation batchWriteItem. Lege das Verhalten von batchPutItem(Collection) und batchUpdateItem(Collection) für das Sammeln gemappter Requests und deren Ausführung in Batches fest; abgeschlossen ist die Aufgabe, wenn POJOs über den Enhanced client mit den angeforderten Batch-Methoden geschrieben werden können.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, java
- Bereich
- cloud, databases
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100