<small id='Zl2RV'></small><noframes id='Zl2RV'>

<tfoot id='Zl2RV'></tfoot>
<i id='Zl2RV'><tr id='Zl2RV'><dt id='Zl2RV'><q id='Zl2RV'><span id='Zl2RV'><b id='Zl2RV'><form id='Zl2RV'><ins id='Zl2RV'></ins><ul id='Zl2RV'></ul><sub id='Zl2RV'></sub></form><legend id='Zl2RV'></legend><bdo id='Zl2RV'><pre id='Zl2RV'><center id='Zl2RV'></center></pre></bdo></b><th id='Zl2RV'></th></span></q></dt></tr></i><div id='Zl2RV'><tfoot id='Zl2RV'></tfoot><dl id='Zl2RV'><fieldset id='Zl2RV'></fieldset></dl></div>
  • <legend id='Zl2RV'><style id='Zl2RV'><dir id='Zl2RV'><q id='Zl2RV'></q></dir></style></legend>
      <bdo id='Zl2RV'></bdo><ul id='Zl2RV'></ul>

      1. AWS Java SDK 中 DynamoDB v2 的迁移详细信息?

        时间:2023-09-29
      2. <legend id='0JsGG'><style id='0JsGG'><dir id='0JsGG'><q id='0JsGG'></q></dir></style></legend>

            <tfoot id='0JsGG'></tfoot>
              <bdo id='0JsGG'></bdo><ul id='0JsGG'></ul>

                <tbody id='0JsGG'></tbody>

              • <small id='0JsGG'></small><noframes id='0JsGG'>

              • <i id='0JsGG'><tr id='0JsGG'><dt id='0JsGG'><q id='0JsGG'><span id='0JsGG'><b id='0JsGG'><form id='0JsGG'><ins id='0JsGG'></ins><ul id='0JsGG'></ul><sub id='0JsGG'></sub></form><legend id='0JsGG'></legend><bdo id='0JsGG'><pre id='0JsGG'><center id='0JsGG'></center></pre></bdo></b><th id='0JsGG'></th></span></q></dt></tr></i><div id='0JsGG'><tfoot id='0JsGG'></tfoot><dl id='0JsGG'><fieldset id='0JsGG'></fieldset></dl></div>

                  本文介绍了AWS Java SDK 中 DynamoDB v2 的迁移详细信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  是否有人对 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):

                  • HashKeyElementRangeKeyElement 被替换为 Map.这包括名为 ExclusiveStartKeyLastEvaluatedKeyKey 的结构.此更改对代码的主要影响是,现在为了调用 GetItem,您的代码需要知道主键的属性名称,而不仅仅是主键值.
                  • Query 现在使用 Map 类型的 KeyCondition 来指定完整的查询,而不是使用单独的 HashKeyValueRangeKeyCondition 字段.
                  • CreateTable 输入将属性类型定义与主键定义分开(并且创建/更新/删除/描述响应与此匹配)
                  • 响应中的已消耗容量现在是一个结构,而不是单个数字,并且必须在请求中提出.在批处理操作中,它以单独的 ConsumedCapacity 结构返回,而不是与结果一起返回.
                  • HashKeyElement and RangeKeyElement are replaced with a Map<String, AttributeValue>. This includes the structures named ExclusiveStartKey, LastEvaluatedKey, and Key. The main impact on the code with this change is that now in order to call GetItem, for example, your code needs to know the attribute names of the primary keys, and not just the primary key values.
                  • Query now uses a KeyCondition of type Map<String, Condition> to specify the full query, instead of having separate HashKeyValue and RangeKeyCondition fields.
                  • CreateTable input separates the attribute type definitions from the primary key definitions (and create/update/delete/describe responses match this)
                  • Consumed Capacity in responses is now a structure instead of a single number, and must be asked for in the request. In Batch operations, this is returned in a separate ConsumedCapacity structure, instead of alongside the results.

                  如果需要,可以逐步将您的代码迁移到新的 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模板网!

                  上一篇:DynamoDBMapper 仅在唯一时保存项目 下一篇:如何确定是否确实删除了 DynamoDB 项目?

                  相关文章

                  最新文章

                        <bdo id='e49td'></bdo><ul id='e49td'></ul>

                      <legend id='e49td'><style id='e49td'><dir id='e49td'><q id='e49td'></q></dir></style></legend>

                      <small id='e49td'></small><noframes id='e49td'>

                    1. <i id='e49td'><tr id='e49td'><dt id='e49td'><q id='e49td'><span id='e49td'><b id='e49td'><form id='e49td'><ins id='e49td'></ins><ul id='e49td'></ul><sub id='e49td'></sub></form><legend id='e49td'></legend><bdo id='e49td'><pre id='e49td'><center id='e49td'></center></pre></bdo></b><th id='e49td'></th></span></q></dt></tr></i><div id='e49td'><tfoot id='e49td'></tfoot><dl id='e49td'><fieldset id='e49td'></fieldset></dl></div>
                      <tfoot id='e49td'></tfoot>