Hi Flink Community,
Recently I implemented a new metrics reporter to report Flink runtime metrics
to a Kafka topic. After building the project, I move my reporter jar file from
my build folder to the plugin folder:
COPY build/flink-diagnostics-message-reporter-${VERSION}.jar
${FLINK_HOME}/plugins/flink-diagnostics-message-reporter/flink-diagnostics-message-reporter.jar
But then I see lots of ClassNotFoundException when I tried to start a test job
with this new metrics reporter. Looks like the problem is that the metrics
reporter plugin can not get access to some of the jars in the /opt/flink/lib
folder. By reading this document:
https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/filesystems/plugins/,
looks like there is a whitelist to define what packages can be accessed by the
plugins. Is there any way to config this whitelist so that the plugin jar can
get accessed to classes in this folder? If this can't work, are there other
solutions for this problem like changing the classpath for the plugin?
Plugins | Apache
Flink<https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/filesystems/plugins/>
Plugins # Plugins facilitate a strict separation of code through restricted
classloaders. Plugins cannot access classes from other plugins or from Flink
that have not been specifically whitelisted. This strict isolation allows
plugins to contain conflicting versions of the same library without the need to
relocate classes or to converge to common versions.
nightlies.apache.org
Best,
Fan