Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # dev >> [jira] [Commented] (KAFKA-1234) All kafka-run-class.sh to source in user config file (to set env vars like KAFKA_OPTS)


Copy link to this message
-
Re: [jira] [Commented] (KAFKA-1234) All kafka-run-class.sh to source in user config file (to set env vars like KAFKA_OPTS)
On CentOS the equivalent is files in /etc/sysconfig. As with /etc/default,
they are per service settings exactly as you want and exactly to solve the
problem you have. There is no need to change Kafka to behave in a
non-standard way in its startup scripts.
On Fri, Jan 31, 2014 at 4:14 PM, Alex Gray (JIRA) <[EMAIL PROTECTED]> wrote:

>
>     [
> https://issues.apache.org/jira/browse/KAFKA-1234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13888339#comment-13888339]
>
> Alex Gray commented on KAFKA-1234:
> ----------------------------------
>
> True, but the problem is that I don't want to set system wide env vars; I
> only want to set it for the specific service that I run.
> The "service" command strips out all environment variables (at least on
> centos or AWS OS), so unless the init.d file is sourcing in something, I
> don't think I can set those env vars... they will just get stripped out.
> Here is an explanation of the "service" command stripping out env vars:
>
> http://serverfault.com/questions/374404/service-command-and-environment-variables
>
> I haven't tried setting the vars in /etc/default, but I will try tomorrow.
>
> > All kafka-run-class.sh to source in user config file (to set env vars
> like KAFKA_OPTS)
> >
> --------------------------------------------------------------------------------------
> >
> >                 Key: KAFKA-1234
> >                 URL: https://issues.apache.org/jira/browse/KAFKA-1234
> >             Project: Kafka
> >          Issue Type: Improvement
> >          Components: config
> >    Affects Versions: 0.8.0
> >            Reporter: Alex Gray
> >            Priority: Trivial
> >         Attachments: patch.txt
> >
> >
> > We are using the distributed version of kafka:
> >
> http://apache.mirrors.lucidnetworks.net/kafka/0.8.0/kafka_2.8.0-0.8.0.tar.gz
> > And we would like to set some environment variables, particularly
> KAFKA_OPTS when the kafka service starts.
> > In other words, when someone does a "sudo service kafka start" we would
> like to set some environment variables.
> > We cannot do this *without* modifying either /etc/init.d/kafka or
> bin/kafka-run-class.sh, and we don't want to modify files that we don't own.
> > The solution is to have kafka source in a user specific file that may
> have these environment variables set.
> > I'm attaching the patch file to show you what I mean.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.1.5#6160)
>