Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Khare authored and Kartik Khare committed Dec 12, 2024
1 parent 57c5685 commit 5c54961
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String> _fsmSchemes = new HashMap<>();
private final String _defaultFsmScheme;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ private SegmentCompletionFSMFactory() {

private static final Logger LOGGER = LoggerFactory.getLogger(SegmentCompletionFSMFactory.class);
private static final Map<String, Class<? extends SegmentCompletionFSM>> 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<? extends SegmentCompletionFSM>) clazz);
register(SegmentCompletionConfig.DEFAULT_FSM_SCHEME, (Class<? extends SegmentCompletionFSM>) clazz);
LOGGER.info("Registered default BlockingSegmentCompletionFSM");
} catch (Exception e) {
LOGGER.error("Failed to register default BlockingSegmentCompletionFSM", e);
Expand Down

0 comments on commit 5c54961

Please sign in to comment.