From b3e0e03cc8ce0ee6b672302f4be026f28b892dc9 Mon Sep 17 00:00:00 2001 From: Kaituo Li Date: Tue, 11 Jul 2023 12:09:57 -0700 Subject: [PATCH] Fix comments Signed-off-by: Kaituo Li --- .../indices/ForecastIndexManagement.java | 4 ++-- .../timeseries/indices/IndexManagement.java | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/opensearch/forecast/indices/ForecastIndexManagement.java b/src/main/java/org/opensearch/forecast/indices/ForecastIndexManagement.java index b27fa51f5..db8b40d42 100644 --- a/src/main/java/org/opensearch/forecast/indices/ForecastIndexManagement.java +++ b/src/main/java/org/opensearch/forecast/indices/ForecastIndexManagement.java @@ -204,8 +204,8 @@ public void initCheckpointIndex(ActionListener actionListen } catch (IOException e) { throw new EndRunException("", "Cannot find checkpoint mapping file", true); } - // AD indices need RAW (e.g., we want users to be able to consume AD results as soon as possible and send out an alert if anomalies - // found). + // forecast indices need RAW (e.g., we want users to be able to consume forecast results as soon as + // possible and send out an alert if a threshold is breached). Settings replicationSettings = Settings.builder().put(SETTING_REPLICATION_TYPE, DOCUMENT.name()).build(); CreateIndexRequest request = new CreateIndexRequest(ForecastCommonName.FORECAST_CHECKPOINT_INDEX_NAME, replicationSettings) .mapping(mapping, XContentType.JSON); diff --git a/src/main/java/org/opensearch/timeseries/indices/IndexManagement.java b/src/main/java/org/opensearch/timeseries/indices/IndexManagement.java index 19ca29061..d342f3f85 100644 --- a/src/main/java/org/opensearch/timeseries/indices/IndexManagement.java +++ b/src/main/java/org/opensearch/timeseries/indices/IndexManagement.java @@ -428,8 +428,8 @@ public void initConfigIndexIfAbsent(ActionListener actionLi * @throws IOException IOException from {@link IndexManagement#getConfigMappings} */ public void initConfigIndex(ActionListener actionListener) throws IOException { - // AD indices need RAW (e.g., we want users to be able to consume AD results as soon as possible and send out an alert if anomalies - // found). + // time series indices need RAW (e.g., we want users to be able to consume AD results as soon as possible + // and send out an alert if anomalies found). Settings replicationSettings = Settings.builder().put(SETTING_REPLICATION_TYPE, DOCUMENT.name()).build(); CreateIndexRequest request = new CreateIndexRequest(CommonName.CONFIG_INDEX, replicationSettings) .mapping(getConfigMappings(), XContentType.JSON) @@ -482,8 +482,8 @@ public static String getJobMappings() throws IOException { */ public void initJobIndex(ActionListener actionListener) { try { - // AD indices need RAW (e.g., we want users to be able to consume AD results as soon as possible and send out an alert if - // anomalies found). + // time series indices need RAW (e.g., we want users to be able to consume AD results as soon as + // possible and send out an alert if anomalies found). Settings replicationSettings = Settings.builder().put(SETTING_REPLICATION_TYPE, DOCUMENT.name()).build(); CreateIndexRequest request = new CreateIndexRequest(CommonName.JOB_INDEX, replicationSettings) .mapping(getJobMappings(), XContentType.JSON); @@ -937,8 +937,8 @@ protected void rolloverAndDeleteHistoryIndex( CreateIndexRequest createRequest = rollOverRequest.getCreateIndexRequest(); - // AD indices need RAW (e.g., we want users to be able to consume AD results as soon as possible and send out an alert if anomalies - // found). + // time series indices need RAW (e.g., we want users to be able to consume AD results as soon as possible + // and send out an alert if anomalies found). Settings replicationSettings = Settings.builder().put(SETTING_REPLICATION_TYPE, DOCUMENT.name()).build(); createRequest.index(rolloverIndexPattern).settings(replicationSettings).mapping(resultMapping, XContentType.JSON); @@ -965,8 +965,8 @@ protected void initResultIndexDirectly( IndexType resultIndex, ActionListener actionListener ) { - // AD indices need RAW (e.g., we want users to be able to consume AD results as soon as possible and send out an alert if anomalies - // found). + // time series indices need RAW (e.g., we want users to be able to consume AD results as soon as possible + // and send out an alert if anomalies found). Settings replicationSettings = Settings.builder().put(SETTING_REPLICATION_TYPE, DOCUMENT.name()).build(); CreateIndexRequest request = new CreateIndexRequest(resultIndexName, replicationSettings).mapping(resultMapping, XContentType.JSON); if (alias != null) {