This repository has been archived by the owner on Jul 2, 2021. It is now read-only.
support for exporting selected parts of hardware database into an sqlite database #108
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.
The code here is one of the solutions to #99. It allows to export selected dpset paths to a sqlite file and configure
DAQAggregator.properties
to read the hardware database from such an sqlite file.Note that it was necessary to catch and rewrite one SQL query done by the RCMS code when reading the hardware database because this SQL query uses a vendor specific extension which is not understood by sqlite. The replacement query (see 356152d) is currently not 100% equivalent but internal discussions indicate that the database content is nowadays such that the difference does not matter.
The pull request includes a standalone application which extracts a list of given paths to an sqlite file. This can be built and run as follows:
mvn assembly:assembly -DskipTests
To configure the DAQAggregator to use this file, comment out the existing
hwcfgdb.type
fields inDAQAggregator.properties
and add the following two lines:(note that when running the conversion program above you should ensure that
DAQAggregator.properties
is configured to use the original database to read from).Doing both of the above steps,
FlashlistDispatcherIT
successfully runs from an sqlite file if one copies the appropriate dpset paths (some of which seem to be taken from the current configuration which is running online).