You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Grant Henke (JIRA)" <ji...@apache.org> on 2016/07/07 15:01:10 UTC

[jira] [Created] (KAFKA-3934) kafka-server-start.sh enables GC by default with no way to disable

Grant Henke created KAFKA-3934:
----------------------------------

             Summary: kafka-server-start.sh enables GC by default with no way to disable
                 Key: KAFKA-3934
                 URL: https://issues.apache.org/jira/browse/KAFKA-3934
             Project: Kafka
          Issue Type: Bug
    Affects Versions: 0.8.2.0
            Reporter: Grant Henke
            Assignee: Grant Henke


In KAFKA-1127 the following line was added to kafka-server-start.sh:

{noformat}
EXTRA_ARGS="-name kafkaServer -loggc"
{noformat}

This prevents gc logging from being disabled without some unusual environment variable workarounds. 

I suggest EXTRA_ARGS is made overridable like below: 

{noformat}
if [ "x$EXTRA_ARGS" = "x" ]; then
    export EXTRA_ARGS="-name kafkaServer -loggc"
fi
{noformat}

*Note:* I am also not sure I understand why the existing code uses the "x" thing when checking the variable instead of the following:

{noformat}
export EXTRA_ARGS=${EXTRA_ARGS-'-name kafkaServer -loggc'}
{noformat}

This lets the variable be overridden to "" without taking the default. 

*Workaround:* As a workaround the user should be able to set $KAFKA_GC_LOG_OPTS to fit their needs. Since kafka-run-class.sh will not ignore the -loggc parameter if that is set. 

{noformat}
-loggc)
      if [ -z "$KAFKA_GC_LOG_OPTS" ]; then
        GC_LOG_ENABLED="true"
      fi
      shift
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)