-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Star tree mapping changes #14261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Star tree mapping changes #14261
Changes from 6 commits
4af8a1e
9560d19
a83794b
7651776
6371916
680875e
0a28513
95e8d25
ed01cc0
b813450
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.index.compositeindex; | ||
|
||
import org.opensearch.common.annotation.ExperimentalApi; | ||
import org.opensearch.common.settings.ClusterSettings; | ||
import org.opensearch.common.settings.Setting; | ||
import org.opensearch.common.settings.Settings; | ||
import org.opensearch.common.util.FeatureFlags; | ||
|
||
/** | ||
* Cluster level settings for composite indices | ||
* | ||
* @opensearch.experimental | ||
*/ | ||
@ExperimentalApi | ||
public class CompositeIndexSettings { | ||
public static final Setting<Boolean> STAR_TREE_INDEX_ENABLED_SETTING = Setting.boolSetting( | ||
"indices.composite_index.star_tree.enabled", | ||
dblock marked this conversation as resolved.
Show resolved
Hide resolved
|
||
false, | ||
dblock marked this conversation as resolved.
Show resolved
Hide resolved
|
||
value -> { | ||
if (FeatureFlags.isEnabled(FeatureFlags.STAR_TREE_INDEX_SETTING) == false && value == true) { | ||
throw new IllegalArgumentException( | ||
Check warning on line 29 in server/src/main/java/org/opensearch/index/compositeindex/CompositeIndexSettings.java
|
||
"star tree index is under an experimental feature and can be activated only by enabling " | ||
+ FeatureFlags.STAR_TREE_INDEX_SETTING.getKey() | ||
Check warning on line 31 in server/src/main/java/org/opensearch/index/compositeindex/CompositeIndexSettings.java
|
||
+ " feature flag in the JVM options" | ||
); | ||
} | ||
}, | ||
Setting.Property.NodeScope, | ||
Setting.Property.Dynamic | ||
bharath-techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
); | ||
|
||
private volatile boolean starTreeIndexCreationEnabled; | ||
|
||
public CompositeIndexSettings(Settings settings, ClusterSettings clusterSettings) { | ||
this.starTreeIndexCreationEnabled = STAR_TREE_INDEX_ENABLED_SETTING.get(settings); | ||
clusterSettings.addSettingsUpdateConsumer(STAR_TREE_INDEX_ENABLED_SETTING, this::starTreeIndexCreationEnabled); | ||
|
||
} | ||
|
||
private void starTreeIndexCreationEnabled(boolean value) { | ||
this.starTreeIndexCreationEnabled = value; | ||
bharath-techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
public boolean isStarTreeIndexCreationEnabled() { | ||
return starTreeIndexCreationEnabled; | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.