Decouple rest from iotdb-server using ExternalService framework #17099
+431
−1,612
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.
Major Changes
PR Description
This pull request introduces a new REST external service module to the project and refactors the existing REST service implementation to improve modularity and maintainability. The changes include adding new Maven modules, updating dependencies, adjusting assembly packaging, and refactoring Java package structures for REST-related code.
Addition of REST External Service:
restunderexternal-service-implwith its ownpom.xml, specifying all required dependencies and build plugins for the REST service implementation.restandrest-openapimodules in the parentexternal-service-impl/pom.xml.pom.xmlto include the newrestmodule as a provided dependency.Assembly and Packaging Updates:
all.xml,datanode.xml,external-service-impl.xml) to include therestservice JAR in distribution packaging.Refactoring and Relocation of REST Service Code:
RestServiceJava implementation fromiotdb-core/datanodetoexternal-service-impl/rest, changing its package fromorg.apache.iotdb.db.servicetoorg.apache.iotdb.rest, and updated its interface fromIServicetoIExternalService.RestServiceto use the new package structure and external service API, and changed Jersey provider package configuration accordingly.OpenAPI Module Refactoring:
openapimodule fromiotdb-protocol/openapitoexternal-service-impl/rest-openapi, updating its parent module and artifact naming for clarity and consistency.org.apache.iotdb.rest.protocolfor APIs, models, and invokers.Dependency Management Improvements:
external-service-api,junit) from the parentexternal-service-impl/pom.xmlto the specificmqttandrestmodulepom.xmlfiles for better modularization.These changes collectively modularize the REST service, making it easier to maintain and extend, and ensure it is properly packaged and distributed with the project.