majin1102 commented on code in PR #4073:
URL: https://github.com/apache/amoro/pull/4073#discussion_r2844306023
##########
amoro-ams/src/main/java/org/apache/amoro/server/AmoroServiceContainer.java:
##########
@@ -239,33 +240,33 @@ public void startOptimizingService() throws Exception {
new DefaultOptimizingService(serviceConfig, catalogManager,
optimizerManager, tableService);
processService = new ProcessService(serviceConfig, tableService);
-
- LOG.info("Setting up AMS table executors...");
- InlineTableExecutors.getInstance().setup(tableService, serviceConfig);
- addHandlerChain(optimizingService.getTableRuntimeHandler());
- addHandlerChain(processService.getTableHandlerChain());
-
addHandlerChain(InlineTableExecutors.getInstance().getDataExpiringExecutor());
-
addHandlerChain(InlineTableExecutors.getInstance().getSnapshotsExpiringExecutor());
-
addHandlerChain(InlineTableExecutors.getInstance().getOrphanFilesCleaningExecutor());
-
addHandlerChain(InlineTableExecutors.getInstance().getDanglingDeleteFilesCleaningExecutor());
-
addHandlerChain(InlineTableExecutors.getInstance().getOptimizingCommitExecutor());
-
addHandlerChain(InlineTableExecutors.getInstance().getOptimizingExpiringExecutor());
-
addHandlerChain(InlineTableExecutors.getInstance().getBlockerExpiringExecutor());
-
addHandlerChain(InlineTableExecutors.getInstance().getHiveCommitSyncExecutor());
-
addHandlerChain(InlineTableExecutors.getInstance().getTableRefreshingExecutor());
-
addHandlerChain(InlineTableExecutors.getInstance().getTagsAutoCreatingExecutor());
- tableService.initialize();
- LOG.info("AMS table service have been initialized");
+ tableService.initialize(initTablePlugins());
tableManager.setTableService(tableService);
+ LOG.info("AMS table service have been initialized");
initThriftService();
startThriftService();
}
- private void addHandlerChain(RuntimeHandlerChain chain) {
- if (chain != null) {
- tableService.addHandlerChain(chain);
- }
+ private List<TableRuntimePlugin> initTablePlugins() {
+ LOG.info("Setting up AMS table executors...");
+ InlineTableExecutors.getInstance().setup(tableService, serviceConfig);
+ IcebergTablePlugin icebergTablePlugin =
Review Comment:
I think we should still use SPI(PluginManager) to do this. I'm preparing to
create a LanceTableRuntimePlugin to handle lance tables and we could see the
path clearly.
But Iceberg table runtime plugin is automatically loaded.
How do you feel
--
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]