You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, net.opentsdb.utils.Config has a constructor that accepts a path to the OpenTSDB configuration file.
/** * Constructor that initializes default values and attempts to load the given * properties file * @param file Path to the file to load * @throws IOException Thrown if unable to read or parse the file */publicConfig(finalStringfile) throwsIOException {
loadConfig(file);
setDefaults();
}
Since the structure of an application changes when it is packaged as a JAR file, this path would no longer be valid for applications using this constructor that are deployed as JAR files. (assuming the configuration file is store under src/main/resources)
Would it make sense to add another constructor that accepts an InputStream of the contents of the configuration file instead of just a path to the file? Or are there any other ways to set the configurations in a JAR if the file is placed under src/main/resources?
I'd be happy to open a PR for the same if this sounds like a valid usecase.
The text was updated successfully, but these errors were encountered:
Yes that sounds like a good use case so if you don't mind adding another ctor with the stream we can load it. 3.x supports remote URLs but you should open an issue against that to support streams as well.
Currently,
net.opentsdb.utils.Config
has a constructor that accepts a path to the OpenTSDB configuration file.Since the structure of an application changes when it is packaged as a JAR file, this path would no longer be valid for applications using this constructor that are deployed as JAR files. (assuming the configuration file is store under src/main/resources)
Would it make sense to add another constructor that accepts an
InputStream
of the contents of the configuration file instead of just a path to the file? Or are there any other ways to set the configurations in a JAR if the file is placed under src/main/resources?I'd be happy to open a PR for the same if this sounds like a valid usecase.
The text was updated successfully, but these errors were encountered: