@Override
    public Status learner2Follower(final String groupId, final Configuration conf, final PeerId learner) {
        Status status = removeLearners(groupId, conf, Arrays.asList(learner));
        if (status.isOk()) {
            status = addPeer(groupId, conf, new PeerId(learner.getIp(), learner.getPort()));
        }
        return status;
    }
Cli service implementation.

@author boyan (boyan@alibaba-inc.com)
@author jiachun.fjc
jraft-core/src/main/java/com/alipay/sofa/jraft/core/CliServiceImpl.java