From 68d6794b3769314bb1c9f3f9e645a3184c76740b Mon Sep 17 00:00:00 2001 From: Monu Singh Date: Wed, 16 Aug 2023 13:38:57 +0530 Subject: [PATCH] Refactor for upstream changes from PR import 9082 (#1102) Signed-off-by: monusingh-1 (cherry picked from commit 505e242e59023ea84ae20723299530654c398c23) --- .../kotlin/org/opensearch/replication/ReplicationPlugin.kt | 2 +- .../TransportAutoFollowClusterManagerNodeAction.kt | 2 +- .../autofollow/TransportUpdateAutoFollowPatternAction.kt | 2 +- .../replication/action/changes/GetChangesResponse.kt | 2 +- .../replication/action/changes/TransportGetChangesAction.kt | 2 +- .../action/index/TransportReplicateIndexAction.kt | 2 +- .../TransportReplicateIndexClusterManagerNodeAction.kt | 2 +- .../action/index/block/TransportUpddateIndexBlockAction.kt | 2 +- .../action/pause/TransportPauseIndexReplicationAction.kt | 2 +- .../action/replay/TransportReplayChangesAction.kt | 2 +- .../TransportUpdateReplicationStateDetails.kt | 2 +- .../replication/action/repository/GetFileChunkResponse.kt | 2 +- .../action/repository/GetStoreMetadataResponse.kt | 2 +- .../action/resume/TransportResumeIndexReplicationAction.kt | 2 +- .../replication/action/setup/TransportSetupChecksAction.kt | 2 +- .../action/setup/TransportValidatePermissionsAction.kt | 2 +- .../action/stats/TransportAutoFollowStatsAction.kt | 2 +- .../action/status/TransportReplicationStatusAction.kt | 2 +- .../action/stop/TransportStopIndexReplicationAction.kt | 2 +- .../action/update/TransportUpdateIndexReplicationAction.kt | 2 +- .../replication/metadata/TransportUpdateMetadataAction.kt | 2 +- .../opensearch/replication/metadata/UpdateIndexBlockTask.kt | 2 +- .../replication/metadata/UpdateReplicationMetadata.kt | 2 +- .../repository/RemoteClusterMultiChunkTransfer.kt | 2 +- .../replication/repository/RemoteClusterRepository.kt | 4 ++-- .../replication/task/CrossClusterReplicationTask.kt | 6 +++--- .../replication/task/autofollow/AutoFollowExecutor.kt | 2 +- .../replication/task/autofollow/AutoFollowTask.kt | 2 +- .../replication/task/index/IndexReplicationExecutor.kt | 2 +- .../replication/task/index/IndexReplicationTask.kt | 4 ++-- .../replication/task/shard/ShardReplicationExecutor.kt | 2 +- .../replication/task/shard/ShardReplicationTask.kt | 2 +- .../opensearch/replication/task/shard/TranslogSequencer.kt | 2 +- .../kotlin/org/opensearch/replication/util/Coroutines.kt | 4 ++-- .../kotlin/org/opensearch/replication/util/Extensions.kt | 4 ++-- .../org/opensearch/replication/util/SecurityContext.kt | 2 +- .../replication/task/index/IndexReplicationTaskTests.kt | 2 +- .../org/opensearch/replication/task/index/NoOpClient.kt | 4 ++-- .../replication/task/shard/TranslogSequencerTests.kt | 6 +++--- 39 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/main/kotlin/org/opensearch/replication/ReplicationPlugin.kt b/src/main/kotlin/org/opensearch/replication/ReplicationPlugin.kt index 8a17fc51..ecc1f888 100644 --- a/src/main/kotlin/org/opensearch/replication/ReplicationPlugin.kt +++ b/src/main/kotlin/org/opensearch/replication/ReplicationPlugin.kt @@ -73,7 +73,7 @@ import org.opensearch.replication.task.shard.ShardReplicationParams import org.opensearch.replication.task.shard.ShardReplicationState import org.opensearch.replication.util.Injectables import org.opensearch.action.ActionRequest -import org.opensearch.action.ActionResponse +import org.opensearch.core.action.ActionResponse import org.opensearch.client.Client import org.opensearch.cluster.NamedDiff import org.opensearch.cluster.metadata.IndexNameExpressionResolver 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 cc93d88a..140a708d 100644 --- a/src/main/kotlin/org/opensearch/replication/action/autofollow/TransportAutoFollowClusterManagerNodeAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/autofollow/TransportAutoFollowClusterManagerNodeAction.kt @@ -28,7 +28,7 @@ import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchException import org.opensearch.ResourceAlreadyExistsException import org.opensearch.ResourceNotFoundException -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.master.AcknowledgedResponse import org.opensearch.action.support.master.TransportMasterNodeAction diff --git a/src/main/kotlin/org/opensearch/replication/action/autofollow/TransportUpdateAutoFollowPatternAction.kt b/src/main/kotlin/org/opensearch/replication/action/autofollow/TransportUpdateAutoFollowPatternAction.kt index 4cb32b1a..7b0f8c67 100644 --- a/src/main/kotlin/org/opensearch/replication/action/autofollow/TransportUpdateAutoFollowPatternAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/autofollow/TransportUpdateAutoFollowPatternAction.kt @@ -24,7 +24,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import org.apache.logging.log4j.LogManager -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.HandledTransportAction import org.opensearch.action.support.master.AcknowledgedResponse 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 c71b4795..8de61312 100644 --- a/src/main/kotlin/org/opensearch/replication/action/changes/GetChangesResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/changes/GetChangesResponse.kt @@ -11,7 +11,7 @@ package org.opensearch.replication.action.changes -import org.opensearch.action.ActionResponse +import org.opensearch.core.action.ActionResponse import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.index.translog.Translog 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 a3995999..dbee183d 100644 --- a/src/main/kotlin/org/opensearch/replication/action/changes/TransportGetChangesAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/changes/TransportGetChangesAction.kt @@ -15,7 +15,7 @@ import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchTimeoutException -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.single.shard.TransportSingleShardAction import org.opensearch.cluster.ClusterState diff --git a/src/main/kotlin/org/opensearch/replication/action/index/TransportReplicateIndexAction.kt b/src/main/kotlin/org/opensearch/replication/action/index/TransportReplicateIndexAction.kt index becb1360..8b2de1ea 100644 --- a/src/main/kotlin/org/opensearch/replication/action/index/TransportReplicateIndexAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/index/TransportReplicateIndexAction.kt @@ -26,7 +26,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import org.apache.logging.log4j.LogManager -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.admin.indices.settings.get.GetSettingsRequest import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.HandledTransportAction 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 36fe81f2..042509f2 100644 --- a/src/main/kotlin/org/opensearch/replication/action/index/TransportReplicateIndexClusterManagerNodeAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/index/TransportReplicateIndexClusterManagerNodeAction.kt @@ -27,7 +27,7 @@ import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchStatusException -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.IndicesOptions import org.opensearch.action.support.master.AcknowledgedResponse 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 55e569aa..c2e58bdd 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 @@ -20,7 +20,7 @@ import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchException -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.master.AcknowledgedResponse import org.opensearch.action.support.master.TransportMasterNodeAction 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 eaf828a1..c4663685 100644 --- a/src/main/kotlin/org/opensearch/replication/action/pause/TransportPauseIndexReplicationAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/pause/TransportPauseIndexReplicationAction.kt @@ -22,7 +22,7 @@ import kotlinx.coroutines.launch import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchException import org.opensearch.ResourceAlreadyExistsException -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.master.AcknowledgedRequest import org.opensearch.action.support.master.AcknowledgedResponse 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 c874e92f..fbf9e181 100644 --- a/src/main/kotlin/org/opensearch/replication/action/replay/TransportReplayChangesAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/replay/TransportReplayChangesAction.kt @@ -25,7 +25,7 @@ import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.asCoroutineDispatcher import kotlinx.coroutines.launch import org.apache.logging.log4j.LogManager -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.admin.indices.mapping.get.GetMappingsRequest import org.opensearch.action.admin.indices.mapping.put.PutMappingRequest import org.opensearch.action.index.IndexRequest 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 0b744482..bc629db7 100644 --- a/src/main/kotlin/org/opensearch/replication/action/replicationstatedetails/TransportUpdateReplicationStateDetails.kt +++ b/src/main/kotlin/org/opensearch/replication/action/replicationstatedetails/TransportUpdateReplicationStateDetails.kt @@ -18,7 +18,7 @@ import org.opensearch.replication.util.submitClusterStateUpdateTask import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.master.AcknowledgedRequest import org.opensearch.action.support.master.AcknowledgedResponse 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 325e20f0..6f432c4b 100644 --- a/src/main/kotlin/org/opensearch/replication/action/repository/GetFileChunkResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/repository/GetFileChunkResponse.kt @@ -11,7 +11,7 @@ package org.opensearch.replication.action.repository -import org.opensearch.action.ActionResponse +import org.opensearch.core.action.ActionResponse import org.opensearch.core.common.bytes.BytesReference import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput 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 9ef97259..ad3d66ab 100644 --- a/src/main/kotlin/org/opensearch/replication/action/repository/GetStoreMetadataResponse.kt +++ b/src/main/kotlin/org/opensearch/replication/action/repository/GetStoreMetadataResponse.kt @@ -11,7 +11,7 @@ package org.opensearch.replication.action.repository -import org.opensearch.action.ActionResponse +import org.opensearch.core.action.ActionResponse import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.index.store.Store 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 a1128913..d748d479 100644 --- a/src/main/kotlin/org/opensearch/replication/action/resume/TransportResumeIndexReplicationAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/resume/TransportResumeIndexReplicationAction.kt @@ -35,7 +35,7 @@ import kotlinx.coroutines.launch import org.apache.logging.log4j.LogManager import org.opensearch.ResourceAlreadyExistsException import org.opensearch.ResourceNotFoundException -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.admin.indices.settings.get.GetSettingsRequest import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.IndicesOptions 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 0b1169b6..ca495da5 100644 --- a/src/main/kotlin/org/opensearch/replication/action/setup/TransportSetupChecksAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/setup/TransportSetupChecksAction.kt @@ -16,7 +16,7 @@ import org.opensearch.replication.util.SecurityContext import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchSecurityException import org.opensearch.ExceptionsHelper -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.StepListener import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.HandledTransportAction diff --git a/src/main/kotlin/org/opensearch/replication/action/setup/TransportValidatePermissionsAction.kt b/src/main/kotlin/org/opensearch/replication/action/setup/TransportValidatePermissionsAction.kt index 2b746c1a..a592bc55 100644 --- a/src/main/kotlin/org/opensearch/replication/action/setup/TransportValidatePermissionsAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/setup/TransportValidatePermissionsAction.kt @@ -13,7 +13,7 @@ package org.opensearch.replication.action.setup import org.opensearch.replication.util.completeWith import org.apache.logging.log4j.LogManager -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.HandledTransportAction import org.opensearch.action.support.master.AcknowledgedResponse diff --git a/src/main/kotlin/org/opensearch/replication/action/stats/TransportAutoFollowStatsAction.kt b/src/main/kotlin/org/opensearch/replication/action/stats/TransportAutoFollowStatsAction.kt index 8176a478..677039ca 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stats/TransportAutoFollowStatsAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stats/TransportAutoFollowStatsAction.kt @@ -14,7 +14,7 @@ package org.opensearch.replication.action.stats import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.GlobalScope import org.apache.logging.log4j.LogManager -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.FailedNodeException import org.opensearch.action.TaskOperationFailure import org.opensearch.action.support.ActionFilters diff --git a/src/main/kotlin/org/opensearch/replication/action/status/TransportReplicationStatusAction.kt b/src/main/kotlin/org/opensearch/replication/action/status/TransportReplicationStatusAction.kt index 317fb621..76cc1153 100644 --- a/src/main/kotlin/org/opensearch/replication/action/status/TransportReplicationStatusAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/status/TransportReplicationStatusAction.kt @@ -20,7 +20,7 @@ import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import org.apache.logging.log4j.LogManager import org.opensearch.ResourceNotFoundException -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.HandledTransportAction import org.opensearch.client.Client 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 f18cbb30..d9af050a 100644 --- a/src/main/kotlin/org/opensearch/replication/action/stop/TransportStopIndexReplicationAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/stop/TransportStopIndexReplicationAction.kt @@ -33,7 +33,7 @@ import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import org.apache.logging.log4j.LogManager import org.opensearch.OpenSearchException -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.admin.indices.open.OpenIndexRequest import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.master.AcknowledgedResponse 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 333ed9f7..4baf7a1d 100644 --- a/src/main/kotlin/org/opensearch/replication/action/update/TransportUpdateIndexReplicationAction.kt +++ b/src/main/kotlin/org/opensearch/replication/action/update/TransportUpdateIndexReplicationAction.kt @@ -22,7 +22,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import org.apache.logging.log4j.LogManager -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.master.AcknowledgedResponse import org.opensearch.action.support.master.TransportMasterNodeAction diff --git a/src/main/kotlin/org/opensearch/replication/metadata/TransportUpdateMetadataAction.kt b/src/main/kotlin/org/opensearch/replication/metadata/TransportUpdateMetadataAction.kt index 21b1643f..6f2ecfa7 100644 --- a/src/main/kotlin/org/opensearch/replication/metadata/TransportUpdateMetadataAction.kt +++ b/src/main/kotlin/org/opensearch/replication/metadata/TransportUpdateMetadataAction.kt @@ -13,7 +13,7 @@ package org.opensearch.replication.metadata import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.message.ParameterizedMessage -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.IndicesRequest import org.opensearch.action.admin.indices.alias.IndicesAliasesClusterStateUpdateRequest import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest diff --git a/src/main/kotlin/org/opensearch/replication/metadata/UpdateIndexBlockTask.kt b/src/main/kotlin/org/opensearch/replication/metadata/UpdateIndexBlockTask.kt index e67293b6..38f2d85a 100644 --- a/src/main/kotlin/org/opensearch/replication/metadata/UpdateIndexBlockTask.kt +++ b/src/main/kotlin/org/opensearch/replication/metadata/UpdateIndexBlockTask.kt @@ -13,7 +13,7 @@ package org.opensearch.replication.metadata import org.opensearch.replication.action.index.block.IndexBlockUpdateType import org.opensearch.replication.action.index.block.UpdateIndexBlockRequest -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.support.master.AcknowledgedResponse import org.opensearch.cluster.AckedClusterStateUpdateTask import org.opensearch.cluster.ClusterState diff --git a/src/main/kotlin/org/opensearch/replication/metadata/UpdateReplicationMetadata.kt b/src/main/kotlin/org/opensearch/replication/metadata/UpdateReplicationMetadata.kt index 54d4663e..5c69a10a 100644 --- a/src/main/kotlin/org/opensearch/replication/metadata/UpdateReplicationMetadata.kt +++ b/src/main/kotlin/org/opensearch/replication/metadata/UpdateReplicationMetadata.kt @@ -14,7 +14,7 @@ package org.opensearch.replication.metadata import org.opensearch.replication.action.replicationstatedetails.UpdateReplicationStateDetailsRequest import org.opensearch.replication.metadata.state.ReplicationStateMetadata import org.apache.logging.log4j.LogManager -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.cluster.AckedClusterStateUpdateTask import org.opensearch.cluster.ClusterState import org.opensearch.cluster.ClusterStateTaskExecutor diff --git a/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterMultiChunkTransfer.kt b/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterMultiChunkTransfer.kt index 344fbcbb..e1460e0b 100644 --- a/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterMultiChunkTransfer.kt +++ b/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterMultiChunkTransfer.kt @@ -23,7 +23,7 @@ import kotlinx.coroutines.launch import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock import org.apache.logging.log4j.Logger -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.client.Client import org.opensearch.cluster.node.DiscoveryNode import org.opensearch.core.common.unit.ByteSizeValue diff --git a/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterRepository.kt b/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterRepository.kt index 7272c006..4493c9bb 100644 --- a/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterRepository.kt +++ b/src/main/kotlin/org/opensearch/replication/repository/RemoteClusterRepository.kt @@ -30,9 +30,9 @@ import kotlinx.coroutines.Dispatchers import org.apache.logging.log4j.LogManager import org.apache.lucene.index.IndexCommit import org.opensearch.Version -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.ActionRequest -import org.opensearch.action.ActionResponse +import org.opensearch.core.action.ActionResponse import org.opensearch.action.ActionType import org.opensearch.action.admin.indices.stats.IndicesStatsAction import org.opensearch.action.admin.indices.stats.IndicesStatsRequest diff --git a/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt b/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt index 7f03dd79..9f39da74 100644 --- a/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt +++ b/src/main/kotlin/org/opensearch/replication/task/CrossClusterReplicationTask.kt @@ -30,8 +30,8 @@ import kotlinx.coroutines.withTimeoutOrNull import kotlinx.coroutines.ObsoleteCoroutinesApi import org.apache.logging.log4j.Logger import org.opensearch.OpenSearchException -import org.opensearch.action.ActionListener -import org.opensearch.action.ActionResponse +import org.opensearch.core.action.ActionListener +import org.opensearch.core.action.ActionResponse import org.opensearch.client.Client import org.opensearch.cluster.service.ClusterService import org.opensearch.core.common.io.stream.StreamOutput @@ -48,7 +48,7 @@ import org.opensearch.persistent.PersistentTaskState import org.opensearch.persistent.PersistentTasksService import org.opensearch.replication.util.stackTraceToString import org.opensearch.core.rest.RestStatus -import org.opensearch.tasks.TaskId +import org.opensearch.core.tasks.TaskId import org.opensearch.tasks.TaskManager import org.opensearch.threadpool.ThreadPool diff --git a/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowExecutor.kt b/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowExecutor.kt index afa8a30e..4faebf45 100644 --- a/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowExecutor.kt +++ b/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowExecutor.kt @@ -19,7 +19,7 @@ import org.opensearch.persistent.AllocatedPersistentTask import org.opensearch.persistent.PersistentTaskState import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask import org.opensearch.persistent.PersistentTasksExecutor -import org.opensearch.tasks.TaskId +import org.opensearch.core.tasks.TaskId import org.opensearch.threadpool.ThreadPool class AutoFollowExecutor(executor: String, private val clusterService: ClusterService, 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 d47843d6..ca376e59 100644 --- a/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowTask.kt +++ b/src/main/kotlin/org/opensearch/replication/task/autofollow/AutoFollowTask.kt @@ -41,7 +41,7 @@ import org.opensearch.replication.action.status.ShardInfoRequest import org.opensearch.replication.action.status.ShardInfoResponse import org.opensearch.core.rest.RestStatus import org.opensearch.tasks.Task -import org.opensearch.tasks.TaskId +import org.opensearch.core.tasks.TaskId import org.opensearch.threadpool.Scheduler import org.opensearch.threadpool.ThreadPool import java.util.concurrent.ConcurrentSkipListSet diff --git a/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationExecutor.kt b/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationExecutor.kt index 8c2e88ca..72b1484f 100644 --- a/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationExecutor.kt +++ b/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationExecutor.kt @@ -27,7 +27,7 @@ import org.opensearch.persistent.AllocatedPersistentTask import org.opensearch.persistent.PersistentTaskState import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask import org.opensearch.persistent.PersistentTasksExecutor -import org.opensearch.tasks.TaskId +import org.opensearch.core.tasks.TaskId import org.opensearch.threadpool.ThreadPool class IndexReplicationExecutor(executor: String, private val clusterService: ClusterService, 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 ce3cb43a..d0c812a7 100644 --- a/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationTask.kt +++ b/src/main/kotlin/org/opensearch/replication/task/index/IndexReplicationTask.kt @@ -48,7 +48,7 @@ import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import org.opensearch.OpenSearchException import org.opensearch.OpenSearchTimeoutException -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions import org.opensearch.action.admin.indices.alias.get.GetAliasesRequest @@ -95,7 +95,7 @@ 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.core.rest.RestStatus -import org.opensearch.tasks.TaskId +import org.opensearch.core.tasks.TaskId import org.opensearch.tasks.TaskManager import org.opensearch.threadpool.ThreadPool import java.util.Collections diff --git a/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationExecutor.kt b/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationExecutor.kt index 11be6056..526935ef 100644 --- a/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationExecutor.kt +++ b/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationExecutor.kt @@ -26,7 +26,7 @@ import org.opensearch.persistent.PersistentTaskState import org.opensearch.persistent.PersistentTasksCustomMetadata.Assignment import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask import org.opensearch.persistent.PersistentTasksExecutor -import org.opensearch.tasks.TaskId +import org.opensearch.core.tasks.TaskId import org.opensearch.threadpool.ThreadPool class ShardReplicationExecutor(executor: String, private val clusterService : ClusterService, 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 e165c916..c41ee084 100644 --- a/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationTask.kt +++ b/src/main/kotlin/org/opensearch/replication/task/shard/ShardReplicationTask.kt @@ -51,7 +51,7 @@ import org.opensearch.core.index.shard.ShardId import org.opensearch.persistent.PersistentTaskState import org.opensearch.persistent.PersistentTasksNodeService import org.opensearch.core.rest.RestStatus -import org.opensearch.tasks.TaskId +import org.opensearch.core.tasks.TaskId import org.opensearch.threadpool.ThreadPool import org.opensearch.transport.NodeNotConnectedException import java.time.Duration 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 bbb6837a..fcbfc33c 100644 --- a/src/main/kotlin/org/opensearch/replication/task/shard/TranslogSequencer.kt +++ b/src/main/kotlin/org/opensearch/replication/task/shard/TranslogSequencer.kt @@ -32,7 +32,7 @@ import org.opensearch.index.IndexNotFoundException 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 org.opensearch.core.tasks.TaskId import java.util.ArrayList import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.TimeUnit diff --git a/src/main/kotlin/org/opensearch/replication/util/Coroutines.kt b/src/main/kotlin/org/opensearch/replication/util/Coroutines.kt index 47e7b723..b561c795 100644 --- a/src/main/kotlin/org/opensearch/replication/util/Coroutines.kt +++ b/src/main/kotlin/org/opensearch/replication/util/Coroutines.kt @@ -15,9 +15,9 @@ import org.opensearch.replication.metadata.store.ReplicationMetadata import kotlinx.coroutines.* import org.opensearch.OpenSearchTimeoutException import org.opensearch.ExceptionsHelper -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.ActionRequest -import org.opensearch.action.ActionResponse +import org.opensearch.core.action.ActionResponse import org.opensearch.action.ActionType import org.opensearch.action.support.master.AcknowledgedRequest import org.opensearch.action.support.master.MasterNodeRequest diff --git a/src/main/kotlin/org/opensearch/replication/util/Extensions.kt b/src/main/kotlin/org/opensearch/replication/util/Extensions.kt index 1928ad6b..7a73fa5f 100644 --- a/src/main/kotlin/org/opensearch/replication/util/Extensions.kt +++ b/src/main/kotlin/org/opensearch/replication/util/Extensions.kt @@ -20,9 +20,9 @@ import org.apache.logging.log4j.Logger import org.opensearch.OpenSearchException import org.opensearch.OpenSearchSecurityException import org.opensearch.ResourceNotFoundException -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.ActionRequest -import org.opensearch.action.ActionResponse +import org.opensearch.core.action.ActionResponse import org.opensearch.action.ActionType import org.opensearch.action.index.IndexRequestBuilder import org.opensearch.action.index.IndexResponse diff --git a/src/main/kotlin/org/opensearch/replication/util/SecurityContext.kt b/src/main/kotlin/org/opensearch/replication/util/SecurityContext.kt index 2490dd0c..f811324a 100644 --- a/src/main/kotlin/org/opensearch/replication/util/SecurityContext.kt +++ b/src/main/kotlin/org/opensearch/replication/util/SecurityContext.kt @@ -29,7 +29,7 @@ import org.opensearch.commons.ConfigConstants import org.opensearch.commons.authuser.User import org.apache.logging.log4j.LogManager import org.opensearch.action.ActionRequest -import org.opensearch.action.ActionResponse +import org.opensearch.core.action.ActionResponse import org.opensearch.action.ActionType import org.opensearch.common.util.concurrent.ThreadContext import org.opensearch.transport.RemoteClusterAwareRequest 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 00bde557..b1e44f39 100644 --- a/src/test/kotlin/org/opensearch/replication/task/index/IndexReplicationTaskTests.kt +++ b/src/test/kotlin/org/opensearch/replication/task/index/IndexReplicationTaskTests.kt @@ -52,7 +52,7 @@ import org.opensearch.replication.task.shard.ShardReplicationExecutor import org.opensearch.replication.task.shard.ShardReplicationParams import org.opensearch.snapshots.Snapshot import org.opensearch.snapshots.SnapshotId -import org.opensearch.tasks.TaskId.EMPTY_TASK_ID +import org.opensearch.core.tasks.TaskId.EMPTY_TASK_ID import org.opensearch.tasks.TaskManager import org.opensearch.test.ClusterServiceUtils import org.opensearch.test.ClusterServiceUtils.setState 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 606d7a18..6f1904fd 100644 --- a/src/test/kotlin/org/opensearch/replication/task/index/NoOpClient.kt +++ b/src/test/kotlin/org/opensearch/replication/task/index/NoOpClient.kt @@ -12,9 +12,9 @@ package org.opensearch.replication.task.index import com.nhaarman.mockitokotlin2.doReturn import org.mockito.Mockito -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.ActionRequest -import org.opensearch.action.ActionResponse +import org.opensearch.core.action.ActionResponse import org.opensearch.action.ActionType import org.opensearch.action.admin.cluster.health.ClusterHealthAction import org.opensearch.action.admin.cluster.health.ClusterHealthResponse 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 730289ed..e33e0f87 100644 --- a/src/test/kotlin/org/opensearch/replication/task/shard/TranslogSequencerTests.kt +++ b/src/test/kotlin/org/opensearch/replication/task/shard/TranslogSequencerTests.kt @@ -16,9 +16,9 @@ import kotlinx.coroutines.ObsoleteCoroutinesApi import kotlinx.coroutines.test.runBlockingTest import org.assertj.core.api.Assertions.assertThat import org.mockito.Mockito -import org.opensearch.action.ActionListener +import org.opensearch.core.action.ActionListener import org.opensearch.action.ActionRequest -import org.opensearch.action.ActionResponse +import org.opensearch.core.action.ActionResponse import org.opensearch.action.ActionType import org.opensearch.action.support.replication.ReplicationResponse.ShardInfo import org.opensearch.common.settings.Settings @@ -36,7 +36,7 @@ import org.opensearch.replication.metadata.store.ReplicationContext import org.opensearch.replication.metadata.store.ReplicationMetadata import org.opensearch.replication.metadata.store.ReplicationStoreMetadataType import org.opensearch.replication.util.indicesService -import org.opensearch.tasks.TaskId.EMPTY_TASK_ID +import org.opensearch.core.tasks.TaskId.EMPTY_TASK_ID import org.opensearch.test.OpenSearchTestCase import org.opensearch.test.client.NoOpClient import java.util.Locale