-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add Admin CreatePartitions API call #1386
Conversation
@@ -42,4 +42,6 @@ | |||
31: 'DeleteAcls', | |||
32: 'DescribeConfigs', | |||
33: 'AlterConfigs', | |||
36: 'SaslAuthenticate', |
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 it was missing, but anyway where is API_KEYS used?
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.
It's not used atm.
kafka/protocol/admin.py
Outdated
API_KEY = 37 | ||
API_VERSION = 0 | ||
SCHEMA = Schema( | ||
('topic_error_codes', Array( |
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.
Seems like you missed throttle_time_ms
field. Lets set the name to topic_errors
to be exact to docs also. See https://kafka.apache.org/protocol#The_Messages_CreatePartitions.
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.
Ouch, my bad, pushed a fix.
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.
Is Line 335 in kafka/admin/client.py a residual mistake from this change?
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.
Minor fix and looks good. GJ!
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.
Looks good!
@tvoinarovskyi thank you for the review! Is there something else I need to do to get this merged, or just wait for more approval? |
Looked good to me, so I merged it. Thanks! |
I've been using it for some time in a personal project.
Protocol should match:https://github.com/apache/kafka/blob/1.0/clients/src/main/java/org/apache/kafka/common/requests/CreatePartitionsRequest.java and https://github.com/apache/kafka/blob/1.0/clients/src/main/java/org/apache/kafka/common/requests/CreatePartitionsResponse.java
This change is