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

Topicmappr refactor #387

Merged
merged 18 commits into from
Jan 19, 2022
Merged

Topicmappr refactor #387

merged 18 commits into from
Jan 19, 2022

Conversation

mborst
Copy link
Contributor

@mborst mborst commented Jan 14, 2022

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.

@mborst mborst force-pushed the mborst/topicmappr-library branch from 262be9d to 9e7adb4 Compare January 14, 2022 16:29
@mborst mborst force-pushed the mborst/topicmappr-library branch from 9e7adb4 to 295fcd6 Compare January 14, 2022 16:55
@mborst mborst marked this pull request as ready for review January 17, 2022 08:30
@mborst mborst changed the title topicmappr library Topicmappr refactor Jan 17, 2022
@mborst mborst requested a review from jamiealquiza January 18, 2022 22:26
@@ -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()
Copy link
Collaborator

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
Copy link
Collaborator

@jamiealquiza jamiealquiza Jan 18, 2022

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?

@jamiealquiza
Copy link
Collaborator

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.

@jamiealquiza jamiealquiza merged commit 59c046e into master Jan 19, 2022
@jamiealquiza jamiealquiza deleted the mborst/topicmappr-library branch January 19, 2022 14:51
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