From 5c54961d44302638e7c96fdcfd9a0d25cd5911b4 Mon Sep 17 00:00:00 2001 From: Kartik Khare Date: Wed, 11 Dec 2024 23:07:27 +0530 Subject: [PATCH] refactor --- .../helix/core/realtime/SegmentCompletionConfig.java | 2 +- .../helix/core/realtime/SegmentCompletionFSMFactory.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/SegmentCompletionConfig.java b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/SegmentCompletionConfig.java index 29aab8531eac..f95c55de4334 100644 --- a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/SegmentCompletionConfig.java +++ b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/SegmentCompletionConfig.java @@ -25,7 +25,7 @@ public class SegmentCompletionConfig { public static final String FSM_SCHEME = "pinot.controller.segment.completion.fsm.scheme."; - public static final String DEFAULT_FSM_SCHEME_KEY = "pinot.controller.segment.completion.fsm.scheme.default."; + public static final String DEFAULT_FSM_SCHEME_KEY = "pinot.controller.segment.completion.fsm.scheme.default"; public static final String DEFAULT_FSM_SCHEME = "default"; private final Map _fsmSchemes = new HashMap<>(); private final String _defaultFsmScheme; diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/SegmentCompletionFSMFactory.java b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/SegmentCompletionFSMFactory.java index 239c2052e9c7..2c646f3f7fd3 100644 --- a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/SegmentCompletionFSMFactory.java +++ b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/SegmentCompletionFSMFactory.java @@ -33,13 +33,12 @@ private SegmentCompletionFSMFactory() { private static final Logger LOGGER = LoggerFactory.getLogger(SegmentCompletionFSMFactory.class); private static final Map> FSM_CLASS_MAP = new HashMap<>(); - public static final String DEFAULT = "default"; // Static block to register the default FSM static { try { Class clazz = Class.forName(BlockingSegmentCompletionFSM.class.getCanonicalName()); - register(DEFAULT, (Class) clazz); + register(SegmentCompletionConfig.DEFAULT_FSM_SCHEME, (Class) clazz); LOGGER.info("Registered default BlockingSegmentCompletionFSM"); } catch (Exception e) { LOGGER.error("Failed to register default BlockingSegmentCompletionFSM", e);