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.
| Modifier and Type | Class and Description |
|---|---|
static class |
ScanQuery.Builder |
| Constructor and Description |
|---|
ScanQuery() |
| Modifier and Type | Method and Description |
|---|---|
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 © 2024. All Rights Reserved.