public static AtomicRangeGroup start(StartupConf conf, RpcServer rpcServer) throws IOException {

        final NodeOptions nodeOptions = new NodeOptions();
        // Set election timeout to 1 second
        nodeOptions.setElectionTimeoutMs(1000);
        // Close cli service
        nodeOptions.setDisableCli(false);
        // A snapshot saving would be triggered every 30 seconds
        // nodeOptions.setSnapshotIntervalSecs(30);
        // Parsing Options
        final PeerId serverId = new PeerId();
        if (!serverId.parse(conf.getServerAddress())) {
            throw new IllegalArgumentException("Fail to parse serverId:" + conf.getServerAddress());
        }
        final Configuration initConf = new Configuration();
        if (!initConf.parse(conf.getConf())) {
            throw new IllegalArgumentException("Fail to parse initConf:" + conf.getConf());
        }
        // Set the initial cluster configuration
        nodeOptions.setInitialConf(initConf);
        // Startup node
        final AtomicRangeGroup node = new AtomicRangeGroup(conf.getDataPath(), conf.getGroupId(), serverId,
            conf.getMinSlot(), conf.getMaxSlot(), nodeOptions, rpcServer);
        LOG.info("Started range node[{}-{}] at port:{}", conf.getMinSlot(), conf.getMaxSlot(), node.getNode()
            .getNodeId().getPeerId().getPort());
        return node;
    }
Redirect request to new leader
@return
jraft-test/src/main/java/com/alipay/sofa/jraft/test/atomic/server/AtomicRangeGroup.java