
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
!https://github.com/WaCoDiS/datasource-observer/workflows/Build/badge.svg
Observer component for data model supported SubsetJobDefinitions.
The WaCoDiS Datasource Observer component provides routines for handling WaCoDiS job creation and deletion events. As each WaCoDiS job requires concrete datasets of supported datasources (e.g. Copernicus satellite data or sensor data) to start its result computation, the role of the data source observer is to query and observe each required datasource so that relevant metadata about relevant datasets can be stored and used in subsequent steps of the WaCoDiS pipeline.
Table of Content
Climate changes and the ongoing intensification of agriculture effect in increased material inputs in watercourses and dams. Thus, water industry associations, suppliers and municipalities face new challenges. To ensure an efficient and environmentally friendly water supply for the future, adjustments on changing conditions are necessary. Hence, the research project WaCoDiS aims to geo-locate and quantify material outputs from agricultural areas and to optimize models for sediment and material inputs (nutrient contamination) into watercourses and dams. Therefore, approaches for combining heterogeneous data sources, existing interoperable web based information systems and innovative domain oriented models will be explored.
For a detailed overview about the WaCoDiS system architecture please visit the https://github.com/WaCoDiS/core-engine repository.
The WaCoDiS Datasource Observer is capable of querying metadata about concrete datasets from different datasources that is needed as input data for WaCoDiS processing jobs. Currently supported datasources comprise (the list can be extended through implementation of the relevant source code interfaces):
For each supported datasource additional spatio-temporal information is required so the Datasource Observer may know which concrete datasets must be queried. In essence, the following aspects are consumed:
Within the WaCoDiS system, the Datasource Observer subscribes to message broker WacodisJobDefinition creation/deletion events sent by the https://github.com/WaCoDiS/job-definition-api. Each WacodisJobDefinition includes all necessary information about the previously mentioned spatio-temporal aspects as well as details about required datasets from the upper listed datasources (so-called WaCoDiS SubsetDefinitions).
On WacodisJobDefinition creation events the Datasource Observer analyzes the job details and may start to observe the relevent datasources, i.e. query metadata about actual datasets for the job specific spatio-temporal and Subset-depending settings. According to the various WacodisJobDefinition settings these observations may vary between single-time-execution events or regularly repeated processes, observing processes might be started immediately or in the future, and data queries might cover datasets from the past or current datasets.
As soon as relevant datasets are identified the queried dataset metadata is sent as DataEnvelope event to the message broker. Subscribed components (i.e. https://github.com/WaCoDiS/metadata-connector) pick up and process that information (e.g. check whether metadata for the found datasets have been already registered at the https://github.com/WaCoDiS/data-access-api)
Regarding the number of observation jobs compared to the number of WacodisJobDefinitions, there is not necessarily a 1:1 relationship. Instead, the Datasource Observer compares the observing characteristics of new WacodisJobDefinitions to already running observation jobs. Only if a different datasource or disjoint area of interest is demanded, a new separate observation job is started. Otherwise an already existing observation job is simply enhanced by the new WacodisJobDefinition details, i.e. by storing its unique job ID within a list of associated WacodisJobDefinition IDs and - if required - expand intersecting bounding boxes of the respective areas of interest.
On WacodisJobDefinition deletion events, any associated running observation job is updated. The association to the deleted WacodisJobDefinition is removed. If no other existing WacodisJobDefinition is still associated to the observation job, it will be stopped. Otherwise, the observation bounding box is recalculated from the remaining other associated WacodisJobDefinitions.
The WaCoDiS Datasource Observer comprises seven Maven modules:
JobFactory to handle the creation of observation jobs for performing the actual datasource queries. The concrete implementation of supported datasources is realized by separate Maven modules (see below).JobFactory providing support for querying Copernicus satellite scenes from the Code-DE platform.JobFactory providing support for querying Copernicus satellite scenes from the SentinelHub platform.JobFactory providing support for querying weather data from the German weather data provider DWD.JobFactory providing support for querying sensor data from standardized Sensor Observation Services.In order to build the WaCoDiS Datasource Observer from source Java Development Kit (JDK) must be available. Data Access is tested with Oracle JDK 8 and OpenJDK 8. Unless stated otherwise later JDK versions can be used.
Since this is a Maven project, https://maven.apache.org/ must be available for building it. Then, you
can build the project by running mvn clean install from root directory
The project contains a Dockerfile for building a Docker image. Simply run docker build -t wacodis/datasource-observer:latest .
in order to build the image. You will find some detailed information about running the Datasource Observer as Docker container
within the deployment section.
Configuration is fetched from https://github.com/WaCoDiS/config-server. If config server is not available, configuration values located at src/main/resources/application.yml within the Datasource Observer App submodule are applied instead.
Parameters
WaCoDiS Datasource Observer is a Spring Boot application and provides an application.yml within the datasource-observer-app module for configuration purpose. A documentation for common application properties can be found at https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-application-properties.html
In addition, some configuration parameters relate to different Spring Cloud components, i.e. https://docs.spring.io/spring-cloud-stream/docs/current/reference/html/ and https://docs.spring.io/spring-cloud-config/docs/current/reference/html/.
The following section contains descriptions for configuration parameters structured by configuration section.
spring/cloud/stream/bindings/job-creation
configuration of message channel for receiving messages when a new job is created
| value | description | note |
|---|---|---|
| destination | topic used for messages about created WaCoDiS jobs | e.g. wacodis.test.jobs.new |
| binder | defines the binder (message broker) | |
| content-type | content type of the messages | should always be application/json |
spring/cloud/stream/bindings/job-deletion
configuration of message channel for receiving messages when an existing job is deleted
| value | description | note |
|---|---|---|
| destination | topic used for messages about deleted WaCoDiS jobs | e.g. wacodis.test.jobs.deleted |
| binder | defines the binder (message broker) | |
| content-type | content type of the messages | should always be application/json |
spring/cloud/stream/bindings/output-data-envelope
configuration of message channel for publishing messages on newly available dataset metadata as DataEnvelope
| value | description | note |
|---|---|---|
| destination | topic used to receive messages on newly available datasets, must be aligned with Metadata Connector API config | e.g. wacodis.test.data.available |
| binder | defines the binder (message broker) | |
| content-type | content type of DataEnvelope acknowledgement messages (mime type) | should always be application/json |
spring/cloud/config
configuration of target URL of a running config server serving dynamic app config file
| value | description | note |
|---|---|---|
| url | target URL to running config server that holds config file for Datasource Observer App | e.g. http:localhost:8888 |
spring/rabbitmq
parameters related to WaCoDis message broker
| value | description | note |
|---|---|---|
| host | RabbitMQ host (WaCoDiS message broker) | e.g. localhost |
| port | RabbitMQ port (WaCoDiS message broker) | e.g. 5672 |
| username | RabbitMQ username (WaCoDiS message broker) | |
| password | RabbitMQ password (WaCoDiS message broker) |
spring/datasource.core.quartz-data-source
Per default, Quartz scheduler makes use of an in-memory job store. In order to configure a JDBC-based store, Core Engine
provides a DataSource bean which can be configured using spring.datasource.core.quartz-data-source. To configure the
DataSource just follow the https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-configure-a-datasource.
spring/quartz
Quartz scheduler related beans are provided using https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-quartz.
Hence, the scheduler can be configured via externalized configuration using spring.quartz.properties. Just set the usual
Quartz configuration properties.
datasource-observer/execution/interval
parameters related to WaCoDis Datasource Observer execution interval settings
| value | description | note |
|---|---|---|
| sentinel | execution interval for re-triggering sentinel-based observation jobs periodically in seconds | e.g. 3600 ~ 5 minutes |
| sensorWeb | execution interval for re-triggering Sensor Observation Service based observation jobs periodically in seconds | e.g. 3600 ~ 5 minutes |
| dwd | execution interval for re-triggering weather data (German DWD) based observation jobs periodically in seconds | e.g. 3600 ~ 5 minutes |
datasource-observer/sentinelhub
parameters related to WaCoDis Datasource Observer SentinelHub settings
| value | description | note |
|---|---|---|
| enabled | boolean true or false to enable SentineHub based Copernicus data observation (either SentinelHub or Code-DE can be activated, not both at the same time) | e.g. text |
| base-url | url to entrypoint of SentinelHub API | e.g. [**] |
| user | username for SentinelHub requests | |
| password | password for SentinelHub requests |
datasource-observer/code-de
parameters related to WaCoDis Datasource Observer SentinelHub settings
| value | description | note |
|---|---|---|
| enabled | boolean true or false to enable Code-DE based Copernicus data observation (either SentinelHub or Code-DE can be activated, not both at the same time) | e.g. text |
WaCoDiS Datasource Observer requires a running RabbitMQ instance for consuming messages as well as a running WaCoDiS Job Definition API for receiving WacodisJobDefinition creation/deletion event. Furthermore, outgoing DataEnevlop messages sent by the Datasource Observer against a dedicated rabbitMQ topic, are picked up by the Metadata Connector (However, a running Metadata Connector is not required to run the Datasource Observer). For starting a RabbitMQ instance as Docker container a docker-compose.yml is provided at ./docker/rabbitmq. Detailed deployment instructions for the Job Definition Api can be found at https://github.com/WaCoDiS/job-definition-api. Same applies for the https://github.com/WaCoDiS/metadata-connector.
Just start the application by running mvn spring-boot:run from the root of the metadata-connector-app module. Make
sure you have installed all dependencies with mvn clean install from the project root.
For convenience, a docker-compose.yml is provided for running the Datasource Observer as Docker container. Just, run
docker-compose up from the project root. The latest Docker image will be fetched from https://hub.docker.com/repository/docker/wacodis/datasource-observer.
The docker-compose.yml also contains the most important configuration parameters as environment variables. Feel free
to adapt the parameters for your needs.
The role of the Datasource Observer is to fetch metadata about concrete datasets from supported datasources (satellite data, weather data, sensor data) required for at least one WacodisJobDefinition. To be precise, a WacodisJobDefinition specifies one ore more required data inputs from supported datasource types (data source types are called SubsetDefinitions with respect to the WaCoDiS data model). In addition, spatio-temporal parameters are submitted for each input data type (or globally) to be ***ed within the data queries performed by the Datasource Observer. datasources. With regard implementations of the model class AbstractSubsetDefinition, the Datasource Observer supports the following dataset types and is able to perform queries against the respective datasource.
AbstractSubsetDefinition model class implementations
CopernicusSubsetDefinition: Describes a Copernicus resource e.g., provided at CODE-DE or SentinelHub.DwdSubsetDefinition: Describes datasets provided by the German Weather Services via WFS.SensorWebSubsetDefinition: Describes a standardized Sensor Observtion Service resource.For each of the previously listed supported datasource types, the Datasource Observer provides implementations of its core interface
JobFactory, which internally relies on the Java Quartz library to trigger and schedule the actual datasource queries by implementing associated Quartz Job class. Current implementations include:
CodeDeJobFactory and CodeDeJob: Implements data queries against Copernicus satellite datasets from CODE-DE platform.SentinelJobFactory and SentinelJob: Implements data queries against Copernicus satellite datasets from SentinelHub platform.SensorWebFactory and SensorWebJob: Implements data queries against standardized Sensor Observtion Services.DwdJobFactory and DwdJob: Implements data queries against weather data provided by the German Weather Services via WFS.It is possible to enhance Datasource Observer for handling additional dataset types. To do so, the following steps are required:
AbstractSubsetDefinition.
mvn clean compile -Pgenerate-models and
mvn clean compile -Pdownload-generate-models.JobFactory and associated Quartz's Job class.
code-de-observer, sentinel-observer, dwd-observer or sensor-web-observerpom.xml and include the new Maven module in the modules sectionFeel free to implement missing features by creating a pull request. For any feature requests or found bugs, we kindly ask you to create an issue.
The master branch provides sources for stable builds. The develop branch represents the latest (maybe unstable) state of development.
Apache License, Version 2.0
| Name | Organization | GitHub |
|---|---|---|
| Sebastian Drost | 52° North GmbH | https://github.com/SebaDro |
| Arne Vogt | 52° North GmbH | https://github.com/arnevogt |
| Christian Danowski-Buhren | Bochum University of Applied Sciences | https://github.com/cDanowski |
| Matthes Rieke | 52° North GmbH | https://github.com/matthesrieke |
The WaCoDiS project is maintained by 52°North GmbH. If you have any questions about this or any other repository related to WaCoDiS, please contact ***.
The research project WaCoDiS is funded by the BMVI as part of the mFund programme
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务