diff --git a/ml-algorithms/build.gradle b/ml-algorithms/build.gradle index 0a586e74ae..240da67edc 100644 --- a/ml-algorithms/build.gradle +++ b/ml-algorithms/build.gradle @@ -64,13 +64,38 @@ dependencies { implementation 'com.amazonaws:aws-encryption-sdk-java:2.4.1' implementation 'com.jayway.jsonpath:json-path:2.8.0' implementation group: 'org.json', name: 'json', version: '20231013' + implementation(group: 'opensearch-sql', name: 'opensearch-sql', version: "${common_utils_version}") { + exclude module: 'legacy' + exclude module: 'prometheus' + exclude module: 'datasources' + exclude module: 'spark' + exclude module: 'common' + exclude module: 'core' + exclude module: 'protocol' + exclude module: 'opensearch' + } + implementation(group: 'opensearch-sql', name: 'ppl', version: "${common_utils_version}") { + exclude module: 'common' + exclude module: 'core' + exclude module: 'protocol' + exclude module: 'opensearch' + exclude group: 'org.reflections', module: 'reflections' + exclude group: 'com.google.guava', module: 'guava' + exclude group: 'org.json', module: 'json' + } + implementation(group: 'opensearch-sql', name: 'protocol', version: "${common_utils_version}") { + exclude group: 'com.google.guava', module: 'guava' + exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core' + exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind' + exclude group: 'com.fasterxml.jackson.dataformat', module: 'jackson-dataformat-cbor' + exclude group: 'com.google.code.gson', module: 'gson' + exclude module: 'core' + exclude module: 'opensearch' + } } configurations.all { resolutionStrategy.force 'com.google.protobuf:protobuf-java:3.21.9' -// resolutionStrategy.force 'com.fasterxml.jackson.core:jackson-annotations:2.16.0' -// resolutionStrategy.force 'org.opensearch.client:opensearch-rest-client:2.12.0-SNAPSHOT' -// resolutionStrategy.force 'com.fasterxml.jackson.core:jackson-databind:2.16.0' } jacocoTestReport { diff --git a/plugin/src/main/java/org/opensearch/ml/rest/MyRestPPLQueryAction.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/MyRestPPLQueryAction.java similarity index 100% rename from plugin/src/main/java/org/opensearch/ml/rest/MyRestPPLQueryAction.java rename to ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/MyRestPPLQueryAction.java diff --git a/plugin/build.gradle b/plugin/build.gradle index 826089b03f..abb8036957 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -48,39 +48,38 @@ dependencies { implementation project(':opensearch-ml-memory') implementation group: 'org.opensearch', name: 'opensearch', version: "${opensearch_version}" - implementation (group: 'opensearch-sql', name: 'opensearch-sql', version: "${common_utils_version}") { + implementation "org.opensearch.client:opensearch-rest-client:${opensearch_version}" + implementation "org.opensearch:common-utils:${common_utils_version}" + implementation("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}") + implementation("com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}") + implementation group: 'com.google.guava', name: 'guava', version: '32.0.1-jre' + implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' + implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1' + implementation "org.apache.logging.log4j:log4j-slf4j-impl:2.19.0" + testImplementation group: 'commons-io', name: 'commons-io', version: '2.11.0' + implementation group: 'org.apache.commons', name: 'commons-text', version: '1.10.0' + implementation(group: 'opensearch-sql', name: 'opensearch-sql', version: "${common_utils_version}") { exclude module: 'legacy' exclude module: 'opensearch' exclude module: 'prometheus' exclude module: 'datasources' exclude module: 'spark' } - implementation (group: 'opensearch-sql', name: 'ppl', version: "${common_utils_version}") { + implementation(group: 'opensearch-sql', name: 'ppl', version: "${common_utils_version}") { exclude group: 'org.reflections', module: 'reflections' exclude group: 'com.google.guava', module: 'guava' exclude group: 'org.json', module: 'json' exclude module: 'common' exclude module: 'core' } - implementation (group: 'opensearch-sql', name: 'protocol', version: "${common_utils_version}") { + implementation(group: 'opensearch-sql', name: 'protocol', version: "${common_utils_version}") { exclude group: 'com.google.guava', module: 'guava' exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core' exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind' exclude group: 'com.fasterxml.jackson.dataformat', module: 'jackson-dataformat-cbor' exclude group: 'com.google.code.gson', module: 'gson' } - implementation "org.opensearch.client:opensearch-rest-client:${opensearch_version}" - implementation "org.opensearch:common-utils:${common_utils_version}" - implementation("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}") - implementation("com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}") - implementation group: 'com.google.guava', name: 'guava', version: '32.0.1-jre' - implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' - implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1' - implementation "org.apache.logging.log4j:log4j-slf4j-impl:2.19.0" - testImplementation group: 'commons-io', name: 'commons-io', version: '2.11.0' - implementation group: 'org.apache.commons', name: 'commons-text', version: '1.10.0' - checkstyle "com.puppycrawl.tools:checkstyle:${project.checkstyle.toolVersion}" } diff --git a/plugin/src/main/java/org/opensearch/ml/plugin/MachineLearningPlugin.java b/plugin/src/main/java/org/opensearch/ml/plugin/MachineLearningPlugin.java index 187064cf6b..a8a233134b 100644 --- a/plugin/src/main/java/org/opensearch/ml/plugin/MachineLearningPlugin.java +++ b/plugin/src/main/java/org/opensearch/ml/plugin/MachineLearningPlugin.java @@ -145,7 +145,7 @@ import org.opensearch.ml.model.MLModelCacheHelper; import org.opensearch.ml.model.MLModelManager; //import org.opensearch.ml.rest.MyRestPPLQueryAction; -import org.opensearch.ml.rest.MyRestPPLQueryAction; +//import org.opensearch.ml.rest.MyRestPPLQueryAction; import org.opensearch.ml.rest.RestMLCreateConnectorAction; import org.opensearch.ml.rest.RestMLDeleteConnectorAction; import org.opensearch.ml.rest.RestMLDeleteModelAction; @@ -556,7 +556,7 @@ public List getRestHandlers( RestMemoryGetInteractionsAction restListInteractionsAction = new RestMemoryGetInteractionsAction(); RestMemoryDeleteConversationAction restDeleteConversationAction = new RestMemoryDeleteConversationAction(); RestMLUpdateConnectorAction restMLUpdateConnectorAction = new RestMLUpdateConnectorAction(mlFeatureEnabledSetting); - MyRestPPLQueryAction restPPLQueryAction = new MyRestPPLQueryAction(); +// MyRestPPLQueryAction restPPLQueryAction = new MyRestPPLQueryAction(); return ImmutableList .of( restMLStatsAction, @@ -590,8 +590,8 @@ public List getRestHandlers( restCreateInteractionAction, restListInteractionsAction, restDeleteConversationAction, - restMLUpdateConnectorAction, - restPPLQueryAction + restMLUpdateConnectorAction +// restPPLQueryAction ); }