You could bundle said file in the jar and retrieve it via
getClass().getClassLoader().getResource("<file name>").
On 10/21/2020 2:24 PM, Manas Kale wrote:
Hi,
I have a Flink job that I am packaging as a JAR that is submitted to
the Flink cluster runtime. However, this JAR reads a few configuration
values from a .properties file.
What is the recommended way to package this properties file when
submitting to a cluster? Do I have to copy it to a folder in my flink
cluster installation?
My own attempt is a somewhat convoluted method that is not working.
Basically I set an environment variable that points to the properties
file, and I use that at runtime to read configuration values. This
works when I run it in my IDE as a minicluster but fails when I submit
it to the cluster. I'm kind of stuck debugging this as for some reason
I am not able to see the logs from the configuration reader class
(asked a question about that in a separate thread).