LJW21-02 opened a new pull request, #17099: URL: https://github.com/apache/iotdb/pull/17099
# Major Changes - Moved rest from datanode to external-service-impl as an independent module - Moved openapi from iotdb-protocol to external-service-impl as an independent module - Reduced the number of dependencies in lib from 162 to 124 - The size of lib before modifying: 122MB; after modifying: 121MB # 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:** * Added a new Maven module `rest` under `external-service-impl` with its own `pom.xml`, specifying all required dependencies and build plugins for the REST service implementation. * Registered the new `rest` and `rest-openapi` modules in the parent `external-service-impl/pom.xml`. * Updated the main distribution's `pom.xml` to include the new `rest` module as a provided dependency. **Assembly and Packaging Updates:** * Modified multiple assembly configuration files (`all.xml`, `datanode.xml`, `external-service-impl.xml`) to include the `rest` service JAR in distribution packaging. **Refactoring and Relocation of REST Service Code:** * Moved the `RestService` Java implementation from `iotdb-core/datanode` to `external-service-impl/rest`, changing its package from `org.apache.iotdb.db.service` to `org.apache.iotdb.rest`, and updated its interface from `IService` to `IExternalService`. * Updated references and imports in `RestService` to use the new package structure and external service API, and changed Jersey provider package configuration accordingly. **OpenAPI Module Refactoring:** * Renamed the `openapi` module from `iotdb-protocol/openapi` to `external-service-impl/rest-openapi`, updating its parent module and artifact naming for clarity and consistency. * Updated OpenAPI code generation configurations to use new package names under `org.apache.iotdb.rest.protocol` for APIs, models, and invokers. **Dependency Management Improvements:** * Moved common dependencies (`external-service-api`, `junit`) from the parent `external-service-impl/pom.xml` to the specific `mqtt` and `rest` module `pom.xml` files 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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
