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

Consider refactoring existing annotations #11

Open
tombentley opened this issue Dec 21, 2022 · 0 comments
Open

Consider refactoring existing annotations #11

tombentley opened this issue Dec 21, 2022 · 0 comments

Comments

@tombentley
Copy link
Contributor

Right now we have @Kraft, @ZooKeeper and @BrokerCluster, but there's an alternative formulation that might work out cleaner:

@interface MetadataQuorum {
    QuorumType type() default COMBINED;
    int size() default 1;
}
enum QuorumType {
    @Deprecated ZK, // use ZK
    COMBINED, // use combined node (broker+controllers)
    DEDICATED // use dedicated controllers
}
@interface Brokers {
    int value() default 1;
}

This feels like a cleaner separation where there's a single annotation for specifying the details for the controller quorum and a separate annotation for the broker cluster. It would require the backend code to figure out (or reject) interesting combinations like @MetadataQuorum(size=3) @Brokers(1) (which given the default quorum type is COMBINED is a contradiction).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant