Search in sources :

Example 1 with StoreHeartbeatHandler

use of io.dingodb.server.coordinator.handler.StoreHeartbeatHandler in project dingo by dingodb.

the class CoordinatorStateMachine method initRpcServer.

private RpcServer initRpcServer() {
    ExtSerializerSupports.init();
    boolean isAutoBalanceSplit = context.coordOpts().getSchedule().isAutoBalanceSplit();
    log.info("coordOpt, isAutoBalanceSplit: {}", isAutoBalanceSplit);
    RpcServer rpcServer = createRaftRpcServer(context.endpoint(), raftExecutor(), cliExecutor());
    rpcServer.registerProcessor(new GetLocationHandler());
    rpcServer.registerProcessor(new GetClusterInfoHandler(context.rowStoreMetaAdaptor()));
    rpcServer.registerProcessor(new GetStoreInfoHandler(context.rowStoreMetaAdaptor()));
    rpcServer.registerProcessor(new GetStoreIdHandler(context.rowStoreMetaAdaptor()));
    rpcServer.registerProcessor(new RegionHeartbeatHandler(context.rowStoreMetaAdaptor(), isAutoBalanceSplit));
    rpcServer.registerProcessor(new SetStoreHandler(context.rowStoreMetaAdaptor()));
    rpcServer.registerProcessor(new StoreHeartbeatHandler(context.rowStoreMetaAdaptor()));
    log.info("Start coordinator raft rpc server, result: {}.", rpcServer.init(null));
    context.rpcServer(rpcServer);
    return rpcServer;
}
Also used : GetClusterInfoHandler(io.dingodb.server.coordinator.handler.GetClusterInfoHandler) GetLocationHandler(io.dingodb.server.coordinator.handler.GetLocationHandler) SetStoreHandler(io.dingodb.server.coordinator.handler.SetStoreHandler) GetStoreIdHandler(io.dingodb.server.coordinator.handler.GetStoreIdHandler) RpcServer(io.dingodb.raft.rpc.RpcServer) RaftRpcServerFactory.createRaftRpcServer(io.dingodb.raft.rpc.RaftRpcServerFactory.createRaftRpcServer) RegionHeartbeatHandler(io.dingodb.server.coordinator.handler.RegionHeartbeatHandler) GetStoreInfoHandler(io.dingodb.server.coordinator.handler.GetStoreInfoHandler) StoreHeartbeatHandler(io.dingodb.server.coordinator.handler.StoreHeartbeatHandler)

Aggregations

RaftRpcServerFactory.createRaftRpcServer (io.dingodb.raft.rpc.RaftRpcServerFactory.createRaftRpcServer)1 RpcServer (io.dingodb.raft.rpc.RpcServer)1 GetClusterInfoHandler (io.dingodb.server.coordinator.handler.GetClusterInfoHandler)1 GetLocationHandler (io.dingodb.server.coordinator.handler.GetLocationHandler)1 GetStoreIdHandler (io.dingodb.server.coordinator.handler.GetStoreIdHandler)1 GetStoreInfoHandler (io.dingodb.server.coordinator.handler.GetStoreInfoHandler)1 RegionHeartbeatHandler (io.dingodb.server.coordinator.handler.RegionHeartbeatHandler)1 SetStoreHandler (io.dingodb.server.coordinator.handler.SetStoreHandler)1 StoreHeartbeatHandler (io.dingodb.server.coordinator.handler.StoreHeartbeatHandler)1