| 程序包 | 说明 |
|---|---|
| com.pingcap.tikv | |
| com.pingcap.tikv.event | |
| com.pingcap.tikv.region | |
| com.pingcap.tikv.txn | |
| com.pingcap.tikv.txn.type | |
| com.pingcap.tikv.util |
| 限定符和类型 | 方法和说明 |
|---|---|
TiRegion |
ReadOnlyPDClient.getRegionByID(BackOffer backOffer,
long id)
Get Region by Region Id
|
TiRegion |
PDClient.getRegionByID(BackOffer backOffer,
long id) |
TiRegion |
ReadOnlyPDClient.getRegionByKey(BackOffer backOffer,
com.google.protobuf.ByteString key)
Get Region from PD by key specified
|
TiRegion |
PDClient.getRegionByKey(BackOffer backOffer,
com.google.protobuf.ByteString key) |
| 限定符和类型 | 方法和说明 |
|---|---|
Future<TiRegion> |
ReadOnlyPDClient.getRegionByIDAsync(BackOffer backOffer,
long id) |
Future<TiRegion> |
PDClient.getRegionByIDAsync(BackOffer backOffer,
long id) |
Future<TiRegion> |
ReadOnlyPDClient.getRegionByKeyAsync(BackOffer backOffer,
com.google.protobuf.ByteString key) |
Future<TiRegion> |
PDClient.getRegionByKeyAsync(BackOffer backOffer,
com.google.protobuf.ByteString key) |
| 限定符和类型 | 方法和说明 |
|---|---|
TiRegion |
CacheInvalidateEvent.getRegion() |
| 构造器和说明 |
|---|
CacheInvalidateEvent(TiRegion region,
boolean updateRegion,
boolean updateStore,
CacheInvalidateEvent.CacheType type) |
| 限定符和类型 | 字段和说明 |
|---|---|
protected TiRegion |
AbstractRegionStoreClient.region |
| 限定符和类型 | 方法和说明 |
|---|---|
TiRegion |
AbstractRegionStoreClient.getRegion() |
TiRegion |
RegionErrorReceiver.getRegion() |
TiRegion |
RegionManager.getRegionByKey(com.google.protobuf.ByteString key) |
TiRegion |
RegionManager.getRegionByKey(com.google.protobuf.ByteString key,
BackOffer backOffer) |
TiRegion |
RegionManager.RegionCache.getRegionByKey(com.google.protobuf.ByteString key,
BackOffer backOffer) |
TiRegion |
TiRegion.switchPeer(long leaderStoreID)
switches current peer to the one on specific store.
|
TiRegion |
RegionManager.updateLeader(TiRegion region,
long storeId) |
| 限定符和类型 | 方法和说明 |
|---|---|
Pair<TiRegion,Metapb.Store> |
RegionManager.getRegionStorePairByKey(com.google.protobuf.ByteString key) |
Pair<TiRegion,Metapb.Store> |
RegionManager.getRegionStorePairByKey(com.google.protobuf.ByteString key,
BackOffer backOffer) |
Pair<TiRegion,Metapb.Store> |
RegionManager.getRegionStorePairByKey(com.google.protobuf.ByteString key,
TiStoreType storeType) |
Pair<TiRegion,Metapb.Store> |
RegionManager.getRegionStorePairByKey(com.google.protobuf.ByteString key,
TiStoreType storeType,
BackOffer backOffer) |
List<TiRegion> |
RegionStoreClient.splitRegion(Iterable<com.google.protobuf.ByteString> splitKeys)
Send SplitRegion request to tikv split a region at splitKey. splitKey must between current
region's start key and end key.
|
| 限定符和类型 | 方法和说明 |
|---|---|
RegionStoreClient |
RegionStoreClient.RegionStoreClientBuilder.build(TiRegion region) |
RegionStoreClient |
RegionStoreClient.RegionStoreClientBuilder.build(TiRegion region,
Metapb.Store store) |
RegionStoreClient |
RegionStoreClient.RegionStoreClientBuilder.build(TiRegion region,
Metapb.Store store,
TiStoreType storeType) |
List<RangeSplitter.RegionTask> |
RegionStoreClient.coprocess(BackOffer backOffer,
DAGRequest req,
TiRegion region,
List<Coprocessor.KeyRange> ranges,
Queue<SelectResponse> responseQueue,
long startTs)
Execute and retrieve the response from TiKV server.
|
void |
RegionManager.invalidateRegion(TiRegion region) |
void |
RegionManager.RegionCache.invalidateRegion(TiRegion region)
Removes region associated with regionId from regionCache.
|
boolean |
AbstractRegionStoreClient.onNotLeader(Metapb.Store newStore,
TiRegion newRegion)
onNotLeader deals with NotLeaderError and returns whether re-splitting key range is needed
|
boolean |
RegionErrorReceiver.onNotLeader(Metapb.Store store,
TiRegion region) |
void |
RegionManager.onRegionStale(TiRegion region) |
void |
RegionManager.onRequestFail(TiRegion region)
Clears all cache when a TiKV server does not respond
|
TiRegion |
RegionManager.updateLeader(TiRegion region,
long storeId) |
boolean |
RegionManager.RegionCache.updateRegion(TiRegion expected,
TiRegion region) |
| 构造器和说明 |
|---|
AbstractRegionStoreClient(TiConfiguration conf,
TiRegion region,
ChannelFactory channelFactory,
TikvGrpc.TikvBlockingStub blockingStub,
TikvGrpc.TikvStub asyncStub,
RegionManager regionManager) |
| 限定符和类型 | 方法和说明 |
|---|---|
ClientRPCResult |
TxnKVClient.commit(BackOffer backOffer,
List<com.google.protobuf.ByteString> keys,
long startTs,
long commitTs,
TiRegion tiRegion)
Commit request of 2pc, add backoff logic when encountered region error, ErrBodyMissing, and
other errors
|
static AbstractLockResolverClient |
AbstractLockResolverClient.getInstance(String storeVersion,
TiConfiguration conf,
TiRegion region,
TikvGrpc.TikvBlockingStub blockingStub,
TikvGrpc.TikvStub asyncStub,
ChannelFactory channelFactory,
RegionManager regionManager,
PDClient pdClient,
RegionStoreClient.RegionStoreClientBuilder clientBuilder) |
ClientRPCResult |
TxnKVClient.prewrite(BackOffer backOffer,
List<Kvrpcpb.Mutation> mutations,
com.google.protobuf.ByteString primary,
long lockTTL,
long startTs,
TiRegion tiRegion)
when encountered region error,ErrBodyMissing, and other errors
|
ClientRPCResult |
TxnKVClient.txnHeartBeat(BackOffer backOffer,
com.google.protobuf.ByteString primaryLock,
long startTs,
long ttl,
TiRegion tiRegion,
Metapb.Store store)
TXN Heart Beat: update primary key ttl
|
| 构造器和说明 |
|---|
LockResolverClientV2(TiConfiguration conf,
TiRegion region,
TikvGrpc.TikvBlockingStub blockingStub,
TikvGrpc.TikvStub asyncStub,
ChannelFactory channelFactory,
RegionManager regionManager) |
LockResolverClientV3(TiConfiguration conf,
TiRegion region,
TikvGrpc.TikvBlockingStub blockingStub,
TikvGrpc.TikvStub asyncStub,
ChannelFactory channelFactory,
RegionManager regionManager,
PDClient pdClient,
RegionStoreClient.RegionStoreClientBuilder clientBuilder) |
LockResolverClientV4(TiConfiguration conf,
TiRegion region,
TikvGrpc.TikvBlockingStub blockingStub,
TikvGrpc.TikvStub asyncStub,
ChannelFactory channelFactory,
RegionManager regionManager,
PDClient pdClient,
RegionStoreClient.RegionStoreClientBuilder clientBuilder) |
| 限定符和类型 | 方法和说明 |
|---|---|
TiRegion |
BatchKeys.getRegion() |
| 限定符和类型 | 方法和说明 |
|---|---|
Map<Pair<TiRegion,Metapb.Store>,List<com.google.protobuf.ByteString>> |
GroupKeyResult.getGroupsResult() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
GroupKeyResult.setGroupsResult(Map<Pair<TiRegion,Metapb.Store>,List<com.google.protobuf.ByteString>> groupsResult) |
| 构造器和说明 |
|---|
BatchKeys(TiRegion region,
List<com.google.protobuf.ByteString> keysInput,
int sizeInBytes) |
| 限定符和类型 | 方法和说明 |
|---|---|
TiRegion |
Batch.getRegion() |
TiRegion |
RangeSplitter.RegionTask.getRegion() |
| 限定符和类型 | 方法和说明 |
|---|---|
Map<Pair<TiRegion,Metapb.Store>,List<Handle>> |
RangeSplitter.groupByAndSortHandlesByRegionId(long tableId,
List<Handle> handles)
Group by a list of handles by the handles' region, handles will be sorted.
|
static Map<TiRegion,List<com.google.protobuf.ByteString>> |
ClientUtils.groupKeysByRegion(RegionManager regionManager,
List<com.google.protobuf.ByteString> keys,
BackOffer backoffer) |
static Map<TiRegion,List<com.google.protobuf.ByteString>> |
ClientUtils.groupKeysByRegion(RegionManager regionManager,
List<com.google.protobuf.ByteString> keys,
BackOffer backoffer,
boolean sorted)
Group by list of keys according to its region
|
static Map<TiRegion,List<com.google.protobuf.ByteString>> |
ClientUtils.groupKeysByRegion(RegionManager regionManager,
Set<com.google.protobuf.ByteString> keys,
BackOffer backoffer) |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
ClientUtils.appendBatches(BackOffer backOffer,
List<Batch> batches,
TiRegion region,
List<com.google.protobuf.ByteString> keys,
int batchMaxSizeInBytes,
int batchLimit)
Append batch to list and split them according to batch limit
|
static void |
ClientUtils.appendBatches(BackOffer backOffer,
List<Batch> batches,
TiRegion region,
List<com.google.protobuf.ByteString> keys,
List<com.google.protobuf.ByteString> values,
int batchMaxSizeInBytes,
int batchLimit)
Append batch to list and split them according to batch limit
|
static RangeSplitter.RegionTask |
RangeSplitter.RegionTask.newInstance(TiRegion region,
Metapb.Store store,
List<Coprocessor.KeyRange> ranges) |
| 构造器和说明 |
|---|
Batch(BackOffer backOffer,
TiRegion region,
List<com.google.protobuf.ByteString> keys) |
Batch(BackOffer backOffer,
TiRegion region,
List<com.google.protobuf.ByteString> keys,
List<com.google.protobuf.ByteString> values) |
Copyright © 2022 PingCAP. All rights reserved.