For a good example of a simple plugin, see the kairos-announce project.
- Kairos attempts to load the file from the classpath. (this lets you add default values to future releases of your plugin)
- Kairos loads the conf properties file.
There is in essence only one Properties object in Kairos so, plugins can overwrite properties set in kairosdb.properties with their own.
For clarity lets look at an example of how things get loaded. Say I create a new plugin called xplugin, my install places two files, xpluing.jar in /opt/kairosdb/lib and xplugin.properties in /opt/kairosdb/conf.
When KairosDB starts it first loads kairosdb.properties and then scans the conf directory for other .properties files. KairosDB sees xplugin.properties and tries to find the file on the classpath. This lets me as a plugin developer create a xplugin.properties that placed within my xplugin.jar file and contains default settings. After loading the properties file on the classpath KairosDB loads the file from the conf directory.