Search in sources :

Example 1 with GetStoreInfoRequest

use of io.dingodb.store.row.cmd.pd.GetStoreInfoRequest in project dingo by dingodb.

the class MetadataRpcClient method internalGetStoreInfo.

private void internalGetStoreInfo(final long clusterId, final Endpoint selfEndpoint, final CompletableFuture<Store> future, final int retriesLeft, final Errors lastCause) {
    final RetryRunner retryRunner = retryCause -> internalGetStoreInfo(clusterId, selfEndpoint, future, retriesLeft - 1, retryCause);
    final FailoverClosure<Store> closure = new FailoverClosureImpl<>(future, retriesLeft, retryRunner);
    final GetStoreInfoRequest request = new GetStoreInfoRequest();
    request.setClusterId(clusterId);
    request.setEndpoint(selfEndpoint);
    this.pdRpcService.callPdServerWithRpc(request, closure, lastCause);
}
Also used : CreateRegionIdRequest(io.dingodb.store.row.cmd.pd.CreateRegionIdRequest) GetClusterInfoRequest(io.dingodb.store.row.cmd.pd.GetClusterInfoRequest) Errors(io.dingodb.store.row.errors.Errors) FailoverClosure(io.dingodb.store.row.client.failover.FailoverClosure) Store(io.dingodb.store.row.metadata.Store) CompletableFuture(java.util.concurrent.CompletableFuture) Cluster(io.dingodb.store.row.metadata.Cluster) SetStoreInfoRequest(io.dingodb.store.row.cmd.pd.SetStoreInfoRequest) RetryRunner(io.dingodb.store.row.client.failover.RetryRunner) FailoverClosureImpl(io.dingodb.store.row.client.failover.impl.FailoverClosureImpl) GetStoreInfoRequest(io.dingodb.store.row.cmd.pd.GetStoreInfoRequest) GetStoreIdRequest(io.dingodb.store.row.cmd.pd.GetStoreIdRequest) Endpoint(io.dingodb.raft.util.Endpoint) FutureHelper(io.dingodb.store.row.client.FutureHelper) FailoverClosureImpl(io.dingodb.store.row.client.failover.impl.FailoverClosureImpl) Store(io.dingodb.store.row.metadata.Store) GetStoreInfoRequest(io.dingodb.store.row.cmd.pd.GetStoreInfoRequest) RetryRunner(io.dingodb.store.row.client.failover.RetryRunner)

Aggregations

Endpoint (io.dingodb.raft.util.Endpoint)1 FutureHelper (io.dingodb.store.row.client.FutureHelper)1 FailoverClosure (io.dingodb.store.row.client.failover.FailoverClosure)1 RetryRunner (io.dingodb.store.row.client.failover.RetryRunner)1 FailoverClosureImpl (io.dingodb.store.row.client.failover.impl.FailoverClosureImpl)1 CreateRegionIdRequest (io.dingodb.store.row.cmd.pd.CreateRegionIdRequest)1 GetClusterInfoRequest (io.dingodb.store.row.cmd.pd.GetClusterInfoRequest)1 GetStoreIdRequest (io.dingodb.store.row.cmd.pd.GetStoreIdRequest)1 GetStoreInfoRequest (io.dingodb.store.row.cmd.pd.GetStoreInfoRequest)1 SetStoreInfoRequest (io.dingodb.store.row.cmd.pd.SetStoreInfoRequest)1 Errors (io.dingodb.store.row.errors.Errors)1 Cluster (io.dingodb.store.row.metadata.Cluster)1 Store (io.dingodb.store.row.metadata.Store)1 CompletableFuture (java.util.concurrent.CompletableFuture)1