-
Notifications
You must be signed in to change notification settings - Fork 54
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
Topicmappr refactor #387
Topicmappr refactor #387
Conversation
PartitionMap.Topics() is already sorted.
262be9d
to
9e7adb4
Compare
9e7adb4
to
295fcd6
Compare
@@ -45,7 +45,10 @@ func rebalance(cmd *cobra.Command, _ []string) { | |||
bootstrap(cmd) | |||
|
|||
// ZooKeeper init. | |||
zk, err := initZooKeeper(cmd) | |||
zkAddr := cmd.Parent().Flag("zk-addr").Value.String() |
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.
I see you're experiencing the joy of extracting cobra flag vals
case resultsByRange[i].storageRange > resultsByRange[j].storageRange: | ||
return false | ||
} | ||
// TODO intentionally not handling the one error that can be returned here |
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.
I saw that the range increase error is always returned from printBrokerAssignmentStats
; is the goal to conditionally handle it here rather than in that function I assume?
All around massively great clean up. Nothing to note beyond the comments here in the review. Also did a bit of local testing and don't have any concern getting this merged in. |
This refactor is intended to pave the way for topicmappr as a service or as a library.
Refactoring of error handling and potentially of logging are still missing, but will likely be handled separately.