diff --git a/src/main/kotlin/org/opensearch/replication/ReplicationPlugin.kt b/src/main/kotlin/org/opensearch/replication/ReplicationPlugin.kt index 7e5933c0..9b50bb2b 100644 --- a/src/main/kotlin/org/opensearch/replication/ReplicationPlugin.kt +++ b/src/main/kotlin/org/opensearch/replication/ReplicationPlugin.kt @@ -82,7 +82,7 @@ import org.opensearch.cluster.metadata.RepositoryMetadata import org.opensearch.cluster.node.DiscoveryNodes import org.opensearch.cluster.service.ClusterService import org.opensearch.common.CheckedFunction -import org.opensearch.common.ParseField +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 @@ -96,8 +96,8 @@ import org.opensearch.common.unit.ByteSizeUnit import org.opensearch.common.unit.ByteSizeValue import org.opensearch.common.unit.TimeValue import org.opensearch.common.util.concurrent.OpenSearchExecutors -import org.opensearch.common.xcontent.NamedXContentRegistry -import org.opensearch.common.xcontent.XContentParser +import org.opensearch.core.xcontent.NamedXContentRegistry +import org.opensearch.core.xcontent.XContentParser import org.opensearch.commons.utils.OpenForTesting import org.opensearch.env.Environment import org.opensearch.env.NodeEnvironment 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 80c05995..f9199ea0 100644 --- a/src/main/kotlin/org/opensearch/replication/action/autofollow/AutoFollowClusterManagerNodeRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/autofollow/AutoFollowClusterManagerNodeRequest.kt @@ -16,9 +16,9 @@ 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.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder class AutoFollowClusterManagerNodeRequest: MasterNodeRequest, ToXContentObject { var user: User? = null 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 30d16b29..a7077793 100644 --- a/src/main/kotlin/org/opensearch/replication/action/autofollow/UpdateAutoFollowPatternRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/autofollow/UpdateAutoFollowPatternRequest.kt @@ -16,15 +16,15 @@ import org.opensearch.replication.metadata.store.KEY_SETTINGS import org.opensearch.replication.util.ValidationUtil.validateName import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.master.AcknowledgedRequest -import org.opensearch.common.ParseField +import org.opensearch.core.ParseField import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.settings.Settings -import org.opensearch.common.xcontent.ObjectParser -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser +import org.opensearch.core.xcontent.ObjectParser +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser import java.util.Collections import java.util.function.BiConsumer import java.util.function.BiFunction 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 2c06b6ca..63f77023 100644 --- a/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexClusterManagerNodeRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexClusterManagerNodeRequest.kt @@ -16,9 +16,9 @@ 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.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder class ReplicateIndexClusterManagerNodeRequest: MasterNodeRequest, ToXContentObject { 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 894996db..bb0f9aaf 100644 --- a/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/index/ReplicateIndexRequest.kt @@ -17,16 +17,16 @@ 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.ParseField +import org.opensearch.core.ParseField import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.settings.Settings -import org.opensearch.common.xcontent.ObjectParser -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContent.Params -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser +import org.opensearch.core.xcontent.ObjectParser +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContent.Params +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser import java.io.IOException import java.util.Collections import java.util.function.BiConsumer 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 12eade15..d9b51933 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 @@ -15,13 +15,13 @@ 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.ParseField +import org.opensearch.core.ParseField import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ObjectParser -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.core.xcontent.ObjectParser +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder import java.util.function.Supplier enum class IndexBlockUpdateType { 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 a1e6bf8f..e69dcb44 100644 --- a/src/main/kotlin/org/opensearch/replication/action/pause/PauseIndexReplicationRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/pause/PauseIndexReplicationRequest.kt @@ -16,14 +16,14 @@ 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.ParseField +import org.opensearch.core.ParseField import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ObjectParser -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser +import org.opensearch.core.xcontent.ObjectParser +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser class PauseIndexReplicationRequest : AcknowledgedRequest, IndicesRequest.Replaceable, ToXContentObject { 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 9ebef602..dd219272 100644 --- a/src/main/kotlin/org/opensearch/replication/action/resume/ResumeIndexReplicationRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/resume/ResumeIndexReplicationRequest.kt @@ -17,7 +17,7 @@ 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.common.xcontent.* +import org.opensearch.core.xcontent.* class ResumeIndexReplicationRequest : AcknowledgedRequest, IndicesRequest.Replaceable, ToXContentObject { 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 4d14d10f..57b9fffb 100644 --- a/src/main/kotlin/org/opensearch/replication/action/setup/SetupChecksRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/setup/SetupChecksRequest.kt @@ -16,9 +16,9 @@ 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.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder class SetupChecksRequest: AcknowledgedRequest, ToXContentObject { val followerContext: ReplicationContext 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 1b51d95d..430fe9b8 100644 --- a/src/main/kotlin/org/opensearch/replication/action/setup/ValidatePermissionsRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/setup/ValidatePermissionsRequest.kt @@ -17,9 +17,9 @@ 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.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder class ValidatePermissionsRequest: AcknowledgedRequest, IndicesRequest.Replaceable, ToXContentObject { val cluster: String 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 678b6449..0878d377 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/AutoFollowStatsAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/AutoFollowStatsAction.kt @@ -18,10 +18,10 @@ 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.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContent.EMPTY_PARAMS -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContent.EMPTY_PARAMS +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.replication.task.autofollow.AutoFollowStat 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 3b405bde..53271fe4 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/FollowerStatsResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/FollowerStatsResponse.kt @@ -19,10 +19,10 @@ 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.common.xcontent.ToXContent.EMPTY_PARAMS -import org.opensearch.common.xcontent.ToXContent.Params -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder +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.replication.metadata.ReplicationOverallState 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 235331d5..47333152 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/LeaderStatsResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/LeaderStatsResponse.kt @@ -19,10 +19,10 @@ 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.common.xcontent.ToXContent.EMPTY_PARAMS -import org.opensearch.common.xcontent.ToXContent.Params -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder +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.replication.seqno.RemoteShardMetric import org.opensearch.replication.seqno.RemoteShardMetric.RemoteStats 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 b7b6fa73..a4832381 100644 --- a/src/main/kotlin/org/opensearch/replication/action/status/ReplicationStatusResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/status/ReplicationStatusResponse.kt @@ -16,9 +16,9 @@ import org.opensearch.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.common.xcontent.ToXContent.Params -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.core.xcontent.ToXContent.Params +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder import java.io.IOException class ReplicationStatusResponse : BroadcastResponse, ToXContentObject { 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 23549470..024dd976 100644 --- a/src/main/kotlin/org/opensearch/replication/action/status/ShardInfoRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/status/ShardInfoRequest.kt @@ -16,9 +16,9 @@ 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.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentObject +import org.opensearch.core.xcontent.XContentBuilder class ShardInfoRequest : BroadcastRequest , ToXContentObject { 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 4cadea82..af111889 100644 --- a/src/main/kotlin/org/opensearch/replication/action/status/ShardInfoResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/status/ShardInfoResponse.kt @@ -13,12 +13,12 @@ package org.opensearch.replication.action.status import org.opensearch.action.support.broadcast.BroadcastResponse import org.opensearch.action.support.broadcast.BroadcastShardResponse -import org.opensearch.common.ParseField +import org.opensearch.core.ParseField import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder +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 java.io.IOException 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 32d44b7a..2f447eb8 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stop/StopIndexReplicationRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stop/StopIndexReplicationRequest.kt @@ -15,10 +15,10 @@ 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.ParseField +import org.opensearch.core.ParseField import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.* +import org.opensearch.core.xcontent.* class StopIndexReplicationRequest : AcknowledgedRequest, IndicesRequest.Replaceable, ToXContentObject { 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 1dde6ddc..753e2f62 100644 --- a/src/main/kotlin/org/opensearch/replication/action/update/UpdateIndexReplicationRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/update/UpdateIndexReplicationRequest.kt @@ -15,12 +15,12 @@ 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.ParseField +import org.opensearch.core.ParseField import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.settings.Settings import org.opensearch.common.settings.Settings.readSettingsFromStream -import org.opensearch.common.xcontent.* +import org.opensearch.core.xcontent.* import java.io.IOException import java.util.* 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 edfec793..d6d5c6d9 100644 --- a/src/main/kotlin/org/opensearch/replication/metadata/state/ReplicationStateMetadata.kt +++ b/src/main/kotlin/org/opensearch/replication/metadata/state/ReplicationStateMetadata.kt @@ -20,9 +20,9 @@ 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.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder +import org.opensearch.core.xcontent.XContentParser import java.io.IOException import java.util.EnumSet import kotlin.collections.HashMap 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 892a86a9..86cd80c2 100644 --- a/src/main/kotlin/org/opensearch/replication/metadata/store/ReplicationMetadata.kt +++ b/src/main/kotlin/org/opensearch/replication/metadata/store/ReplicationMetadata.kt @@ -12,15 +12,15 @@ package org.opensearch.replication.metadata.store import org.opensearch.commons.authuser.User -import org.opensearch.common.ParseField +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.common.settings.Settings -import org.opensearch.common.xcontent.ObjectParser -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser +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 java.io.IOException import java.util.* import java.util.function.BiConsumer diff --git a/src/main/kotlin/org/opensearch/replication/metadata/store/ReplicationMetadataStore.kt b/src/main/kotlin/org/opensearch/replication/metadata/store/ReplicationMetadataStore.kt index 0ce5683f..ba0122ee 100644 --- a/src/main/kotlin/org/opensearch/replication/metadata/store/ReplicationMetadataStore.kt +++ b/src/main/kotlin/org/opensearch/replication/metadata/store/ReplicationMetadataStore.kt @@ -33,7 +33,13 @@ import org.opensearch.cluster.service.ClusterService import org.opensearch.common.component.AbstractLifecycleComponent import org.opensearch.common.settings.Settings import org.opensearch.common.util.concurrent.ThreadContext -import org.opensearch.common.xcontent.* +import org.opensearch.common.xcontent.XContentType +import org.opensearch.common.xcontent.XContentFactory +import org.opensearch.common.xcontent.XContentHelper +import org.opensearch.common.xcontent.LoggingDeprecationHandler +import org.opensearch.core.xcontent.NamedXContentRegistry +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentParser import org.opensearch.replication.util.suspendExecuteWithRetries class ReplicationMetadataStore constructor(val client: Client, val clusterService: ClusterService, diff --git a/src/main/kotlin/org/opensearch/replication/rest/AutoFollowStatsHandler.kt b/src/main/kotlin/org/opensearch/replication/rest/AutoFollowStatsHandler.kt index 2f09c4b1..42421eb4 100644 --- a/src/main/kotlin/org/opensearch/replication/rest/AutoFollowStatsHandler.kt +++ b/src/main/kotlin/org/opensearch/replication/rest/AutoFollowStatsHandler.kt @@ -2,8 +2,8 @@ package org.opensearch.replication.rest import org.apache.logging.log4j.LogManager import org.opensearch.client.node.NodeClient -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory import org.opensearch.replication.action.stats.AutoFollowStatsAction import org.opensearch.replication.action.stats.AutoFollowStatsRequest diff --git a/src/main/kotlin/org/opensearch/replication/rest/FollowerStatsHandler.kt b/src/main/kotlin/org/opensearch/replication/rest/FollowerStatsHandler.kt index 12026466..ce5013f6 100644 --- a/src/main/kotlin/org/opensearch/replication/rest/FollowerStatsHandler.kt +++ b/src/main/kotlin/org/opensearch/replication/rest/FollowerStatsHandler.kt @@ -2,8 +2,8 @@ package org.opensearch.replication.rest import org.apache.logging.log4j.LogManager import org.opensearch.client.node.NodeClient -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory import org.opensearch.replication.action.stats.FollowerStatsAction import org.opensearch.replication.action.stats.FollowerStatsRequest diff --git a/src/main/kotlin/org/opensearch/replication/rest/LeaderStatsHandler.kt b/src/main/kotlin/org/opensearch/replication/rest/LeaderStatsHandler.kt index 98a68c27..d71379bf 100644 --- a/src/main/kotlin/org/opensearch/replication/rest/LeaderStatsHandler.kt +++ b/src/main/kotlin/org/opensearch/replication/rest/LeaderStatsHandler.kt @@ -2,8 +2,8 @@ package org.opensearch.replication.rest import org.apache.logging.log4j.LogManager import org.opensearch.client.node.NodeClient -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.common.xcontent.XContentFactory import org.opensearch.replication.action.stats.LeaderStatsAction import org.opensearch.replication.action.stats.LeaderStatsRequest diff --git a/src/main/kotlin/org/opensearch/replication/seqno/RemoteClusterStats.kt b/src/main/kotlin/org/opensearch/replication/seqno/RemoteClusterStats.kt index d6635288..cc565d03 100644 --- a/src/main/kotlin/org/opensearch/replication/seqno/RemoteClusterStats.kt +++ b/src/main/kotlin/org/opensearch/replication/seqno/RemoteClusterStats.kt @@ -15,10 +15,10 @@ 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.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentFragment -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder +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 java.util.concurrent.atomic.AtomicLong diff --git a/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt b/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt index 933be175..75477625 100644 --- a/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt +++ b/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt @@ -36,9 +36,9 @@ import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.settings.Settings -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder +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 diff --git a/src/main/kotlin/org/opensearch/replication/task/ReplicationState.kt b/src/main/kotlin/org/opensearch/replication/task/ReplicationState.kt index 57c41f64..3a81f74e 100644 --- a/src/main/kotlin/org/opensearch/replication/task/ReplicationState.kt +++ b/src/main/kotlin/org/opensearch/replication/task/ReplicationState.kt @@ -14,9 +14,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.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentFragment -import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContentFragment +import org.opensearch.core.xcontent.XContentBuilder /** * Enum that represents the state of replication of either shards or indices. 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 e85d323d..9bcecf64 100644 --- a/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowParams.kt +++ b/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowParams.kt @@ -12,13 +12,13 @@ package org.opensearch.replication.task.autofollow import org.opensearch.Version -import org.opensearch.common.ParseField +import org.opensearch.core.ParseField import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ObjectParser -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser +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.persistent.PersistentTaskParams import java.io.IOException 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 1ac2f7de..da89580e 100644 --- a/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowTask.kt +++ b/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowTask.kt @@ -32,8 +32,8 @@ import org.opensearch.cluster.service.ClusterService import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.logging.Loggers -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.core.xcontent.ToXContent +import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.persistent.PersistentTaskState import org.opensearch.replication.ReplicationException import org.opensearch.replication.action.status.ReplicationStatusAction 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 0c4f4a53..efaf2af6 100644 --- a/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationParams.kt +++ b/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationParams.kt @@ -12,14 +12,14 @@ package org.opensearch.replication.task.index import org.opensearch.Version -import org.opensearch.common.ParseField +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.common.xcontent.ObjectParser -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser +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.persistent.PersistentTaskParams 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 1ea7afaf..010d1447 100644 --- a/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationState.kt +++ b/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationState.kt @@ -13,13 +13,13 @@ package org.opensearch.replication.task.index import org.opensearch.replication.task.ReplicationState import org.opensearch.replication.task.shard.ShardReplicationParams -import org.opensearch.common.ParseField +import org.opensearch.core.ParseField import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ObjectParser -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser +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.persistent.PersistentTaskState import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask 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 b4662aa3..bc3cf5e0 100644 --- a/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationTask.kt +++ b/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationTask.kt @@ -75,9 +75,9 @@ import org.opensearch.common.settings.Settings import org.opensearch.common.settings.SettingsModule import org.opensearch.common.unit.ByteSizeUnit import org.opensearch.common.unit.ByteSizeValue -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentObject -import org.opensearch.common.xcontent.XContentBuilder +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.index.IndexService 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 09a0bc60..db112a1f 100644 --- a/src/main/kotlin/org/opensearch/replication/task/shard/FollowerClusterStats.kt +++ b/src/main/kotlin/org/opensearch/replication/task/shard/FollowerClusterStats.kt @@ -15,9 +15,9 @@ 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.common.xcontent.ToXContent -import org.opensearch.common.xcontent.ToXContentFragment -import org.opensearch.common.xcontent.XContentBuilder +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 java.util.concurrent.atomic.AtomicLong 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 eb5c23b1..d8f790a1 100644 --- a/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationParams.kt +++ b/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationParams.kt @@ -12,14 +12,14 @@ package org.opensearch.replication.task.shard import org.opensearch.Version -import org.opensearch.common.ParseField +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.common.xcontent.ObjectParser -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser +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.persistent.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 52849d92..f0c3fc88 100644 --- a/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationState.kt +++ b/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationState.kt @@ -13,13 +13,13 @@ package org.opensearch.replication.task.shard import org.opensearch.replication.task.ReplicationState import org.opensearch.OpenSearchException -import org.opensearch.common.ParseField +import org.opensearch.core.ParseField import org.opensearch.common.io.stream.StreamInput import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.ObjectParser -import org.opensearch.common.xcontent.ToXContent -import org.opensearch.common.xcontent.XContentBuilder -import org.opensearch.common.xcontent.XContentParser +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.persistent.PersistentTaskState import java.io.IOException import java.lang.IllegalArgumentException diff --git a/src/test/kotlin/org/opensearch/replication/MultiClusterRestTestCase.kt b/src/test/kotlin/org/opensearch/replication/MultiClusterRestTestCase.kt index c40af9a7..744b7223 100644 --- a/src/test/kotlin/org/opensearch/replication/MultiClusterRestTestCase.kt +++ b/src/test/kotlin/org/opensearch/replication/MultiClusterRestTestCase.kt @@ -42,8 +42,8 @@ import org.opensearch.common.io.PathUtils import org.opensearch.common.settings.Settings import org.opensearch.common.unit.TimeValue import org.opensearch.common.util.concurrent.ThreadContext -import org.opensearch.common.xcontent.DeprecationHandler -import org.opensearch.common.xcontent.NamedXContentRegistry +import org.opensearch.core.xcontent.DeprecationHandler +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.common.xcontent.XContentHelper import org.opensearch.common.xcontent.XContentType import org.opensearch.common.xcontent.json.JsonXContent @@ -57,7 +57,6 @@ import org.junit.After import org.junit.AfterClass import org.junit.Before import org.junit.BeforeClass -import org.opensearch.index.mapper.ObjectMapper import java.nio.file.Files import java.security.KeyManagementException import java.security.KeyStore diff --git a/src/test/kotlin/org/opensearch/replication/ReplicationHelpers.kt b/src/test/kotlin/org/opensearch/replication/ReplicationHelpers.kt index 884d8b01..3fe4e11f 100644 --- a/src/test/kotlin/org/opensearch/replication/ReplicationHelpers.kt +++ b/src/test/kotlin/org/opensearch/replication/ReplicationHelpers.kt @@ -23,8 +23,8 @@ import org.opensearch.client.Response import org.opensearch.client.RestHighLevelClient import org.opensearch.common.settings.Settings import org.opensearch.common.unit.TimeValue -import org.opensearch.common.xcontent.DeprecationHandler -import org.opensearch.common.xcontent.NamedXContentRegistry +import org.opensearch.core.xcontent.DeprecationHandler +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.common.xcontent.XContentType import org.opensearch.test.OpenSearchTestCase.assertBusy import org.opensearch.test.rest.OpenSearchRestTestCase diff --git a/src/test/kotlin/org/opensearch/replication/integ/rest/StartReplicationIT.kt b/src/test/kotlin/org/opensearch/replication/integ/rest/StartReplicationIT.kt index af2f9d09..5b2595c5 100644 --- a/src/test/kotlin/org/opensearch/replication/integ/rest/StartReplicationIT.kt +++ b/src/test/kotlin/org/opensearch/replication/integ/rest/StartReplicationIT.kt @@ -67,8 +67,8 @@ import org.opensearch.repositories.fs.FsRepository import org.opensearch.test.OpenSearchTestCase.assertBusy import org.junit.Assert import org.opensearch.cluster.metadata.AliasMetadata -import org.opensearch.common.xcontent.DeprecationHandler -import org.opensearch.common.xcontent.NamedXContentRegistry +import org.opensearch.core.xcontent.DeprecationHandler +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.replication.ReplicationPlugin.Companion.REPLICATION_INDEX_TRANSLOG_PRUNING_ENABLED_SETTING import org.opensearch.replication.followerStats import org.opensearch.replication.leaderStats 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 569eadf8..083533d9 100644 --- a/src/test/kotlin/org/opensearch/replication/task/index/IndexReplicationTaskTests.kt +++ b/src/test/kotlin/org/opensearch/replication/task/index/IndexReplicationTaskTests.kt @@ -30,7 +30,7 @@ import org.opensearch.cluster.routing.RoutingTable import org.opensearch.common.settings.Settings import org.opensearch.common.settings.SettingsModule import org.opensearch.common.unit.TimeValue -import org.opensearch.common.xcontent.NamedXContentRegistry +import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.index.Index import org.opensearch.index.shard.ShardId import org.opensearch.persistent.PersistentTaskParams 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 1c92c0bb..35af7cb4 100644 --- a/src/test/kotlin/org/opensearch/replication/task/index/NoOpClient.kt +++ b/src/test/kotlin/org/opensearch/replication/task/index/NoOpClient.kt @@ -32,7 +32,7 @@ import org.opensearch.common.UUIDs import org.opensearch.common.bytes.BytesReference import org.opensearch.common.collect.ImmutableOpenMap import org.opensearch.common.settings.Settings -import org.opensearch.common.xcontent.ToXContent +import org.opensearch.core.xcontent.ToXContent import org.opensearch.common.xcontent.XContentFactory import org.opensearch.index.Index import org.opensearch.index.get.GetResult