Reply
Highlighted
New Contributor
Posts: 3
Registered: ‎04-26-2017
Accepted Solution

Flume - custom user classpath by CM

[ Edited ]

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

Cloudera Employee
Posts: 172
Registered: ‎01-09-2014

Re: Flume - custom user classpath by CM

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
New Contributor
Posts: 3
Registered: ‎04-26-2017

Re: Flume - custom user classpath by CM

it works!!

 

 

Thanks !!

Announcements