Skip to content
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

Fix partitionScore #182

Merged
merged 13 commits into from
Feb 18, 2022
Merged

Conversation

qoo332001
Copy link
Collaborator

這支PR修正了 partitionScore讀不到 internel topics的問題,以及新增argument,使其可以決定是否要在計算分數時忽略internel topics,以及是否要輸出已經balance之Βroker

@qoo332001 qoo332001 requested a review from chia7712 January 6, 2022 11:46
Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qoo332001 感謝修正,有蠻多地方可以用lambda重寫,麻煩看一下

@qoo332001 qoo332001 requested a review from chia7712 January 10, 2022 23:04
@qoo332001 qoo332001 requested a review from chia7712 January 23, 2022 13:50
Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qoo332001 不好意思,太晚看這隻PR

幾個小問題麻煩處理一下,另外請手動測試一下,並貼上改正後的畫面
謝謝

@qoo332001
Copy link
Collaborator Author

原本只能讀到partition的leader,更新後已可以使用broker中所有的replica來計算分數
目前輸出長這樣

$ java -jar app-0.0.1-SNAPSHOT-all.jar score --bootstrap.servers 192.168.103.39:19217

broker: 1001
test0-0: 113.98
test0-1: 127.33
test0-3: 135.33
test1-1: 147.78
test1-2: 126.98
test1-3: 146.55
test2-0: 126.09
test2-1: 115.84

broker: 1002
test0-0: 8.01
test0-2: 8.69
test1-0: 7.13
test1-1: 10.34
test1-3: 10.26
test2-0: 8.84
test2-2: 8.41
test2-3: 9.45

The following brokers are balanced: [1003]
The following partitions are balanced: [__consumer_offsets-0, __consumer_offsets-1, __consumer_offsets-2, __consumer_offsets-3, __consumer_offsets-4, __consumer_offsets-5, __consumer_offsets-6, __consumer_offsets-7, __consumer_offsets-8, __consumer_offsets-9, __consumer_offsets-10, __consumer_offsets-11, __consumer_offsets-12, __consumer_offsets-13, __consumer_offsets-14, __consumer_offsets-15, __consumer_offsets-16, __consumer_offsets-17, __consumer_offsets-18, __consumer_offsets-19, __consumer_offsets-20, __consumer_offsets-21, __consumer_offsets-22, __consumer_offsets-23, __consumer_offsets-24, __consumer_offsets-25, __consumer_offsets-26, __consumer_offsets-27, __consumer_offsets-28, __consumer_offsets-29, __consumer_offsets-30, __consumer_offsets-31, __consumer_offsets-32, __consumer_offsets-33, __consumer_offsets-34, __consumer_offsets-35, __consumer_offsets-36, __consumer_offsets-37, __consumer_offsets-38, __consumer_offsets-39, __consumer_offsets-40, __consumer_offsets-41, __consumer_offsets-42, __consumer_offsets-43, __consumer_offsets-44, __consumer_offsets-45, __consumer_offsets-46, __consumer_offsets-47, __consumer_offsets-48, __consumer_offsets-49, test3-0, test3-0, test3-1, test3-2, test3-3]

忽略internal topics:

$ java -jar app-0.0.1-SNAPSHOT-all.jar score --bootstrap.servers 192.168.103.39:19217 --exclude.internal.topics

broker: 1001
test0-0: 18.69
test0-1: 32.78
test0-3: 41.22
test1-1: 54.36
test1-2: 32.41
test1-3: 53.06
test2-0: 31.47
test2-1: 20.65

broker: 1002
test0-0: 1.23
test0-2: 1.6
test1-0: 0.75
test1-1: 2.51
test1-3: 2.46
test2-0: 1.69
test2-2: 1.45
test2-3: 2.02

The following brokers are balanced: [1003]
The following partitions are balanced: [test3-0, test3-0, test3-1, test3-2, test3-3]

@chia7712
Copy link
Contributor

chia7712 commented Feb 18, 2022

現在的畫面還不錯,不過我在想是否有機會更延伸一點讓我們的算分程式輸出更有"linux"的味道,#240 接著討論

@chia7712 chia7712 merged commit c8c4ad7 into opensource4you:main Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants