I have to read configs from local path(for unit test) and from gcs bucket when running from dataproc cluster. The code I have written is:
val appConf = ConfigFactory.parseFile(new File(pathToFile))
appConf.getConfigList("params")
This code is working fine when reading from local path like /tmp/dir/file.conf
But when passing path as gs://bucket/folder/file.conf
I am getting error:
No configuration setting found for key 'params'.
Is there a common way to read config from both local and gs bucket.?
Or Is there any other way to do it in some common way.?
Thanks
As per the previous comment of a community member: