public class PDClient extends AbstractGRPCClient<PDGrpc.PDBlockingStub,PDGrpc.PDFutureStub> implements ReadOnlyPDClient
| 限定符和类型 | 字段和说明 |
|---|---|
static io.prometheus.client.Histogram |
PD_GET_REGION_BY_KEY_REQUEST_LATENCY |
asyncStub, blockingStub, channelFactory, conf, timeoutcallAsyncWithRetry, callServerStreamingWithRetry, callWithRetry, checkHealth, getConf, getTimeout, setTimeoutpublic static final io.prometheus.client.Histogram PD_GET_REGION_BY_KEY_REQUEST_LATENCY
public static ReadOnlyPDClient create(TiConfiguration conf, RequestKeyCodec codec, ChannelFactory channelFactory)
public HostMapping getHostMapping()
getHostMapping 在接口中 ReadOnlyPDClientpublic TiTimestamp getTimestamp(BackOffer backOffer)
ReadOnlyPDClientgetTimestamp 在接口中 ReadOnlyPDClientpublic void keepPauseChecker(PDChecker checker)
public void stopKeepPauseChecker(PDChecker checker)
public void resumeChecker(PDChecker checker)
public Pair<Metapb.Region,Metapb.Peer> getRegionByKey(BackOffer backOffer, com.google.protobuf.ByteString key)
ReadOnlyPDClientgetRegionByKey 在接口中 ReadOnlyPDClientkey - key in bytes for locating a regionpublic Pair<Metapb.Region,Metapb.Peer> getRegionByID(BackOffer backOffer, long id)
ReadOnlyPDClientgetRegionByID 在接口中 ReadOnlyPDClientid - Region Idpublic List<Pdpb.Region> scanRegions(BackOffer backOffer, com.google.protobuf.ByteString startKey, com.google.protobuf.ByteString endKey, int limit)
scanRegions 在接口中 ReadOnlyPDClientpublic Metapb.Store getStore(BackOffer backOffer, long storeId)
ReadOnlyPDClientgetStore 在接口中 ReadOnlyPDClientstoreId - StoreIdpublic List<Metapb.Store> getAllStores(BackOffer backOffer)
getAllStores 在接口中 ReadOnlyPDClientpublic TiConfiguration.ReplicaRead getReplicaRead()
getReplicaRead 在接口中 ReadOnlyPDClientpublic Long updateServiceGCSafePoint(String serviceId, long ttl, long safePoint, BackOffer backOffer)
ReadOnlyPDClientupdateServiceGCSafePoint 在接口中 ReadOnlyPDClientserviceId - ServiceIdttl - TTL in secondssafePoint - The TiTimestamp you want to set. Set to start_ts.getPrevious() is a good
practicepublic void close()
throws InterruptedException
close 在接口中 AutoCloseableInterruptedExceptionpublic void tryUpdateLeaderOrForwardFollower()
public void tryUpdateLeader()
public void updateTiFlashReplicaStatus()
public double getTiFlashReplicaProgress(long tableId)
protected PDGrpc.PDBlockingStub getBlockingStub()
protected PDGrpc.PDFutureStub getAsyncStub()
public Long getClusterId()
getClusterId 在接口中 ReadOnlyPDClientpublic RequestKeyCodec getCodec()
getCodec 在接口中 ReadOnlyPDClientCopyright © 2023 PingCAP. All rights reserved.