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

Describe topic API #530

Merged
merged 6 commits into from
Jan 26, 2018
Merged

Describe topic API #530

merged 6 commits into from
Jan 26, 2018

Conversation

0x2c7
Copy link
Contributor

@0x2c7 0x2c7 commented Jan 22, 2018

Proposed solution:

Since we are following simple approach for the users, the admin API for topic description is quite simple:

client.describe_topic("topic", ["retention.ms", "retention.bytes non_exists"])
# Returns
{
  "retention.ms"=>"604800000", 
  "retention.bytes"=>"-1"
}

The underlying API is DescribeConfigs API. Currently, there is only one interface describe_topic but in future, it is easy to pretty easy to add other similar interfaces to support other resource types.

@0x2c7
Copy link
Contributor Author

0x2c7 commented Jan 23, 2018

I'll wait for this pull request #533 to be merged to resue client#support_api? before running tests.

@dasch
Copy link
Contributor

dasch commented Jan 24, 2018

What is the use case for adding this API?

@0x2c7
Copy link
Contributor Author

0x2c7 commented Jan 24, 2018

@dasch The main purpose of this pull request is to introduce DescribeConfigs API, and later AlterConfigs API. This API is powerful for Kafka administration or operation since it provides full information like compression.type, max.message.byte, etc. which are missing from Metadata responses. The describe_topic is just a concrete use case for the generic DescribeConfigs API.

From recent pull requests and your todo in github project, I assume that the 0.6.x provide support some interfaces / APIs for administrations. I think this would fulfill the goal of the next version. Or am I missing something?

@0x2c7 0x2c7 force-pushed the describe-configs-api branch from 7737bcb to 6d38e32 Compare January 24, 2018 16:34
@dasch
Copy link
Contributor

dasch commented Jan 24, 2018

I'm mostly thinking: what concrete tool would use this API? I'm wary of introducing something like this without knowing how it will be used. Once an API is there it's difficult to change, so I'd like to consider use cases before adding more.

@0x2c7
Copy link
Contributor Author

0x2c7 commented Jan 24, 2018

@dasch Ah, about the concrete use case, it's almost for debugging and monitoring. I'm working on multiple Kafka clusters and even in the same cluster, each topic has a different set of configurations. So, the need of fetching, updating and syncing configurations between different environments or clusters usually pop up. It would be pretty nice and helpful if those could be handled programmatically via the client interfaces (like Java / Golang clients also supported this). That's my use case. I would admit that this need is non-trivial and not sure about the usabilities of others too. 🤔

Copy link
Contributor

@dasch dasch left a comment

Choose a reason for hiding this comment

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

I'm going to mark this is alpha, since the API may change, but I'm 👍

@dasch dasch merged commit 36f3ba0 into zendesk:master Jan 26, 2018
@0x2c7 0x2c7 deleted the describe-configs-api branch January 26, 2018 10:12
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