You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Sönke Liebau (JIRA)" <ji...@apache.org> on 2019/05/08 06:23:00 UTC
[jira] [Commented] (KAFKA-8247) Duplicate error handling in
kafka-server-start.sh and actual Kafka class
[ https://issues.apache.org/jira/browse/KAFKA-8247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16835344#comment-16835344 ]
Sönke Liebau commented on KAFKA-8247:
-------------------------------------
So..these checks actually have a little bit of sense, because the error message that is shown here is the only place where the -daemon parameter is documented that can be used to send tasks to the background.
Since this parameter is handled in kafka-run-class it is honored by all command line tools though, regardless of whether this makes sense or not, so we might just add it in the default options next to --help and --version. Downside to this is that this will make the inconsistency between --help/version and -daemon glaringly obvious, not much we can do about that.
I'm afraid there is no perfect solution here, handling parameters in two different places is just not possible in a clean way. I'll create a pull request to remove these duplicate checks for now, as it shouldn't break anything and fixes the immediate issue.
> Duplicate error handling in kafka-server-start.sh and actual Kafka class
> ------------------------------------------------------------------------
>
> Key: KAFKA-8247
> URL: https://issues.apache.org/jira/browse/KAFKA-8247
> Project: Kafka
> Issue Type: Bug
> Components: core
> Affects Versions: 2.1.1
> Reporter: Sönke Liebau
> Assignee: Sönke Liebau
> Priority: Minor
>
> There is some duplication of error handling for command line parameters that are passed into kafka-server-start.sh
>
> The shell script prints an error, if no arguments are passed in, effectively causing the same check in [Kafka|https://github.com/apache/kafka/blob/92db08cba582668d77160b0c2853efd45a1b809b/core/src/main/scala/kafka/Kafka.scala#L43] to never be triggered, unless the only option that is specified is -daemon, which would be removed before passing arguments to the java class.
>
> While not in any way critical I don't think that this is intended behavior. I think we should remove the extra check in kafka-server-start.sh and leave argument handling up to the Kafka class.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)