-
Notifications
You must be signed in to change notification settings - Fork 62
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
Replace ClusterLogAllocation
usage by ClusterInfoBuilder
#1184
Replace ClusterLogAllocation
usage by ClusterInfoBuilder
#1184
Conversation
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.
@garyparrot 整體很棒,就一個小建議,修改完就可以合併了
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.
@garyparrot 剛剛又看了一下,對程式碼品質有一些想法,請看一下
common/src/main/java/org/astraea/common/admin/ClusterInfoBuilder.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/astraea/common/admin/ClusterInfoBuilder.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/astraea/common/admin/ClusterInfoBuilder.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/astraea/common/admin/ClusterInfoBuilder.java
Outdated
Show resolved
Hide resolved
@chia7712 已修正所有項目,麻煩再看看,感謝 |
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 這次重構的很棒!
就一個小地方修正一下就可以合併了
Resolve #1157.
Previous related PR #1165.
這個 PR 根據 #1165 實作出來的
ClusterInfoBuilder
,在上面添加兩個函數,分別用來 reassign replica 和 change preferred leader,這些功能將會取代ClusterLogAllocation
。ClusterInfoBuilder#reassignReplica
ClusterInfoBuilder#setPreferredLeader
ClusterLogAllocation
AllocationTweaker
現在接受和回傳ClusterInfo<Replica>
,內部用ClusterInfoBuilder
來修改ClusterInfo