aliyun / aliyun/aliyun-tablestore-java-sdk
TimestreamMetaIterator分页会取出所有数据
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 57
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
参考该地址实现:https://help.aliyun.com/document_detail/114347.html?spm=a2c4g.11186623.6.615.17132345T3bKeQ
TimestreamMetaIterator iter1 = db.metaTable()
.filter(filter)
.identifierOnly() // 只返回identifer
.fetchAll();
System.out.print(iterator.getTotalCount()); //获取命中的时间线条数
while (iter1.hasNext()) {
System.out.print(iterator.next().toString());
}
public boolean hasNext() {
if (isBufferHasData()) {
return true;
}
byte[] token = response.getNextToken();
while (token != null) {
request.getSearchQuery().setToken(response.getNextToken());
request.getSearchQuery().setOffset(0);
fetchData(request);
if (isBufferHasData()) {
return true;
}
token = response.getNextToken();
}
return false;
}
上述实现会取出所有数据,是否需要把isBufferHasData提出公共方法出来。目前实现分页,不能用这个方法,只能自己写实现
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at TimestreamMetaIterator.hasNext and inspect isBufferHasData, response.getNextToken, and fetchData. Reproduce the paginated fetch described in the issue, then verify that iteration respects pagination instead of continuing until all data is retrieved; no test or source file is named in the report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100