-
Notifications
You must be signed in to change notification settings - Fork 718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server/api: add scheduler api #407
Conversation
|
||
switch name { | ||
case "leader-balancer": | ||
if err := h.AddLeaderBalancer(); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have no leader-balancer before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean "no leader-balancer"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here I see adding a leaderBalancer, but the leader balancer seems existing before, why do we need to add again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we can use the API to delete the leader-balancer and add it again.
For example, if I add a random-leader-scheduler, it will conflict with the leader-balancer, so I can remove the leader-balancer. If I add a shuffle-leader-scheduler, it can run with the leader-balancer concurrently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it can run with the leader-balancer concurrently.
seem can not?
20dc513
to
a745901
Compare
8a3fc28
to
a8bb3a4
Compare
b7580b8
to
88a27bb
Compare
0455451
to
9093d4a
Compare
I think the score things are too complicated, we can calculate the scores more easily.
I think the score things are too complicated, we can calculate the scores more easily.
Coordinator can control the speed of different schedulers. Every scheduler has a unique name, we can add API to run or stop any schedulers dynamically, and different schedulers can run concurrently.
I think the score things are too complicated, we can calculate the scores more easily.
Coordinator can control the speed of different schedulers. Every scheduler has a unique name, we can add API to run or stop any schedulers dynamically, and different schedulers can run concurrently.
I think the score things are too complicated, we can calculate the scores more easily.
Coordinator can control the speed of different schedulers. Every scheduler has a unique name, we can add API to run or stop any schedulers dynamically, and different schedulers can run concurrently.
I think the score things are too complicated, we can calculate the scores more easily.
I think the score things are too complicated, we can calculate the scores more easily.
I think the score things are too complicated, we can calculate the scores more easily.
We can now use API to list all schedulers, add or remove a scheduler.
9093d4a
to
6d160b3
Compare
PTAL @siddontang @overvenus |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* server/selector: add selector interface and balance selector (#388) We can use selector to abstract different strategies to select the source and target stores. * server: use selector to schedule region peer (#389) * server/resource: replace score type with resource kind (#393) I think the score things are too complicated, we can calculate the scores more easily. * server/metrics: remove redundant metrics (#395) * server/balancer: add scheduler and simplify schedule configs (#396) The original balance configs are complicated and some of them are very confusing, now we simplify them to make it more easy to understand. We replace the concept of "balance" with "schedule". Balance means to keep the resource balance, but we will introduce different kinds of strategies in the future which may not balance, and balance is just one kind of strategies to schedule resources between stores. * server/coordinator: replace balancer worker with coordinator (#398) Coordinator can control the speed of different schedulers. Every scheduler has a unique name, we can add API to run or stop any schedulers dynamically, and different schedulers can run concurrently. * server/constraints: add replication constraints (#402) * server/scheduler: add grant-leader-scheduler (#406) * server/coordinator: combine scheduler and controller * server/api: add scheduler api (#407) We can now use API to list all schedulers, add or remove a scheduler. * Add shuffle-leader-scheduler (#409) * server/scheduler: add shuffle-leader-scheduler
We can now use API to list all schedulers, add or remove a scheduler.