-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apache IoTDB: Integrate IoTDB Data Quality Library and enable visualisation in Grafana #52
Conversation
Introduce a Dockerfile to build a CDSP specific Apache IoTDB image. To keep the build as simple and quick as possible the starting point is the pre-built IoTDB image from the upstream IoTDB project. This avoids the burden of building IoTDB from scratch. This can be done because currently our needs are limited to configuration and adding some additional files. Beyond some specific runtime environment values that can be hot loaded IoTDB stores configuration in files located in the 'conf' directory. For some specific use cases it is useful to automate the configuration so end users of the Playground do not need to have to go through a lot of manual configuration. For example, in this commit we enable the REST API which is used by the IoTDB Grafana Connector to make DB queries. In addition this commit integrates the optional IoTDB UDF (User Defined Function) Data Quality Library into the image, which greatly extends the data processing functions of IoTDB. Signed-off-by: Stephen Lawrence <[email protected]>
To allow ease of configuration of Apache IoTDB and the ability to add files to the image, a Dockerfile for a CDSP Apache IoTDB image was introduced in a prior commit. Now change the CDSP docker compose to use this Dockerfile rather than simply use the upstream pre-built image. Signed-off-by: Stephen Lawrence <[email protected]>
The Playground docker deployment now includes the IoTDB project's Data Quality Library of data processing functions in the Playground IoTDB container image. Rewrite the existing UDF section of the IoTDB reference manual to better explain the built-in functions and those provided in the Data Quality Library. Along with how to enable the Library functions. Signed-off-by: Stephen Lawrence <[email protected]>
PR update: Added documentation for the IoTDB Data Quality Library to the doc site |
PR update 26/7: added WIP example for the using the library. Example down-samples high frequency vehicle.speed data |
50b0220
to
b7b47cb
Compare
Substantially updated the README.md that documents the timeseries transformation example. Squashed a series of commits during the last week for related changes. |
Is it still WIP or is it ready for review? |
Given your time constraints before your leave I think you could review, but not yet merge, as its 95% done. With the example the coding is done and I just need to complete the documentation in the readme. I planned to do that yesterday but didn't achieve it. What's left to do on the readme:
It would be great of course for this to be your first merge, but depending on what time you have left a review is also useful. |
Add an example that illustrates using the Playground to transform timeseries data using the Apache IoTDB data store. It does this by accurately down-sampling a timeseries of pre-recorded high frequency VSS Vehicle.Speed data using the IoTDB Data Quality Library function Sample. Signed-off-by: Stephen Lawrence <[email protected]>
101b8fe
to
1ff5e75
Compare
Extended the example documentation to include notes on using Grafana. |
Removed WIP from the title as the PR is now ready. @chrizmc Please review and consider for possible merging. As discussed if merging please use "Rebase and merge" as the default Github merge strategy. |
Extend the documentation for the IoTDB Data Processing example that shows down-sampling of VSS vehicle.speed to include using Grafana. Signed-off-by: Stephen Lawrence <[email protected]>
17d04da
to
756f154
Compare
Pushed final minor documentation changes prior to merge. |
[12/8/2024] I met with my fellow CDSP Maintainer @chrizmc just before Christian has gone on extended leave. Unfortunately we were unable to get this PR reviewed and merged by him before his leave. He however is familiar with the work and he is happy for me to merge when ready. The Docker changes have been reviewed by his colleague @sschleemilch. After a final check I am now merging. |
Summary
Changes:
This is a WIP as the documentation for this needs to be added. This should not be merged without discussion with the author.
User note
To use the Data Quality Library the functions must be first registered in a running IoTDB instance. This need only be done once.
A script is provided to do this for you. With the Playground running run the following command from the host:
sudo docker exec -ti iotdb-service /iotdb/sbin/register-UDF.sh
Example use of the Data Quality Library to down-sample the timeseries
root.test2.dev1.`Vehicle.Speed`
to 100 points using the triangle method:select sample(`Vehicle.Speed`,'method'='triangle','k'='100') from root.test2.dev1
Instructions for connecting Grafana to IoTDB using the IoTDB Grafana-Plugin can be found upstream here:
https://iotdb.apache.org/UserGuide/latest/Ecosystem-Integration/Grafana-Plugin.html
Technical Detail
Introduce a Dockerfile to build a CDSP specific Apache IoTDB image.
To keep the build as simple and quick as possible the starting point is
the pre-built IoTDB image from the upstream IoTDB project. This avoids
the burden of building IoTDB from scratch. This can be done because
currently our needs are limited to configuration and adding some
additional files.
Beyond some specific runtime environment values that can be hot loaded
IoTDB stores configuration in files located in the 'conf' directory.
For some specific use cases it is useful to automate the configuration
so end users of the Playground do not need to have to go through a lot
of manual configuration. For example, in this commit we enable the REST
API which is used by the IoTDB Grafana Connector to make DB queries.
In addition this commit integrates the optional IoTDB UDF (User Defined
Function) Data Quality Library into the image, which greatly extends
the data processing functions of IoTDB.