This is an automated email from the ASF dual-hosted git repository. tkalkirill pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push: new 65cf333bb6 IGNITE-18349 Move LogicalTopologyService to an internal package (#1423) 65cf333bb6 is described below commit 65cf333bb62a5a7d4885cf89b3dbad1e5545a9d9 Author: Roman Puchkovskiy <roman.puchkovs...@gmail.com> AuthorDate: Wed Dec 7 20:11:29 2022 +0400 IGNITE-18349 Move LogicalTopologyService to an internal package (#1423) --- .../org/apache/ignite/internal/cluster/management/MockNode.java | 2 +- .../internal/cluster/management/raft/ItCmgRaftServiceTest.java | 2 +- .../internal/cluster/management/ClusterManagementGroupManager.java | 2 +- .../ignite/internal/cluster/management/raft/CmgRaftService.java | 2 +- .../cluster/management/raft/responses/LogicalTopologyResponse.java | 2 +- .../ignite/internal/cluster/management/rest/TopologyController.java | 2 +- .../internal/cluster/management/topology/LogicalTopology.java | 4 ++-- .../internal/cluster/management/topology/LogicalTopologyImpl.java | 4 ++-- .../cluster/management/topology/LogicalTopologyServiceImpl.java | 6 +++--- .../management/topology/api}/LogicalTopologyEventListener.java | 4 +++- .../cluster/management/topology/api}/LogicalTopologyService.java | 3 ++- .../cluster/management/topology/api}/LogicalTopologySnapshot.java | 3 ++- .../cluster/management/topology/LogicalTopologyImplTest.java | 4 ++-- .../cluster/management/topology/LogicalTopologyServiceImplTest.java | 4 ++-- .../org/apache/ignite/internal/compute/ItLogicalTopologyTest.java | 4 ++-- .../src/main/java/org/apache/ignite/internal/app/IgniteImpl.java | 2 +- 16 files changed, 27 insertions(+), 23 deletions(-) diff --git a/modules/cluster-management/src/integrationTest/java/org/apache/ignite/internal/cluster/management/MockNode.java b/modules/cluster-management/src/integrationTest/java/org/apache/ignite/internal/cluster/management/MockNode.java index 44c63a17f0..c814d46be5 100644 --- a/modules/cluster-management/src/integrationTest/java/org/apache/ignite/internal/cluster/management/MockNode.java +++ b/modules/cluster-management/src/integrationTest/java/org/apache/ignite/internal/cluster/management/MockNode.java @@ -27,6 +27,7 @@ import java.util.List; import java.util.concurrent.CompletableFuture; import org.apache.ignite.internal.cluster.management.raft.RocksDbClusterStateStorage; import org.apache.ignite.internal.cluster.management.topology.LogicalTopologyImpl; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; import org.apache.ignite.internal.hlc.HybridClockImpl; import org.apache.ignite.internal.manager.IgniteComponent; import org.apache.ignite.internal.raft.Loza; @@ -35,7 +36,6 @@ import org.apache.ignite.internal.vault.VaultManager; import org.apache.ignite.internal.vault.persistence.PersistentVaultService; import org.apache.ignite.network.ClusterNode; import org.apache.ignite.network.ClusterService; -import org.apache.ignite.network.LogicalTopologySnapshot; import org.apache.ignite.network.NetworkAddress; import org.apache.ignite.network.NodeFinder; import org.apache.ignite.utils.ClusterServiceTestUtils; diff --git a/modules/cluster-management/src/integrationTest/java/org/apache/ignite/internal/cluster/management/raft/ItCmgRaftServiceTest.java b/modules/cluster-management/src/integrationTest/java/org/apache/ignite/internal/cluster/management/raft/ItCmgRaftServiceTest.java index cf871112a9..86e7a8cd6d 100644 --- a/modules/cluster-management/src/integrationTest/java/org/apache/ignite/internal/cluster/management/raft/ItCmgRaftServiceTest.java +++ b/modules/cluster-management/src/integrationTest/java/org/apache/ignite/internal/cluster/management/raft/ItCmgRaftServiceTest.java @@ -47,6 +47,7 @@ import org.apache.ignite.internal.cluster.management.raft.commands.JoinReadyComm import org.apache.ignite.internal.cluster.management.raft.commands.JoinRequestCommand; import org.apache.ignite.internal.cluster.management.topology.LogicalTopology; import org.apache.ignite.internal.cluster.management.topology.LogicalTopologyImpl; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; import org.apache.ignite.internal.configuration.testframework.ConfigurationExtension; import org.apache.ignite.internal.configuration.testframework.InjectConfiguration; import org.apache.ignite.internal.hlc.HybridClockImpl; @@ -62,7 +63,6 @@ import org.apache.ignite.lang.IgniteInternalException; import org.apache.ignite.lang.NodeStoppingException; import org.apache.ignite.network.ClusterNode; import org.apache.ignite.network.ClusterService; -import org.apache.ignite.network.LogicalTopologySnapshot; import org.apache.ignite.network.NetworkAddress; import org.apache.ignite.network.NodeFinder; import org.apache.ignite.network.StaticNodeFinder; diff --git a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/ClusterManagementGroupManager.java b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/ClusterManagementGroupManager.java index c52d4ad20c..7190955a46 100644 --- a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/ClusterManagementGroupManager.java +++ b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/ClusterManagementGroupManager.java @@ -50,6 +50,7 @@ import org.apache.ignite.internal.cluster.management.raft.JoinDeniedException; import org.apache.ignite.internal.cluster.management.raft.commands.JoinReadyCommand; import org.apache.ignite.internal.cluster.management.topology.LogicalTopology; import org.apache.ignite.internal.cluster.management.topology.LogicalTopologyImpl; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; import org.apache.ignite.internal.logger.IgniteLogger; import org.apache.ignite.internal.logger.Loggers; import org.apache.ignite.internal.manager.IgniteComponent; @@ -66,7 +67,6 @@ import org.apache.ignite.lang.IgniteInternalException; import org.apache.ignite.lang.NodeStoppingException; import org.apache.ignite.network.ClusterNode; import org.apache.ignite.network.ClusterService; -import org.apache.ignite.network.LogicalTopologySnapshot; import org.apache.ignite.network.NetworkMessage; import org.apache.ignite.network.TopologyEventHandler; import org.apache.ignite.network.TopologyService; diff --git a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/raft/CmgRaftService.java b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/raft/CmgRaftService.java index 26845a3cd1..a489f6707a 100644 --- a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/raft/CmgRaftService.java +++ b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/raft/CmgRaftService.java @@ -33,6 +33,7 @@ import org.apache.ignite.internal.cluster.management.raft.commands.NodesLeaveCom import org.apache.ignite.internal.cluster.management.raft.responses.LogicalTopologyResponse; import org.apache.ignite.internal.cluster.management.raft.responses.ValidationErrorResponse; import org.apache.ignite.internal.cluster.management.topology.LogicalTopology; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; import org.apache.ignite.internal.logger.IgniteLogger; import org.apache.ignite.internal.logger.Loggers; import org.apache.ignite.internal.properties.IgniteProductVersion; @@ -41,7 +42,6 @@ import org.apache.ignite.internal.raft.service.RaftGroupService; import org.apache.ignite.lang.IgniteInternalException; import org.apache.ignite.network.ClusterNode; import org.apache.ignite.network.ClusterService; -import org.apache.ignite.network.LogicalTopologySnapshot; /** * A wrapper around a {@link RaftGroupService} providing helpful methods for working with the CMG. diff --git a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/raft/responses/LogicalTopologyResponse.java b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/raft/responses/LogicalTopologyResponse.java index 79724c666f..74797fc02e 100644 --- a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/raft/responses/LogicalTopologyResponse.java +++ b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/raft/responses/LogicalTopologyResponse.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.cluster.management.raft.responses; import java.io.Serializable; -import org.apache.ignite.network.LogicalTopologySnapshot; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; /** * Response containing the current logical topology. diff --git a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/rest/TopologyController.java b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/rest/TopologyController.java index a2b665cc8b..52688aafc2 100644 --- a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/rest/TopologyController.java +++ b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/rest/TopologyController.java @@ -24,13 +24,13 @@ import java.util.Collection; import java.util.List; import java.util.concurrent.CompletableFuture; import org.apache.ignite.internal.cluster.management.ClusterManagementGroupManager; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; import org.apache.ignite.internal.rest.api.cluster.ClusterNodeDto; import org.apache.ignite.internal.rest.api.cluster.NetworkAddressDto; import org.apache.ignite.internal.rest.api.cluster.NodeMetadataDto; import org.apache.ignite.internal.rest.api.cluster.TopologyApi; import org.apache.ignite.internal.rest.exception.ClusterNotInitializedException; import org.apache.ignite.network.ClusterNode; -import org.apache.ignite.network.LogicalTopologySnapshot; import org.apache.ignite.network.NetworkAddress; import org.apache.ignite.network.NodeMetadata; import org.apache.ignite.network.TopologyService; diff --git a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopology.java b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopology.java index 2b9df4b26f..ff1161415e 100644 --- a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopology.java +++ b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopology.java @@ -18,9 +18,9 @@ package org.apache.ignite.internal.cluster.management.topology; import java.util.Set; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologyEventListener; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; import org.apache.ignite.network.ClusterNode; -import org.apache.ignite.network.LogicalTopologyEventListener; -import org.apache.ignite.network.LogicalTopologySnapshot; /** * Used to manage logical topology information available locally on the current node. diff --git a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyImpl.java b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyImpl.java index 3c969eaaa8..798fc41cea 100644 --- a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyImpl.java +++ b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyImpl.java @@ -31,11 +31,11 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; import org.apache.ignite.internal.cluster.management.raft.ClusterStateStorage; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologyEventListener; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; import org.apache.ignite.internal.logger.IgniteLogger; import org.apache.ignite.internal.logger.Loggers; import org.apache.ignite.network.ClusterNode; -import org.apache.ignite.network.LogicalTopologyEventListener; -import org.apache.ignite.network.LogicalTopologySnapshot; /** * Implementation of {@link LogicalTopology}. diff --git a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyServiceImpl.java b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyServiceImpl.java index 58378072d5..64c8e16db5 100644 --- a/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyServiceImpl.java +++ b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyServiceImpl.java @@ -19,9 +19,9 @@ package org.apache.ignite.internal.cluster.management.topology; import java.util.concurrent.CompletableFuture; import org.apache.ignite.internal.cluster.management.ClusterManagementGroupManager; -import org.apache.ignite.network.LogicalTopologyEventListener; -import org.apache.ignite.network.LogicalTopologyService; -import org.apache.ignite.network.LogicalTopologySnapshot; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologyEventListener; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologyService; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; /** * {@link LogicalTopologyService} implementation. diff --git a/modules/api/src/main/java/org/apache/ignite/network/LogicalTopologyEventListener.java b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalTopologyEventListener.java similarity index 96% rename from modules/api/src/main/java/org/apache/ignite/network/LogicalTopologyEventListener.java rename to modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalTopologyEventListener.java index d20bd34420..a609f1baa0 100644 --- a/modules/api/src/main/java/org/apache/ignite/network/LogicalTopologyEventListener.java +++ b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalTopologyEventListener.java @@ -15,7 +15,9 @@ * limitations under the License. */ -package org.apache.ignite.network; +package org.apache.ignite.internal.cluster.management.topology.api; + +import org.apache.ignite.network.ClusterNode; /** * Listens to events related to logical topology changes. diff --git a/modules/api/src/main/java/org/apache/ignite/network/LogicalTopologyService.java b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalTopologyService.java similarity index 95% rename from modules/api/src/main/java/org/apache/ignite/network/LogicalTopologyService.java rename to modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalTopologyService.java index 308d0d146e..d0c054fa08 100644 --- a/modules/api/src/main/java/org/apache/ignite/network/LogicalTopologyService.java +++ b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalTopologyService.java @@ -15,9 +15,10 @@ * limitations under the License. */ -package org.apache.ignite.network; +package org.apache.ignite.internal.cluster.management.topology.api; import java.util.concurrent.CompletableFuture; +import org.apache.ignite.network.TopologyService; /** * Used for getting information about the cluster's Logical Topology. diff --git a/modules/api/src/main/java/org/apache/ignite/network/LogicalTopologySnapshot.java b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalTopologySnapshot.java similarity index 95% rename from modules/api/src/main/java/org/apache/ignite/network/LogicalTopologySnapshot.java rename to modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalTopologySnapshot.java index 66ed67214f..83c1ae5f73 100644 --- a/modules/api/src/main/java/org/apache/ignite/network/LogicalTopologySnapshot.java +++ b/modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/topology/api/LogicalTopologySnapshot.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.ignite.network; +package org.apache.ignite.internal.cluster.management.topology.api; import static java.util.Collections.emptySet; @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.Set; import org.apache.ignite.internal.tostring.IgniteToStringInclude; import org.apache.ignite.internal.tostring.S; +import org.apache.ignite.network.ClusterNode; /** * A snapshot of a logical topology as seen locally. Includes nodes participating in the logical topology and the version diff --git a/modules/cluster-management/src/test/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyImplTest.java b/modules/cluster-management/src/test/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyImplTest.java index 340b0a8e80..6785c0aeb2 100644 --- a/modules/cluster-management/src/test/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyImplTest.java +++ b/modules/cluster-management/src/test/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyImplTest.java @@ -48,11 +48,11 @@ import java.util.Set; import java.util.concurrent.TimeUnit; import org.apache.ignite.internal.cluster.management.raft.ClusterStateStorage; import org.apache.ignite.internal.cluster.management.raft.TestClusterStateStorage; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologyEventListener; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; import org.apache.ignite.internal.testframework.WorkDirectory; import org.apache.ignite.internal.testframework.WorkDirectoryExtension; import org.apache.ignite.network.ClusterNode; -import org.apache.ignite.network.LogicalTopologyEventListener; -import org.apache.ignite.network.LogicalTopologySnapshot; import org.apache.ignite.network.NetworkAddress; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/modules/cluster-management/src/test/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyServiceImplTest.java b/modules/cluster-management/src/test/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyServiceImplTest.java index b30a3dc240..b82dc0728b 100644 --- a/modules/cluster-management/src/test/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyServiceImplTest.java +++ b/modules/cluster-management/src/test/java/org/apache/ignite/internal/cluster/management/topology/LogicalTopologyServiceImplTest.java @@ -24,8 +24,8 @@ import static org.mockito.Mockito.verify; import java.util.concurrent.CompletableFuture; import org.apache.ignite.internal.cluster.management.ClusterManagementGroupManager; -import org.apache.ignite.network.LogicalTopologyEventListener; -import org.apache.ignite.network.LogicalTopologySnapshot; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologyEventListener; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/compute/ItLogicalTopologyTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/compute/ItLogicalTopologyTest.java index 1993f8f908..ce360d0f79 100644 --- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/compute/ItLogicalTopologyTest.java +++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/compute/ItLogicalTopologyTest.java @@ -29,9 +29,9 @@ import java.util.concurrent.CopyOnWriteArrayList; import org.apache.ignite.Ignite; import org.apache.ignite.internal.AbstractClusterIntegrationTest; import org.apache.ignite.internal.app.IgniteImpl; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologyEventListener; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; import org.apache.ignite.network.ClusterNode; -import org.apache.ignite.network.LogicalTopologyEventListener; -import org.apache.ignite.network.LogicalTopologySnapshot; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInfo; diff --git a/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java b/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java index 68c83ee438..c0a59f14ef 100644 --- a/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java +++ b/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java @@ -41,6 +41,7 @@ import org.apache.ignite.internal.cluster.management.raft.RocksDbClusterStateSto import org.apache.ignite.internal.cluster.management.rest.ClusterManagementRestFactory; import org.apache.ignite.internal.cluster.management.topology.LogicalTopologyImpl; import org.apache.ignite.internal.cluster.management.topology.LogicalTopologyServiceImpl; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologyService; import org.apache.ignite.internal.component.RestAddressReporter; import org.apache.ignite.internal.components.LongJvmPauseDetector; import org.apache.ignite.internal.compute.ComputeComponent; @@ -113,7 +114,6 @@ import org.apache.ignite.lang.NodeStoppingException; import org.apache.ignite.network.ClusterLocalConfiguration; import org.apache.ignite.network.ClusterNode; import org.apache.ignite.network.ClusterService; -import org.apache.ignite.network.LogicalTopologyService; import org.apache.ignite.network.MessageSerializationRegistryImpl; import org.apache.ignite.network.NettyBootstrapFactory; import org.apache.ignite.network.NetworkAddress;