Skip to content

Commit 78fe8bc

Browse files
committed
Code Refactoring for CommonName (opensearch-project#867)
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]>
1 parent 0261afc commit 78fe8bc

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

src/test/java/org/opensearch/ad/TestHelpers.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ public static ClusterState createClusterState() {
15161516

15171517
mappings
15181518
.put(
1519-
CommonName.JOB_INDEX,
1519+
CommonName.JOB_INDEX,
15201520
IndexMetadata
15211521
.builder("test")
15221522
.settings(

src/test/java/org/opensearch/ad/feature/SearchFeatureDaoParamTests.java

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
import org.opensearch.ad.AnomalyDetectorPlugin;
5656
import org.opensearch.ad.NodeStateManager;
5757
import org.opensearch.ad.constant.ADCommonName;
58-
import org.opensearch.ad.constant.CommonName;
5958
import org.opensearch.ad.dataprocessor.Interpolator;
6059
import org.opensearch.ad.dataprocessor.LinearUniformInterpolator;
6160
import org.opensearch.ad.dataprocessor.SingleFeatureLinearUniformInterpolator;

src/test/java/org/opensearch/ad/transport/DeleteAnomalyDetectorTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ private ClusterState createClusterState() {
200200
Map<String, IndexMetadata> immutableOpenMap = new HashMap<>();
201201
immutableOpenMap
202202
.put(
203-
CommonName.JOB_INDEX,
203+
CommonName.JOB_INDEX,
204204
IndexMetadata
205205
.builder("test")
206206
.settings(

0 commit comments

Comments
 (0)