czy006 opened a new issue, #4022:
URL: https://github.com/apache/amoro/issues/4022

   ### Search before asking
   
   - [x] I have searched in the 
[issues](https://github.com/apache/amoro/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### What would you like to be improved?
   
   IcebergTableMaintainer is currently located in the amoro ams module and 
directly depends on the DefaultTableRuntime class, resulting in the following 
issues:
   
   - Unclear module responsibilities: The amoro format iceberg module should 
include all Iceberg format related implementations, but the implementation of 
TableMaintainer is coupled with AMS
   - Difficulty in code reuse: If other projects need to use Amoro's Iceberg 
maintenance feature, the entire AMS module must be introduced
   - High testing complexity: Testing for maintenance functions requires 
simulating the entire AMS runtime environment
   - Scalability limited: In the future, if we want to support other formats 
(such as Paimon/Kudi), we will need to repeatedly implement similar AMS 
integration logic
   
   **Before**
   
   ```
   ┌─────────────────────────────────────────────────────────────────┐
   │                    IcebergTableMaintainer                       │
   │                  (amoro-ams)                                    │
   └───────────────────────────┬─────────────────────────────────────┘
                               │
                               │ dependency
                               ▼
   ┌─────────────────────────────────────────────────────────────────┐
   │                     DefaultTableRuntime                         │
   │                   (amoro-ams)                                   │
   └─────────────────────────────────────────────────────────────────┘
   
   ```
   
   Add TableMaintainerContext interface to the amoro common module as an 
abstraction layer for maintainer and AMS runtime interaction:
   
   **After**
   ```
   ┌──────────────────┐
   │  amoro-common    │  
   │  - TableMaintainer
   │  - TableMaintainerContext
   │  - MaintainerMetrics
   │  - OptimizingInfo
   └────────┬─────────┘
            │
            │ dependency
            ▼
   ┌──────────────────────┐
   │ amoro-format-iceberg │  (add dependency: amoro-common)
   │ - IcebergTableMaintainer
   └────────┬─────────────┘
            │
            │ 
            ▼
   ┌──────────────────┐
   │   amoro-ams      │  
   │ - DefaultTableMaintainerContext
   │ - DefaultTableRuntime
   └──────────────────┘
   ```
   
   ### How should we improve?
   
   - TableMaintainer interface remove to amoro-common
   - Add TableMaintainerContext、MaintainerMetrics、OptimizingInfo interface
   - Impl DefaultTableMaintainerContext
   - MixedTableMaintainer & IcebergTableMaintainer remove to amoro-iceberg
   - Iceberg Maintainer Test from ams remove to amoro-iceberg
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Subtasks
   
   _No response_
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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]

Reply via email to