public class ScanQuery extends Object
Function:
The function is to scan data in batches.
Usage scenarios:
When you want to scan data in bulk, and you don't care about sorting, aggregation, etc.
ScanQuery
supports multiple threads to access data in parallel.
setLimit(Integer)
can be very large and you can san data faster.
Exception:
When you scan data, there may be an exception that session is expired. TableStoreException.getErrorCode()
is OTSServerSessionExpired.
For Example:
You should retry ComputeSplitsRequest and then retry ScanQuery.
限定符和类型 | 类和说明 |
---|---|
static class |
ScanQuery.Builder |
构造器和说明 |
---|
ScanQuery() |
限定符和类型 | 方法和说明 |
---|---|
Integer |
getAliveTime() |
Integer |
getCurrentParallelId() |
Integer |
getLimit() |
Integer |
getMaxParallel() |
Query |
getQuery() |
byte[] |
getToken() |
static ScanQuery.Builder |
newBuilder() |
ScanQuery |
setAliveTime(Integer aliveTime) |
ScanQuery |
setCurrentParallelId(Integer currentParallelId) |
ScanQuery |
setLimit(Integer limit) |
ScanQuery |
setMaxParallel(Integer maxParallel) |
ScanQuery |
setQuery(Query query) |
ScanQuery |
setToken(byte[] token) |
public Query getQuery()
public Integer getLimit()
public Integer getMaxParallel()
public Integer getCurrentParallelId()
public Integer getAliveTime()
public byte[] getToken()
public ScanQuery setToken(byte[] token)
public static ScanQuery.Builder newBuilder()
Copyright © 2021. All Rights Reserved.