diff --git a/.github/workflows/multi-node-test-workflow.yml b/.github/workflows/multi-node-test-workflow.yml index 14e1ec3df..68ab5e83a 100644 --- a/.github/workflows/multi-node-test-workflow.yml +++ b/.github/workflows/multi-node-test-workflow.yml @@ -19,10 +19,14 @@ jobs: strategy: matrix: java: [ 21, 23 ] + os: + - ubuntu-24.04-arm # arm64-preview + - ubuntu-24.04 # x64 + # Job name - name: Build and test Alerting + name: Build and test Alerting with JDK ${{ matrix.java }} on ${{ matrix.os }} # This job runs on Linux - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} container: # using the same image which is used by opensearch-build team to build the OpenSearch Distribution # this image tag is subject to change as more dependencies and updates will arrive over time @@ -33,11 +37,14 @@ jobs: steps: - name: Run start commands run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }} + # This step uses the setup-java Github action: https://github.com/actions/setup-java - name: Set Up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: temurin # Temurin is a distribution of adoptium java-version: ${{ matrix.java }} + # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch uses: actions/checkout@v4 diff --git a/.github/workflows/test-workflow.yml b/.github/workflows/test-workflow.yml index 171ca88c3..c19437ac0 100644 --- a/.github/workflows/test-workflow.yml +++ b/.github/workflows/test-workflow.yml @@ -16,16 +16,19 @@ jobs: build-linux: needs: Get-CI-Image-Tag - env: - BUILD_ARGS: ${{ matrix.os_build_args }} - WORKING_DIR: ${{ matrix.working_directory }}. strategy: + # This setting says that all jobs should finish, even if one fails + fail-fast: false matrix: - java: [21, 23] + java: [ 21, 23 ] + os: + - ubuntu-24.04-arm # arm64-preview + - ubuntu-24.04 # x64 + # Job name - name: Build Alerting with JDK ${{ matrix.java }} on Linux + name: Build Alerting with JDK ${{ matrix.java }} on ${{ matrix.os }} # This job runs on Linux - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} container: # using the same image which is used by opensearch-build team to build the OpenSearch Distribution # this image tag is subject to change as more dependencies and updates will arrive over time @@ -36,27 +39,34 @@ jobs: steps: - name: Run start commands run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }} + # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch uses: actions/checkout@v4 + # This step uses the setup-java Github action: https://github.com/actions/setup-java - name: Set Up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: temurin # Temurin is a distribution of adoptium java-version: ${{ matrix.java }} + - name: Build and run with Gradle run: | chown -R 1000:1000 `pwd` su `id -un 1000` -c "whoami && java -version && ./gradlew assemble integTest" + - name: Create Artifact Path run: | mkdir -p alerting-artifacts cp ./alerting/build/distributions/*.zip alerting-artifacts + # This step uses the codecov-action Github action: https://github.com/codecov/codecov-action - name: Upload Coverage Report uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} + # This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact - name: Upload Artifacts uses: actions/upload-artifact@v4 @@ -79,6 +89,7 @@ jobs: os_build_args: -x integTest working_directory: X:\ os_java_options: -Xmx4096M + # Job name name: Build Alerting with JDK ${{ matrix.java }} on ${{ matrix.os }} # This job runs on Linux @@ -87,25 +98,31 @@ jobs: # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch uses: actions/checkout@v4 + # This is a hack, but this step creates a link to the X: mounted drive, which makes the path # short enough to work on Windows - name: Shorten Path if: ${{ matrix.os == 'windows-latest' }} run: subst 'X:' . + # This step uses the setup-java Github action: https://github.com/actions/setup-java - name: Set Up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: temurin # Temurin is a distribution of adoptium java-version: ${{ matrix.java }} + - name: Build and run with Gradle working-directory: ${{ env.WORKING_DIR }} run: ./gradlew assemble ${{ env.BUILD_ARGS }} env: _JAVA_OPTIONS: ${{ matrix.os_java_options }} + - name: Create Artifact Path run: | mkdir -p alerting-artifacts cp ./alerting/build/distributions/*.zip alerting-artifacts + # This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact - name: Upload Artifacts uses: actions/upload-artifact@v4 diff --git a/alerting/build.gradle b/alerting/build.gradle index bdf842123..77264c1b5 100644 --- a/alerting/build.gradle +++ b/alerting/build.gradle @@ -3,7 +3,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin import java.util.concurrent.Callable import org.opensearch.gradle.test.RestIntegTestTask import org.opensearch.gradle.testclusters.StandaloneRestIntegTestTask diff --git a/alerting/src/main/java/org/opensearch/percolator/PercolatorFieldMapperExt.java b/alerting/src/main/java/org/opensearch/percolator/PercolatorFieldMapperExt.java index 8ed81e12b..ac5a452e7 100644 --- a/alerting/src/main/java/org/opensearch/percolator/PercolatorFieldMapperExt.java +++ b/alerting/src/main/java/org/opensearch/percolator/PercolatorFieldMapperExt.java @@ -31,7 +31,6 @@ package org.opensearch.percolator; -import org.apache.lucene.document.BinaryRange; import org.apache.lucene.document.Field; import org.apache.lucene.document.FieldType; import org.apache.lucene.document.NumericDocValuesField; @@ -293,7 +292,7 @@ Tuple createCandidateQuery(IndexReader indexReader, Versi List extractedTerms = t.v1(); Map> encodedPointValuesByField = t.v2(); // `1 + ` is needed to take into account the EXTRACTION_FAILED should clause - boolean canUseMinimumShouldMatchField = 1 + extractedTerms.size() + encodedPointValuesByField.size() <= BooleanQuery + boolean canUseMinimumShouldMatchField = 1 + extractedTerms.size() + encodedPointValuesByField.size() <= IndexSearcher .getMaxClauseCount(); List subQueries = new ArrayList<>(); diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/AlertService.kt b/alerting/src/main/kotlin/org/opensearch/alerting/AlertService.kt index 84eb5aae5..2e013740a 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/AlertService.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/AlertService.kt @@ -28,7 +28,6 @@ import org.opensearch.alerting.util.CommentsUtils import org.opensearch.alerting.util.IndexUtils import org.opensearch.alerting.util.MAX_SEARCH_SIZE import org.opensearch.alerting.util.getBucketKeysHash -import org.opensearch.client.Client import org.opensearch.common.unit.TimeValue import org.opensearch.common.xcontent.LoggingDeprecationHandler import org.opensearch.common.xcontent.XContentFactory @@ -63,6 +62,7 @@ import org.opensearch.index.reindex.DeleteByQueryAction import org.opensearch.index.reindex.DeleteByQueryRequestBuilder import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.search.sort.SortOrder +import org.opensearch.transport.client.Client import java.time.Instant import java.util.UUID import java.util.concurrent.TimeUnit diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/AlertingPlugin.kt b/alerting/src/main/kotlin/org/opensearch/alerting/AlertingPlugin.kt index 1f8a4d514..23d03f08e 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/AlertingPlugin.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/AlertingPlugin.kt @@ -85,7 +85,6 @@ import org.opensearch.alerting.transport.TransportSearchEmailGroupAction import org.opensearch.alerting.transport.TransportSearchMonitorAction import org.opensearch.alerting.util.DocLevelMonitorQueries import org.opensearch.alerting.util.destinationmigration.DestinationMigrationCoordinator -import org.opensearch.client.Client import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.node.DiscoveryNodes import org.opensearch.cluster.service.ClusterService @@ -135,6 +134,7 @@ import org.opensearch.rest.RestHandler import org.opensearch.script.ScriptContext import org.opensearch.script.ScriptService import org.opensearch.threadpool.ThreadPool +import org.opensearch.transport.client.Client import org.opensearch.watcher.ResourceWatcherService import java.util.function.Supplier diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/BucketLevelMonitorRunner.kt b/alerting/src/main/kotlin/org/opensearch/alerting/BucketLevelMonitorRunner.kt index cc9e6508c..fea37e0af 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/BucketLevelMonitorRunner.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/BucketLevelMonitorRunner.kt @@ -27,7 +27,6 @@ import org.opensearch.alerting.util.getBucketKeysHash import org.opensearch.alerting.util.getCancelAfterTimeInterval import org.opensearch.alerting.util.getCombinedTriggerRunResult import org.opensearch.alerting.util.printsSampleDocData -import org.opensearch.client.Client import org.opensearch.common.unit.TimeValue import org.opensearch.common.xcontent.LoggingDeprecationHandler import org.opensearch.common.xcontent.XContentType @@ -60,6 +59,7 @@ import org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.search.sort.SortOrder import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client import java.time.Instant import java.util.UUID diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/InputService.kt b/alerting/src/main/kotlin/org/opensearch/alerting/InputService.kt index c7eeac833..c77878bd4 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/InputService.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/InputService.kt @@ -21,7 +21,6 @@ import org.opensearch.alerting.util.clusterMetricsMonitorHelpers.executeTranspor import org.opensearch.alerting.util.clusterMetricsMonitorHelpers.toMap import org.opensearch.alerting.util.getRoleFilterEnabled import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.routing.Preference import org.opensearch.cluster.service.ClusterService @@ -49,6 +48,7 @@ import org.opensearch.script.ScriptService import org.opensearch.script.ScriptType import org.opensearch.script.TemplateScript import org.opensearch.search.builder.SearchSourceBuilder +import org.opensearch.transport.client.Client import java.time.Duration import java.time.Instant diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorMetadataService.kt b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorMetadataService.kt index b3826479a..abd2bc1c2 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorMetadataService.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorMetadataService.kt @@ -28,7 +28,6 @@ import org.opensearch.action.support.WriteRequest import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.IndexUtils -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.settings.Settings import org.opensearch.common.unit.TimeValue @@ -49,6 +48,7 @@ import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.index.seqno.SequenceNumbers import org.opensearch.transport.RemoteTransportException +import org.opensearch.transport.client.Client private val log = LogManager.getLogger(MonitorMetadataService::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunner.kt b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunner.kt index ec599aba8..4e6cdbc02 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunner.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunner.kt @@ -23,7 +23,6 @@ import org.opensearch.alerting.util.destinationmigration.sendNotification import org.opensearch.alerting.util.isAllowed import org.opensearch.alerting.util.isTestAction import org.opensearch.alerting.util.use -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.model.ActionRunResult import org.opensearch.commons.alerting.model.Monitor import org.opensearch.commons.alerting.model.MonitorRunResult @@ -33,6 +32,7 @@ import org.opensearch.commons.alerting.model.action.Action import org.opensearch.commons.notifications.model.NotificationConfigInfo import org.opensearch.core.common.Strings import org.opensearch.transport.TransportService +import org.opensearch.transport.client.node.NodeClient import java.time.Instant abstract class MonitorRunner { diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunnerExecutionContext.kt b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunnerExecutionContext.kt index 523c2be3a..c3f1f28c7 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunnerExecutionContext.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunnerExecutionContext.kt @@ -14,7 +14,6 @@ import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.settings.DestinationSettings import org.opensearch.alerting.settings.LegacyOpenDistroDestinationSettings import org.opensearch.alerting.util.DocLevelMonitorQueries -import org.opensearch.client.Client import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.service.ClusterService import org.opensearch.common.settings.Settings @@ -24,6 +23,7 @@ import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.monitor.jvm.JvmStats import org.opensearch.script.ScriptService import org.opensearch.threadpool.ThreadPool +import org.opensearch.transport.client.Client data class MonitorRunnerExecutionContext( diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunnerService.kt b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunnerService.kt index ec8d57736..152db1a8d 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunnerService.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunnerService.kt @@ -14,7 +14,7 @@ import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchStatusException import org.opensearch.action.bulk.BackoffPolicy import org.opensearch.action.search.TransportSearchAction.SEARCH_CANCEL_AFTER_TIME_INTERVAL_SETTING -import org.opensearch.action.support.master.AcknowledgedResponse +import org.opensearch.action.support.clustermanager.AcknowledgedResponse import org.opensearch.alerting.action.ExecuteMonitorAction import org.opensearch.alerting.action.ExecuteMonitorRequest import org.opensearch.alerting.action.ExecuteMonitorResponse @@ -52,7 +52,6 @@ import org.opensearch.alerting.util.DocLevelMonitorQueries import org.opensearch.alerting.util.IndexUtils import org.opensearch.alerting.util.isDocLevelMonitor import org.opensearch.alerting.workflow.CompositeWorkflowRunner -import org.opensearch.client.Client import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.service.ClusterService import org.opensearch.common.lifecycle.AbstractLifecycleComponent @@ -77,6 +76,7 @@ import org.opensearch.script.ScriptService import org.opensearch.script.TemplateScript import org.opensearch.threadpool.ThreadPool import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client import java.time.Instant import java.time.LocalDateTime import java.time.ZoneOffset diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/WorkflowMetadataService.kt b/alerting/src/main/kotlin/org/opensearch/alerting/WorkflowMetadataService.kt index f56dd5fd7..6b35fd917 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/WorkflowMetadataService.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/WorkflowMetadataService.kt @@ -20,7 +20,6 @@ import org.opensearch.action.index.IndexResponse import org.opensearch.action.support.WriteRequest import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.settings.AlertingSettings -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.settings.Settings import org.opensearch.common.unit.TimeValue @@ -38,6 +37,7 @@ import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParserUtils +import org.opensearch.transport.client.Client import java.time.Instant import java.time.LocalDateTime import java.time.ZoneOffset diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/WorkflowService.kt b/alerting/src/main/kotlin/org/opensearch/alerting/WorkflowService.kt index 1379a1fe3..15f1e192e 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/WorkflowService.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/WorkflowService.kt @@ -12,7 +12,6 @@ import org.opensearch.action.admin.indices.exists.indices.IndicesExistsResponse import org.opensearch.action.search.SearchRequest import org.opensearch.action.search.SearchResponse import org.opensearch.alerting.opensearchapi.suspendUntil -import org.opensearch.client.Client import org.opensearch.common.xcontent.LoggingDeprecationHandler import org.opensearch.common.xcontent.XContentType import org.opensearch.commons.alerting.model.Finding @@ -24,6 +23,7 @@ import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.index.query.QueryBuilders import org.opensearch.search.builder.SearchSourceBuilder +import org.opensearch.transport.client.Client private val log = LogManager.getLogger(WorkflowService::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertIndices.kt b/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertIndices.kt index 64c62f926..11671ce5b 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertIndices.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertIndices.kt @@ -25,7 +25,7 @@ import org.opensearch.action.admin.indices.rollover.RolloverResponse import org.opensearch.action.search.SearchRequest import org.opensearch.action.search.SearchResponse import org.opensearch.action.support.IndicesOptions -import org.opensearch.action.support.master.AcknowledgedResponse +import org.opensearch.action.support.clustermanager.AcknowledgedResponse import org.opensearch.alerting.alerts.AlertIndices.Companion.ALERT_HISTORY_WRITE_INDEX import org.opensearch.alerting.alerts.AlertIndices.Companion.ALERT_INDEX import org.opensearch.alerting.opensearchapi.suspendUntil @@ -43,7 +43,6 @@ import org.opensearch.alerting.settings.AlertingSettings.Companion.FINDING_HISTO import org.opensearch.alerting.settings.AlertingSettings.Companion.REQUEST_TIMEOUT import org.opensearch.alerting.util.CommentsUtils import org.opensearch.alerting.util.IndexUtils -import org.opensearch.client.Client import org.opensearch.cluster.ClusterChangedEvent import org.opensearch.cluster.ClusterStateListener import org.opensearch.cluster.metadata.IndexMetadata @@ -64,6 +63,7 @@ import org.opensearch.index.query.QueryBuilders import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.threadpool.Scheduler.Cancellable import org.opensearch.threadpool.ThreadPool +import org.opensearch.transport.client.Client import java.time.Instant private val scope: CoroutineScope = CoroutineScope(Dispatchers.IO) @@ -189,7 +189,7 @@ class AlertIndices( private var scheduledFindingRollover: Cancellable? = null - fun onMaster() { + fun onClusterManager() { try { // try to rollover immediately as we might be restarting the cluster rolloverAlertHistoryIndex() @@ -203,13 +203,13 @@ class AlertIndices( // This should be run on cluster startup logger.error( "Error creating alert/finding indices. " + - "Alerts/Findings can't be recorded until master node is restarted.", + "Alerts/Findings can't be recorded until clustermanager node is restarted.", e ) } } - fun offMaster() { + fun offClusterManager() { scheduledAlertRollover?.cancel() scheduledFindingRollover?.cancel() } @@ -219,15 +219,15 @@ class AlertIndices( } override fun clusterChanged(event: ClusterChangedEvent) { - // Instead of using a LocalNodeClusterManagerListener to track master changes, this service will - // track them here to avoid conditions where master listener events run after other - // listeners that depend on what happened in the master listener + // Instead of using a LocalNodeClusterManagerListener to track clustermanager changes, this service will + // track them here to avoid conditions where clustermanager listener events run after other + // listeners that depend on what happened in the clustermanager listener if (this.isClusterManager != event.localNodeClusterManager()) { this.isClusterManager = event.localNodeClusterManager() if (this.isClusterManager) { - onMaster() + onClusterManager() } else { - offMaster() + offClusterManager() } } @@ -238,7 +238,7 @@ class AlertIndices( } private fun rescheduleAlertRollover() { - if (clusterService.state().nodes.isLocalNodeElectedMaster) { + if (clusterService.state().nodes.isLocalNodeElectedClusterManager) { scheduledAlertRollover?.cancel() scheduledAlertRollover = threadPool .scheduleWithFixedDelay({ rolloverAndDeleteAlertHistoryIndices() }, alertHistoryRolloverPeriod, executorName()) @@ -246,7 +246,7 @@ class AlertIndices( } private fun rescheduleFindingRollover() { - if (clusterService.state().nodes.isLocalNodeElectedMaster) { + if (clusterService.state().nodes.isLocalNodeElectedClusterManager) { scheduledFindingRollover?.cancel() scheduledFindingRollover = threadPool .scheduleWithFixedDelay({ rolloverAndDeleteFindingHistoryIndices() }, findingHistoryRolloverPeriod, executorName()) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertMover.kt b/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertMover.kt index 07b1a3a91..08d1e884f 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertMover.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/alerts/AlertMover.kt @@ -19,7 +19,6 @@ import org.opensearch.alerting.alerts.AlertIndices.Companion.ALERT_HISTORY_WRITE import org.opensearch.alerting.alerts.AlertIndices.Companion.ALERT_INDEX import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.util.ScheduledJobUtils -import org.opensearch.client.Client import org.opensearch.common.xcontent.LoggingDeprecationHandler import org.opensearch.common.xcontent.XContentFactory import org.opensearch.common.xcontent.XContentHelper @@ -38,6 +37,7 @@ import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.index.VersionType import org.opensearch.index.query.QueryBuilders import org.opensearch.search.builder.SearchSourceBuilder +import org.opensearch.transport.client.Client private val log = LogManager.getLogger(AlertMover::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/comments/CommentsIndices.kt b/alerting/src/main/kotlin/org/opensearch/alerting/comments/CommentsIndices.kt index 6bbeee933..d12e45639 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/comments/CommentsIndices.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/comments/CommentsIndices.kt @@ -20,12 +20,11 @@ import org.opensearch.action.admin.indices.mapping.put.PutMappingRequest import org.opensearch.action.admin.indices.rollover.RolloverRequest import org.opensearch.action.admin.indices.rollover.RolloverResponse import org.opensearch.action.support.IndicesOptions -import org.opensearch.action.support.master.AcknowledgedResponse +import org.opensearch.action.support.clustermanager.AcknowledgedResponse import org.opensearch.alerting.alerts.AlertIndices import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.IndexUtils -import org.opensearch.client.Client import org.opensearch.cluster.ClusterChangedEvent import org.opensearch.cluster.ClusterStateListener import org.opensearch.cluster.metadata.IndexMetadata @@ -36,6 +35,7 @@ import org.opensearch.common.xcontent.XContentType import org.opensearch.core.action.ActionListener import org.opensearch.threadpool.Scheduler import org.opensearch.threadpool.ThreadPool +import org.opensearch.transport.client.Client import java.time.Instant /** @@ -117,7 +117,7 @@ class CommentsIndices( } catch (e: Exception) { // This should be run on cluster startup logger.error( - "Error creating comments indices. Comments can't be recorded until master node is restarted.", + "Error creating comments indices. Comments can't be recorded until clustermanager node is restarted.", e ) } @@ -132,9 +132,9 @@ class CommentsIndices( } override fun clusterChanged(event: ClusterChangedEvent) { - // Instead of using a LocalNodeClusterManagerListener to track master changes, this service will - // track them here to avoid conditions where master listener events run after other - // listeners that depend on what happened in the master listener + // Instead of using a LocalNodeClusterManagerListener to track clustermanager changes, this service will + // track them here to avoid conditions where clustermanager listener events run after other + // listeners that depend on what happened in the clustermanager listener if (this.isClusterManager != event.localNodeClusterManager()) { this.isClusterManager = event.localNodeClusterManager() if (this.isClusterManager) { @@ -149,7 +149,7 @@ class CommentsIndices( } private fun rescheduleCommentsRollover() { - if (clusterService.state().nodes.isLocalNodeElectedMaster) { + if (clusterService.state().nodes.isLocalNodeElectedClusterManager) { scheduledCommentsRollover?.cancel() scheduledCommentsRollover = threadPool .scheduleWithFixedDelay({ rolloverAndDeleteCommentsHistoryIndices() }, commentsHistoryRolloverPeriod, executorName()) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/model/AlertingConfigAccessor.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/AlertingConfigAccessor.kt index 2e2b24b19..89430b9d1 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/model/AlertingConfigAccessor.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/AlertingConfigAccessor.kt @@ -12,13 +12,13 @@ import org.opensearch.action.get.GetResponse import org.opensearch.alerting.model.destination.email.EmailAccount import org.opensearch.alerting.model.destination.email.EmailGroup import org.opensearch.alerting.opensearchapi.suspendUntil -import org.opensearch.client.Client import org.opensearch.common.xcontent.LoggingDeprecationHandler import org.opensearch.common.xcontent.XContentHelper import org.opensearch.common.xcontent.XContentType import org.opensearch.commons.alerting.model.ScheduledJob import org.opensearch.core.common.bytes.BytesReference import org.opensearch.core.xcontent.NamedXContentRegistry +import org.opensearch.transport.client.Client /** * This is an accessor class to retrieve documents/information from the Alerting config index. diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/DestinationContextFactory.kt b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/DestinationContextFactory.kt index 263962ac7..b72711606 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/DestinationContextFactory.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/model/destination/DestinationContextFactory.kt @@ -11,9 +11,9 @@ import org.opensearch.alerting.model.destination.email.EmailAccount import org.opensearch.alerting.model.destination.email.Recipient import org.opensearch.alerting.settings.DestinationSettings.Companion.SecureDestinationSettings import org.opensearch.alerting.util.DestinationType -import org.opensearch.client.Client import org.opensearch.core.common.settings.SecureString import org.opensearch.core.xcontent.NamedXContentRegistry +import org.opensearch.transport.client.Client /** * This class is responsible for generating [DestinationContext]. diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/AsyncActionHandler.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/AsyncActionHandler.kt index ae837d8d9..8f14b0c69 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/AsyncActionHandler.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/AsyncActionHandler.kt @@ -5,9 +5,9 @@ package org.opensearch.alerting.resthandler -import org.opensearch.client.node.NodeClient import org.opensearch.rest.BytesRestResponse import org.opensearch.rest.RestChannel +import org.opensearch.transport.client.node.NodeClient abstract class AsyncActionHandler(protected val client: NodeClient, protected val channel: RestChannel) { diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestAcknowledgeAlertAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestAcknowledgeAlertAction.kt index f953876a4..1b2ee4521 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestAcknowledgeAlertAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestAcknowledgeAlertAction.kt @@ -10,7 +10,6 @@ import org.apache.logging.log4j.Logger import org.opensearch.action.support.WriteRequest.RefreshPolicy import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.util.REFRESH -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.action.AcknowledgeAlertRequest import org.opensearch.commons.alerting.action.AlertingActions import org.opensearch.core.xcontent.XContentParser @@ -22,6 +21,7 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.POST import org.opensearch.rest.action.RestToXContentListener +import org.opensearch.transport.client.node.NodeClient import java.io.IOException private val log: Logger = LogManager.getLogger(RestAcknowledgeAlertAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestAcknowledgeChainedAlertsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestAcknowledgeChainedAlertsAction.kt index 968856a48..34b663cf4 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestAcknowledgeChainedAlertsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestAcknowledgeChainedAlertsAction.kt @@ -8,7 +8,6 @@ package org.opensearch.alerting.resthandler import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger import org.opensearch.alerting.AlertingPlugin -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.action.AcknowledgeChainedAlertRequest import org.opensearch.commons.alerting.action.AlertingActions import org.opensearch.core.xcontent.XContentParser @@ -19,6 +18,7 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.POST import org.opensearch.rest.action.RestToXContentListener +import org.opensearch.transport.client.node.NodeClient import java.io.IOException private val log: Logger = LogManager.getLogger(RestAcknowledgeAlertAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteAlertingCommentAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteAlertingCommentAction.kt index 024b79970..0c5f956db 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteAlertingCommentAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteAlertingCommentAction.kt @@ -8,13 +8,13 @@ package org.opensearch.alerting.resthandler import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger import org.opensearch.alerting.AlertingPlugin -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.action.AlertingActions import org.opensearch.commons.alerting.action.DeleteCommentRequest import org.opensearch.rest.BaseRestHandler import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.action.RestToXContentListener +import org.opensearch.transport.client.node.NodeClient import java.io.IOException private val log: Logger = LogManager.getLogger(RestDeleteMonitorAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteMonitorAction.kt index bf6e63f68..bebad4bd1 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteMonitorAction.kt @@ -9,7 +9,6 @@ import org.apache.logging.log4j.Logger import org.opensearch.action.support.WriteRequest.RefreshPolicy import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.util.REFRESH -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.action.AlertingActions import org.opensearch.commons.alerting.action.DeleteMonitorRequest import org.opensearch.rest.BaseRestHandler @@ -19,6 +18,7 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.DELETE import org.opensearch.rest.action.RestToXContentListener +import org.opensearch.transport.client.node.NodeClient import java.io.IOException private val log: Logger = LogManager.getLogger(RestDeleteMonitorAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteWorkflowAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteWorkflowAction.kt index a61a9b51c..db64181ef 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteWorkflowAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestDeleteWorkflowAction.kt @@ -9,13 +9,13 @@ import org.apache.logging.log4j.LogManager import org.opensearch.action.support.WriteRequest import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.util.REFRESH -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.action.AlertingActions import org.opensearch.commons.alerting.action.DeleteWorkflowRequest import org.opensearch.rest.BaseRestHandler import org.opensearch.rest.RestHandler import org.opensearch.rest.RestRequest import org.opensearch.rest.action.RestToXContentListener +import org.opensearch.transport.client.node.NodeClient import java.io.IOException /** diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestExecuteMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestExecuteMonitorAction.kt index 86e93bd65..4dd4f588b 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestExecuteMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestExecuteMonitorAction.kt @@ -9,7 +9,6 @@ import org.apache.logging.log4j.LogManager import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.action.ExecuteMonitorAction import org.opensearch.alerting.action.ExecuteMonitorRequest -import org.opensearch.client.node.NodeClient import org.opensearch.common.unit.TimeValue import org.opensearch.commons.alerting.model.Monitor import org.opensearch.commons.alerting.util.AlertingException @@ -22,6 +21,7 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.POST import org.opensearch.rest.action.RestToXContentListener +import org.opensearch.transport.client.node.NodeClient import java.time.Instant private val log = LogManager.getLogger(RestExecuteMonitorAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestExecuteWorkflowAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestExecuteWorkflowAction.kt index de8da1bac..096f03010 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestExecuteWorkflowAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestExecuteWorkflowAction.kt @@ -9,7 +9,6 @@ import org.apache.logging.log4j.LogManager import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.action.ExecuteWorkflowAction import org.opensearch.alerting.action.ExecuteWorkflowRequest -import org.opensearch.client.node.NodeClient import org.opensearch.common.unit.TimeValue import org.opensearch.commons.alerting.model.Workflow import org.opensearch.core.xcontent.XContentParser @@ -18,6 +17,7 @@ import org.opensearch.rest.BaseRestHandler import org.opensearch.rest.RestHandler import org.opensearch.rest.RestRequest import org.opensearch.rest.action.RestToXContentListener +import org.opensearch.transport.client.node.NodeClient import java.time.Instant private val log = LogManager.getLogger(RestExecuteWorkflowAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetAlertsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetAlertsAction.kt index aabcf8d6c..d147aa299 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetAlertsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetAlertsAction.kt @@ -7,7 +7,6 @@ package org.opensearch.alerting.resthandler import org.apache.logging.log4j.LogManager import org.opensearch.alerting.AlertingPlugin -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.action.AlertingActions import org.opensearch.commons.alerting.action.GetAlertsRequest import org.opensearch.commons.alerting.model.Table @@ -18,6 +17,7 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET import org.opensearch.rest.action.RestToXContentListener +import org.opensearch.transport.client.node.NodeClient /** * This class consists of the REST handler to retrieve alerts . diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetDestinationsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetDestinationsAction.kt index 7e5e1530f..2323aa80f 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetDestinationsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetDestinationsAction.kt @@ -10,7 +10,6 @@ import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.action.GetDestinationsAction import org.opensearch.alerting.action.GetDestinationsRequest import org.opensearch.alerting.util.context -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.model.Table import org.opensearch.rest.BaseRestHandler import org.opensearch.rest.BaseRestHandler.RestChannelConsumer @@ -20,6 +19,7 @@ import org.opensearch.rest.RestRequest import org.opensearch.rest.action.RestActions import org.opensearch.rest.action.RestToXContentListener import org.opensearch.search.fetch.subphase.FetchSourceContext +import org.opensearch.transport.client.node.NodeClient /** * This class consists of the REST handler to retrieve destinations . diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetEmailAccountAction.kt index ba5dbdb8a..0190cc490 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetEmailAccountAction.kt @@ -9,7 +9,6 @@ import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.action.GetEmailAccountAction import org.opensearch.alerting.action.GetEmailAccountRequest import org.opensearch.alerting.util.context -import org.opensearch.client.node.NodeClient import org.opensearch.rest.BaseRestHandler import org.opensearch.rest.RestHandler.ReplacedRoute import org.opensearch.rest.RestHandler.Route @@ -17,6 +16,7 @@ import org.opensearch.rest.RestRequest import org.opensearch.rest.action.RestActions import org.opensearch.rest.action.RestToXContentListener import org.opensearch.search.fetch.subphase.FetchSourceContext +import org.opensearch.transport.client.node.NodeClient import java.lang.IllegalArgumentException /** diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetEmailGroupAction.kt index 7fe37c17c..8b654bdb7 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetEmailGroupAction.kt @@ -9,7 +9,6 @@ import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.action.GetEmailGroupAction import org.opensearch.alerting.action.GetEmailGroupRequest import org.opensearch.alerting.util.context -import org.opensearch.client.node.NodeClient import org.opensearch.rest.BaseRestHandler import org.opensearch.rest.RestHandler.ReplacedRoute import org.opensearch.rest.RestHandler.Route @@ -17,6 +16,7 @@ import org.opensearch.rest.RestRequest import org.opensearch.rest.action.RestActions import org.opensearch.rest.action.RestToXContentListener import org.opensearch.search.fetch.subphase.FetchSourceContext +import org.opensearch.transport.client.node.NodeClient import java.lang.IllegalArgumentException /** diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetFindingsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetFindingsAction.kt index 75607a701..ebcb447c3 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetFindingsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetFindingsAction.kt @@ -7,7 +7,6 @@ package org.opensearch.alerting.resthandler import org.apache.logging.log4j.LogManager import org.opensearch.alerting.AlertingPlugin -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.action.AlertingActions import org.opensearch.commons.alerting.action.GetFindingsRequest import org.opensearch.commons.alerting.model.Table @@ -17,6 +16,7 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET import org.opensearch.rest.action.RestToXContentListener +import org.opensearch.transport.client.node.NodeClient /** * This class consists of the REST handler to search findings . diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetMonitorAction.kt index 54270b717..888038883 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetMonitorAction.kt @@ -7,7 +7,6 @@ package org.opensearch.alerting.resthandler import org.apache.logging.log4j.LogManager import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.util.context -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.action.AlertingActions import org.opensearch.commons.alerting.action.GetMonitorRequest import org.opensearch.rest.BaseRestHandler @@ -20,6 +19,7 @@ import org.opensearch.rest.RestRequest.Method.HEAD import org.opensearch.rest.action.RestActions import org.opensearch.rest.action.RestToXContentListener import org.opensearch.search.fetch.subphase.FetchSourceContext +import org.opensearch.transport.client.node.NodeClient private val log = LogManager.getLogger(RestGetMonitorAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetRemoteIndexesAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetRemoteIndexesAction.kt index 5d91767bd..5187e2a05 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetRemoteIndexesAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetRemoteIndexesAction.kt @@ -9,12 +9,12 @@ import org.apache.logging.log4j.LogManager import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.action.GetRemoteIndexesAction import org.opensearch.alerting.action.GetRemoteIndexesRequest -import org.opensearch.client.node.NodeClient import org.opensearch.core.common.Strings import org.opensearch.rest.BaseRestHandler import org.opensearch.rest.RestHandler import org.opensearch.rest.RestRequest import org.opensearch.rest.action.RestToXContentListener +import org.opensearch.transport.client.node.NodeClient private val log = LogManager.getLogger(RestGetRemoteIndexesAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetWorkflowAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetWorkflowAction.kt index 1a2ca4426..6af0b4604 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetWorkflowAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetWorkflowAction.kt @@ -8,7 +8,6 @@ package org.opensearch.alerting.resthandler import org.apache.logging.log4j.LogManager import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.util.context -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.action.AlertingActions import org.opensearch.commons.alerting.action.GetWorkflowRequest import org.opensearch.rest.BaseRestHandler @@ -16,6 +15,7 @@ import org.opensearch.rest.RestHandler import org.opensearch.rest.RestRequest import org.opensearch.rest.action.RestToXContentListener import org.opensearch.search.fetch.subphase.FetchSourceContext +import org.opensearch.transport.client.node.NodeClient /** * This class consists of the REST handler to retrieve a workflow . diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetWorkflowAlertsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetWorkflowAlertsAction.kt index 474c32d4a..5356ba730 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetWorkflowAlertsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestGetWorkflowAlertsAction.kt @@ -7,7 +7,6 @@ package org.opensearch.alerting.resthandler import org.apache.logging.log4j.LogManager import org.opensearch.alerting.AlertingPlugin -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.action.AlertingActions import org.opensearch.commons.alerting.action.GetWorkflowAlertsRequest import org.opensearch.commons.alerting.model.Table @@ -18,6 +17,7 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET import org.opensearch.rest.action.RestToXContentListener +import org.opensearch.transport.client.node.NodeClient /** * This class consists of the REST handler to retrieve chained alerts by workflow id. diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexAlertingCommentAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexAlertingCommentAction.kt index 9dc2cb756..0b9905ebb 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexAlertingCommentAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexAlertingCommentAction.kt @@ -9,7 +9,6 @@ import org.apache.logging.log4j.LogManager import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.util.IF_PRIMARY_TERM import org.opensearch.alerting.util.IF_SEQ_NO -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.action.AlertingActions import org.opensearch.commons.alerting.action.IndexCommentRequest import org.opensearch.commons.alerting.action.IndexCommentResponse @@ -26,6 +25,7 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestResponse import org.opensearch.rest.action.RestResponseListener +import org.opensearch.transport.client.node.NodeClient import java.io.IOException private val log = LogManager.getLogger(RestIndexMonitorAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexMonitorAction.kt index e9b973c9c..5f753edd1 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexMonitorAction.kt @@ -11,7 +11,6 @@ import org.opensearch.alerting.alerts.AlertIndices import org.opensearch.alerting.util.IF_PRIMARY_TERM import org.opensearch.alerting.util.IF_SEQ_NO import org.opensearch.alerting.util.REFRESH -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.action.AlertingActions import org.opensearch.commons.alerting.action.IndexMonitorRequest import org.opensearch.commons.alerting.action.IndexMonitorResponse @@ -41,6 +40,7 @@ import org.opensearch.rest.RestRequest.Method.POST import org.opensearch.rest.RestRequest.Method.PUT import org.opensearch.rest.RestResponse import org.opensearch.rest.action.RestResponseListener +import org.opensearch.transport.client.node.NodeClient import java.io.IOException import java.time.Instant import java.util.* diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexWorkflowAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexWorkflowAction.kt index e8837c3f4..032c7921b 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexWorkflowAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestIndexWorkflowAction.kt @@ -9,7 +9,6 @@ import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.util.IF_PRIMARY_TERM import org.opensearch.alerting.util.IF_SEQ_NO import org.opensearch.alerting.util.REFRESH -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.action.AlertingActions import org.opensearch.commons.alerting.action.IndexWorkflowRequest import org.opensearch.commons.alerting.action.IndexWorkflowResponse @@ -28,6 +27,7 @@ import org.opensearch.rest.RestHandler import org.opensearch.rest.RestRequest import org.opensearch.rest.RestResponse import org.opensearch.rest.action.RestResponseListener +import org.opensearch.transport.client.node.NodeClient import java.io.IOException import java.time.Instant diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchAlertingCommentAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchAlertingCommentAction.kt index 821d6639e..f2afd0195 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchAlertingCommentAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchAlertingCommentAction.kt @@ -11,7 +11,6 @@ import org.opensearch.action.search.SearchResponse import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.comments.CommentsIndices.Companion.ALL_COMMENTS_INDEX_PATTERN import org.opensearch.alerting.util.context -import org.opensearch.client.node.NodeClient import org.opensearch.common.xcontent.LoggingDeprecationHandler import org.opensearch.common.xcontent.XContentFactory.jsonBuilder import org.opensearch.common.xcontent.XContentType @@ -29,6 +28,7 @@ import org.opensearch.rest.RestRequest import org.opensearch.rest.RestResponse import org.opensearch.rest.action.RestResponseListener import org.opensearch.search.builder.SearchSourceBuilder +import org.opensearch.transport.client.node.NodeClient import java.io.IOException private val log = LogManager.getLogger(RestIndexMonitorAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchEmailAccountAction.kt index 66281942a..0777a9aa8 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchEmailAccountAction.kt @@ -11,7 +11,6 @@ import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.action.SearchEmailAccountAction import org.opensearch.alerting.model.destination.email.EmailAccount import org.opensearch.alerting.util.context -import org.opensearch.client.node.NodeClient import org.opensearch.common.xcontent.LoggingDeprecationHandler import org.opensearch.common.xcontent.XContentFactory.jsonBuilder import org.opensearch.common.xcontent.XContentType @@ -29,6 +28,7 @@ import org.opensearch.rest.RestRequest import org.opensearch.rest.RestResponse import org.opensearch.rest.action.RestResponseListener import org.opensearch.search.builder.SearchSourceBuilder +import org.opensearch.transport.client.node.NodeClient import java.io.IOException /** diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchEmailGroupAction.kt index 4550bb4a9..1dcd44e66 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchEmailGroupAction.kt @@ -11,7 +11,6 @@ import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.action.SearchEmailGroupAction import org.opensearch.alerting.model.destination.email.EmailGroup import org.opensearch.alerting.util.context -import org.opensearch.client.node.NodeClient import org.opensearch.common.xcontent.LoggingDeprecationHandler import org.opensearch.common.xcontent.XContentFactory import org.opensearch.common.xcontent.XContentType @@ -30,6 +29,7 @@ import org.opensearch.rest.RestRequest import org.opensearch.rest.RestResponse import org.opensearch.rest.action.RestResponseListener import org.opensearch.search.builder.SearchSourceBuilder +import org.opensearch.transport.client.node.NodeClient import java.io.IOException /** diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchMonitorAction.kt index 6df5641e9..6a38cb85c 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/resthandler/RestSearchMonitorAction.kt @@ -12,7 +12,6 @@ import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.alerts.AlertIndices.Companion.ALL_ALERT_INDEX_PATTERN import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.context -import org.opensearch.client.node.NodeClient import org.opensearch.cluster.service.ClusterService import org.opensearch.common.settings.Settings import org.opensearch.common.xcontent.LoggingDeprecationHandler @@ -37,6 +36,7 @@ import org.opensearch.rest.RestRequest.Method.POST import org.opensearch.rest.RestResponse import org.opensearch.rest.action.RestResponseListener import org.opensearch.search.builder.SearchSourceBuilder +import org.opensearch.transport.client.node.NodeClient import java.io.IOException private val log = LogManager.getLogger(RestSearchMonitorAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/service/DeleteMonitorService.kt b/alerting/src/main/kotlin/org/opensearch/alerting/service/DeleteMonitorService.kt index a0bccec0a..fbc655543 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/service/DeleteMonitorService.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/service/DeleteMonitorService.kt @@ -20,7 +20,7 @@ import org.opensearch.action.search.SearchRequest import org.opensearch.action.search.SearchResponse import org.opensearch.action.support.IndicesOptions import org.opensearch.action.support.WriteRequest.RefreshPolicy -import org.opensearch.action.support.master.AcknowledgedResponse +import org.opensearch.action.support.clustermanager.AcknowledgedResponse import org.opensearch.alerting.MonitorMetadataService import org.opensearch.alerting.core.lock.LockModel import org.opensearch.alerting.core.lock.LockService @@ -28,7 +28,6 @@ import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.util.ScheduledJobUtils.Companion.WORKFLOW_DELEGATE_PATH import org.opensearch.alerting.util.ScheduledJobUtils.Companion.WORKFLOW_MONITOR_PATH import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.commons.alerting.action.DeleteMonitorResponse import org.opensearch.commons.alerting.model.Monitor import org.opensearch.commons.alerting.model.ScheduledJob @@ -39,6 +38,7 @@ import org.opensearch.index.reindex.BulkByScrollResponse import org.opensearch.index.reindex.DeleteByQueryAction import org.opensearch.index.reindex.DeleteByQueryRequestBuilder import org.opensearch.search.builder.SearchSourceBuilder +import org.opensearch.transport.client.Client import kotlin.coroutines.resume import kotlin.coroutines.resumeWithException import kotlin.coroutines.suspendCoroutine diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/SecureTransportAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/SecureTransportAction.kt index 5f19ecc6f..54667e125 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/SecureTransportAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/SecureTransportAction.kt @@ -8,13 +8,13 @@ package org.opensearch.alerting.transport import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchStatusException import org.opensearch.alerting.settings.AlertingSettings -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.commons.ConfigConstants import org.opensearch.commons.alerting.util.AlertingException import org.opensearch.commons.authuser.User import org.opensearch.core.action.ActionListener import org.opensearch.core.rest.RestStatus +import org.opensearch.transport.client.Client private val log = LogManager.getLogger(SecureTransportAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeAlertAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeAlertAction.kt index 927a976ab..6cc60732a 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeAlertAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeAlertAction.kt @@ -23,7 +23,6 @@ import org.opensearch.action.update.UpdateRequest import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -51,6 +50,7 @@ import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.search.fetch.subphase.FetchSourceContext import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client import java.time.Instant import java.util.Locale diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeChainedAlertAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeChainedAlertAction.kt index 5f5974163..1d94cc2f8 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeChainedAlertAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeChainedAlertAction.kt @@ -28,7 +28,6 @@ import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.ScheduledJobUtils import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -56,6 +55,7 @@ import org.opensearch.index.query.QueryBuilders import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client import java.time.Instant import java.util.Locale diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteAlertingCommentAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteAlertingCommentAction.kt index f31510d52..09f8d2e00 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteAlertingCommentAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteAlertingCommentAction.kt @@ -19,7 +19,6 @@ import org.opensearch.action.support.HandledTransportAction import org.opensearch.alerting.comments.CommentsIndices.Companion.ALL_COMMENTS_INDEX_PATTERN import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.settings.AlertingSettings -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -42,6 +41,7 @@ import org.opensearch.index.query.QueryBuilders import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client private val scope: CoroutineScope = CoroutineScope(Dispatchers.IO) private val log = LogManager.getLogger(TransportDeleteAlertingCommentAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteMonitorAction.kt index 1b4187b91..b28311bd0 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteMonitorAction.kt @@ -19,7 +19,6 @@ import org.opensearch.action.support.WriteRequest.RefreshPolicy import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.service.DeleteMonitorService import org.opensearch.alerting.settings.AlertingSettings -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -39,6 +38,7 @@ import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client private val scope: CoroutineScope = CoroutineScope(Dispatchers.IO) private val log = LogManager.getLogger(TransportDeleteMonitorAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteWorkflowAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteWorkflowAction.kt index 5a965689a..bf0d44eab 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteWorkflowAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDeleteWorkflowAction.kt @@ -31,7 +31,6 @@ import org.opensearch.alerting.service.DeleteMonitorService import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.ScheduledJobUtils.Companion.WORKFLOW_DELEGATE_PATH import org.opensearch.alerting.util.ScheduledJobUtils.Companion.WORKFLOW_MONITOR_PATH -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -62,6 +61,7 @@ import org.opensearch.index.reindex.DeleteByQueryRequestBuilder import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client private val scope: CoroutineScope = CoroutineScope(Dispatchers.IO) /** diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDocLevelMonitorFanOutAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDocLevelMonitorFanOutAction.kt index 7e6f2ed1d..1e5990a40 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDocLevelMonitorFanOutAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportDocLevelMonitorFanOutAction.kt @@ -63,8 +63,6 @@ import org.opensearch.alerting.util.isTestAction import org.opensearch.alerting.util.parseSampleDocTags import org.opensearch.alerting.util.printsSampleDocData import org.opensearch.alerting.util.use -import org.opensearch.client.Client -import org.opensearch.client.node.NodeClient import org.opensearch.cluster.routing.Preference import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject @@ -122,6 +120,8 @@ import org.opensearch.search.fetch.subphase.FetchSourceContext import org.opensearch.search.sort.SortOrder import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client +import org.opensearch.transport.client.node.NodeClient import java.io.IOException import java.time.Instant import java.util.UUID diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportExecuteMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportExecuteMonitorAction.kt index d10ba5d8d..f2769ad70 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportExecuteMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportExecuteMonitorAction.kt @@ -24,7 +24,6 @@ import org.opensearch.alerting.action.ExecuteMonitorResponse import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.DocLevelMonitorQueries import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -42,6 +41,7 @@ import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client import java.time.Instant import java.util.Locale diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportExecuteWorkflowAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportExecuteWorkflowAction.kt index da48d1da8..8b3272e74 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportExecuteWorkflowAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportExecuteWorkflowAction.kt @@ -19,7 +19,6 @@ import org.opensearch.alerting.action.ExecuteWorkflowAction import org.opensearch.alerting.action.ExecuteWorkflowRequest import org.opensearch.alerting.action.ExecuteWorkflowResponse import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.common.inject.Inject import org.opensearch.common.xcontent.LoggingDeprecationHandler import org.opensearch.common.xcontent.XContentHelper @@ -34,6 +33,7 @@ import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client import java.time.Instant private val log = LogManager.getLogger(TransportExecuteWorkflowAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetAlertsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetAlertsAction.kt index 0c307227f..1fc3ef83a 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetAlertsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetAlertsAction.kt @@ -21,7 +21,6 @@ import org.opensearch.alerting.opensearchapi.addFilter import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -50,6 +49,7 @@ import org.opensearch.search.sort.SortBuilders import org.opensearch.search.sort.SortOrder import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client import java.io.IOException private val log = LogManager.getLogger(TransportGetAlertsAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetDestinationsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetDestinationsAction.kt index e73395cae..60e5edb9d 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetDestinationsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetDestinationsAction.kt @@ -17,7 +17,6 @@ import org.opensearch.alerting.model.destination.Destination import org.opensearch.alerting.opensearchapi.addFilter import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -40,6 +39,7 @@ import org.opensearch.search.sort.SortBuilders import org.opensearch.search.sort.SortOrder import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client import java.io.IOException private val log = LogManager.getLogger(TransportGetDestinationsAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetEmailAccountAction.kt index 1f2a2704a..bbcf02cfb 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetEmailAccountAction.kt @@ -18,7 +18,6 @@ import org.opensearch.alerting.model.destination.email.EmailAccount import org.opensearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST import org.opensearch.alerting.util.DestinationType import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -32,6 +31,7 @@ import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client private val log = LogManager.getLogger(TransportGetEmailAccountAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetEmailGroupAction.kt index 509821b27..88becd6ba 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetEmailGroupAction.kt @@ -18,7 +18,6 @@ import org.opensearch.alerting.model.destination.email.EmailGroup import org.opensearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST import org.opensearch.alerting.util.DestinationType import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -32,6 +31,7 @@ import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client private val log = LogManager.getLogger(TransportGetEmailGroupAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetFindingsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetFindingsAction.kt index 9c4187bce..c4a1f2dbb 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetFindingsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetFindingsAction.kt @@ -22,7 +22,6 @@ import org.opensearch.alerting.alerts.AlertIndices.Companion.ALL_FINDING_INDEX_P import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -53,6 +52,7 @@ import org.opensearch.search.sort.SortBuilders import org.opensearch.search.sort.SortOrder import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client private val log = LogManager.getLogger(TransportGetFindingsSearchAction::class.java) private val scope: CoroutineScope = CoroutineScope(Dispatchers.IO) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetMonitorAction.kt index 6e3d08507..ce42e6157 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetMonitorAction.kt @@ -23,7 +23,6 @@ import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.ScheduledJobUtils.Companion.WORKFLOW_DELEGATE_PATH import org.opensearch.alerting.util.ScheduledJobUtils.Companion.WORKFLOW_MONITOR_PATH import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -46,6 +45,7 @@ import org.opensearch.index.query.QueryBuilders import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client private val log = LogManager.getLogger(TransportGetMonitorAction::class.java) private val scope: CoroutineScope = CoroutineScope(Dispatchers.IO) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetRemoteIndexesAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetRemoteIndexesAction.kt index 7253162fa..b106903a8 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetRemoteIndexesAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetRemoteIndexesAction.kt @@ -29,7 +29,6 @@ import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.settings.AlertingSettings.Companion.CROSS_CLUSTER_MONITORING_ENABLED import org.opensearch.alerting.util.CrossClusterMonitorUtils -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -39,6 +38,7 @@ import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client import java.time.Duration import java.time.Instant diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetWorkflowAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetWorkflowAction.kt index 2671049b7..d0d3e45f7 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetWorkflowAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetWorkflowAction.kt @@ -13,7 +13,6 @@ import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.HandledTransportAction import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -32,6 +31,7 @@ import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.index.IndexNotFoundException import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client class TransportGetWorkflowAction @Inject constructor( transportService: TransportService, diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetWorkflowAlertsAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetWorkflowAlertsAction.kt index cf8244b8c..dd26bf032 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetWorkflowAlertsAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportGetWorkflowAlertsAction.kt @@ -19,7 +19,6 @@ import org.opensearch.alerting.opensearchapi.addFilter import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -46,6 +45,7 @@ import org.opensearch.search.sort.SortBuilders import org.opensearch.search.sort.SortOrder import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client import java.io.IOException private val log = LogManager.getLogger(TransportGetAlertsAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexAlertingCommentAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexAlertingCommentAction.kt index 43a3ed147..8592c505c 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexAlertingCommentAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexAlertingCommentAction.kt @@ -28,7 +28,6 @@ import org.opensearch.alerting.settings.AlertingSettings.Companion.COMMENTS_MAX_ import org.opensearch.alerting.settings.AlertingSettings.Companion.INDEX_TIMEOUT import org.opensearch.alerting.settings.AlertingSettings.Companion.MAX_COMMENTS_PER_ALERT import org.opensearch.alerting.util.CommentsUtils -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -55,6 +54,7 @@ import org.opensearch.rest.RestRequest import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client import java.lang.IllegalArgumentException import java.time.Instant diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexMonitorAction.kt index f7c050290..a5b849a67 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexMonitorAction.kt @@ -28,7 +28,7 @@ import org.opensearch.action.search.SearchResponse import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.HandledTransportAction import org.opensearch.action.support.WriteRequest.RefreshPolicy -import org.opensearch.action.support.master.AcknowledgedResponse +import org.opensearch.action.support.clustermanager.AcknowledgedResponse import org.opensearch.alerting.MonitorMetadataService import org.opensearch.alerting.core.ScheduledJobIndices import org.opensearch.alerting.opensearchapi.suspendUntil @@ -45,7 +45,6 @@ import org.opensearch.alerting.util.addUserBackendRolesFilter import org.opensearch.alerting.util.getRoleFilterEnabled import org.opensearch.alerting.util.isADMonitor import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -83,6 +82,7 @@ import org.opensearch.rest.RestRequest import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client import java.io.IOException import java.time.Duration import java.util.Locale diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexWorkflowAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexWorkflowAction.kt index b1df87032..b83183c07 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexWorkflowAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexWorkflowAction.kt @@ -26,7 +26,7 @@ import org.opensearch.action.search.SearchRequest import org.opensearch.action.search.SearchResponse import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.HandledTransportAction -import org.opensearch.action.support.master.AcknowledgedResponse +import org.opensearch.action.support.clustermanager.AcknowledgedResponse import org.opensearch.alerting.MonitorMetadataService import org.opensearch.alerting.MonitorRunnerService.monitorCtx import org.opensearch.alerting.WorkflowMetadataService @@ -46,7 +46,6 @@ import org.opensearch.alerting.util.isADMonitor import org.opensearch.alerting.util.isQueryLevelMonitor import org.opensearch.alerting.util.use import org.opensearch.alerting.workflow.CompositeWorkflowRunner -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -80,6 +79,7 @@ import org.opensearch.rest.RestRequest import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client import java.util.Locale import java.util.UUID import java.util.stream.Collectors diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchAlertingCommentAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchAlertingCommentAction.kt index e15a5759f..9e8c3d153 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchAlertingCommentAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchAlertingCommentAction.kt @@ -19,7 +19,6 @@ import org.opensearch.alerting.alerts.AlertIndices.Companion.ALL_ALERT_INDEX_PAT import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -44,6 +43,7 @@ import org.opensearch.index.query.QueryBuilders import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client import java.io.IOException private val log = LogManager.getLogger(TransportSearchAlertingCommentAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchEmailAccountAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchEmailAccountAction.kt index e8c190c1c..b63d9a488 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchEmailAccountAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchEmailAccountAction.kt @@ -14,7 +14,6 @@ import org.opensearch.alerting.action.SearchEmailAccountAction import org.opensearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST import org.opensearch.alerting.util.DestinationType import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -23,6 +22,7 @@ import org.opensearch.core.action.ActionListener import org.opensearch.core.rest.RestStatus import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client class TransportSearchEmailAccountAction @Inject constructor( transportService: TransportService, diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchEmailGroupAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchEmailGroupAction.kt index fdb7fb956..f6b3b92d1 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchEmailGroupAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchEmailGroupAction.kt @@ -14,7 +14,6 @@ import org.opensearch.alerting.action.SearchEmailGroupAction import org.opensearch.alerting.settings.DestinationSettings.Companion.ALLOW_LIST import org.opensearch.alerting.util.DestinationType import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -23,6 +22,7 @@ import org.opensearch.core.action.ActionListener import org.opensearch.core.rest.RestStatus import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client class TransportSearchEmailGroupAction @Inject constructor( transportService: TransportService, diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchMonitorAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchMonitorAction.kt index 59007d15b..73a883de4 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchMonitorAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportSearchMonitorAction.kt @@ -14,7 +14,6 @@ import org.opensearch.action.support.HandledTransportAction import org.opensearch.alerting.opensearchapi.addFilter import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.use -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.settings.Settings @@ -34,6 +33,7 @@ import org.opensearch.index.query.MatchQueryBuilder import org.opensearch.index.query.QueryBuilders import org.opensearch.tasks.Task import org.opensearch.transport.TransportService +import org.opensearch.transport.client.Client private val log = LogManager.getLogger(TransportSearchMonitorAction::class.java) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/util/CommentsUtils.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/CommentsUtils.kt index 15cc50c27..d24959452 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/util/CommentsUtils.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/CommentsUtils.kt @@ -10,7 +10,6 @@ import org.opensearch.action.search.SearchRequest import org.opensearch.action.search.SearchResponse import org.opensearch.alerting.comments.CommentsIndices.Companion.ALL_COMMENTS_INDEX_PATTERN import org.opensearch.alerting.opensearchapi.suspendUntil -import org.opensearch.client.Client import org.opensearch.common.xcontent.LoggingDeprecationHandler import org.opensearch.common.xcontent.XContentHelper import org.opensearch.common.xcontent.XContentType @@ -24,6 +23,7 @@ import org.opensearch.index.reindex.BulkByScrollResponse import org.opensearch.index.reindex.DeleteByQueryAction import org.opensearch.index.reindex.DeleteByQueryRequestBuilder import org.opensearch.search.builder.SearchSourceBuilder +import org.opensearch.transport.client.Client import kotlin.coroutines.resume import kotlin.coroutines.resumeWithException import kotlin.coroutines.suspendCoroutine diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/util/CrossClusterMonitorUtils.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/CrossClusterMonitorUtils.kt index b9ddaf187..ade8494f0 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/util/CrossClusterMonitorUtils.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/CrossClusterMonitorUtils.kt @@ -6,13 +6,13 @@ package org.opensearch.alerting.util import org.opensearch.action.search.SearchRequest -import org.opensearch.client.Client -import org.opensearch.client.node.NodeClient import org.opensearch.cluster.service.ClusterService import org.opensearch.commons.alerting.model.ClusterMetricsInput import org.opensearch.commons.alerting.model.DocLevelMonitorInput import org.opensearch.commons.alerting.model.Monitor import org.opensearch.commons.alerting.model.SearchInput +import org.opensearch.transport.client.Client +import org.opensearch.transport.client.node.NodeClient class CrossClusterMonitorUtils { companion object { diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/util/DocLevelMonitorQueries.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/DocLevelMonitorQueries.kt index 1d7d768f9..5173ff897 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/util/DocLevelMonitorQueries.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/DocLevelMonitorQueries.kt @@ -26,10 +26,9 @@ import org.opensearch.action.bulk.BulkResponse import org.opensearch.action.index.IndexRequest import org.opensearch.action.support.IndicesOptions import org.opensearch.action.support.WriteRequest.RefreshPolicy -import org.opensearch.action.support.master.AcknowledgedResponse +import org.opensearch.action.support.clustermanager.AcknowledgedResponse import org.opensearch.alerting.MonitorRunnerService.monitorCtx import org.opensearch.alerting.opensearchapi.suspendUntil -import org.opensearch.client.Client import org.opensearch.cluster.ClusterState import org.opensearch.cluster.metadata.IndexMetadata import org.opensearch.cluster.service.ClusterService @@ -50,6 +49,7 @@ import org.opensearch.index.query.QueryBuilders import org.opensearch.index.reindex.BulkByScrollResponse import org.opensearch.index.reindex.DeleteByQueryAction import org.opensearch.index.reindex.DeleteByQueryRequestBuilder +import org.opensearch.transport.client.Client import kotlin.coroutines.resume import kotlin.coroutines.resumeWithException import kotlin.coroutines.suspendCoroutine diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/util/IndexUtils.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/IndexUtils.kt index 90d85c436..093b0bd39 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/util/IndexUtils.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/IndexUtils.kt @@ -7,11 +7,10 @@ package org.opensearch.alerting.util import org.opensearch.action.admin.indices.mapping.put.PutMappingRequest import org.opensearch.action.support.IndicesOptions -import org.opensearch.action.support.master.AcknowledgedResponse +import org.opensearch.action.support.clustermanager.AcknowledgedResponse import org.opensearch.alerting.alerts.AlertIndices import org.opensearch.alerting.comments.CommentsIndices import org.opensearch.alerting.core.ScheduledJobIndices -import org.opensearch.client.IndicesAdminClient import org.opensearch.cluster.ClusterState import org.opensearch.cluster.metadata.IndexAbstraction import org.opensearch.cluster.metadata.IndexMetadata @@ -23,6 +22,7 @@ import org.opensearch.commons.alerting.util.IndexUtils import org.opensearch.core.action.ActionListener import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.XContentParser +import org.opensearch.transport.client.IndicesAdminClient class IndexUtils { diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt index a1c86d2f5..18afc6cc4 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/clusterMetricsMonitorHelpers/SupportedClusterMetricsSettingsExtensions.kt @@ -28,12 +28,12 @@ import org.opensearch.alerting.opensearchapi.convertToMap import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.settings.SupportedClusterMetricsSettings import org.opensearch.alerting.settings.SupportedClusterMetricsSettings.Companion.resolveToActionRequest -import org.opensearch.client.Client import org.opensearch.cluster.metadata.Metadata import org.opensearch.common.settings.Settings import org.opensearch.common.xcontent.support.XContentMapValues import org.opensearch.commons.alerting.model.ClusterMetricsInput import org.opensearch.core.action.ActionResponse +import org.opensearch.transport.client.Client /** * Calls the appropriate transport action for the API requested in the [clusterMetricsInput]. diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/DestinationMigrationCoordinator.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/DestinationMigrationCoordinator.kt index fbb3b1527..9cee3f893 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/DestinationMigrationCoordinator.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/DestinationMigrationCoordinator.kt @@ -11,8 +11,6 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import org.apache.logging.log4j.LogManager import org.opensearch.alerting.core.ScheduledJobIndices -import org.opensearch.client.Client -import org.opensearch.client.node.NodeClient import org.opensearch.cluster.ClusterChangedEvent import org.opensearch.cluster.ClusterStateListener import org.opensearch.cluster.service.ClusterService @@ -20,6 +18,8 @@ import org.opensearch.common.lifecycle.LifecycleListener import org.opensearch.common.unit.TimeValue import org.opensearch.threadpool.Scheduler import org.opensearch.threadpool.ThreadPool +import org.opensearch.transport.client.Client +import org.opensearch.transport.client.node.NodeClient import kotlin.coroutines.CoroutineContext class DestinationMigrationCoordinator( @@ -74,7 +74,7 @@ class DestinationMigrationCoordinator( return } - if (!clusterService.state().nodes().isLocalNodeElectedMaster) { + if (!clusterService.state().nodes().isLocalNodeElectedClusterManager) { scheduledMigration?.cancel() return } diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/DestinationMigrationUtilService.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/DestinationMigrationUtilService.kt index 508118dc0..0acfb66a2 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/DestinationMigrationUtilService.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/DestinationMigrationUtilService.kt @@ -21,7 +21,6 @@ import org.opensearch.alerting.util.destinationmigration.DestinationConversionUt import org.opensearch.alerting.util.destinationmigration.DestinationConversionUtils.Companion.convertEmailGroupToNotificationConfig import org.opensearch.alerting.util.destinationmigration.NotificationApiUtils.Companion.createNotificationConfig import org.opensearch.alerting.util.use -import org.opensearch.client.node.NodeClient import org.opensearch.common.xcontent.LoggingDeprecationHandler import org.opensearch.common.xcontent.XContentType import org.opensearch.commons.ConfigConstants @@ -37,6 +36,7 @@ import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.index.query.QueryBuilders import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.search.fetch.subphase.FetchSourceContext +import org.opensearch.transport.client.node.NodeClient import java.time.Instant class DestinationMigrationUtilService { diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/NotificationApiUtils.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/NotificationApiUtils.kt index 4278907d3..1698de794 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/NotificationApiUtils.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/NotificationApiUtils.kt @@ -13,8 +13,6 @@ import org.opensearch.alerting.model.destination.Destination import org.opensearch.alerting.opensearchapi.retryForNotification import org.opensearch.alerting.opensearchapi.suspendUntil import org.opensearch.alerting.util.use -import org.opensearch.client.Client -import org.opensearch.client.node.NodeClient import org.opensearch.common.unit.TimeValue import org.opensearch.commons.ConfigConstants import org.opensearch.commons.destination.message.LegacyBaseMessage @@ -31,6 +29,8 @@ import org.opensearch.commons.notifications.model.EventSource import org.opensearch.commons.notifications.model.NotificationConfigInfo import org.opensearch.commons.notifications.model.SeverityType import org.opensearch.core.rest.RestStatus +import org.opensearch.transport.client.Client +import org.opensearch.transport.client.node.NodeClient class NotificationApiUtils { diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/workflow/WorkflowRunner.kt b/alerting/src/main/kotlin/org/opensearch/alerting/workflow/WorkflowRunner.kt index 6c90a64be..ea24da3a6 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/workflow/WorkflowRunner.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/workflow/WorkflowRunner.kt @@ -24,7 +24,6 @@ import org.opensearch.alerting.util.destinationmigration.sendNotification import org.opensearch.alerting.util.isAllowed import org.opensearch.alerting.util.isTestAction import org.opensearch.alerting.util.use -import org.opensearch.client.node.NodeClient import org.opensearch.commons.alerting.model.ActionRunResult import org.opensearch.commons.alerting.model.Table import org.opensearch.commons.alerting.model.Workflow @@ -35,6 +34,7 @@ import org.opensearch.core.common.Strings import org.opensearch.script.Script import org.opensearch.script.TemplateScript import org.opensearch.transport.TransportService +import org.opensearch.transport.client.node.NodeClient import java.time.Instant abstract class WorkflowRunner { diff --git a/alerting/src/test/kotlin/org/opensearch/alerting/AlertServiceTests.kt b/alerting/src/test/kotlin/org/opensearch/alerting/AlertServiceTests.kt index 2da1c5830..aacfa58a8 100644 --- a/alerting/src/test/kotlin/org/opensearch/alerting/AlertServiceTests.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/AlertServiceTests.kt @@ -11,7 +11,6 @@ import org.opensearch.Version import org.opensearch.alerting.alerts.AlertIndices import org.opensearch.alerting.settings.AlertingSettings import org.opensearch.alerting.util.getBucketKeysHash -import org.opensearch.client.Client import org.opensearch.cluster.node.DiscoveryNode import org.opensearch.cluster.service.ClusterService import org.opensearch.common.settings.ClusterSettings @@ -26,6 +25,7 @@ import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.test.ClusterServiceUtils import org.opensearch.test.OpenSearchTestCase import org.opensearch.threadpool.ThreadPool +import org.opensearch.transport.client.Client import java.time.Instant import java.time.temporal.ChronoUnit diff --git a/build.gradle b/build.gradle index 7f03bab2b..cd74bcf6c 100644 --- a/build.gradle +++ b/build.gradle @@ -7,8 +7,8 @@ buildscript { apply from: 'build-tools/repositories.gradle' ext { - opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT") - buildVersionQualifier = System.getProperty("build.version_qualifier", "") + opensearch_version = System.getProperty("opensearch.version", "3.0.0-alpha1-SNAPSHOT") + buildVersionQualifier = System.getProperty("build.version_qualifier", "alpha1") isSnapshot = "true" == System.getProperty("build.snapshot", "true") // 3.0.0-SNAPSHOT -> 3.0.0.0-SNAPSHOT version_tokens = opensearch_version.tokenize('-') diff --git a/core/src/main/kotlin/org/opensearch/alerting/core/JobSweeper.kt b/core/src/main/kotlin/org/opensearch/alerting/core/JobSweeper.kt index b67f278b2..e08b1360f 100644 --- a/core/src/main/kotlin/org/opensearch/alerting/core/JobSweeper.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/JobSweeper.kt @@ -17,7 +17,6 @@ import org.opensearch.alerting.core.settings.ScheduledJobSettings.Companion.SWEE import org.opensearch.alerting.core.settings.ScheduledJobSettings.Companion.SWEEP_PERIOD import org.opensearch.alerting.opensearchapi.firstFailureOrNull import org.opensearch.alerting.opensearchapi.retry -import org.opensearch.client.Client import org.opensearch.cluster.ClusterChangedEvent import org.opensearch.cluster.ClusterStateListener import org.opensearch.cluster.routing.IndexShardRoutingTable @@ -48,6 +47,7 @@ import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.search.sort.FieldSortBuilder import org.opensearch.threadpool.Scheduler import org.opensearch.threadpool.ThreadPool +import org.opensearch.transport.client.Client import java.util.TreeMap import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.Executors diff --git a/core/src/main/kotlin/org/opensearch/alerting/core/ScheduledJobIndices.kt b/core/src/main/kotlin/org/opensearch/alerting/core/ScheduledJobIndices.kt index a71a7e64f..87c8d362e 100644 --- a/core/src/main/kotlin/org/opensearch/alerting/core/ScheduledJobIndices.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/ScheduledJobIndices.kt @@ -7,12 +7,12 @@ package org.opensearch.alerting.core import org.opensearch.action.admin.indices.create.CreateIndexRequest import org.opensearch.action.admin.indices.create.CreateIndexResponse -import org.opensearch.client.AdminClient import org.opensearch.cluster.health.ClusterIndexHealth import org.opensearch.cluster.service.ClusterService import org.opensearch.common.settings.Settings import org.opensearch.commons.alerting.model.ScheduledJob import org.opensearch.core.action.ActionListener +import org.opensearch.transport.client.AdminClient /** * Initialize the OpenSearch components required to run [ScheduledJobs]. diff --git a/core/src/main/kotlin/org/opensearch/alerting/core/lock/LockService.kt b/core/src/main/kotlin/org/opensearch/alerting/core/lock/LockService.kt index 0c558038d..fd88fc56f 100644 --- a/core/src/main/kotlin/org/opensearch/alerting/core/lock/LockService.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/lock/LockService.kt @@ -13,7 +13,6 @@ import org.opensearch.action.index.IndexRequest import org.opensearch.action.index.IndexResponse import org.opensearch.action.update.UpdateRequest import org.opensearch.action.update.UpdateResponse -import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.settings.Settings import org.opensearch.common.unit.TimeValue @@ -28,6 +27,7 @@ import org.opensearch.index.IndexNotFoundException import org.opensearch.index.engine.DocumentMissingException import org.opensearch.index.engine.VersionConflictEngineException import org.opensearch.index.seqno.SequenceNumbers +import org.opensearch.transport.client.Client import java.io.IOException import java.time.Instant import java.util.concurrent.TimeUnit diff --git a/core/src/main/kotlin/org/opensearch/alerting/core/resthandler/RestScheduledJobStatsHandler.kt b/core/src/main/kotlin/org/opensearch/alerting/core/resthandler/RestScheduledJobStatsHandler.kt index c79c260b9..fbe57ab19 100644 --- a/core/src/main/kotlin/org/opensearch/alerting/core/resthandler/RestScheduledJobStatsHandler.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/core/resthandler/RestScheduledJobStatsHandler.kt @@ -7,7 +7,6 @@ package org.opensearch.alerting.core.resthandler import org.opensearch.alerting.core.action.node.ScheduledJobsStatsAction import org.opensearch.alerting.core.action.node.ScheduledJobsStatsRequest -import org.opensearch.client.node.NodeClient import org.opensearch.core.common.Strings import org.opensearch.rest.BaseRestHandler import org.opensearch.rest.BaseRestHandler.RestChannelConsumer @@ -16,6 +15,7 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET import org.opensearch.rest.action.RestActions +import org.opensearch.transport.client.node.NodeClient import java.util.Locale import java.util.TreeSet diff --git a/core/src/main/kotlin/org/opensearch/alerting/opensearchapi/OpenSearchExtensions.kt b/core/src/main/kotlin/org/opensearch/alerting/opensearchapi/OpenSearchExtensions.kt index 3e87f207f..582d13fbe 100644 --- a/core/src/main/kotlin/org/opensearch/alerting/opensearchapi/OpenSearchExtensions.kt +++ b/core/src/main/kotlin/org/opensearch/alerting/opensearchapi/OpenSearchExtensions.kt @@ -14,7 +14,6 @@ import org.opensearch.OpenSearchException import org.opensearch.action.bulk.BackoffPolicy import org.opensearch.action.search.SearchResponse import org.opensearch.action.search.ShardSearchFailure -import org.opensearch.client.OpenSearchClient import org.opensearch.common.settings.Settings import org.opensearch.common.util.concurrent.ThreadContext import org.opensearch.common.xcontent.XContentHelper @@ -31,6 +30,7 @@ import org.opensearch.core.xcontent.ToXContent import org.opensearch.index.query.BoolQueryBuilder import org.opensearch.index.query.QueryBuilders import org.opensearch.search.builder.SearchSourceBuilder +import org.opensearch.transport.client.OpenSearchClient import kotlin.coroutines.CoroutineContext import kotlin.coroutines.resume import kotlin.coroutines.resumeWithException diff --git a/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/SampleRemoteMonitorPlugin.java b/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/SampleRemoteMonitorPlugin.java index b73d440f6..7e1ce8992 100644 --- a/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/SampleRemoteMonitorPlugin.java +++ b/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/SampleRemoteMonitorPlugin.java @@ -14,7 +14,6 @@ import org.opensearch.alerting.monitor.runners.SampleRemoteMonitorRunner2; import org.opensearch.alerting.spi.RemoteMonitorRunner; import org.opensearch.alerting.spi.RemoteMonitorRunnerExtension; -import org.opensearch.client.Client; import org.opensearch.cluster.metadata.IndexNameExpressionResolver; import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.service.ClusterService; @@ -34,6 +33,7 @@ import org.opensearch.rest.RestHandler; import org.opensearch.script.ScriptService; import org.opensearch.threadpool.ThreadPool; +import org.opensearch.transport.client.Client; import org.opensearch.watcher.ResourceWatcherService; import reactor.util.annotation.NonNull; diff --git a/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/SampleRemoteMonitorRestHandler.java b/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/SampleRemoteMonitorRestHandler.java index 91c97a636..17a29cf54 100644 --- a/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/SampleRemoteMonitorRestHandler.java +++ b/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/SampleRemoteMonitorRestHandler.java @@ -10,7 +10,6 @@ import org.opensearch.alerting.monitor.inputs.SampleRemoteMonitorInput1; import org.opensearch.alerting.monitor.inputs.SampleRemoteMonitorInput2; import org.opensearch.alerting.monitor.triggers.SampleRemoteMonitorTrigger1; -import org.opensearch.client.node.NodeClient; import org.opensearch.common.io.stream.BytesStreamOutput; import org.opensearch.common.xcontent.json.JsonXContent; import org.opensearch.commons.alerting.action.AlertingActions; @@ -37,6 +36,7 @@ import org.opensearch.rest.RestResponse; import org.opensearch.script.Script; import org.opensearch.script.ScriptType; +import org.opensearch.transport.client.node.NodeClient; import java.io.IOException; import java.time.Instant; diff --git a/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/monitor/fanouts/TransportRemoteDocLevelMonitorFanOutAction.java b/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/monitor/fanouts/TransportRemoteDocLevelMonitorFanOutAction.java index 1be9255fe..a70df47ee 100644 --- a/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/monitor/fanouts/TransportRemoteDocLevelMonitorFanOutAction.java +++ b/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/monitor/fanouts/TransportRemoteDocLevelMonitorFanOutAction.java @@ -13,7 +13,6 @@ import org.opensearch.alerting.monitor.inputs.SampleRemoteDocLevelMonitorInput; import org.opensearch.alerting.monitor.runners.SampleRemoteDocLevelMonitorRunner; import org.opensearch.alerting.monitor.triggers.SampleRemoteMonitorTrigger1; -import org.opensearch.client.Client; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.inject.Inject; import org.opensearch.common.settings.Settings; @@ -31,6 +30,7 @@ import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.tasks.Task; import org.opensearch.transport.TransportService; +import org.opensearch.transport.client.Client; import java.util.HashMap; import java.util.Map; diff --git a/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/monitor/runners/SampleRemoteMonitorRunner1.java b/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/monitor/runners/SampleRemoteMonitorRunner1.java index f2e67f460..1227b9fa1 100644 --- a/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/monitor/runners/SampleRemoteMonitorRunner1.java +++ b/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/monitor/runners/SampleRemoteMonitorRunner1.java @@ -13,7 +13,6 @@ import org.opensearch.alerting.monitor.trigger.results.SampleRemoteMonitorTriggerRunResult; import org.opensearch.alerting.monitor.triggers.SampleRemoteMonitorTrigger1; import org.opensearch.alerting.spi.RemoteMonitorRunner; -import org.opensearch.client.Client; import org.opensearch.commons.alerting.model.Input; import org.opensearch.commons.alerting.model.InputRunResults; import org.opensearch.commons.alerting.model.Monitor; @@ -25,6 +24,7 @@ import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.transport.TransportService; +import org.opensearch.transport.client.Client; import java.time.Instant; import java.util.Map; diff --git a/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/monitor/runners/SampleRemoteMonitorRunner2.java b/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/monitor/runners/SampleRemoteMonitorRunner2.java index 31f732b51..db06d8f70 100644 --- a/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/monitor/runners/SampleRemoteMonitorRunner2.java +++ b/sample-remote-monitor-plugin/src/main/java/org/opensearch/alerting/monitor/runners/SampleRemoteMonitorRunner2.java @@ -12,7 +12,6 @@ import org.opensearch.alerting.monitor.inputs.SampleRemoteMonitorInput2; import org.opensearch.alerting.monitor.trigger.results.SampleRemoteMonitorTriggerRunResult; import org.opensearch.alerting.spi.RemoteMonitorRunner; -import org.opensearch.client.Client; import org.opensearch.commons.alerting.model.Input; import org.opensearch.commons.alerting.model.InputRunResults; import org.opensearch.commons.alerting.model.Monitor; @@ -22,6 +21,7 @@ import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.transport.TransportService; +import org.opensearch.transport.client.Client; import java.time.Instant; import java.util.Map; diff --git a/settings.gradle b/settings.gradle index e6d7bcbdd..1d5c717af 100644 --- a/settings.gradle +++ b/settings.gradle @@ -13,3 +13,4 @@ project(":spi").name = 'alerting-spi' include 'sample-remote-monitor-plugin' project(":sample-remote-monitor-plugin").name = "alerting-sample-remote-monitor-plugin" +// startParameter.excludedTaskNames=["generatePomFileForShadowPublication"] diff --git a/spi/build.gradle b/spi/build.gradle index 5a586bd48..82bd20cf3 100644 --- a/spi/build.gradle +++ b/spi/build.gradle @@ -13,7 +13,7 @@ apply plugin: 'java' apply plugin: 'opensearch.java-rest-test' apply plugin: 'org.jetbrains.kotlin.jvm' apply plugin: 'jacoco' -apply plugin: 'com.github.johnrengelman.shadow' +apply plugin: 'com.gradleup.shadow' apply plugin: 'opensearch.repositories' dependencies {