Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Flume - custom user classpath by CM

avatar
New Contributor

Hi all,

i need insert 'plugins_lib' directory at the head  of flume_classpath .

I solved it modifying CDH_INSTALL_DIR/lib/flume-ng/bin/flume-ng script:

 

from :

if [[ -n "${plugin_lib}" ]]
then
FLUME_CLASSPATH="${FLUME_CLASSPATH}:${plugin_lib}"
fi

 

to:

if [[ -n "${plugin_lib}" ]]
then
FLUME_CLASSPATH="${plugin_lib}:${FLUME_CLASSPATH}"
fi

 

In a production environemnt i can't alter script.

So,how can achieve it using cloudera manager configuration?

 

Thanks in advance

1 ACCEPTED SOLUTION

avatar
Modifying the flume classpath to insert the plugins directory first isn't a recommended solution, as it could cause unintended side affects due to class version incompatibilities (if thats why you are attempting to load them first).

If you have duplicate classes with higher versions, the recommendation would be to use the maven shade plugin (https://maven.apache.org/plugins/maven-shade-plugin/) with relocation in order to load the needed duplicate classes.

-pd

View solution in original post

2 REPLIES 2

avatar
Modifying the flume classpath to insert the plugins directory first isn't a recommended solution, as it could cause unintended side affects due to class version incompatibilities (if thats why you are attempting to load them first).

If you have duplicate classes with higher versions, the recommendation would be to use the maven shade plugin (https://maven.apache.org/plugins/maven-shade-plugin/) with relocation in order to load the needed duplicate classes.

-pd

avatar
New Contributor

it works!!

 

 

Thanks !!