logging-flume icon indicating copy to clipboard operation
logging-flume copied to clipboard

startup script supports reading environment variable for some param

Open zhipcui opened this issue 6 years ago • 5 comments

zhipcui avatar Jul 11 '18 10:07 zhipcui

Hi @zhipcui why do you need this?

These are internal variables and they can be set with different parameters.

What are you trying to achieve?

szaboferee avatar Jul 11 '18 10:07 szaboferee

All these variables can be set by flume-env.sh file on conf dir. Take JAVA_OPTS as example, if I want to change it, I need flume-env.sh file.
Setting this variables from environment variable would be a more clean way especially run the flume using Kubernetes.

zhipcui avatar Jul 12 '18 02:07 zhipcui

Can one of the admins verify this patch?

asfgit avatar Aug 17 '18 13:08 asfgit

LGTM

majorendre avatar Aug 29 '18 11:08 majorendre

We can add these environment variables, but I do not think it is really necessary.

Regarding JAVA_OPTS: yes, it is common the pass parameters and system properties to java, but FLUME_JAVA_OPTS can be used for this and can be defined as an environment variable, FLUME_JAVA_OPTS is appended after JAVA_OPTS so it has higher precedence

Regarding classpath: the best practice for using third party libraries is through plugins (by default the plugins.d directory), so adjusting the classpath should be needed in quite rare/special cases only

turcsanyip avatar Aug 30 '18 11:08 turcsanyip