Skip to content

Commit

Permalink
Code Refactoring for CommonName (opensearch-project#867)
Browse files Browse the repository at this point in the history
In this pull request, I have refactored the code related to shared names in both AD and forecasting modules to CommonNames. Additionally, the previously used CommonName has been renamed to ADCommonName. For the Forecasting module, I have introduced new names in ForecastCommonNames.

Testing done:
* gradle build

Signed-off-by: Kaituo Li <[email protected]>
  • Loading branch information
kaituo committed May 9, 2023
1 parent 0261afc commit 78fe8bc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/test/java/org/opensearch/ad/TestHelpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,7 @@ public static ClusterState createClusterState() {

mappings
.put(
CommonName.JOB_INDEX,
CommonName.JOB_INDEX,
IndexMetadata
.builder("test")
.settings(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
import org.opensearch.ad.AnomalyDetectorPlugin;
import org.opensearch.ad.NodeStateManager;
import org.opensearch.ad.constant.ADCommonName;
import org.opensearch.ad.constant.CommonName;
import org.opensearch.ad.dataprocessor.Interpolator;
import org.opensearch.ad.dataprocessor.LinearUniformInterpolator;
import org.opensearch.ad.dataprocessor.SingleFeatureLinearUniformInterpolator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private ClusterState createClusterState() {
Map<String, IndexMetadata> immutableOpenMap = new HashMap<>();
immutableOpenMap
.put(
CommonName.JOB_INDEX,
CommonName.JOB_INDEX,
IndexMetadata
.builder("test")
.settings(
Expand Down

0 comments on commit 78fe8bc

Please sign in to comment.