是否有人对 AWS Java SDK 1.4.2(及更高版本)中的 DynamoDB 的新命名空间 (com.amazonaws.services.dynamodbv2
) 和接口进行了更改?根据 1.4.2 发行说明,本地二级指数的发布显然需要进行重大更改.
Has anyone made the change to the new namespaces (com.amazonaws.services.dynamodbv2
) and interfaces for DynamoDB in the AWS Java SDK 1.4.2 (and later)? The release of Local Secondary Indices apparently necessitated breaking changes as per the 1.4.2 release notes.
有没有人找到一份指南,详细说明了哪些更改以及迁移现有代码需要做什么?我正在尝试决定何时最好对现有代码库进行此更改.
Has anyone found a guide detailing what changed and what needs to happen to migrate existing code? I am trying to decide when is best to make this change for an existing code base.
DynamoDB 的新 dynamodbv2 命名空间引入了以下不兼容的更改(因为它们不是简单的添加,需要更改代码才能切换到新的命名空间):
The new dynamodbv2 namespace of DynamoDB introduces the following incompatible changes (in that they are not simply additive, and require code changes to switch to the new namespace):
如果需要,可以逐步将您的代码迁移到新的 Java API.如果您计划在代码中添加查询本地二级索引或使用本地二级索引创建表的功能,您将需要为该部分代码使用新的 API.
It is possible to migrate your code to the new Java API incrementally, if desired. If you plan to add functionality to your code that queries Local Secondary Indexes, or creates tables with local secondary indexes, you will need to use the new API for that part of your code.
如果您使用新 API 创建具有本地二级索引的表,您仍然可以使用 dynamodb 命名空间中的现有代码对该表执行所有现有操作.例如,带有 dynamodb 命名空间客户端的 PutItem 将适用于使用 dynamodbv2 客户端创建的表,反之亦然.
If you create a table with Local Secondary Indexes with the new API, you can still use your existing code in the dynamodb namespace to perform all of the existing operations on that table. As an example, PutItem with the dynamodb namespace client will work against tables created using the dynamodbv2 client, as well as the other way around.
这篇关于AWS Java SDK 中 DynamoDB v2 的迁移详细信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!