public interface CliService extends Lifecycle<CliOptions>
| 限定符和类型 | 方法和说明 |
|---|---|
Status |
addLearners(String groupId,
Configuration conf,
List<PeerId> learners)
Add some new learners into the replicating group which consists of |conf|.
|
Status |
addPeer(String groupId,
Configuration conf,
PeerId peer)
Add a new peer into the replicating group which consists of |conf|.
|
Status |
changePeers(String groupId,
Configuration conf,
Configuration newPeers)
Gracefully change the peers of the replication group.
|
List<PeerId> |
getAliveLearners(String groupId,
Configuration conf)
Ask all alive learners of the replication group.
|
List<PeerId> |
getAlivePeers(String groupId,
Configuration conf)
Ask all alive peers of the replication group.
|
Status |
getLeader(String groupId,
Configuration conf,
PeerId leaderId)
Get the leader of the replication group.
|
List<PeerId> |
getLearners(String groupId,
Configuration conf)
Ask all learners of the replication group.
|
List<PeerId> |
getPeers(String groupId,
Configuration conf)
Ask all peers of the replication group.
|
Status |
learner2Follower(String groupId,
Configuration conf,
PeerId learner)
Converts the specified learner to follower of |conf|.
|
Status |
rebalance(Set<String> balanceGroupIds,
Configuration conf,
Map<String,PeerId> balancedLeaderIds)
Balance the number of leaders.
|
Status |
removeLearners(String groupId,
Configuration conf,
List<PeerId> learners)
Remove some learners from the replicating group which consists of |conf|.
|
Status |
removePeer(String groupId,
Configuration conf,
PeerId peer)
Remove a peer from the replicating group which consists of |conf|.
|
Status |
resetLearners(String groupId,
Configuration conf,
List<PeerId> learners)
Update learners set in the replicating group which consists of |conf|.
|
Status |
resetPeer(String groupId,
PeerId peer,
Configuration newPeers)
Reset the peer set of the target peer.
|
Status |
snapshot(String groupId,
PeerId peer)
Ask the peer to dump a snapshot immediately.
|
Status |
transferLeader(String groupId,
Configuration conf,
PeerId peer)
Transfer the leader of the replication group to the target peer
|
Status addPeer(String groupId, Configuration conf, PeerId peer)
groupId - the raft group idconf - current configurationpeer - peer to addStatus removePeer(String groupId, Configuration conf, PeerId peer)
groupId - the raft group idconf - current configurationpeer - peer to removeStatus changePeers(String groupId, Configuration conf, Configuration newPeers)
groupId - the raft group idconf - current configurationnewPeers - new peers to changeStatus resetPeer(String groupId, PeerId peer, Configuration newPeers)
groupId - the raft group idpeer - target peernewPeers - new peers to resetStatus addLearners(String groupId, Configuration conf, List<PeerId> learners)
groupId - the raft group idconf - current configurationlearners - learner peers to addStatus removeLearners(String groupId, Configuration conf, List<PeerId> learners)
groupId - the raft group idconf - current configurationlearners - learner peers to removeStatus learner2Follower(String groupId, Configuration conf, PeerId learner)
groupId - the raft group idconf - current configurationlearner - learner peerStatus resetLearners(String groupId, Configuration conf, List<PeerId> learners)
groupId - the raft group idconf - current configurationlearners - learner peers to setStatus transferLeader(String groupId, Configuration conf, PeerId peer)
groupId - the raft group idconf - current configurationpeer - target peer of new leaderStatus snapshot(String groupId, PeerId peer)
groupId - the raft group idpeer - target peerStatus getLeader(String groupId, Configuration conf, PeerId leaderId)
groupId - the raft group idconf - configurationleaderId - id of leaderList<PeerId> getPeers(String groupId, Configuration conf)
groupId - the raft group idconf - target peers configurationList<PeerId> getAlivePeers(String groupId, Configuration conf)
groupId - the raft group idconf - target peers configurationList<PeerId> getLearners(String groupId, Configuration conf)
groupId - the raft group idconf - target peers configurationList<PeerId> getAliveLearners(String groupId, Configuration conf)
groupId - the raft group idconf - target peers configurationStatus rebalance(Set<String> balanceGroupIds, Configuration conf, Map<String,PeerId> balancedLeaderIds)
balanceGroupIds - all raft group ids to balanceconf - configuration of all nodesbalancedLeaderIds - the result of all balanced leader idsCopyright © 2021. All rights reserved.