wardlican commented on code in PR #3922:
URL: https://github.com/apache/amoro/pull/3922#discussion_r2928412604
##########
amoro-ams/src/main/java/org/apache/amoro/server/AmoroServiceContainer.java:
##########
@@ -240,6 +241,22 @@ public void startOptimizingService() throws Exception {
DefaultTableRuntimeFactory defaultRuntimeFactory = new
DefaultTableRuntimeFactory();
defaultRuntimeFactory.initialize(processFactories);
+ // In master-slave mode, create AmsAssignService for bucket assignment
+ if (IS_MASTER_SLAVE_MODE && haContainer != null) {
+ try {
+ // Create and start AmsAssignService for bucket assignment
+ // The factory will handle different HA types (ZK, database, etc.)
+ amsAssignService = new AmsAssignService(haContainer, serviceConfig);
+ amsAssignService.start();
+ LOG.info("AmsAssignService started for master-slave mode");
+ } catch (UnsupportedOperationException e) {
+ LOG.info("Skip AmsAssignService: {}", e.getMessage());
+ } catch (Exception e) {
+ LOG.error("Failed to start AmsAssignService", e);
+ }
+ }
+
+ tableService = new DefaultTableService(serviceConfig, catalogManager,
defaultRuntimeFactory);
Review Comment:
Yes, I will fix this problem.
--
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]