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

Kafka Configurator as an external library which can be called from Java code #32

Open
aaaleshaaa opened this issue Jul 26, 2018 · 2 comments

Comments

@aaaleshaaa
Copy link

There are scenarios where is convenient to run Kafka Configurator as an external library from Java code. But there are some obstacles in that:

  • Due to Scala/Java paradigm mismatch, there is no pretty way to process case classes in Java, the result of Kafka Configurator work is exactly that class.
  • Calling of run(...).get() yields in Tuple2<List,List> result type which cannot be processed from the outer code due to package restriction of ConfiguratorFailure class.

It would be nice to have:

  • A dedicated function which result can be elegantly processed in Java code
  • Positive results can be exposed as a List as it returned in Tuple2 result of Scala code
  • Negative results could be propagated as Exception class descendants (either Runtime one, or not)
  • Scala provides a list of ConfiguratorFailure but it's enough to return to Java a Throwable instance got from the head of this list (if we have got sufficient logging on Scala side)
@aaaleshaaa aaaleshaaa changed the title Support ru Kafka Configurator as an external library from Java code Support Kafka Configurator as an external library which can be called from Java code Jul 27, 2018
@aaaleshaaa aaaleshaaa changed the title Support Kafka Configurator as an external library which can be called from Java code Kafka Configurator as an external library which can be called from Java code Jul 27, 2018
@lacarvalho91
Copy link
Contributor

@mc-alesha thanks for raising the issue. I am on holiday this week, but we will be discussing the best way to proceed with this when I am back.

@lacarvalho91
Copy link
Contributor

@mc-alesha just to let you know that I am back and we will be discussing this today or tomorrow, will keep you updated.

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

No branches or pull requests

2 participants