public class Snapshot extends Object
Constructor and Description |
---|
Snapshot(TiTimestamp timestamp,
TiSession session) |
Modifier and Type | Method and Description |
---|---|
List<BytePairWrapper> |
batchGet(int backOffer,
List<byte[]> keys) |
byte[] |
get(byte[] key) |
com.google.protobuf.ByteString |
get(com.google.protobuf.ByteString key) |
TiConfiguration |
getConf() |
TiSession |
getSession() |
TiTimestamp |
getTimestamp() |
long |
getVersion() |
Iterator<Long> |
indexHandleRead(TiDAGRequest dagRequest,
List<RangeSplitter.RegionTask> tasks)
Below is lower level API for env like Spark which already did key range split Perform handle
scan
|
Iterator<Kvrpcpb.KvPair> |
scan(com.google.protobuf.ByteString startKey)
scan all keys after startKey, inclusive
|
Iterator<Kvrpcpb.KvPair> |
scanPrefix(com.google.protobuf.ByteString prefix)
scan all keys with prefix
|
Iterator<TiChunk> |
tableReadChunk(TiDAGRequest dagRequest,
List<RangeSplitter.RegionTask> tasks,
int numOfRows) |
Iterator<Row> |
tableReadRow(TiDAGRequest dagRequest,
long physicalId)
Issue a table read request
|
public Snapshot(@Nonnull TiTimestamp timestamp, TiSession session)
public TiSession getSession()
public long getVersion()
public TiTimestamp getTimestamp()
public byte[] get(byte[] key)
public com.google.protobuf.ByteString get(com.google.protobuf.ByteString key)
public List<BytePairWrapper> batchGet(int backOffer, List<byte[]> keys)
public Iterator<TiChunk> tableReadChunk(TiDAGRequest dagRequest, List<RangeSplitter.RegionTask> tasks, int numOfRows)
public Iterator<Row> tableReadRow(TiDAGRequest dagRequest, long physicalId)
dagRequest
- DAG request for coprocessorpublic Iterator<Long> indexHandleRead(TiDAGRequest dagRequest, List<RangeSplitter.RegionTask> tasks)
dagRequest
- DAGRequest for coprocessortasks
- RegionTask of the coprocessor request to sendpublic Iterator<Kvrpcpb.KvPair> scan(com.google.protobuf.ByteString startKey)
startKey
- start of keyspublic Iterator<Kvrpcpb.KvPair> scanPrefix(com.google.protobuf.ByteString prefix)
prefix
- prefix of keyspublic TiConfiguration getConf()
Copyright © 2024 PingCAP. All rights reserved.