You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by ta...@gmail.com on 2021/09/01 17:41:54 UTC
[DISCUSS] FLINK-23972: Customizable classpath of the flink client
Hi All,
I would solve the problem https://issues.apache.org/jira/browse/FLINK-23972
in the following way.
The command line client FLINK_HOME/bin/flink uses a
function constructFlinkClassPath() from the helper script
FLINK_HOME/bin/config.sh:
echo "$FLINK_CLASSPATH""$FLINK_DIST"
Let's modify it:
if [[ "$ADD_CLIENT_CLASSPATH" == "" ]]; then
echo "$FLINK_CLASSPATH""$FLINK_DIST"
else
echo "$ADD_CLIENT_CLASSPATH":"$FLINK_CLASSPATH""$FLINK_DIST"
fi
The variable ADD_CLIENT_CLASSPATH will allow users to inject their custom
jars to the classpath of the command line client. This will solve the
problem with NoClassDefFoundError.
export ADD_CLIENT_CLASSPATH=mylib1.jar:mylib2.jar
$FLINK_HOME/bin/flink run ...
Best regards,
Arseniy Tashoyan