diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 4b707787..458c4c3e 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -13,8 +13,8 @@ jobs: strategy: matrix: java: - - 11 - - 17 + - 21 + - 23 fail-fast: false runs-on: [ubuntu-latest] name: Building PA package @@ -66,6 +66,6 @@ jobs: - name: Run Integration Tests working-directory: ./tmp/performance-analyzer run: ./gradlew integTest -Dtests.enableIT -Dtests.useDockerCluster - - name: Run PerformanceAnalzyer Backwards Compatibility Tests - working-directory: ./tmp/performance-analyzer - run: ./gradlew bwcTestSuite -Dtests.security.manager=false + #- name: Run PerformanceAnalzyer Backwards Compatibility Tests + # working-directory: ./tmp/performance-analyzer + # run: ./gradlew bwcTestSuite -Dtests.security.manager=false diff --git a/build.gradle b/build.gradle index 9bd72dca..edb9f176 100644 --- a/build.gradle +++ b/build.gradle @@ -6,9 +6,9 @@ buildscript { ext { - opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT") + opensearch_version = System.getProperty("opensearch.version", "3.0.0-alpha1-SNAPSHOT") isSnapshot = "true" == System.getProperty("build.snapshot", "true") - buildVersionQualifier = System.getProperty("build.version_qualifier", "") + buildVersionQualifier = System.getProperty("build.version_qualifier", "alpha1") default_bwc_version = System.getProperty("bwc.version", "2.18.0.0") pa_bwc_version = System.getProperty("tests.bwc.version", default_bwc_version) @@ -16,7 +16,7 @@ buildscript { // The PA Commons (https://github.com/opensearch-project/performance-analyzer-commons) // is a library dependency with hardcoded versioning in PA and RCA repos. - paCommonsVersion = "1.6.0" + paCommonsVersion = "2.0.0" // 3.0.0-SNAPSHOT -> 3.0.0.0-SNAPSHOT version_tokens = opensearch_version.tokenize('-') @@ -26,7 +26,7 @@ buildscript { } if (isSnapshot) { opensearch_build += "-SNAPSHOT" - paCommonsVersion += "-SNAPSHOT" + //paCommonsVersion += "-SNAPSHOT" } } @@ -53,7 +53,7 @@ plugins { id 'com.diffplug.spotless' version '6.25.0' id 'checkstyle' id 'org.ajoberstar.grgit' version '5.0.0' - id 'org.gradle.test-retry' version '1.5.2' + id 'org.gradle.test-retry' version '1.6.1' } @@ -138,8 +138,8 @@ opensearchplugin { classname 'org.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin' } -sourceCompatibility = JavaVersion.VERSION_11 -targetCompatibility = JavaVersion.VERSION_11 +sourceCompatibility = JavaVersion.VERSION_21 +targetCompatibility = JavaVersion.VERSION_21 compileJava { dependsOn spotlessApply @@ -212,7 +212,7 @@ tasks.withType(JavaCompile) { } jacoco { - toolVersion = "0.8.11" + toolVersion = "0.8.12" } jacocoTestReport { @@ -301,8 +301,8 @@ dependencies { implementation 'org.jooq:jooq:3.10.8' implementation 'org.apache.commons:commons-lang3:3.9' - implementation 'org.bouncycastle:bcprov-jdk15to18:1.78.1' - implementation 'org.bouncycastle:bcpkix-jdk18on:1.78.1' + implementation 'org.bouncycastle:bcprov-jdk18on:1.78' + implementation 'org.bouncycastle:bcpkix-jdk18on:1.78' implementation "org.opensearch:performance-analyzer-commons:${paCommonsVersion}" implementation "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}" implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonDataBindVersion}" @@ -458,85 +458,6 @@ static def propEnabled(property) { return System.getProperty(property) != null && System.getProperty(property).toLowerCase().equals("true") } -// The following Gradle tasks are used to create a PA/RCA enabled OpenSearch cluster -// Pass the -Dtests.enableIT property to Gradle to run ITs - -/** - * cloneRcaGitRepo clones the performance-analyzer-rca repo if the -Dtests.enableIT=true flag is passed - * to the Gradle JVM - */ -task cloneRcaGitRepo() { - def destination = file(rcaProjectDir) - def uri = rcaProjectRepo - def fetch = rcaProjectFetch - def branch = rcaProjectBranch - if (!branch.startsWith(fetch)) { // to avoid checking out origin/origin/branch - branch = rcaProjectFetch + "/" + rcaProjectBranch - } - doFirst { - println "Cloning performance-analyzer-rca into ${rcaProjectDir} from ${rcaProjectRepo}#${rcaProjectBranch}" - } - doLast { - if (destination.exists() && destination.isDirectory()) { // If directory exists, use this instead. - def grgit = Grgit.open(dir: destination.toString()) - } else { // Otherwise pull it from git. - def grgit = Grgit.clone(dir: destination.toString(), uri: uri) - grgit.fetch(remote: fetch) - grgit.checkout(branch: branch) - } - } -} - -task buildRca() { - dependsOn(cloneRcaGitRepo) - - doFirst { - logger.info("Building performance-analyzer-rca project in ${rcaProjectDir} with -Dopensearch.version=${opensearch_version}") - } - - doLast { - exec { - workingDir("$rcaProjectDir") - if (buildVersionQualifier == null || buildVersionQualifier == '' || buildVersionQualifier == 'null') { - commandLine './gradlew', 'build', '-x', 'test', '-x', 'jacocoTestCoverageVerification', "-Dopensearch.version=${opensearch_version}", "-Dbuild.snapshot=${isSnapshot}" - } - else { - commandLine './gradlew', 'build', '-x', 'test', '-x', 'jacocoTestCoverageVerification', "-Dopensearch.version=${opensearch_version}", "-Dbuild.snapshot=${isSnapshot}", "-Dbuild.version_qualifier=${buildVersionQualifier}" - } - } - exec { - workingDir("$rcaProjectDir") - if (buildVersionQualifier == null || buildVersionQualifier == '' || buildVersionQualifier == 'null') { - commandLine './gradlew', 'publishToMavenLocal', "-Dopensearch.version=${opensearch_version}", "-Dbuild.snapshot=${isSnapshot}" - } - else { - commandLine './gradlew', 'publishToMavenLocal', "-Dopensearch.version=${opensearch_version}", "-Dbuild.snapshot=${isSnapshot}", "-Dbuild.version_qualifier=${buildVersionQualifier}" - } - } - exec { - def licenseDir = "$projectDir/licenses" - workingDir("$licenseDir") - commandLine 'rm', "-f", "performanceanalyzer-rca-${version}.jar.sha1" - } - } -} - -buildRca.finalizedBy updateShas - -// This value is set by the unpackRca task -def rcaArtifactsDir - -task unpackRca(type: Copy) { - dependsOn(buildRca) - from(zipTree("$rcaProjectDir/build/distributions/performance-analyzer-rca-${version}.zip")) { - } - into "$rcaProjectDir/build/distributions" - rcaArtifactsDir = "$rcaProjectDir/build/distributions/performance-analyzer-rca/" - - doLast { - logger.info("Unpacked performance-analyzer-rca artifacts into ${rcaProjectDir}") - } -} tasks.withType(Test) { jvmArgs('--add-opens=java.base/sun.security.jca=ALL-UNNAMED') @@ -549,17 +470,6 @@ tasks.withType(Test) { bundlePlugin { - dependsOn 'unpackRca' - from("$rcaArtifactsDir/config") { - into "config" - } - from("$rcaArtifactsDir/bin") { - into "bin" - include "performance-analyzer-agent" - } - from("$rcaArtifactsDir") { - into "performance-analyzer-rca" - } from("packaging") { include "performance-analyzer-agent-cli" into "bin" @@ -572,23 +482,6 @@ bundlePlugin { } } -/** - * setupOpenSearchCluster spins up a local 2 node OpenSearch cluster using the enableRca task in the performance-analyzer-rca - * repo. The performance-analyzer-rca repo is cloned as part of the cloneRcaGitRepo task. - */ -task setupOpenSearchCluster() { - dependsOn(cloneRcaGitRepo) - onlyIf = { - propEnabled("tests.enableIT") - } - doLast { - exec { - workingDir(rcaProjectDir) - commandLine './gradlew', 'enableRca' - } - sleep(30000) - } -} /** * integTest is a task provided by the OpenSearch test framework, which allows us to spin up clients @@ -635,9 +528,9 @@ task integTest(type: RestIntegTestTask) { } tasks.named("check").configure { dependsOn(integTest) } -Zip bundle = (Zip) project.getTasks().getByName("bundlePlugin"); -integTest.dependsOn(bundle) -integTest.getClusters().forEach{c -> c.plugin(project.getObjects().fileProperty().value(bundle.getArchiveFile()))} +//Zip bundle = (Zip) project.getTasks().getByName("bundlePlugin"); +//integTest.dependsOn(bundle) +//integTest.getClusters().forEach{c -> c.plugin(project.getObjects().fileProperty().value(bundle.getArchiveFile()))} def opensearch_tmp_dir = rootProject.file('build/private/opensearch_tmp').absoluteFile opensearch_tmp_dir.mkdirs() @@ -694,17 +587,17 @@ List> plugins = [] // Ensure the artifact for the current project version is available to be used for the bwc tests task prepareBwcTests { - dependsOn bundle - doLast { - plugins = [ project.getObjects().fileProperty().value(bundle.getArchiveFile()) ] - } + //dependsOn bundle + //doLast { + // plugins = [ project.getObjects().fileProperty().value(bundle.getArchiveFile()) ] + // } } // Creates 2 test clusters with 3 nodes of the old version. 2.times {i -> task "${baseName}#oldVersionClusterTask$i"(type: StandaloneRestIntegTestTask) { - dependsOn 'prepareBwcTests' + //dependsOn 'prepareBwcTests' useCluster testClusters."${baseName}$i" filter { includeTestsMatching "org.opensearch.performanceanalyzer.bwc.*IT" @@ -817,7 +710,7 @@ run { cluster.waitForAllConditions() } } - useCluster testClusters.integTest + //useCluster testClusters.integTest } // This is afterEvaluate because the bundlePlugin ZIP task is updated afterEvaluate and changes the ZIP name to match the plugin name @@ -901,7 +794,6 @@ afterEvaluate { } } -bundlePlugin.mustRunAfter unpackRca // updateVersion: Task to auto increment to the next development iteration task updateVersion { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cbf..a4b76b95 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3499ded5..497ca8f3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-all.zip +validateDistributionUrl=true networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68d..caf35dbd 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -83,7 +83,9 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' diff --git a/licenses/bcpkix-jdk15to18-1.78.1.jar.sha1 b/licenses/bcpkix-jdk15to18-1.78.1.jar.sha1 deleted file mode 100644 index 3a1d2a1e..00000000 --- a/licenses/bcpkix-jdk15to18-1.78.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5884ee847542641d04abfbfdeca3446d0300670b diff --git a/licenses/bcpkix-jdk18on-1.78.jar.sha1 b/licenses/bcpkix-jdk18on-1.78.jar.sha1 new file mode 100644 index 00000000..385a9d93 --- /dev/null +++ b/licenses/bcpkix-jdk18on-1.78.jar.sha1 @@ -0,0 +1 @@ +dd61bcdb87678451dd42d42e267979bd4b4451a1 \ No newline at end of file diff --git a/licenses/bcprov-jdk15to18-1.78.1.jar.sha1 b/licenses/bcprov-jdk15to18-1.78.1.jar.sha1 deleted file mode 100644 index 393c2246..00000000 --- a/licenses/bcprov-jdk15to18-1.78.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -83bfa8229f7127d933161aefb281e54a9ffcf9f4 diff --git a/licenses/bcprov-jdk18on-1.78.jar.sha1 b/licenses/bcprov-jdk18on-1.78.jar.sha1 new file mode 100644 index 00000000..47fb5fd5 --- /dev/null +++ b/licenses/bcprov-jdk18on-1.78.jar.sha1 @@ -0,0 +1 @@ +619aafb92dc0b4c6cc4cf86c487ca48ee2d67a8e \ No newline at end of file diff --git a/licenses/bcprov-jdk15to18-LICENSE.txt b/licenses/bcprov-jdk18on-LICENSE.txt similarity index 100% rename from licenses/bcprov-jdk15to18-LICENSE.txt rename to licenses/bcprov-jdk18on-LICENSE.txt diff --git a/licenses/bcprov-jdk15to18-NOTICE.txt b/licenses/bcprov-jdk18on-NOTICE.txt similarity index 100% rename from licenses/bcprov-jdk15to18-NOTICE.txt rename to licenses/bcprov-jdk18on-NOTICE.txt diff --git a/src/main/java/org/opensearch/performanceanalyzer/OpenSearchResources.java b/src/main/java/org/opensearch/performanceanalyzer/OpenSearchResources.java index 0ddab1a6..2d0ade95 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/OpenSearchResources.java +++ b/src/main/java/org/opensearch/performanceanalyzer/OpenSearchResources.java @@ -5,7 +5,6 @@ package org.opensearch.performanceanalyzer; -import org.opensearch.client.Client; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.Settings; import org.opensearch.core.indices.breaker.CircuitBreakerService; @@ -13,6 +12,7 @@ import org.opensearch.indices.IndicesService; import org.opensearch.telemetry.metrics.MetricsRegistry; import org.opensearch.threadpool.ThreadPool; +import org.opensearch.transport.client.Client; public final class OpenSearchResources { public static final OpenSearchResources INSTANCE = new OpenSearchResources(); diff --git a/src/main/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerPlugin.java b/src/main/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerPlugin.java index 84a09648..705c6d1d 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerPlugin.java +++ b/src/main/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerPlugin.java @@ -20,7 +20,6 @@ import org.opensearch.SpecialPermission; import org.opensearch.action.ActionRequest; import org.opensearch.action.support.ActionFilter; -import org.opensearch.client.Client; import org.opensearch.cluster.metadata.IndexNameExpressionResolver; import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.service.ClusterService; @@ -105,6 +104,7 @@ import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.Transport; import org.opensearch.transport.TransportInterceptor; +import org.opensearch.transport.client.Client; import org.opensearch.watcher.ResourceWatcherService; public final class PerformanceAnalyzerPlugin extends Plugin diff --git a/src/main/java/org/opensearch/performanceanalyzer/collectors/ClusterManagerServiceEventMetrics.java b/src/main/java/org/opensearch/performanceanalyzer/collectors/ClusterManagerServiceEventMetrics.java index 5536a075..04bfbb82 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/collectors/ClusterManagerServiceEventMetrics.java +++ b/src/main/java/org/opensearch/performanceanalyzer/collectors/ClusterManagerServiceEventMetrics.java @@ -192,7 +192,7 @@ Field getClusterManagerServiceTPExecutorField() throws NoSuchFieldException { // Currently ClusterManagerService extends MasterService, remove getSuperClass(), // once MasterService contents are moved and class is removed. Field threadPoolExecutorField = - ClusterManagerService.class.getSuperclass().getDeclaredField("threadPoolExecutor"); + ClusterManagerService.class.getDeclaredField("threadPoolExecutor"); threadPoolExecutorField.setAccessible(true); return threadPoolExecutorField; } diff --git a/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigAction.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigAction.java index b1495134..8fb85d6f 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigAction.java +++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigAction.java @@ -13,7 +13,6 @@ import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.XContentHelper; import org.opensearch.common.xcontent.XContentType; @@ -27,6 +26,7 @@ import org.opensearch.rest.BytesRestResponse; import org.opensearch.rest.RestController; import org.opensearch.rest.RestRequest; +import org.opensearch.transport.client.node.NodeClient; /** * Rest request handler for handling cluster-wide enabling and disabling of performance analyzer diff --git a/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigAction.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigAction.java index b4a62f05..3e9fd6f3 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigAction.java +++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigAction.java @@ -13,7 +13,6 @@ import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.opensearch.client.node.NodeClient; import org.opensearch.common.inject.Inject; import org.opensearch.common.xcontent.XContentHelper; import org.opensearch.core.rest.RestStatus; @@ -24,6 +23,7 @@ import org.opensearch.rest.BytesRestResponse; import org.opensearch.rest.RestController; import org.opensearch.rest.RestRequest; +import org.opensearch.transport.client.node.NodeClient; @SuppressWarnings("deprecation") public class PerformanceAnalyzerConfigAction extends BaseRestHandler { diff --git a/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigAction.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigAction.java index f13161ab..2e1fa556 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigAction.java +++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigAction.java @@ -13,7 +13,6 @@ import java.util.List; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.XContentHelper; import org.opensearch.common.xcontent.XContentType; @@ -27,6 +26,7 @@ import org.opensearch.rest.BytesRestResponse; import org.opensearch.rest.RestController; import org.opensearch.rest.RestRequest; +import org.opensearch.transport.client.node.NodeClient; /** Rest request handler for handling config overrides for various performance analyzer features. */ public class PerformanceAnalyzerOverridesClusterConfigAction extends BaseRestHandler { diff --git a/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProvider.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProvider.java index 7fced2b6..b71bb090 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProvider.java +++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerResourceProvider.java @@ -26,7 +26,6 @@ import javax.net.ssl.X509TrustManager; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.opensearch.client.node.NodeClient; import org.opensearch.common.inject.Inject; import org.opensearch.common.settings.Settings; import org.opensearch.core.rest.RestStatus; @@ -37,6 +36,7 @@ import org.opensearch.rest.RestRequest; import org.opensearch.rest.RestRequest.Method; import org.opensearch.rest.RestResponse; +import org.opensearch.transport.client.node.NodeClient; public class PerformanceAnalyzerResourceProvider extends BaseRestHandler { private static final Logger LOG = diff --git a/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequestBuilder.java b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequestBuilder.java index a495313a..ed1bd7ef 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequestBuilder.java +++ b/src/main/java/org/opensearch/performanceanalyzer/http_action/whoami/WhoAmIRequestBuilder.java @@ -6,8 +6,8 @@ package org.opensearch.performanceanalyzer.http_action.whoami; import org.opensearch.action.ActionRequestBuilder; -import org.opensearch.client.ClusterAdminClient; -import org.opensearch.client.OpenSearchClient; +import org.opensearch.transport.client.ClusterAdminClient; +import org.opensearch.transport.client.OpenSearchClient; public class WhoAmIRequestBuilder extends ActionRequestBuilder { public WhoAmIRequestBuilder(final ClusterAdminClient client) { diff --git a/src/main/java/org/opensearch/performanceanalyzer/util/Utils.java b/src/main/java/org/opensearch/performanceanalyzer/util/Utils.java index fd788b80..26620455 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/util/Utils.java +++ b/src/main/java/org/opensearch/performanceanalyzer/util/Utils.java @@ -90,6 +90,7 @@ public static IndexShardStats indexShardStats( indicesService.getIndicesQueryCache(), indexShard, flags), null, null, + null, null) }); } diff --git a/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerPluginTests.java b/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerPluginTests.java index 074267fb..3f095721 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerPluginTests.java +++ b/src/test/java/org/opensearch/performanceanalyzer/PerformanceAnalyzerPluginTests.java @@ -21,7 +21,6 @@ import org.junit.Test; import org.opensearch.action.ActionRequest; import org.opensearch.action.support.ActionFilter; -import org.opensearch.client.node.NodeClient; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Setting; @@ -50,6 +49,7 @@ import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.Transport; import org.opensearch.transport.TransportInterceptor; +import org.opensearch.transport.client.node.NodeClient; import org.opensearch.usage.UsageService; @ThreadLeakScope(Scope.NONE) diff --git a/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigActionTests.java b/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigActionTests.java index 89ae282a..4e66f063 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigActionTests.java +++ b/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerClusterConfigActionTests.java @@ -16,7 +16,6 @@ import org.junit.Before; import org.junit.Test; import org.mockito.Mock; -import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; @@ -40,6 +39,7 @@ import org.opensearch.test.rest.FakeRestRequest; import org.opensearch.threadpool.TestThreadPool; import org.opensearch.threadpool.ThreadPool; +import org.opensearch.transport.client.node.NodeClient; import org.opensearch.usage.UsageService; public class PerformanceAnalyzerClusterConfigActionTests { diff --git a/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigActionTests.java b/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigActionTests.java index 77ff05a9..3f090e05 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigActionTests.java +++ b/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigActionTests.java @@ -17,7 +17,6 @@ import org.junit.Test; import org.mockito.Mock; import org.mockito.Mockito; -import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; @@ -37,6 +36,7 @@ import org.opensearch.test.rest.FakeRestRequest; import org.opensearch.threadpool.TestThreadPool; import org.opensearch.threadpool.ThreadPool; +import org.opensearch.transport.client.node.NodeClient; import org.opensearch.usage.UsageService; public class PerformanceAnalyzerConfigActionTests { diff --git a/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigActionTests.java b/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigActionTests.java index e5e43658..9d07ce6c 100644 --- a/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigActionTests.java +++ b/src/test/java/org/opensearch/performanceanalyzer/http_action/config/PerformanceAnalyzerOverridesClusterConfigActionTests.java @@ -17,7 +17,6 @@ import org.junit.Before; import org.junit.Test; import org.mockito.Mock; -import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; @@ -37,6 +36,7 @@ import org.opensearch.test.rest.FakeRestRequest; import org.opensearch.threadpool.TestThreadPool; import org.opensearch.threadpool.ThreadPool; +import org.opensearch.transport.client.node.NodeClient; import org.opensearch.usage.UsageService; public class PerformanceAnalyzerOverridesClusterConfigActionTests {