Apache IoTDB: add runtime configuration file support for connector #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the ServiceManager connector code that supports Apache IoTDB as a State Storage backend is configured at build-time. This commit extends the support to allow runtime configuration through a config file.
The config file is named iotdb-config.json and placed in the vissv2server directory. The file is in JSON format to follow the pattern set by existing config files within the VISS server.
The contents of the file are not validated and are assumed to be both complete and correct.
Example file:
{
"host": "localhost",
"port": "6667",
"username": "root",
"password": "root",
"queryPrefixPath": "root.test2.dev1",
"queryTimeout(ms)": 5000
}
host, port, username and password are the client configuration to be used to create a session (connection) with the IoTDB Server.
queryPrefixPath is the IoTDB database timeseries prefix to be used to access VSS nodes/keys in get/set operations.
queryTimeout(ms) is the timeout to be used in milliseconds when querying the database.
If no config file is found on server startup the default (build-time) configuration is used.