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

String functions for KafkaVersion #989

Merged
merged 8 commits into from
Nov 27, 2017
Merged

String functions for KafkaVersion #989

merged 8 commits into from
Nov 27, 2017

Conversation

backlin
Copy link
Contributor

@backlin backlin commented Nov 24, 2017

Added protobuf style functionality for

  • parsing a string to KafkaVersion, allowing it for example to be set in a config file, and
  • rendering a KafkaVersion as a string, allowing it for example to be printed to a log.

Sorry for the messy commit log. Please squash if merging.

@eapache
Copy link
Contributor

eapache commented Nov 24, 2017

Thanks. I think it probably makes more sense to use printf/scanf for these rather than map constants.

@backlin
Copy link
Contributor Author

backlin commented Nov 25, 2017

Yes, you're right. I thought of the version as an enum with only certain allowed values, but that also places a requirement on explicitly stating all Kafka versions as public variables. The scanf way is more flexible, and it really doesn't matter if you set a non-existent version since it is still comparable to other versions.

Will fix the build errors in a little while and update.

@eapache
Copy link
Contributor

eapache commented Nov 27, 2017

Thanks!

@eapache eapache merged commit a709f2d into IBM:master Nov 27, 2017
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