Skip to content

Conversation

@LJW21-02
Copy link
Contributor

@LJW21-02 LJW21-02 commented Jan 28, 2026

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 (including rest with size 9.75MB)

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.

@CritasWang CritasWang merged commit d05276e into apache:master Jan 28, 2026
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants