diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/encryptor/EncryptorImpl.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/encryptor/EncryptorImpl.java index 8ad3016ae9..739447a3f3 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/encryptor/EncryptorImpl.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/encryptor/EncryptorImpl.java @@ -34,7 +34,7 @@ @Log4j2 public class EncryptorImpl implements Encryptor { - public static final String MASTER_KEY_NOT_READY_ERROR = "ML encryption master key not initialized yet. Please retry after 10 seconds."; + public static final String MASTER_KEY_NOT_READY_ERROR = "The ML encryption master key has not been initialized yet. Please retry after waiting for 10 seconds."; private ClusterService clusterService; private Client client; private volatile String masterKey; diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/utils/ScriptUtils.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/utils/ScriptUtils.java index 89de1006c6..7c7e3a528f 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/utils/ScriptUtils.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/utils/ScriptUtils.java @@ -6,7 +6,6 @@ package org.opensearch.ml.engine.utils; import com.google.gson.Gson; -import lombok.extern.log4j.Log4j2; import org.opensearch.ml.common.connector.MLPostProcessFunction; import org.opensearch.ml.common.connector.MLPreProcessFunction; import org.opensearch.ml.common.utils.StringUtils; @@ -19,7 +18,6 @@ import java.util.Map; import java.util.Optional; -@Log4j2 public class ScriptUtils { public static final Gson gson; @@ -54,12 +52,8 @@ public static Optional executePostprocessFunction(ScriptService scriptSe } public static String executeScript(ScriptService scriptService, String painlessScript, Map params) { - long start = System.nanoTime(); Script script = new Script(ScriptType.INLINE, "painless", painlessScript, Collections.emptyMap()); TemplateScript templateScript = scriptService.compile(script, TemplateScript.CONTEXT).newInstance(params); - long end = System.nanoTime(); - double durationInMs = (end - start) / 1e6; - log.info("----------------- painless script execution time: {} ms", durationInMs); return templateScript.execute(); } } diff --git a/plugin/src/main/java/org/opensearch/ml/model/MLModelGroupManager.java b/plugin/src/main/java/org/opensearch/ml/model/MLModelGroupManager.java index bff64f19df..d9fc0a9742 100644 --- a/plugin/src/main/java/org/opensearch/ml/model/MLModelGroupManager.java +++ b/plugin/src/main/java/org/opensearch/ml/model/MLModelGroupManager.java @@ -77,7 +77,9 @@ public void createModelGroup(MLRegisterModelGroupInput input, ActionListener argumentCaptor = ArgumentCaptor.forClass(Exception.class); verify(actionListener).onFailure(argumentCaptor.capture()); assertEquals( - "The name you provided is already being used by another model with ID: model_group_ID. Please provide a different name or add \"model_group_id\": \"lMPmr4kB4eSCtCCDmCDm\" to request body", + "The name you provided is already being used by another model with ID: model_group_ID. Please provide a different name or add \"model_group_id\": \"model_group_ID\" to request body", argumentCaptor.getValue().getMessage() );