-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kartik Khare
authored and
Kartik Khare
committed
Nov 19, 2024
1 parent
24765e0
commit a4b24d9
Showing
8 changed files
with
178 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 27 additions & 9 deletions
36
...rc/main/java/org/apache/pinot/controller/helix/core/realtime/SegmentCompletionConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,44 @@ | ||
/** | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.pinot.controller.helix.core.realtime; | ||
|
||
import java.util.Map; | ||
import java.util.HashMap; | ||
import java.util.Properties; | ||
import java.util.Map; | ||
import org.apache.pinot.spi.env.PinotConfiguration; | ||
|
||
|
||
public class SegmentCompletionConfig { | ||
private final Map<String, String> fsmSchemes = new HashMap<>(); | ||
private final Map<String, String> _fsmSchemes = new HashMap<>(); | ||
|
||
public SegmentCompletionConfig(Properties properties) { | ||
public SegmentCompletionConfig(PinotConfiguration configuration) { | ||
// Parse properties to extract FSM schemes | ||
// Assuming properties keys are in the format scheme=className | ||
for (String key : properties.stringPropertyNames()) { | ||
for (String key : configuration.getKeys()) { | ||
if (key.startsWith("fsm.scheme.")) { | ||
String scheme = key.substring("fsm.scheme.".length()); | ||
String className = properties.getProperty(key); | ||
fsmSchemes.put(scheme, className); | ||
String className = configuration.getProperty(key); | ||
_fsmSchemes.put(scheme, className); | ||
} | ||
} | ||
} | ||
|
||
public Map<String, String> getFsmSchemes() { | ||
return fsmSchemes; | ||
return _fsmSchemes; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
.../main/java/org/apache/pinot/controller/helix/core/realtime/SegmentCompletionFSMState.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.