From 9c025760a264e4368b4ffd1b0a5cf4b82e7d049d Mon Sep 17 00:00:00 2001 From: Monu Singh Date: Fri, 21 Jul 2023 16:21:43 +0530 Subject: [PATCH] Move from common to core.common (#1087) Keep up with core changes opensearch-project/OpenSearch#8157 move from common to core.common Change kotlin.version "1.8.21" as Class 'org.opensearch.commons.utils.OpenForTesting' was compiled with "1.8.21" version of Kotlin. Ref Set following to use 1.6 as 1.8.21 is not available yet. Checked that other OpenSearch plugins are also doing the same. Set kotlinx-coroutines-core to 1.6.0 set kotlinx-coroutines-test to 1.6.0 Added else in when statements as from Kotlin 1.7 version onward exhaustive list is mandatory. 'when' expression must be exhaustive, add necessary 'else' branch --------- Signed-off-by: monusingh-1 --- build.gradle | 8 ++++---- .../org/opensearch/replication/ReplicationException.kt | 6 +++--- .../org/opensearch/replication/ReplicationPlugin.kt | 4 ++-- .../autofollow/AutoFollowClusterManagerNodeRequest.kt | 4 ++-- .../TransportAutoFollowClusterManagerNodeAction.kt | 2 +- .../action/autofollow/UpdateAutoFollowPatternRequest.kt | 4 ++-- .../replication/action/changes/GetChangesRequest.kt | 6 +++--- .../replication/action/changes/GetChangesResponse.kt | 4 ++-- .../action/changes/TransportGetChangesAction.kt | 6 +++--- .../index/ReplicateIndexClusterManagerNodeRequest.kt | 4 ++-- .../replication/action/index/ReplicateIndexRequest.kt | 4 ++-- .../replication/action/index/ReplicateIndexResponse.kt | 4 ++-- .../TransportReplicateIndexClusterManagerNodeAction.kt | 4 ++-- .../index/block/TransportUpddateIndexBlockAction.kt | 2 +- .../action/index/block/UpdateIndexBlockRequest.kt | 4 ++-- .../action/pause/PauseIndexReplicationRequest.kt | 4 ++-- .../action/pause/TransportPauseIndexReplicationAction.kt | 2 +- .../replication/action/replay/ReplayChangesRequest.kt | 6 +++--- .../replication/action/replay/ReplayChangesResponse.kt | 2 +- .../action/replay/TransportReplayChangesAction.kt | 6 +++--- .../TransportUpdateReplicationStateDetails.kt | 2 +- .../UpdateReplicationStateDetailsRequest.kt | 4 ++-- .../replication/action/repository/GetFileChunkRequest.kt | 6 +++--- .../replication/action/repository/GetFileChunkResponse.kt | 6 +++--- .../action/repository/GetStoreMetadataRequest.kt | 4 ++-- .../action/repository/GetStoreMetadataResponse.kt | 4 ++-- .../action/repository/ReleaseLeaderResourcesRequest.kt | 4 ++-- .../action/repository/RemoteClusterRepositoryRequest.kt | 6 +++--- .../action/repository/TransportGetFileChunkAction.kt | 8 ++++---- .../action/repository/TransportGetStoreMetadataAction.kt | 6 +++--- .../repository/TransportReleaseLeaderResourcesAction.kt | 6 +++--- .../action/resume/ResumeIndexReplicationRequest.kt | 4 ++-- .../resume/TransportResumeIndexReplicationAction.kt | 4 ++-- .../replication/action/setup/SetupChecksRequest.kt | 4 ++-- .../action/setup/TransportSetupChecksAction.kt | 2 +- .../action/setup/ValidatePermissionsRequest.kt | 4 ++-- .../replication/action/stats/AutoFollowStatsAction.kt | 6 +++--- .../replication/action/stats/AutoFollowStatsRequest.kt | 4 ++-- .../replication/action/stats/FollowerNodeStatsResponse.kt | 6 +++--- .../replication/action/stats/FollowerStatsAction.kt | 2 +- .../replication/action/stats/FollowerStatsRequest.kt | 4 ++-- .../replication/action/stats/FollowerStatsResponse.kt | 6 +++--- .../replication/action/stats/LeaderNodeStatsResponse.kt | 6 +++--- .../replication/action/stats/LeaderStatsAction.kt | 2 +- .../replication/action/stats/LeaderStatsRequest.kt | 4 ++-- .../replication/action/stats/LeaderStatsResponse.kt | 4 ++-- .../replication/action/stats/NodeStatsRequest.kt | 4 ++-- .../action/stats/TransportFollowerStatsAction.kt | 2 +- .../action/stats/TransportLeaderStatsAction.kt | 4 ++-- .../replication/action/status/ReplicationStatusAction.kt | 2 +- .../action/status/ReplicationStatusResponse.kt | 6 +++--- .../replication/action/status/ShardInfoRequest.kt | 4 ++-- .../replication/action/status/ShardInfoResponse.kt | 6 +++--- .../replication/action/status/ShardsInfoAction.kt | 2 +- .../replication/action/status/TranportShardsInfoAction.kt | 6 +++--- .../action/stop/StopIndexReplicationRequest.kt | 4 ++-- .../action/stop/TransportStopIndexReplicationAction.kt | 2 +- .../update/TransportUpdateIndexReplicationAction.kt | 2 +- .../action/update/UpdateIndexReplicationRequest.kt | 4 ++-- .../replication/metadata/TransportUpdateMetadataAction.kt | 4 ++-- .../replication/metadata/UpdateIndexBlockTask.kt | 2 +- .../replication/metadata/UpdateMetadataRequest.kt | 4 ++-- .../metadata/state/ReplicationStateMetadata.kt | 4 ++-- .../replication/metadata/store/ReplicationMetadata.kt | 6 +++--- .../repository/RemoteClusterMultiChunkTransfer.kt | 2 +- .../replication/repository/RemoteClusterRepository.kt | 8 ++++---- .../opensearch/replication/rest/AutoFollowStatsHandler.kt | 2 +- .../opensearch/replication/rest/FollowerStatsHandler.kt | 2 +- .../org/opensearch/replication/rest/LeaderStatsHandler.kt | 2 +- .../replication/rest/UpdateAutoFollowPatternsHandler.kt | 2 +- .../org/opensearch/replication/rest/UpdateIndexHandler.kt | 2 +- .../seqno/RemoteClusterRetentionLeaseHelper.kt | 2 +- .../opensearch/replication/seqno/RemoteClusterStats.kt | 6 +++--- .../replication/task/CrossClusterReplicationTask.kt | 6 +++--- .../org/opensearch/replication/task/IndexCloseListener.kt | 2 +- .../org/opensearch/replication/task/ReplicationState.kt | 6 +++--- .../replication/task/autofollow/AutoFollowParams.kt | 4 ++-- .../replication/task/autofollow/AutoFollowTask.kt | 6 +++--- .../replication/task/index/IndexReplicationParams.kt | 6 +++--- .../replication/task/index/IndexReplicationState.kt | 6 +++--- .../replication/task/index/IndexReplicationTask.kt | 8 ++++---- .../replication/task/shard/FollowerClusterStats.kt | 6 +++--- .../replication/task/shard/ShardReplicationParams.kt | 8 ++++---- .../replication/task/shard/ShardReplicationState.kt | 4 ++-- .../replication/task/shard/ShardReplicationTask.kt | 4 ++-- .../replication/task/shard/TranslogSequencer.kt | 4 ++-- .../kotlin/org/opensearch/replication/util/Extensions.kt | 4 ++-- .../translog/ReplicationTranslogDeletionPolicyTests.kt | 4 ++-- .../replication/bwc/BackwardsCompatibilityIT.kt | 1 + .../replication/singleCluster/SingleClusterSanityIT.kt | 1 + .../replication/task/index/IndexReplicationTaskTests.kt | 4 ++-- .../org/opensearch/replication/task/index/NoOpClient.kt | 6 +++--- .../task/shard/ShardReplicationExecutorTests.kt | 4 ++-- .../replication/task/shard/TranslogSequencerTests.kt | 2 +- 94 files changed, 199 insertions(+), 197 deletions(-) diff --git a/build.gradle b/build.gradle index ccbfaf1e..ead3cae9 100644 --- a/build.gradle +++ b/build.gradle @@ -36,7 +36,7 @@ import org.opensearch.gradle.test.RestIntegTestTask buildscript { ext { isSnapshot = "true" == System.getProperty("build.snapshot", "true") - opensearch_version = System.getProperty("opensearch.version", "2.8.0-SNAPSHOT") + opensearch_version = System.getProperty("opensearch.version", "2.10.0-SNAPSHOT") buildVersionQualifier = System.getProperty("build.version_qualifier", "") // e.g. 2.0.0-rc1-SNAPSHOT -> 2.0.0.0-rc1-SNAPSHOT version_tokens = opensearch_version.tokenize('-') @@ -54,7 +54,7 @@ buildscript { plugin_previous_version = opensearch_previous_version.replaceAll(/(\.\d)([^\d]*)$/, '$1.0$2') common_utils_version = System.getProperty("common_utils.version", opensearch_build) - kotlin_version = System.getProperty("kotlin.version", "1.6.0") + kotlin_version = System.getProperty("kotlin.version", "1.8.21") // For fetching security zip from Maven. // https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.1.0/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-security-2.1.0.0.zip @@ -141,13 +141,13 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}" implementation "org.jetbrains:annotations:13.0" implementation "com.github.seancfoley:ipaddress:5.3.3" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${kotlin_version}" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0" // Moving away from kotlin_version implementation "org.opensearch:common-utils:${common_utils_version}" testImplementation "org.opensearch.test:framework:${opensearch_version}" testImplementation "org.assertj:assertj-core:3.17.2" testImplementation "org.opensearch.client:opensearch-rest-high-level-client:${opensearch_version}" - testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:${kotlin_version}" + testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.0" // Moving away from kotlin_version testImplementation "org.jetbrains.kotlin:kotlin-test:${kotlin_version}" testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0" } diff --git a/src/main/kotlin/org/opensearch/replication/ReplicationException.kt b/src/main/kotlin/org/opensearch/replication/ReplicationException.kt index 891be0a3..83e59220 100644 --- a/src/main/kotlin/org/opensearch/replication/ReplicationException.kt +++ b/src/main/kotlin/org/opensearch/replication/ReplicationException.kt @@ -13,10 +13,10 @@ package org.opensearch.replication import org.opensearch.OpenSearchException import org.opensearch.OpenSearchStatusException -import org.opensearch.action.ShardOperationFailedException +import org.opensearch.core.action.ShardOperationFailedException import org.opensearch.cluster.metadata.IndexMetadata.INDEX_UUID_NA_VALUE -import org.opensearch.index.shard.ShardId -import org.opensearch.rest.RestStatus +import org.opensearch.core.index.shard.ShardId +import org.opensearch.core.rest.RestStatus /** * Base class replication exceptions. Note: Replication process may throw exceptions that do not derive from this such as diff --git a/src/main/kotlin/org/opensearch/replication/ReplicationPlugin.kt b/src/main/kotlin/org/opensearch/replication/ReplicationPlugin.kt index 4254412c..7d66c976 100644 --- a/src/main/kotlin/org/opensearch/replication/ReplicationPlugin.kt +++ b/src/main/kotlin/org/opensearch/replication/ReplicationPlugin.kt @@ -84,8 +84,8 @@ import org.opensearch.cluster.service.ClusterService import org.opensearch.common.CheckedFunction import org.opensearch.core.ParseField import org.opensearch.common.component.LifecycleComponent -import org.opensearch.common.io.stream.NamedWriteableRegistry -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.NamedWriteableRegistry +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.common.settings.ClusterSettings import org.opensearch.common.settings.IndexScopedSettings import org.opensearch.common.settings.Setting diff --git a/src/main/kotlin/org/opensearch/replication/action/autofollow/AutoFollowClusterManagerNodeRequest.kt b/src/main/kotlin/org/opensearch/replication/action/autofollow/AutoFollowClusterManagerNodeRequest.kt index f9199ea0..216809d8 100644 --- a/src/main/kotlin/org/opensearch/replication/action/autofollow/AutoFollowClusterManagerNodeRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/autofollow/AutoFollowClusterManagerNodeRequest.kt @@ -14,8 +14,8 @@ package org.opensearch.replication.action.autofollow import org.opensearch.commons.authuser.User import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.master.MasterNodeRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/replication/action/autofollow/TransportAutoFollowClusterManagerNodeAction.kt b/src/main/kotlin/org/opensearch/replication/action/autofollow/TransportAutoFollowClusterManagerNodeAction.kt index e3c59444..cc93d88a 100644 --- a/src/main/kotlin/org/opensearch/replication/action/autofollow/TransportAutoFollowClusterManagerNodeAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/autofollow/TransportAutoFollowClusterManagerNodeAction.kt @@ -39,7 +39,7 @@ import org.opensearch.cluster.block.ClusterBlockLevel import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.common.settings.IndexScopedSettings import org.opensearch.replication.ReplicationException import org.opensearch.threadpool.ThreadPool diff --git a/src/main/kotlin/org/opensearch/replication/action/autofollow/UpdateAutoFollowPatternRequest.kt b/src/main/kotlin/org/opensearch/replication/action/autofollow/UpdateAutoFollowPatternRequest.kt index a7077793..165ede8b 100644 --- a/src/main/kotlin/org/opensearch/replication/action/autofollow/UpdateAutoFollowPatternRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/autofollow/UpdateAutoFollowPatternRequest.kt @@ -17,8 +17,8 @@ import org.opensearch.replication.util.ValidationUtil.validateName import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.master.AcknowledgedRequest import org.opensearch.core.ParseField -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.common.settings.Settings import org.opensearch.core.xcontent.ObjectParser import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/replication/action/changes/GetChangesRequest.kt b/src/main/kotlin/org/opensearch/replication/action/changes/GetChangesRequest.kt index d3aeb8e7..43e1fa33 100644 --- a/src/main/kotlin/org/opensearch/replication/action/changes/GetChangesRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/changes/GetChangesRequest.kt @@ -14,9 +14,9 @@ package org.opensearch.replication.action.changes import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.single.shard.SingleShardRequest import org.opensearch.cluster.node.DiscoveryNode -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.index.shard.ShardId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.index.shard.ShardId import org.opensearch.transport.RemoteClusterAwareRequest class GetChangesRequest : SingleShardRequest { diff --git a/src/main/kotlin/org/opensearch/replication/action/changes/GetChangesResponse.kt b/src/main/kotlin/org/opensearch/replication/action/changes/GetChangesResponse.kt index f3adaf2e..c71b4795 100644 --- a/src/main/kotlin/org/opensearch/replication/action/changes/GetChangesResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/changes/GetChangesResponse.kt @@ -12,8 +12,8 @@ package org.opensearch.replication.action.changes import org.opensearch.action.ActionResponse -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.index.translog.Translog class GetChangesResponse(val changes: List, diff --git a/src/main/kotlin/org/opensearch/replication/action/changes/TransportGetChangesAction.kt b/src/main/kotlin/org/opensearch/replication/action/changes/TransportGetChangesAction.kt index c483ebad..a3995999 100644 --- a/src/main/kotlin/org/opensearch/replication/action/changes/TransportGetChangesAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/changes/TransportGetChangesAction.kt @@ -23,10 +23,10 @@ import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.routing.ShardsIterator import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.common.unit.TimeValue -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.index.translog.Translog import org.opensearch.indices.IndicesService import org.opensearch.replication.ReplicationPlugin.Companion.REPLICATION_INDEX_TRANSLOG_PRUNING_ENABLED_SETTING diff --git a/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexClusterManagerNodeRequest.kt b/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexClusterManagerNodeRequest.kt index 63f77023..0b741d4e 100644 --- a/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexClusterManagerNodeRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexClusterManagerNodeRequest.kt @@ -14,8 +14,8 @@ package org.opensearch.replication.action.index import org.opensearch.commons.authuser.User import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.master.MasterNodeRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexRequest.kt b/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexRequest.kt index bb0f9aaf..6024798a 100644 --- a/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexRequest.kt @@ -18,8 +18,8 @@ import org.opensearch.action.IndicesRequest import org.opensearch.action.support.IndicesOptions import org.opensearch.action.support.master.AcknowledgedRequest import org.opensearch.core.ParseField -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.common.settings.Settings import org.opensearch.core.xcontent.ObjectParser import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexResponse.kt b/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexResponse.kt index 6ab3cc75..31963036 100644 --- a/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexResponse.kt @@ -12,8 +12,8 @@ package org.opensearch.replication.action.index import org.opensearch.action.support.master.AcknowledgedResponse -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput class ReplicateIndexResponse(val ack: Boolean) : AcknowledgedResponse(ack) { constructor(inp: StreamInput) : this(inp.readBoolean()) diff --git a/src/main/kotlin/org/opensearch/replication/action/index/TransportReplicateIndexClusterManagerNodeAction.kt b/src/main/kotlin/org/opensearch/replication/action/index/TransportReplicateIndexClusterManagerNodeAction.kt index 1a926798..36fe81f2 100644 --- a/src/main/kotlin/org/opensearch/replication/action/index/TransportReplicateIndexClusterManagerNodeAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/index/TransportReplicateIndexClusterManagerNodeAction.kt @@ -40,14 +40,14 @@ import org.opensearch.cluster.metadata.IndexMetadata import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.common.settings.IndexScopedSettings import org.opensearch.index.IndexNotFoundException import org.opensearch.persistent.PersistentTasksService import org.opensearch.replication.ReplicationPlugin import org.opensearch.replication.util.stackTraceToString import org.opensearch.repositories.RepositoriesService -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import org.opensearch.threadpool.ThreadPool import org.opensearch.transport.TransportService import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/replication/action/index/block/TransportUpddateIndexBlockAction.kt b/src/main/kotlin/org/opensearch/replication/action/index/block/TransportUpddateIndexBlockAction.kt index 189e7acc..55e569aa 100644 --- a/src/main/kotlin/org/opensearch/replication/action/index/block/TransportUpddateIndexBlockAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/index/block/TransportUpddateIndexBlockAction.kt @@ -31,7 +31,7 @@ import org.opensearch.cluster.block.ClusterBlockLevel import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.threadpool.ThreadPool import org.opensearch.transport.TransportService import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/replication/action/index/block/UpdateIndexBlockRequest.kt b/src/main/kotlin/org/opensearch/replication/action/index/block/UpdateIndexBlockRequest.kt index d9b51933..4c766468 100644 --- a/src/main/kotlin/org/opensearch/replication/action/index/block/UpdateIndexBlockRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/index/block/UpdateIndexBlockRequest.kt @@ -16,8 +16,8 @@ import org.opensearch.action.IndicesRequest import org.opensearch.action.support.IndicesOptions import org.opensearch.action.support.master.AcknowledgedRequest import org.opensearch.core.ParseField -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ObjectParser import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject diff --git a/src/main/kotlin/org/opensearch/replication/action/pause/PauseIndexReplicationRequest.kt b/src/main/kotlin/org/opensearch/replication/action/pause/PauseIndexReplicationRequest.kt index e69dcb44..fce15d2e 100644 --- a/src/main/kotlin/org/opensearch/replication/action/pause/PauseIndexReplicationRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/pause/PauseIndexReplicationRequest.kt @@ -17,8 +17,8 @@ import org.opensearch.action.IndicesRequest import org.opensearch.action.support.IndicesOptions import org.opensearch.action.support.master.AcknowledgedRequest import org.opensearch.core.ParseField -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ObjectParser import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject diff --git a/src/main/kotlin/org/opensearch/replication/action/pause/TransportPauseIndexReplicationAction.kt b/src/main/kotlin/org/opensearch/replication/action/pause/TransportPauseIndexReplicationAction.kt index abd54403..eaf828a1 100644 --- a/src/main/kotlin/org/opensearch/replication/action/pause/TransportPauseIndexReplicationAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/pause/TransportPauseIndexReplicationAction.kt @@ -37,7 +37,7 @@ import org.opensearch.cluster.block.ClusterBlockLevel import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.threadpool.ThreadPool import org.opensearch.transport.TransportService import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/replication/action/replay/ReplayChangesRequest.kt b/src/main/kotlin/org/opensearch/replication/action/replay/ReplayChangesRequest.kt index 7ac35526..a7366b1a 100644 --- a/src/main/kotlin/org/opensearch/replication/action/replay/ReplayChangesRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/replay/ReplayChangesRequest.kt @@ -12,9 +12,9 @@ package org.opensearch.replication.action.replay import org.opensearch.action.support.replication.ReplicatedWriteRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.index.shard.ShardId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.index.shard.ShardId import org.opensearch.index.translog.Translog class ReplayChangesRequest : ReplicatedWriteRequest { diff --git a/src/main/kotlin/org/opensearch/replication/action/replay/ReplayChangesResponse.kt b/src/main/kotlin/org/opensearch/replication/action/replay/ReplayChangesResponse.kt index b0bab6fb..5fe155f4 100644 --- a/src/main/kotlin/org/opensearch/replication/action/replay/ReplayChangesResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/replay/ReplayChangesResponse.kt @@ -13,7 +13,7 @@ package org.opensearch.replication.action.replay import org.opensearch.action.support.WriteResponse import org.opensearch.action.support.replication.ReplicationResponse -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput class ReplayChangesResponse : ReplicationResponse, WriteResponse { diff --git a/src/main/kotlin/org/opensearch/replication/action/replay/TransportReplayChangesAction.kt b/src/main/kotlin/org/opensearch/replication/action/replay/TransportReplayChangesAction.kt index 9b3a78b6..c874e92f 100644 --- a/src/main/kotlin/org/opensearch/replication/action/replay/TransportReplayChangesAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/replay/TransportReplayChangesAction.kt @@ -39,10 +39,10 @@ import org.opensearch.cluster.action.index.MappingUpdatedAction import org.opensearch.cluster.action.shard.ShardStateAction import org.opensearch.cluster.block.ClusterBlockLevel import org.opensearch.cluster.service.ClusterService -import org.opensearch.common.bytes.BytesReference +import org.opensearch.core.common.bytes.BytesReference import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.common.settings.Settings import org.opensearch.common.xcontent.XContentType import org.opensearch.index.IndexingPressureService diff --git a/src/main/kotlin/org/opensearch/replication/action/replicationstatedetails/TransportUpdateReplicationStateDetails.kt b/src/main/kotlin/org/opensearch/replication/action/replicationstatedetails/TransportUpdateReplicationStateDetails.kt index ada0aefa..0b744482 100644 --- a/src/main/kotlin/org/opensearch/replication/action/replicationstatedetails/TransportUpdateReplicationStateDetails.kt +++ b/src/main/kotlin/org/opensearch/replication/action/replicationstatedetails/TransportUpdateReplicationStateDetails.kt @@ -30,7 +30,7 @@ import org.opensearch.cluster.block.ClusterBlockLevel import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.threadpool.ThreadPool import org.opensearch.transport.TransportService diff --git a/src/main/kotlin/org/opensearch/replication/action/replicationstatedetails/UpdateReplicationStateDetailsRequest.kt b/src/main/kotlin/org/opensearch/replication/action/replicationstatedetails/UpdateReplicationStateDetailsRequest.kt index 04fedd0a..1b139495 100644 --- a/src/main/kotlin/org/opensearch/replication/action/replicationstatedetails/UpdateReplicationStateDetailsRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/replicationstatedetails/UpdateReplicationStateDetailsRequest.kt @@ -14,8 +14,8 @@ package org.opensearch.replication.action.replicationstatedetails import org.opensearch.replication.metadata.state.ReplicationStateParams import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.master.AcknowledgedRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput class UpdateReplicationStateDetailsRequest: AcknowledgedRequest { diff --git a/src/main/kotlin/org/opensearch/replication/action/repository/GetFileChunkRequest.kt b/src/main/kotlin/org/opensearch/replication/action/repository/GetFileChunkRequest.kt index 8f9213b1..d959866e 100644 --- a/src/main/kotlin/org/opensearch/replication/action/repository/GetFileChunkRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/repository/GetFileChunkRequest.kt @@ -13,9 +13,9 @@ package org.opensearch.replication.action.repository import org.opensearch.action.ActionRequestValidationException import org.opensearch.cluster.node.DiscoveryNode -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.index.shard.ShardId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.index.shard.ShardId import org.opensearch.index.store.StoreFileMetadata class GetFileChunkRequest : RemoteClusterRepositoryRequest { diff --git a/src/main/kotlin/org/opensearch/replication/action/repository/GetFileChunkResponse.kt b/src/main/kotlin/org/opensearch/replication/action/repository/GetFileChunkResponse.kt index 5e292138..325e20f0 100644 --- a/src/main/kotlin/org/opensearch/replication/action/repository/GetFileChunkResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/repository/GetFileChunkResponse.kt @@ -12,9 +12,9 @@ package org.opensearch.replication.action.repository import org.opensearch.action.ActionResponse -import org.opensearch.common.bytes.BytesReference -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.bytes.BytesReference +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.index.store.StoreFileMetadata class GetFileChunkResponse : ActionResponse { diff --git a/src/main/kotlin/org/opensearch/replication/action/repository/GetStoreMetadataRequest.kt b/src/main/kotlin/org/opensearch/replication/action/repository/GetStoreMetadataRequest.kt index f8940730..d26e37e1 100644 --- a/src/main/kotlin/org/opensearch/replication/action/repository/GetStoreMetadataRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/repository/GetStoreMetadataRequest.kt @@ -13,8 +13,8 @@ package org.opensearch.replication.action.repository import org.opensearch.action.ActionRequestValidationException import org.opensearch.cluster.node.DiscoveryNode -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.index.shard.ShardId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.index.shard.ShardId class GetStoreMetadataRequest : RemoteClusterRepositoryRequest { diff --git a/src/main/kotlin/org/opensearch/replication/action/repository/GetStoreMetadataResponse.kt b/src/main/kotlin/org/opensearch/replication/action/repository/GetStoreMetadataResponse.kt index baeb62b5..9ef97259 100644 --- a/src/main/kotlin/org/opensearch/replication/action/repository/GetStoreMetadataResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/repository/GetStoreMetadataResponse.kt @@ -12,8 +12,8 @@ package org.opensearch.replication.action.repository import org.opensearch.action.ActionResponse -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.index.store.Store class GetStoreMetadataResponse : ActionResponse { diff --git a/src/main/kotlin/org/opensearch/replication/action/repository/ReleaseLeaderResourcesRequest.kt b/src/main/kotlin/org/opensearch/replication/action/repository/ReleaseLeaderResourcesRequest.kt index 2ea55a01..97908e9f 100644 --- a/src/main/kotlin/org/opensearch/replication/action/repository/ReleaseLeaderResourcesRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/repository/ReleaseLeaderResourcesRequest.kt @@ -13,8 +13,8 @@ package org.opensearch.replication.action.repository import org.opensearch.action.ActionRequestValidationException import org.opensearch.cluster.node.DiscoveryNode -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.index.shard.ShardId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.index.shard.ShardId class ReleaseLeaderResourcesRequest: RemoteClusterRepositoryRequest { diff --git a/src/main/kotlin/org/opensearch/replication/action/repository/RemoteClusterRepositoryRequest.kt b/src/main/kotlin/org/opensearch/replication/action/repository/RemoteClusterRepositoryRequest.kt index 8a600a4e..8dd702d9 100644 --- a/src/main/kotlin/org/opensearch/replication/action/repository/RemoteClusterRepositoryRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/repository/RemoteClusterRepositoryRequest.kt @@ -13,9 +13,9 @@ package org.opensearch.replication.action.repository import org.opensearch.action.support.single.shard.SingleShardRequest import org.opensearch.cluster.node.DiscoveryNode -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.index.shard.ShardId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.index.shard.ShardId import org.opensearch.transport.RemoteClusterAwareRequest abstract class RemoteClusterRepositoryRequest?>: diff --git a/src/main/kotlin/org/opensearch/replication/action/repository/TransportGetFileChunkAction.kt b/src/main/kotlin/org/opensearch/replication/action/repository/TransportGetFileChunkAction.kt index 2564a0e3..9b8b13e1 100644 --- a/src/main/kotlin/org/opensearch/replication/action/repository/TransportGetFileChunkAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/repository/TransportGetFileChunkAction.kt @@ -20,11 +20,11 @@ import org.opensearch.cluster.ClusterState import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.routing.ShardsIterator import org.opensearch.cluster.service.ClusterService -import org.opensearch.common.bytes.BytesArray +import org.opensearch.core.common.bytes.BytesArray import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.index.shard.ShardId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.index.shard.ShardId import org.opensearch.indices.IndicesService import org.opensearch.threadpool.ThreadPool import org.opensearch.transport.TransportActionProxy diff --git a/src/main/kotlin/org/opensearch/replication/action/repository/TransportGetStoreMetadataAction.kt b/src/main/kotlin/org/opensearch/replication/action/repository/TransportGetStoreMetadataAction.kt index e3c677d8..44ce8570 100644 --- a/src/main/kotlin/org/opensearch/replication/action/repository/TransportGetStoreMetadataAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/repository/TransportGetStoreMetadataAction.kt @@ -20,9 +20,9 @@ import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.routing.ShardsIterator import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.index.shard.ShardId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.index.shard.ShardId import org.opensearch.threadpool.ThreadPool import org.opensearch.transport.TransportActionProxy import org.opensearch.transport.TransportService diff --git a/src/main/kotlin/org/opensearch/replication/action/repository/TransportReleaseLeaderResourcesAction.kt b/src/main/kotlin/org/opensearch/replication/action/repository/TransportReleaseLeaderResourcesAction.kt index 9818ebcc..62a615b3 100644 --- a/src/main/kotlin/org/opensearch/replication/action/repository/TransportReleaseLeaderResourcesAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/repository/TransportReleaseLeaderResourcesAction.kt @@ -21,9 +21,9 @@ import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.routing.ShardsIterator import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.index.shard.ShardId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.index.shard.ShardId import org.opensearch.threadpool.ThreadPool import org.opensearch.transport.TransportActionProxy import org.opensearch.transport.TransportService diff --git a/src/main/kotlin/org/opensearch/replication/action/resume/ResumeIndexReplicationRequest.kt b/src/main/kotlin/org/opensearch/replication/action/resume/ResumeIndexReplicationRequest.kt index dd219272..10220a7f 100644 --- a/src/main/kotlin/org/opensearch/replication/action/resume/ResumeIndexReplicationRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/resume/ResumeIndexReplicationRequest.kt @@ -15,8 +15,8 @@ import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.IndicesRequest import org.opensearch.action.support.IndicesOptions import org.opensearch.action.support.master.AcknowledgedRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.* class ResumeIndexReplicationRequest : AcknowledgedRequest, IndicesRequest.Replaceable, ToXContentObject { diff --git a/src/main/kotlin/org/opensearch/replication/action/resume/TransportResumeIndexReplicationAction.kt b/src/main/kotlin/org/opensearch/replication/action/resume/TransportResumeIndexReplicationAction.kt index 97fb017e..a1128913 100644 --- a/src/main/kotlin/org/opensearch/replication/action/resume/TransportResumeIndexReplicationAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/resume/TransportResumeIndexReplicationAction.kt @@ -50,10 +50,10 @@ import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.env.Environment import org.opensearch.index.IndexNotFoundException -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.threadpool.ThreadPool import org.opensearch.transport.TransportService import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/replication/action/setup/SetupChecksRequest.kt b/src/main/kotlin/org/opensearch/replication/action/setup/SetupChecksRequest.kt index 57b9fffb..44e53460 100644 --- a/src/main/kotlin/org/opensearch/replication/action/setup/SetupChecksRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/setup/SetupChecksRequest.kt @@ -14,8 +14,8 @@ package org.opensearch.replication.action.setup import org.opensearch.replication.metadata.store.ReplicationContext import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.master.AcknowledgedRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/replication/action/setup/TransportSetupChecksAction.kt b/src/main/kotlin/org/opensearch/replication/action/setup/TransportSetupChecksAction.kt index 82315e37..0b1169b6 100644 --- a/src/main/kotlin/org/opensearch/replication/action/setup/TransportSetupChecksAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/setup/TransportSetupChecksAction.kt @@ -26,7 +26,7 @@ import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject import org.opensearch.common.util.concurrent.ThreadContext import org.opensearch.replication.util.stackTraceToString -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import org.opensearch.tasks.Task import org.opensearch.threadpool.ThreadPool import org.opensearch.transport.ActionNotFoundTransportException diff --git a/src/main/kotlin/org/opensearch/replication/action/setup/ValidatePermissionsRequest.kt b/src/main/kotlin/org/opensearch/replication/action/setup/ValidatePermissionsRequest.kt index 430fe9b8..7808fd85 100644 --- a/src/main/kotlin/org/opensearch/replication/action/setup/ValidatePermissionsRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/setup/ValidatePermissionsRequest.kt @@ -15,8 +15,8 @@ import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.IndicesRequest import org.opensearch.action.support.IndicesOptions import org.opensearch.action.support.master.AcknowledgedRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/replication/action/stats/AutoFollowStatsAction.kt b/src/main/kotlin/org/opensearch/replication/action/stats/AutoFollowStatsAction.kt index 0878d377..3c7b60fe 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/AutoFollowStatsAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/AutoFollowStatsAction.kt @@ -15,9 +15,9 @@ import org.opensearch.action.ActionType import org.opensearch.action.FailedNodeException import org.opensearch.action.TaskOperationFailure import org.opensearch.action.support.tasks.BaseTasksResponse -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContent.EMPTY_PARAMS import org.opensearch.core.xcontent.ToXContentObject diff --git a/src/main/kotlin/org/opensearch/replication/action/stats/AutoFollowStatsRequest.kt b/src/main/kotlin/org/opensearch/replication/action/stats/AutoFollowStatsRequest.kt index 93102cf5..7bce9a0d 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/AutoFollowStatsRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/AutoFollowStatsRequest.kt @@ -13,8 +13,8 @@ package org.opensearch.replication.action.stats import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.tasks.BaseTasksRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.replication.task.autofollow.AutoFollowTask import org.opensearch.tasks.Task import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/replication/action/stats/FollowerNodeStatsResponse.kt b/src/main/kotlin/org/opensearch/replication/action/stats/FollowerNodeStatsResponse.kt index cdff07ab..a20ae942 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/FollowerNodeStatsResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/FollowerNodeStatsResponse.kt @@ -13,9 +13,9 @@ package org.opensearch.replication.action.stats import org.opensearch.action.support.nodes.BaseNodeResponse import org.opensearch.cluster.node.DiscoveryNode -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.index.shard.ShardId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.index.shard.ShardId import org.opensearch.replication.task.shard.FollowerShardMetric import org.opensearch.replication.task.shard.FollowerShardMetric.FollowerStats import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/replication/action/stats/FollowerStatsAction.kt b/src/main/kotlin/org/opensearch/replication/action/stats/FollowerStatsAction.kt index 8ecafb98..9d07bea1 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/FollowerStatsAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/FollowerStatsAction.kt @@ -12,7 +12,7 @@ package org.opensearch.replication.action.stats import org.opensearch.action.ActionType -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.Writeable class FollowerStatsAction : ActionType(NAME, reader) { companion object { diff --git a/src/main/kotlin/org/opensearch/replication/action/stats/FollowerStatsRequest.kt b/src/main/kotlin/org/opensearch/replication/action/stats/FollowerStatsRequest.kt index e79e4d2e..9dfdf8f5 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/FollowerStatsRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/FollowerStatsRequest.kt @@ -12,8 +12,8 @@ package org.opensearch.replication.action.stats import org.opensearch.action.support.nodes.BaseNodesRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/replication/action/stats/FollowerStatsResponse.kt b/src/main/kotlin/org/opensearch/replication/action/stats/FollowerStatsResponse.kt index 53271fe4..9d4ae15c 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/FollowerStatsResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/FollowerStatsResponse.kt @@ -17,14 +17,14 @@ import org.opensearch.action.FailedNodeException import org.opensearch.action.support.nodes.BaseNodesResponse import org.opensearch.cluster.ClusterName import org.opensearch.common.Strings -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent.EMPTY_PARAMS import org.opensearch.core.xcontent.ToXContent.Params import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.replication.metadata.ReplicationOverallState import org.opensearch.replication.metadata.state.REPLICATION_LAST_KNOWN_OVERALL_STATE import org.opensearch.replication.metadata.state.ReplicationStateMetadata diff --git a/src/main/kotlin/org/opensearch/replication/action/stats/LeaderNodeStatsResponse.kt b/src/main/kotlin/org/opensearch/replication/action/stats/LeaderNodeStatsResponse.kt index a326772b..cdc4b4d8 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/LeaderNodeStatsResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/LeaderNodeStatsResponse.kt @@ -13,9 +13,9 @@ package org.opensearch.replication.action.stats import org.opensearch.action.support.nodes.BaseNodeResponse import org.opensearch.cluster.node.DiscoveryNode -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.index.shard.ShardId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.index.shard.ShardId import org.opensearch.replication.seqno.RemoteShardMetric import org.opensearch.replication.seqno.RemoteShardMetric.RemoteStats import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/replication/action/stats/LeaderStatsAction.kt b/src/main/kotlin/org/opensearch/replication/action/stats/LeaderStatsAction.kt index be7b3cd4..83c100d7 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/LeaderStatsAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/LeaderStatsAction.kt @@ -12,7 +12,7 @@ package org.opensearch.replication.action.stats import org.opensearch.action.ActionType -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.Writeable class LeaderStatsAction : ActionType(NAME, reader) { companion object { diff --git a/src/main/kotlin/org/opensearch/replication/action/stats/LeaderStatsRequest.kt b/src/main/kotlin/org/opensearch/replication/action/stats/LeaderStatsRequest.kt index 5523a859..53ed027b 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/LeaderStatsRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/LeaderStatsRequest.kt @@ -12,8 +12,8 @@ package org.opensearch.replication.action.stats import org.opensearch.action.support.nodes.BaseNodesRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/replication/action/stats/LeaderStatsResponse.kt b/src/main/kotlin/org/opensearch/replication/action/stats/LeaderStatsResponse.kt index 47333152..29abc78c 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/LeaderStatsResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/LeaderStatsResponse.kt @@ -17,8 +17,8 @@ import org.opensearch.action.FailedNodeException import org.opensearch.action.support.nodes.BaseNodesResponse import org.opensearch.cluster.ClusterName import org.opensearch.common.Strings -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent.EMPTY_PARAMS import org.opensearch.core.xcontent.ToXContent.Params import org.opensearch.core.xcontent.ToXContentObject diff --git a/src/main/kotlin/org/opensearch/replication/action/stats/NodeStatsRequest.kt b/src/main/kotlin/org/opensearch/replication/action/stats/NodeStatsRequest.kt index 19e180da..6e71b8e6 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/NodeStatsRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/NodeStatsRequest.kt @@ -12,8 +12,8 @@ package org.opensearch.replication.action.stats import org.opensearch.action.support.nodes.BaseNodeRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import java.io.IOException class NodeStatsRequest : BaseNodeRequest { diff --git a/src/main/kotlin/org/opensearch/replication/action/stats/TransportFollowerStatsAction.kt b/src/main/kotlin/org/opensearch/replication/action/stats/TransportFollowerStatsAction.kt index e33d9a0c..7a258ef1 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/TransportFollowerStatsAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/TransportFollowerStatsAction.kt @@ -20,7 +20,7 @@ import org.opensearch.action.support.nodes.TransportNodesAction import org.opensearch.client.node.NodeClient import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.replication.metadata.state.ReplicationStateMetadata import org.opensearch.replication.seqno.RemoteClusterStats import org.opensearch.replication.task.shard.FollowerClusterStats diff --git a/src/main/kotlin/org/opensearch/replication/action/stats/TransportLeaderStatsAction.kt b/src/main/kotlin/org/opensearch/replication/action/stats/TransportLeaderStatsAction.kt index 7cc9ec11..f6a91f2c 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/TransportLeaderStatsAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/TransportLeaderStatsAction.kt @@ -20,8 +20,8 @@ import org.opensearch.action.support.nodes.TransportNodesAction import org.opensearch.client.node.NodeClient import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.index.shard.ShardId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.index.shard.ShardId import org.opensearch.indices.IndicesService import org.opensearch.replication.seqno.RemoteClusterRetentionLeaseHelper.Companion.RETENTION_LEASE_PREFIX import org.opensearch.replication.seqno.RemoteClusterStats diff --git a/src/main/kotlin/org/opensearch/replication/action/status/ReplicationStatusAction.kt b/src/main/kotlin/org/opensearch/replication/action/status/ReplicationStatusAction.kt index f2416354..eb4de39f 100644 --- a/src/main/kotlin/org/opensearch/replication/action/status/ReplicationStatusAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/status/ReplicationStatusAction.kt @@ -12,7 +12,7 @@ package org.opensearch.replication.action.status import org.opensearch.action.ActionType -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.Writeable class ReplicationStatusAction : ActionType(NAME, reader) { companion object { diff --git a/src/main/kotlin/org/opensearch/replication/action/status/ReplicationStatusResponse.kt b/src/main/kotlin/org/opensearch/replication/action/status/ReplicationStatusResponse.kt index a4832381..dc982cee 100644 --- a/src/main/kotlin/org/opensearch/replication/action/status/ReplicationStatusResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/status/ReplicationStatusResponse.kt @@ -12,10 +12,10 @@ package org.opensearch.replication.action.status -import org.opensearch.action.support.DefaultShardOperationFailedException +import org.opensearch.core.action.support.DefaultShardOperationFailedException import org.opensearch.action.support.broadcast.BroadcastResponse -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent.Params import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/replication/action/status/ShardInfoRequest.kt b/src/main/kotlin/org/opensearch/replication/action/status/ShardInfoRequest.kt index 024dd976..67e09d6c 100644 --- a/src/main/kotlin/org/opensearch/replication/action/status/ShardInfoRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/status/ShardInfoRequest.kt @@ -14,8 +14,8 @@ package org.opensearch.replication.action.status import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.IndicesOptions import org.opensearch.action.support.broadcast.BroadcastRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/replication/action/status/ShardInfoResponse.kt b/src/main/kotlin/org/opensearch/replication/action/status/ShardInfoResponse.kt index af111889..528e86df 100644 --- a/src/main/kotlin/org/opensearch/replication/action/status/ShardInfoResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/status/ShardInfoResponse.kt @@ -14,12 +14,12 @@ package org.opensearch.replication.action.status import org.opensearch.action.support.broadcast.BroadcastResponse import org.opensearch.action.support.broadcast.BroadcastShardResponse import org.opensearch.core.ParseField -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import java.io.IOException class ShardInfoResponse : BroadcastShardResponse, ToXContentObject { diff --git a/src/main/kotlin/org/opensearch/replication/action/status/ShardsInfoAction.kt b/src/main/kotlin/org/opensearch/replication/action/status/ShardsInfoAction.kt index 81f6ba4e..d77cd714 100644 --- a/src/main/kotlin/org/opensearch/replication/action/status/ShardsInfoAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/status/ShardsInfoAction.kt @@ -12,7 +12,7 @@ package org.opensearch.replication.action.status import org.opensearch.action.ActionType -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.Writeable class ShardsInfoAction : ActionType(NAME, reader) { diff --git a/src/main/kotlin/org/opensearch/replication/action/status/TranportShardsInfoAction.kt b/src/main/kotlin/org/opensearch/replication/action/status/TranportShardsInfoAction.kt index d3f542d8..4fd73b2f 100644 --- a/src/main/kotlin/org/opensearch/replication/action/status/TranportShardsInfoAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/status/TranportShardsInfoAction.kt @@ -13,7 +13,7 @@ package org.opensearch.replication.action.status import org.apache.logging.log4j.LogManager import org.opensearch.action.support.ActionFilters -import org.opensearch.action.support.DefaultShardOperationFailedException +import org.opensearch.core.action.support.DefaultShardOperationFailedException import org.opensearch.action.support.broadcast.node.TransportBroadcastByNodeAction import org.opensearch.cluster.ClusterState import org.opensearch.cluster.block.ClusterBlockException @@ -21,8 +21,8 @@ import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.routing.* import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.index.IndexService import org.opensearch.indices.IndicesService import org.opensearch.threadpool.ThreadPool diff --git a/src/main/kotlin/org/opensearch/replication/action/stop/StopIndexReplicationRequest.kt b/src/main/kotlin/org/opensearch/replication/action/stop/StopIndexReplicationRequest.kt index 2f447eb8..3ae5eff9 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stop/StopIndexReplicationRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stop/StopIndexReplicationRequest.kt @@ -16,8 +16,8 @@ import org.opensearch.action.IndicesRequest import org.opensearch.action.support.IndicesOptions import org.opensearch.action.support.master.AcknowledgedRequest import org.opensearch.core.ParseField -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.* class StopIndexReplicationRequest : AcknowledgedRequest, IndicesRequest.Replaceable, ToXContentObject { diff --git a/src/main/kotlin/org/opensearch/replication/action/stop/TransportStopIndexReplicationAction.kt b/src/main/kotlin/org/opensearch/replication/action/stop/TransportStopIndexReplicationAction.kt index 8a6fdf71..f18cbb30 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stop/TransportStopIndexReplicationAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stop/TransportStopIndexReplicationAction.kt @@ -51,7 +51,7 @@ import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.metadata.Metadata import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.common.settings.Settings import org.opensearch.replication.util.stackTraceToString import org.opensearch.persistent.PersistentTasksCustomMetadata diff --git a/src/main/kotlin/org/opensearch/replication/action/update/TransportUpdateIndexReplicationAction.kt b/src/main/kotlin/org/opensearch/replication/action/update/TransportUpdateIndexReplicationAction.kt index 7ca866d8..333ed9f7 100644 --- a/src/main/kotlin/org/opensearch/replication/action/update/TransportUpdateIndexReplicationAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/update/TransportUpdateIndexReplicationAction.kt @@ -33,7 +33,7 @@ import org.opensearch.cluster.block.ClusterBlockLevel import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.common.settings.IndexScopedSettings import org.opensearch.threadpool.ThreadPool import org.opensearch.transport.TransportService diff --git a/src/main/kotlin/org/opensearch/replication/action/update/UpdateIndexReplicationRequest.kt b/src/main/kotlin/org/opensearch/replication/action/update/UpdateIndexReplicationRequest.kt index 753e2f62..b498ed92 100644 --- a/src/main/kotlin/org/opensearch/replication/action/update/UpdateIndexReplicationRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/update/UpdateIndexReplicationRequest.kt @@ -16,8 +16,8 @@ import org.opensearch.action.IndicesRequest import org.opensearch.action.support.IndicesOptions import org.opensearch.action.support.master.AcknowledgedRequest import org.opensearch.core.ParseField -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.common.settings.Settings import org.opensearch.common.settings.Settings.readSettingsFromStream import org.opensearch.core.xcontent.* diff --git a/src/main/kotlin/org/opensearch/replication/metadata/TransportUpdateMetadataAction.kt b/src/main/kotlin/org/opensearch/replication/metadata/TransportUpdateMetadataAction.kt index eb3b1750..21b1643f 100644 --- a/src/main/kotlin/org/opensearch/replication/metadata/TransportUpdateMetadataAction.kt +++ b/src/main/kotlin/org/opensearch/replication/metadata/TransportUpdateMetadataAction.kt @@ -40,8 +40,8 @@ import org.opensearch.cluster.metadata.* import org.opensearch.cluster.metadata.AliasAction.RemoveIndex import org.opensearch.cluster.service.ClusterService import org.opensearch.common.inject.Inject -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.index.Index +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.index.Index import org.opensearch.index.IndexNotFoundException import org.opensearch.replication.util.stackTraceToString import org.opensearch.rest.action.admin.indices.AliasesNotFoundException diff --git a/src/main/kotlin/org/opensearch/replication/metadata/UpdateIndexBlockTask.kt b/src/main/kotlin/org/opensearch/replication/metadata/UpdateIndexBlockTask.kt index 3f8e9a90..e67293b6 100644 --- a/src/main/kotlin/org/opensearch/replication/metadata/UpdateIndexBlockTask.kt +++ b/src/main/kotlin/org/opensearch/replication/metadata/UpdateIndexBlockTask.kt @@ -23,7 +23,7 @@ import org.opensearch.cluster.block.ClusterBlockLevel import org.opensearch.cluster.block.ClusterBlocks import org.opensearch.cluster.service.ClusterService import org.opensearch.index.IndexNotFoundException -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import java.util.Collections import java.util.EnumSet diff --git a/src/main/kotlin/org/opensearch/replication/metadata/UpdateMetadataRequest.kt b/src/main/kotlin/org/opensearch/replication/metadata/UpdateMetadataRequest.kt index 25abe070..5f2e4488 100644 --- a/src/main/kotlin/org/opensearch/replication/metadata/UpdateMetadataRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/metadata/UpdateMetadataRequest.kt @@ -18,8 +18,8 @@ import org.opensearch.action.admin.indices.mapping.put.PutMappingRequest import org.opensearch.action.admin.indices.open.OpenIndexRequest import org.opensearch.action.admin.indices.settings.put.UpdateSettingsRequest import org.opensearch.action.support.master.AcknowledgedRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput class UpdateMetadataRequest : AcknowledgedRequest { var indexName: String diff --git a/src/main/kotlin/org/opensearch/replication/metadata/state/ReplicationStateMetadata.kt b/src/main/kotlin/org/opensearch/replication/metadata/state/ReplicationStateMetadata.kt index d6d5c6d9..b87ed1da 100644 --- a/src/main/kotlin/org/opensearch/replication/metadata/state/ReplicationStateMetadata.kt +++ b/src/main/kotlin/org/opensearch/replication/metadata/state/ReplicationStateMetadata.kt @@ -18,8 +18,8 @@ import org.opensearch.cluster.DiffableUtils.getStringKeySerializer import org.opensearch.cluster.NamedDiff import org.opensearch.cluster.metadata.Metadata import org.opensearch.cluster.service.ClusterService -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/replication/metadata/store/ReplicationMetadata.kt b/src/main/kotlin/org/opensearch/replication/metadata/store/ReplicationMetadata.kt index 86cd80c2..891d9970 100644 --- a/src/main/kotlin/org/opensearch/replication/metadata/store/ReplicationMetadata.kt +++ b/src/main/kotlin/org/opensearch/replication/metadata/store/ReplicationMetadata.kt @@ -13,9 +13,9 @@ package org.opensearch.replication.metadata.store import org.opensearch.commons.authuser.User import org.opensearch.core.ParseField -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.common.settings.Settings import org.opensearch.core.xcontent.ObjectParser import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterMultiChunkTransfer.kt b/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterMultiChunkTransfer.kt index f0995346..b3097f13 100644 --- a/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterMultiChunkTransfer.kt +++ b/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterMultiChunkTransfer.kt @@ -28,7 +28,7 @@ import org.opensearch.client.Client import org.opensearch.cluster.node.DiscoveryNode import org.opensearch.common.unit.ByteSizeValue import org.opensearch.common.util.concurrent.ThreadContext -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.index.store.Store import org.opensearch.index.store.StoreFileMetadata import org.opensearch.indices.recovery.MultiChunkTransfer diff --git a/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterRepository.kt b/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterRepository.kt index a9da961c..f5e7a149 100644 --- a/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterRepository.kt +++ b/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterRepository.kt @@ -51,7 +51,7 @@ import org.opensearch.common.component.AbstractLifecycleComponent import org.opensearch.common.metrics.CounterMetric import org.opensearch.common.settings.Settings import org.opensearch.index.mapper.MapperService -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.index.snapshots.IndexShardSnapshotStatus import org.opensearch.index.store.Store import org.opensearch.indices.recovery.RecoverySettings @@ -193,8 +193,8 @@ class RemoteClusterRepository(private val repositoryMetadata: RepositoryMetadata override fun getRepositoryData(listener: ActionListener) { val clusterState = getLeaderClusterState(false, false) val shardGenerations = ShardGenerations.builder() - clusterState.metadata.indices.values() - .map { it.value } + clusterState.metadata.indices.values + .map { it } .forEach { indexMetadata -> val indexId = IndexId(indexMetadata.index.name, indexMetadata.indexUUID) for (i in 0 until indexMetadata.numberOfShards) { @@ -215,7 +215,7 @@ class RemoteClusterRepository(private val repositoryMetadata: RepositoryMetadata override fun getSnapshotInfo(snapshotId: SnapshotId): SnapshotInfo { val leaderClusterState = getLeaderClusterState(false, false) assert(REMOTE_SNAPSHOT_NAME.equals(snapshotId.name), { "SnapshotName differs" }) - val indices = leaderClusterState.metadata().indices().keys().map { x -> x.value } + val indices = leaderClusterState.metadata().indices().keys.toList() return SnapshotInfo(snapshotId, indices, emptyList(), SnapshotState.SUCCESS, Version.CURRENT) } diff --git a/src/main/kotlin/org/opensearch/replication/rest/AutoFollowStatsHandler.kt b/src/main/kotlin/org/opensearch/replication/rest/AutoFollowStatsHandler.kt index 42421eb4..f9055c70 100644 --- a/src/main/kotlin/org/opensearch/replication/rest/AutoFollowStatsHandler.kt +++ b/src/main/kotlin/org/opensearch/replication/rest/AutoFollowStatsHandler.kt @@ -15,7 +15,7 @@ import org.opensearch.rest.RestChannel import org.opensearch.rest.RestHandler import org.opensearch.rest.RestRequest import org.opensearch.rest.RestResponse -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import org.opensearch.rest.action.RestResponseListener import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/replication/rest/FollowerStatsHandler.kt b/src/main/kotlin/org/opensearch/replication/rest/FollowerStatsHandler.kt index ce5013f6..3dc0e4dc 100644 --- a/src/main/kotlin/org/opensearch/replication/rest/FollowerStatsHandler.kt +++ b/src/main/kotlin/org/opensearch/replication/rest/FollowerStatsHandler.kt @@ -15,7 +15,7 @@ import org.opensearch.rest.RestChannel import org.opensearch.rest.RestHandler import org.opensearch.rest.RestRequest import org.opensearch.rest.RestResponse -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import org.opensearch.rest.action.RestResponseListener import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/replication/rest/LeaderStatsHandler.kt b/src/main/kotlin/org/opensearch/replication/rest/LeaderStatsHandler.kt index d71379bf..17acc842 100644 --- a/src/main/kotlin/org/opensearch/replication/rest/LeaderStatsHandler.kt +++ b/src/main/kotlin/org/opensearch/replication/rest/LeaderStatsHandler.kt @@ -15,7 +15,7 @@ import org.opensearch.rest.RestChannel import org.opensearch.rest.RestHandler import org.opensearch.rest.RestRequest import org.opensearch.rest.RestResponse -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import org.opensearch.rest.action.RestResponseListener import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/replication/rest/UpdateAutoFollowPatternsHandler.kt b/src/main/kotlin/org/opensearch/replication/rest/UpdateAutoFollowPatternsHandler.kt index ccb9463a..a8a738e2 100644 --- a/src/main/kotlin/org/opensearch/replication/rest/UpdateAutoFollowPatternsHandler.kt +++ b/src/main/kotlin/org/opensearch/replication/rest/UpdateAutoFollowPatternsHandler.kt @@ -19,7 +19,7 @@ import org.opensearch.rest.BaseRestHandler import org.opensearch.rest.BaseRestHandler.RestChannelConsumer import org.opensearch.rest.RestHandler import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import org.opensearch.rest.action.RestToXContentListener class UpdateAutoFollowPatternsHandler : BaseRestHandler() { diff --git a/src/main/kotlin/org/opensearch/replication/rest/UpdateIndexHandler.kt b/src/main/kotlin/org/opensearch/replication/rest/UpdateIndexHandler.kt index 22e4a6e1..9a5eb086 100644 --- a/src/main/kotlin/org/opensearch/replication/rest/UpdateIndexHandler.kt +++ b/src/main/kotlin/org/opensearch/replication/rest/UpdateIndexHandler.kt @@ -17,7 +17,7 @@ import org.opensearch.replication.task.index.IndexReplicationExecutor.Companion. import org.opensearch.action.support.IndicesOptions import org.opensearch.client.Requests import org.opensearch.client.node.NodeClient -import org.opensearch.common.Strings +import org.opensearch.core.common.Strings import org.opensearch.rest.BaseRestHandler import org.opensearch.rest.BaseRestHandler.RestChannelConsumer import org.opensearch.rest.RestChannel diff --git a/src/main/kotlin/org/opensearch/replication/seqno/RemoteClusterRetentionLeaseHelper.kt b/src/main/kotlin/org/opensearch/replication/seqno/RemoteClusterRetentionLeaseHelper.kt index 5cf28c59..823f61c0 100644 --- a/src/main/kotlin/org/opensearch/replication/seqno/RemoteClusterRetentionLeaseHelper.kt +++ b/src/main/kotlin/org/opensearch/replication/seqno/RemoteClusterRetentionLeaseHelper.kt @@ -23,7 +23,7 @@ import org.opensearch.index.seqno.RetentionLeaseAlreadyExistsException import org.opensearch.index.seqno.RetentionLeaseInvalidRetainingSeqNoException import org.opensearch.index.seqno.RetentionLeaseNotFoundException import org.opensearch.index.shard.IndexShard -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.replication.metadata.store.ReplicationMetadata import org.opensearch.replication.repository.RemoteClusterRepository import org.opensearch.replication.task.index.IndexReplicationParams diff --git a/src/main/kotlin/org/opensearch/replication/seqno/RemoteClusterStats.kt b/src/main/kotlin/org/opensearch/replication/seqno/RemoteClusterStats.kt index cc565d03..80a9d6d2 100644 --- a/src/main/kotlin/org/opensearch/replication/seqno/RemoteClusterStats.kt +++ b/src/main/kotlin/org/opensearch/replication/seqno/RemoteClusterStats.kt @@ -13,13 +13,13 @@ package org.opensearch.replication.seqno import org.opensearch.common.component.AbstractLifecycleComponent import org.opensearch.common.inject.Singleton -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentFragment import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import java.util.concurrent.atomic.AtomicLong class RemoteShardMetric { diff --git a/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt b/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt index 75477625..7f03dd79 100644 --- a/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt +++ b/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt @@ -34,20 +34,20 @@ import org.opensearch.action.ActionListener import org.opensearch.action.ActionResponse import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.common.settings.Settings import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.index.IndexService import org.opensearch.index.shard.IndexShard -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.indices.cluster.IndicesClusterStateService import org.opensearch.persistent.AllocatedPersistentTask import org.opensearch.persistent.PersistentTaskState import org.opensearch.persistent.PersistentTasksService import org.opensearch.replication.util.stackTraceToString -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import org.opensearch.tasks.TaskId import org.opensearch.tasks.TaskManager import org.opensearch.threadpool.ThreadPool diff --git a/src/main/kotlin/org/opensearch/replication/task/IndexCloseListener.kt b/src/main/kotlin/org/opensearch/replication/task/IndexCloseListener.kt index ecd87698..cbc4f676 100644 --- a/src/main/kotlin/org/opensearch/replication/task/IndexCloseListener.kt +++ b/src/main/kotlin/org/opensearch/replication/task/IndexCloseListener.kt @@ -15,7 +15,7 @@ import org.opensearch.common.settings.Settings import org.opensearch.index.IndexService import org.opensearch.index.shard.IndexEventListener import org.opensearch.index.shard.IndexShard -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.indices.cluster.IndicesClusterStateService import java.util.Collections import java.util.concurrent.ConcurrentHashMap diff --git a/src/main/kotlin/org/opensearch/replication/task/ReplicationState.kt b/src/main/kotlin/org/opensearch/replication/task/ReplicationState.kt index 3a81f74e..1f0763b8 100644 --- a/src/main/kotlin/org/opensearch/replication/task/ReplicationState.kt +++ b/src/main/kotlin/org/opensearch/replication/task/ReplicationState.kt @@ -11,9 +11,9 @@ package org.opensearch.replication.task -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentFragment import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowParams.kt b/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowParams.kt index 9bcecf64..2de3ad8e 100644 --- a/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowParams.kt +++ b/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowParams.kt @@ -13,8 +13,8 @@ package org.opensearch.replication.task.autofollow import org.opensearch.Version import org.opensearch.core.ParseField -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ObjectParser import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowTask.kt b/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowTask.kt index 15c22922..d47843d6 100644 --- a/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowTask.kt +++ b/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowTask.kt @@ -29,8 +29,8 @@ import org.opensearch.action.admin.indices.get.GetIndexRequest import org.opensearch.action.support.IndicesOptions import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.common.logging.Loggers import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder @@ -39,7 +39,7 @@ import org.opensearch.replication.ReplicationException import org.opensearch.replication.action.status.ReplicationStatusAction import org.opensearch.replication.action.status.ShardInfoRequest import org.opensearch.replication.action.status.ShardInfoResponse -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import org.opensearch.tasks.Task import org.opensearch.tasks.TaskId import org.opensearch.threadpool.Scheduler diff --git a/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationParams.kt b/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationParams.kt index efaf2af6..6a758b8f 100644 --- a/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationParams.kt +++ b/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationParams.kt @@ -14,14 +14,14 @@ package org.opensearch.replication.task.index import org.opensearch.Version import org.opensearch.core.ParseField import org.opensearch.common.Strings -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ObjectParser import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.common.xcontent.XContentType -import org.opensearch.index.Index +import org.opensearch.core.index.Index import org.opensearch.persistent.PersistentTaskParams import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationState.kt b/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationState.kt index 010d1447..d55accd7 100644 --- a/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationState.kt +++ b/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationState.kt @@ -14,13 +14,13 @@ package org.opensearch.replication.task.index import org.opensearch.replication.task.ReplicationState import org.opensearch.replication.task.shard.ShardReplicationParams import org.opensearch.core.ParseField -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ObjectParser import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.persistent.PersistentTaskState import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationTask.kt b/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationTask.kt index d51af7c0..f520926b 100644 --- a/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationTask.kt +++ b/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationTask.kt @@ -68,7 +68,7 @@ import org.opensearch.cluster.RestoreInProgress import org.opensearch.cluster.metadata.IndexMetadata import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider import org.opensearch.cluster.service.ClusterService -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.common.logging.Loggers import org.opensearch.common.settings.Setting import org.opensearch.common.settings.Settings @@ -79,11 +79,11 @@ import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentType -import org.opensearch.index.Index +import org.opensearch.core.index.Index import org.opensearch.index.IndexService import org.opensearch.index.IndexSettings import org.opensearch.index.shard.IndexShard -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.indices.cluster.IndicesClusterStateService import org.opensearch.indices.recovery.RecoveryState import org.opensearch.persistent.PersistentTaskState @@ -94,7 +94,7 @@ import org.opensearch.persistent.PersistentTasksService import org.opensearch.replication.ReplicationException import org.opensearch.replication.MappingNotAvailableException import org.opensearch.replication.ReplicationPlugin.Companion.REPLICATION_INDEX_TRANSLOG_PRUNING_ENABLED_SETTING -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import org.opensearch.tasks.TaskId import org.opensearch.tasks.TaskManager import org.opensearch.threadpool.ThreadPool diff --git a/src/main/kotlin/org/opensearch/replication/task/shard/FollowerClusterStats.kt b/src/main/kotlin/org/opensearch/replication/task/shard/FollowerClusterStats.kt index db112a1f..77cfb672 100644 --- a/src/main/kotlin/org/opensearch/replication/task/shard/FollowerClusterStats.kt +++ b/src/main/kotlin/org/opensearch/replication/task/shard/FollowerClusterStats.kt @@ -13,13 +13,13 @@ package org.opensearch.replication.task.shard import org.apache.logging.log4j.LogManager import org.opensearch.common.inject.Singleton -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentFragment import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentType -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import java.util.concurrent.atomic.AtomicLong class FollowerShardMetric { diff --git a/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationParams.kt b/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationParams.kt index d8f790a1..c1981de1 100644 --- a/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationParams.kt +++ b/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationParams.kt @@ -14,17 +14,17 @@ package org.opensearch.replication.task.shard import org.opensearch.Version import org.opensearch.core.ParseField import org.opensearch.common.Strings -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ObjectParser import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.common.xcontent.XContentType -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.persistent.PersistentTaskParams import java.io.IOException -import org.opensearch.index.Index +import org.opensearch.core.index.Index class ShardReplicationParams : PersistentTaskParams { diff --git a/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationState.kt b/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationState.kt index f0c3fc88..33efd3ca 100644 --- a/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationState.kt +++ b/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationState.kt @@ -14,8 +14,8 @@ package org.opensearch.replication.task.shard import org.opensearch.replication.task.ReplicationState import org.opensearch.OpenSearchException import org.opensearch.core.ParseField -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ObjectParser import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationTask.kt b/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationTask.kt index e393805e..e165c916 100644 --- a/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationTask.kt +++ b/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationTask.kt @@ -47,10 +47,10 @@ import org.opensearch.common.logging.Loggers import org.opensearch.index.seqno.RetentionLeaseActions import org.opensearch.index.seqno.RetentionLeaseInvalidRetainingSeqNoException import org.opensearch.index.seqno.RetentionLeaseNotFoundException -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.persistent.PersistentTaskState import org.opensearch.persistent.PersistentTasksNodeService -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import org.opensearch.tasks.TaskId import org.opensearch.threadpool.ThreadPool import org.opensearch.transport.NodeNotConnectedException diff --git a/src/main/kotlin/org/opensearch/replication/task/shard/TranslogSequencer.kt b/src/main/kotlin/org/opensearch/replication/task/shard/TranslogSequencer.kt index d8c976dc..bbb6837a 100644 --- a/src/main/kotlin/org/opensearch/replication/task/shard/TranslogSequencer.kt +++ b/src/main/kotlin/org/opensearch/replication/task/shard/TranslogSequencer.kt @@ -29,14 +29,14 @@ import org.opensearch.OpenSearchException import org.opensearch.action.support.TransportActions import org.opensearch.common.logging.Loggers import org.opensearch.index.IndexNotFoundException -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.index.translog.Translog import org.opensearch.replication.util.indicesService import org.opensearch.tasks.TaskId import java.util.ArrayList import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.TimeUnit -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus /** diff --git a/src/main/kotlin/org/opensearch/replication/util/Extensions.kt b/src/main/kotlin/org/opensearch/replication/util/Extensions.kt index 643cc010..1928ad6b 100644 --- a/src/main/kotlin/org/opensearch/replication/util/Extensions.kt +++ b/src/main/kotlin/org/opensearch/replication/util/Extensions.kt @@ -31,13 +31,13 @@ import org.opensearch.client.Client import org.opensearch.common.util.concurrent.ThreadContext import org.opensearch.core.concurrency.OpenSearchRejectedExecutionException import org.opensearch.index.IndexNotFoundException -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.index.store.Store import org.opensearch.indices.recovery.RecoveryState import org.opensearch.replication.ReplicationException import org.opensearch.replication.util.stackTraceToString import org.opensearch.repositories.IndexId -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import org.opensearch.snapshots.SnapshotId import org.opensearch.transport.ConnectTransportException import org.opensearch.transport.NodeDisconnectedException diff --git a/src/test/kotlin/org/opensearch/index/translog/ReplicationTranslogDeletionPolicyTests.kt b/src/test/kotlin/org/opensearch/index/translog/ReplicationTranslogDeletionPolicyTests.kt index 8378bbbb..a59e75fe 100644 --- a/src/test/kotlin/org/opensearch/index/translog/ReplicationTranslogDeletionPolicyTests.kt +++ b/src/test/kotlin/org/opensearch/index/translog/ReplicationTranslogDeletionPolicyTests.kt @@ -14,14 +14,14 @@ import org.apache.lucene.store.ByteArrayDataOutput import org.hamcrest.Matchers.equalTo import org.mockito.Mockito import org.opensearch.common.UUIDs -import org.opensearch.common.bytes.BytesArray +import org.opensearch.core.common.bytes.BytesArray import org.opensearch.common.bytes.ReleasableBytesReference import org.opensearch.common.collect.Tuple import org.opensearch.common.util.BigArrays import org.opensearch.common.util.io.IOUtils import org.opensearch.index.seqno.RetentionLease import org.opensearch.index.seqno.RetentionLeases -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.test.OpenSearchTestCase import java.io.IOException import java.nio.channels.FileChannel diff --git a/src/test/kotlin/org/opensearch/replication/bwc/BackwardsCompatibilityIT.kt b/src/test/kotlin/org/opensearch/replication/bwc/BackwardsCompatibilityIT.kt index f6f2c893..e8e803a8 100644 --- a/src/test/kotlin/org/opensearch/replication/bwc/BackwardsCompatibilityIT.kt +++ b/src/test/kotlin/org/opensearch/replication/bwc/BackwardsCompatibilityIT.kt @@ -82,6 +82,7 @@ class BackwardsCompatibilityIT : MultiClusterRestTestCase() { ClusterStatus.ONE_THIRD_UPGRADED, ClusterStatus.TWO_THIRD_UPGRADED, ClusterStatus.ROLLING_UPGRADED, ClusterStatus.FULL_CLUSTER_RESTART -> verifyReplication() ClusterStatus.COMPLETE_SUITE -> {} // Do nothing as all tests have run already + else -> {throw AssertionError("${ClusterStatus.from(System.getProperty("tests.bwcTask"))} is not a valid option for ClusterStatus")} } } diff --git a/src/test/kotlin/org/opensearch/replication/singleCluster/SingleClusterSanityIT.kt b/src/test/kotlin/org/opensearch/replication/singleCluster/SingleClusterSanityIT.kt index 9760e7c2..24b9bb15 100644 --- a/src/test/kotlin/org/opensearch/replication/singleCluster/SingleClusterSanityIT.kt +++ b/src/test/kotlin/org/opensearch/replication/singleCluster/SingleClusterSanityIT.kt @@ -45,6 +45,7 @@ class SingleClusterSanityIT : MultiClusterRestTestCase() { fun testReplicationPluginWithSingleCluster() { when(ClusterState.from(System.getProperty("tests.sanitySingleCluster"))) { ClusterState.SINGLE_CLUSTER_SANITY_SUITE -> basicReplicationSanityWithSingleCluster() + else -> {throw AssertionError("${System.getProperty("tests.sanitySingleCluster")} is not a valid option for ClusterState")} } } diff --git a/src/test/kotlin/org/opensearch/replication/task/index/IndexReplicationTaskTests.kt b/src/test/kotlin/org/opensearch/replication/task/index/IndexReplicationTaskTests.kt index 2032cc26..00bde557 100644 --- a/src/test/kotlin/org/opensearch/replication/task/index/IndexReplicationTaskTests.kt +++ b/src/test/kotlin/org/opensearch/replication/task/index/IndexReplicationTaskTests.kt @@ -33,8 +33,8 @@ import org.opensearch.common.settings.Settings import org.opensearch.common.settings.SettingsModule import org.opensearch.common.unit.TimeValue import org.opensearch.core.xcontent.NamedXContentRegistry -import org.opensearch.index.Index -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.Index +import org.opensearch.core.index.shard.ShardId import org.opensearch.persistent.PersistentTaskParams import org.opensearch.persistent.PersistentTasksCustomMetadata import org.opensearch.persistent.PersistentTasksService diff --git a/src/test/kotlin/org/opensearch/replication/task/index/NoOpClient.kt b/src/test/kotlin/org/opensearch/replication/task/index/NoOpClient.kt index 34e711fd..606d7a18 100644 --- a/src/test/kotlin/org/opensearch/replication/task/index/NoOpClient.kt +++ b/src/test/kotlin/org/opensearch/replication/task/index/NoOpClient.kt @@ -29,13 +29,13 @@ import org.opensearch.action.get.GetAction import org.opensearch.action.get.GetResponse import org.opensearch.action.support.master.AcknowledgedResponse import org.opensearch.common.UUIDs -import org.opensearch.common.bytes.BytesReference +import org.opensearch.core.common.bytes.BytesReference import org.opensearch.common.settings.Settings import org.opensearch.core.xcontent.ToXContent import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.index.Index +import org.opensearch.core.index.Index import org.opensearch.index.get.GetResult -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.indices.recovery.RecoveryState import org.opensearch.persistent.PersistentTaskResponse import org.opensearch.persistent.PersistentTasksCustomMetadata diff --git a/src/test/kotlin/org/opensearch/replication/task/shard/ShardReplicationExecutorTests.kt b/src/test/kotlin/org/opensearch/replication/task/shard/ShardReplicationExecutorTests.kt index 630234f8..39275542 100644 --- a/src/test/kotlin/org/opensearch/replication/task/shard/ShardReplicationExecutorTests.kt +++ b/src/test/kotlin/org/opensearch/replication/task/shard/ShardReplicationExecutorTests.kt @@ -12,8 +12,8 @@ import org.opensearch.cluster.metadata.Metadata import org.opensearch.cluster.routing.* import org.opensearch.common.unit.TimeValue import org.opensearch.core.xcontent.NamedXContentRegistry -import org.opensearch.index.Index -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.Index +import org.opensearch.core.index.shard.ShardId import org.opensearch.replication.ReplicationSettings import org.opensearch.replication.metadata.ReplicationMetadataManager import org.opensearch.replication.metadata.store.ReplicationMetadataStore diff --git a/src/test/kotlin/org/opensearch/replication/task/shard/TranslogSequencerTests.kt b/src/test/kotlin/org/opensearch/replication/task/shard/TranslogSequencerTests.kt index fe6ad1c8..730289ed 100644 --- a/src/test/kotlin/org/opensearch/replication/task/shard/TranslogSequencerTests.kt +++ b/src/test/kotlin/org/opensearch/replication/task/shard/TranslogSequencerTests.kt @@ -24,7 +24,7 @@ import org.opensearch.action.support.replication.ReplicationResponse.ShardInfo import org.opensearch.common.settings.Settings import org.opensearch.index.IndexService import org.opensearch.index.shard.IndexShard -import org.opensearch.index.shard.ShardId +import org.opensearch.core.index.shard.ShardId import org.opensearch.index.translog.Translog import org.opensearch.indices.IndicesService import org.opensearch.replication.action.changes.GetChangesResponse