Search in sources :

Example 1 with CliOptions

use of io.dingodb.raft.option.CliOptions in project dingo by dingodb.

the class AbstractPlacementDriverClient method initCli.

protected void initCli(CliOptions cliOpts) {
    if (cliOpts == null) {
        cliOpts = new CliOptions();
        cliOpts.setTimeoutMs(5000);
        cliOpts.setMaxRetry(3);
    }
    this.cliService = RaftServiceFactory.createAndInitCliService(cliOpts);
    this.cliClientService = ((CliServiceImpl) this.cliService).getCliClientService();
    Requires.requireNonNull(this.cliClientService, "cliClientService");
    this.rpcClient = ((AbstractClientService) this.cliClientService).getRpcClient();
}
Also used : CliOptions(io.dingodb.raft.option.CliOptions)

Example 2 with CliOptions

use of io.dingodb.raft.option.CliOptions in project dingo by dingodb.

the class ExecutorServer method buildRowStoreOptions.

private DingoRowStoreOptions buildRowStoreOptions() {
    DingoRowStoreOptions rowStoreOpts = new DingoRowStoreOptions();
    ExecutorExtOptions extOpts = svrOpts.getOptions();
    rowStoreOpts.setClusterName(DingoOptions.instance().getClusterOpts().getName());
    rowStoreOpts.setInitialServerList(svrOpts.getRaft().getInitExecRaftSvrList());
    rowStoreOpts.setFailoverRetries(extOpts.getCliOptions().getMaxRetry());
    rowStoreOpts.setFutureTimeoutMillis(extOpts.getCliOptions().getTimeoutMs());
    PlacementDriverOptions driverOptions = new PlacementDriverOptions();
    driverOptions.setFake(false);
    driverOptions.setPdGroupId(extOpts.getCoordOptions().getGroup());
    driverOptions.setInitialPdServerList(extOpts.getCoordOptions().getInitCoordRaftSvrList());
    CliOptions cliOptions = new CliOptions();
    cliOptions.setMaxRetry(extOpts.getCliOptions().getMaxRetry());
    cliOptions.setTimeoutMs(extOpts.getCliOptions().getTimeoutMs());
    driverOptions.setCliOptions(cliOptions);
    rowStoreOpts.setPlacementDriverOptions(driverOptions);
    Endpoint endpoint = new Endpoint(svrOpts.getIp(), svrOpts.getRaft().getPort());
    extOpts.getStoreEngineOptions().setServerAddress(endpoint);
    rowStoreOpts.setStoreEngineOptions(extOpts.getStoreEngineOptions());
    return rowStoreOpts;
}
Also used : PlacementDriverOptions(io.dingodb.store.row.options.PlacementDriverOptions) Endpoint(io.dingodb.raft.util.Endpoint) DingoRowStoreOptions(io.dingodb.store.row.options.DingoRowStoreOptions) ExecutorExtOptions(io.dingodb.server.executor.config.ExecutorExtOptions) CliOptions(io.dingodb.raft.option.CliOptions)

Example 3 with CliOptions

use of io.dingodb.raft.option.CliOptions in project dingo by dingodb.

the class DefaultDingoRowStoreCliService method initCli.

private void initCli(CliOptions cliOpts) {
    if (cliOpts == null) {
        cliOpts = new CliOptions();
        cliOpts.setTimeoutMs(5000);
        cliOpts.setMaxRetry(3);
    }
    this.opts = cliOpts;
    this.cliService = RaftServiceFactory.createAndInitCliService(cliOpts);
    final CliClientService cliClientService = ((CliServiceImpl) this.cliService).getCliClientService();
    Requires.requireNonNull(cliClientService, "cliClientService");
    this.rpcClient = ((AbstractClientService) cliClientService).getRpcClient();
}
Also used : CliServiceImpl(io.dingodb.raft.core.CliServiceImpl) CliOptions(io.dingodb.raft.option.CliOptions) CliClientService(io.dingodb.raft.rpc.CliClientService)

Aggregations

CliOptions (io.dingodb.raft.option.CliOptions)3 CliServiceImpl (io.dingodb.raft.core.CliServiceImpl)1 CliClientService (io.dingodb.raft.rpc.CliClientService)1 Endpoint (io.dingodb.raft.util.Endpoint)1 ExecutorExtOptions (io.dingodb.server.executor.config.ExecutorExtOptions)1 DingoRowStoreOptions (io.dingodb.store.row.options.DingoRowStoreOptions)1 PlacementDriverOptions (io.dingodb.store.row.options.PlacementDriverOptions)1