java - Dynamodb Range 查询给出有限数量的结果

标签 java maven amazon-dynamodb guice-3

我正在尝试使用 google guice 框架和 dynamodb 数据库来实现应用程序。 我已经实现了通过范围查询查找文档的 API,但结果集不更新新记录。记录数始终相同。 我们如何解决这个问题?

最佳答案

dynamodb 的响应限制为每页 1mb。此外,当您的结果集较大时,您只会获得第一个结果,直到响应大小为 1MB。

在文档中: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Pagination

描述了如何使用响应的元数据来查看实际结果量、起始索引等。批量/页查询破洞结果。

文档的重要摘录:

If you query or scan for specific attributes that match values that amount to more than 1 MB of data, you'll need to perform another Query or Scan request for the next 1 MB of data. To do this, take the LastEvaluatedKey value from the previous request, and use that value as the ExclusiveStartKey in the next request. This will let you progressively query or scan for new data in 1 MB increments.

When the entire result set from a Query or Scan has been processed, the LastEvaluatedKey is null. This indicates that the result set is complete (i.e. the operation processed the “last page” of data).

关于java - Dynamodb Range 查询给出有限数量的结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29412364/

相关文章:

maven - 如何从构建中排除 {test} 范围的依赖项?

java - GWT、Maven - 无法为对象堆保留足够的空间

amazon-dynamodb - AWS API 网关 - 如果查询未返回任何内容,则更改为 404

java - 在类中实现接口(interface)

java - 如何在 Java 中格式化 GUI 布局

maven - 使用 maven scm 插件

node.js - 超过预配吞吐量怎么办?

java - App Engine爆炸了Gradle的war文件夹问题

java - JFrame 将位置设置在 MAC OSX 窗口的中心

node.js - 如何在dynamodb中使用in运算符