This is an automated email from the ASF dual-hosted git repository.

zhaojinchao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 15e6a6a5138 Refactor package structure of event builder (#31960)
15e6a6a5138 is described below

commit 15e6a6a5138f679fff8fe4cb8188a3c5e8511cb7
Author: Haoran Meng <menghaora...@gmail.com>
AuthorDate: Tue Jul 2 17:10:22 2024 +0800

    Refactor package structure of event builder (#31960)
---
 .../QualifiedDataSourceStatePersistServiceTest.java}     |  9 ++++-----
 .../event/builder/ClusterStateDispatchEventBuilder.java  |  2 +-
 .../builder/ComputeNodeOnlineDispatchEventBuilder.java   |  2 +-
 .../builder/ComputeNodeStateDispatchEventBuilder.java    |  2 +-
 .../event/builder/GlobalRuleDispatchEventBuilder.java    |  2 +-
 .../builder}/ListenerAssistedDispatchEventBuilder.java   |  2 +-
 .../event/builder/PropertiesDispatchEventBuilder.java    |  2 +-
 .../builder/QualifiedDataSourceDispatchEventBuilder.java |  2 +-
 .../builder/ShardingSphereDataDispatchEventBuilder.java  |  2 +-
 ...here.mode.event.builder.dispatch.DispatchEventBuilder | 16 ++++++++--------
 .../builder}/ClusterStateDispatchEventBuilderTest.java   |  3 +--
 .../ComputeNodeOnlineDispatchEventBuilderTest.java       |  3 +--
 .../ComputeNodeStateDispatchEventBuilderTest.java        |  3 +--
 .../QualifiedDataSourceDispatchEventBuilderTest.java     |  3 +--
 .../subscriber/dispatch}/CacheEvictedSubscriberTest.java |  3 +--
 .../dispatch}/ComputeNodeOnlineSubscriberTest.java       |  3 +--
 .../dispatch}/ProcessListChangedSubscriberTest.java      |  3 +--
 .../QualifiedDataSourceStateSubscriberTest.java          |  2 +-
 .../dispatch}/QualifiedDataSourceSubscriberTest.java     |  3 +--
 .../dispatch}/ResourceMetaDataChangedSubscriberTest.java |  7 +------
 .../subscriber/dispatch}/StateChangedSubscriberTest.java |  3 +--
 21 files changed, 31 insertions(+), 46 deletions(-)

diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/storage/service/QualifiedDataSourceStateServiceTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/persist/service/QualifiedDataSourceStatePersistServiceTest.java
similarity index 81%
rename from 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/storage/service/QualifiedDataSourceStateServiceTest.java
rename to 
mode/core/src/test/java/org/apache/shardingsphere/mode/persist/service/QualifiedDataSourceStatePersistServiceTest.java
index 393072a6ec4..b5721114c2d 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/storage/service/QualifiedDataSourceStateServiceTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/persist/service/QualifiedDataSourceStatePersistServiceTest.java
@@ -15,10 +15,9 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.storage.service;
+package org.apache.shardingsphere.mode.persist.service;
 
-import 
org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository;
-import 
org.apache.shardingsphere.mode.persist.service.QualifiedDataSourceStatePersistService;
+import org.apache.shardingsphere.mode.spi.PersistRepository;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
@@ -32,10 +31,10 @@ import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.Mockito.when;
 
 @ExtendWith(MockitoExtension.class)
-class QualifiedDataSourceStateServiceTest {
+class QualifiedDataSourceStatePersistServiceTest {
     
     @Mock
-    private ClusterPersistRepository repository;
+    private PersistRepository repository;
     
     @Test
     void assertLoadStatus() {
diff --git 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/cluster/event/builder/ClusterStateDispatchEventBuilder.java
 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ClusterStateDispatchEventBuilder.java
similarity index 96%
rename from 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/cluster/event/builder/ClusterStateDispatchEventBuilder.java
rename to 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ClusterStateDispatchEventBuilder.java
index fd78fe45985..ef94a58464e 100644
--- 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/cluster/event/builder/ClusterStateDispatchEventBuilder.java
+++ 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ClusterStateDispatchEventBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.cluster.event.builder;
+package org.apache.shardingsphere.mode.manager.cluster.event.builder;
 
 import com.google.common.base.Strings;
 import org.apache.shardingsphere.infra.rule.event.GovernanceEvent;
diff --git 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/compute/online/event/builder/ComputeNodeOnlineDispatchEventBuilder.java
 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ComputeNodeOnlineDispatchEventBuilder.java
similarity index 97%
rename from 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/compute/online/event/builder/ComputeNodeOnlineDispatchEventBuilder.java
rename to 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ComputeNodeOnlineDispatchEventBuilder.java
index 0cfb30c7a66..8da0cde9bcf 100644
--- 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/compute/online/event/builder/ComputeNodeOnlineDispatchEventBuilder.java
+++ 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ComputeNodeOnlineDispatchEventBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.compute.online.event.builder;
+package org.apache.shardingsphere.mode.manager.cluster.event.builder;
 
 import org.apache.shardingsphere.infra.instance.ComputeNodeData;
 import org.apache.shardingsphere.infra.instance.metadata.InstanceMetaData;
diff --git 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/builder/ComputeNodeStateDispatchEventBuilder.java
 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ComputeNodeStateDispatchEventBuilder.java
similarity index 98%
rename from 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/builder/ComputeNodeStateDispatchEventBuilder.java
rename to 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ComputeNodeStateDispatchEventBuilder.java
index f01acad4a6f..f773a8c1ac9 100644
--- 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/builder/ComputeNodeStateDispatchEventBuilder.java
+++ 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ComputeNodeStateDispatchEventBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.builder;
+package org.apache.shardingsphere.mode.manager.cluster.event.builder;
 
 import com.google.common.base.Strings;
 import org.apache.shardingsphere.infra.rule.event.GovernanceEvent;
diff --git 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/global/event/builder/GlobalRuleDispatchEventBuilder.java
 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/GlobalRuleDispatchEventBuilder.java
similarity index 95%
rename from 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/global/event/builder/GlobalRuleDispatchEventBuilder.java
rename to 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/GlobalRuleDispatchEventBuilder.java
index ab982256855..a1af3e16c59 100644
--- 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/global/event/builder/GlobalRuleDispatchEventBuilder.java
+++ 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/GlobalRuleDispatchEventBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.global.event.builder;
+package org.apache.shardingsphere.mode.manager.cluster.event.builder;
 
 import org.apache.shardingsphere.infra.rule.event.GovernanceEvent;
 import org.apache.shardingsphere.mode.path.GlobalNodePath;
diff --git 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/listener/watch/ListenerAssistedDispatchEventBuilder.java
 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ListenerAssistedDispatchEventBuilder.java
similarity index 97%
rename from 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/listener/watch/ListenerAssistedDispatchEventBuilder.java
rename to 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ListenerAssistedDispatchEventBuilder.java
index 36a18f7d97e..5610d73018a 100644
--- 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/listener/watch/ListenerAssistedDispatchEventBuilder.java
+++ 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ListenerAssistedDispatchEventBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.listener.watch;
+package org.apache.shardingsphere.mode.manager.cluster.event.builder;
 
 import org.apache.shardingsphere.infra.rule.event.GovernanceEvent;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
diff --git 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/global/event/builder/PropertiesDispatchEventBuilder.java
 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/PropertiesDispatchEventBuilder.java
similarity index 95%
rename from 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/global/event/builder/PropertiesDispatchEventBuilder.java
rename to 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/PropertiesDispatchEventBuilder.java
index 7a358417685..85e5fdac3e4 100644
--- 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/global/event/builder/PropertiesDispatchEventBuilder.java
+++ 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/PropertiesDispatchEventBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.global.event.builder;
+package org.apache.shardingsphere.mode.manager.cluster.event.builder;
 
 import org.apache.shardingsphere.mode.path.GlobalNodePath;
 import org.apache.shardingsphere.metadata.persist.node.GlobalNode;
diff --git 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/storage/event/builder/QualifiedDataSourceDispatchEventBuilder.java
 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/QualifiedDataSourceDispatchEventBuilder.java
similarity index 96%
rename from 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/storage/event/builder/QualifiedDataSourceDispatchEventBuilder.java
rename to 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/QualifiedDataSourceDispatchEventBuilder.java
index 7b4506a4cb3..19d94617f7c 100644
--- 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/storage/event/builder/QualifiedDataSourceDispatchEventBuilder.java
+++ 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/QualifiedDataSourceDispatchEventBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.storage.event.builder;
+package org.apache.shardingsphere.mode.manager.cluster.event.builder;
 
 import com.google.common.base.Strings;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.QualifiedDataSource;
diff --git 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/data/event/builder/ShardingSphereDataDispatchEventBuilder.java
 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ShardingSphereDataDispatchEventBuilder.java
similarity index 98%
rename from 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/data/event/builder/ShardingSphereDataDispatchEventBuilder.java
rename to 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ShardingSphereDataDispatchEventBuilder.java
index 2e3b5c07f47..24baaba804f 100644
--- 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/data/event/builder/ShardingSphereDataDispatchEventBuilder.java
+++ 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ShardingSphereDataDispatchEventBuilder.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.data.event.builder;
+package org.apache.shardingsphere.mode.manager.cluster.event.builder;
 
 import com.google.common.base.Preconditions;
 import com.google.common.base.Strings;
diff --git 
a/mode/type/cluster/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.event.builder.dispatch.DispatchEventBuilder
 
b/mode/type/cluster/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.event.builder.dispatch.DispatchEventBuilder
index db4bda3c4bf..4397caa2746 100644
--- 
a/mode/type/cluster/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.event.builder.dispatch.DispatchEventBuilder
+++ 
b/mode/type/cluster/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.event.builder.dispatch.DispatchEventBuilder
@@ -15,11 +15,11 @@
 # limitations under the License.
 #
 
-org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.storage.event.builder.QualifiedDataSourceDispatchEventBuilder
-org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.builder.ComputeNodeStateDispatchEventBuilder
-org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.cluster.event.builder.ClusterStateDispatchEventBuilder
-org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.data.event.builder.ShardingSphereDataDispatchEventBuilder
-org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.global.event.builder.GlobalRuleDispatchEventBuilder
-org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.global.event.builder.PropertiesDispatchEventBuilder
-org.apache.shardingsphere.mode.manager.cluster.coordinator.listener.watch.ListenerAssistedDispatchEventBuilder
-org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.compute.online.event.builder.ComputeNodeOnlineDispatchEventBuilder
+org.apache.shardingsphere.mode.manager.cluster.event.builder.QualifiedDataSourceDispatchEventBuilder
+org.apache.shardingsphere.mode.manager.cluster.event.builder.ComputeNodeStateDispatchEventBuilder
+org.apache.shardingsphere.mode.manager.cluster.event.builder.ClusterStateDispatchEventBuilder
+org.apache.shardingsphere.mode.manager.cluster.event.builder.ShardingSphereDataDispatchEventBuilder
+org.apache.shardingsphere.mode.manager.cluster.event.builder.GlobalRuleDispatchEventBuilder
+org.apache.shardingsphere.mode.manager.cluster.event.builder.PropertiesDispatchEventBuilder
+org.apache.shardingsphere.mode.manager.cluster.event.builder.ListenerAssistedDispatchEventBuilder
+org.apache.shardingsphere.mode.manager.cluster.event.builder.ComputeNodeOnlineDispatchEventBuilder
diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/cluster/watcher/ClusterStateDispatchEventBuilderTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ClusterStateDispatchEventBuilderTest.java
similarity index 91%
rename from 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/cluster/watcher/ClusterStateDispatchEventBuilderTest.java
rename to 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ClusterStateDispatchEventBuilderTest.java
index 2ff089307d8..366349342db 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/cluster/watcher/ClusterStateDispatchEventBuilderTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ClusterStateDispatchEventBuilderTest.java
@@ -15,11 +15,10 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.cluster.watcher;
+package org.apache.shardingsphere.mode.manager.cluster.event.builder;
 
 import org.apache.shardingsphere.infra.state.cluster.ClusterState;
 import org.apache.shardingsphere.infra.rule.event.GovernanceEvent;
-import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.cluster.event.builder.ClusterStateDispatchEventBuilder;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.cluster.event.ClusterStateEvent;
 import org.apache.shardingsphere.mode.event.DataChangedEvent;
 import org.apache.shardingsphere.mode.event.DataChangedEvent.Type;
diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/compute/online/watcher/ComputeNodeOnlineDispatchEventBuilderTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ComputeNodeOnlineDispatchEventBuilderTest.java
similarity index 92%
rename from 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/compute/online/watcher/ComputeNodeOnlineDispatchEventBuilderTest.java
rename to 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ComputeNodeOnlineDispatchEventBuilderTest.java
index 6b2935693c5..b89a7c54ee4 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/compute/online/watcher/ComputeNodeOnlineDispatchEventBuilderTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ComputeNodeOnlineDispatchEventBuilderTest.java
@@ -15,13 +15,12 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.compute.online.watcher;
+package org.apache.shardingsphere.mode.manager.cluster.event.builder;
 
 import org.apache.shardingsphere.infra.instance.metadata.InstanceType;
 import org.apache.shardingsphere.infra.rule.event.GovernanceEvent;
 import org.apache.shardingsphere.mode.event.DataChangedEvent;
 import org.apache.shardingsphere.mode.event.DataChangedEvent.Type;
-import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.compute.online.event.builder.ComputeNodeOnlineDispatchEventBuilder;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.compute.online.event.InstanceOfflineEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.compute.online.event.InstanceOnlineEvent;
 import org.junit.jupiter.api.Test;
diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateDispatchEventBuilderTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ComputeNodeStateDispatchEventBuilderTest.java
similarity index 94%
rename from 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateDispatchEventBuilderTest.java
rename to 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ComputeNodeStateDispatchEventBuilderTest.java
index a2db24de5d8..d8593745996 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateDispatchEventBuilderTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/ComputeNodeStateDispatchEventBuilderTest.java
@@ -15,12 +15,11 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.watcher;
+package org.apache.shardingsphere.mode.manager.cluster.event.builder;
 
 import org.apache.shardingsphere.infra.state.instance.InstanceState;
 import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
 import org.apache.shardingsphere.infra.rule.event.GovernanceEvent;
-import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.builder.ComputeNodeStateDispatchEventBuilder;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.LabelsEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.ComputeNodeInstanceStateChangedEvent;
 import org.apache.shardingsphere.mode.event.DataChangedEvent;
diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/storage/watcher/QualifiedDataSourceDispatchEventBuilderTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/QualifiedDataSourceDispatchEventBuilderTest.java
similarity index 93%
rename from 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/storage/watcher/QualifiedDataSourceDispatchEventBuilderTest.java
rename to 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/QualifiedDataSourceDispatchEventBuilderTest.java
index bdf3c48fc0d..d5dd87d70cf 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/storage/watcher/QualifiedDataSourceDispatchEventBuilderTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/builder/QualifiedDataSourceDispatchEventBuilderTest.java
@@ -15,14 +15,13 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.storage.watcher;
+package org.apache.shardingsphere.mode.manager.cluster.event.builder;
 
 import org.apache.shardingsphere.infra.rule.event.GovernanceEvent;
 import org.apache.shardingsphere.infra.state.datasource.DataSourceState;
 import org.apache.shardingsphere.mode.event.DataChangedEvent;
 import org.apache.shardingsphere.mode.event.DataChangedEvent.Type;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.storage.event.QualifiedDataSourceStateEvent;
-import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.storage.event.builder.QualifiedDataSourceDispatchEventBuilder;
 import org.junit.jupiter.api.Test;
 
 import java.util.Optional;
diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/CacheEvictedSubscriberTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/CacheEvictedSubscriberTest.java
similarity index 90%
rename from 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/CacheEvictedSubscriberTest.java
rename to 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/CacheEvictedSubscriberTest.java
index 7f593aff6e7..e02c44bcc09 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/CacheEvictedSubscriberTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/CacheEvictedSubscriberTest.java
@@ -15,12 +15,11 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.mode.manager.cluster.coordinator.subscriber;
+package 
org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch;
 
 import org.apache.shardingsphere.infra.util.eventbus.EventBusContext;
 import 
org.apache.shardingsphere.infra.spi.type.ordered.cache.OrderedServicesCache;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.listener.DropDatabaseListenerAssistedEvent;
-import 
org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.CacheEvictedSubscriber;
 import org.junit.jupiter.api.Test;
 
 import java.util.Collections;
diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/compute/online/subscriber/ComputeNodeOnlineSubscriberTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/ComputeNodeOnlineSubscriberTest.java
similarity index 96%
rename from 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/compute/online/subscriber/ComputeNodeOnlineSubscriberTest.java
rename to 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/ComputeNodeOnlineSubscriberTest.java
index 909afbae2fd..9e6ec4b615b 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/compute/online/subscriber/ComputeNodeOnlineSubscriberTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/ComputeNodeOnlineSubscriberTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.compute.online.subscriber;
+package 
org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch;
 
 import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
 import org.apache.shardingsphere.infra.instance.ComputeNodeInstance;
@@ -28,7 +28,6 @@ import 
org.apache.shardingsphere.mode.manager.ContextManagerBuilderParameter;
 import 
org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.compute.online.event.InstanceOfflineEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.compute.online.event.InstanceOnlineEvent;
-import 
org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.ComputeNodeOnlineSubscriber;
 import org.apache.shardingsphere.mode.metadata.MetaDataContextsFactory;
 import 
org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositoryConfiguration;
 import org.junit.jupiter.api.BeforeEach;
diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessListChangedSubscriberTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/ProcessListChangedSubscriberTest.java
similarity index 97%
rename from 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessListChangedSubscriberTest.java
rename to 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/ProcessListChangedSubscriberTest.java
index e0aff57b12d..e05648fafbe 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessListChangedSubscriberTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/ProcessListChangedSubscriberTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.process.subscriber;
+package 
org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch;
 
 import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
@@ -38,7 +38,6 @@ import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.statu
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.KillLocalProcessEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.ReportLocalProcessesCompletedEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.ReportLocalProcessesEvent;
-import 
org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.ProcessListChangedSubscriber;
 import org.apache.shardingsphere.mode.metadata.MetaDataContextsFactory;
 import 
org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositoryConfiguration;
 import org.apache.shardingsphere.mode.spi.PersistRepository;
diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/storage/subscriber/QualifiedDataSourceStateSubscriberTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/QualifiedDataSourceStateSubscriberTest.java
similarity index 95%
rename from 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/storage/subscriber/QualifiedDataSourceStateSubscriberTest.java
rename to 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/QualifiedDataSourceStateSubscriberTest.java
index 5c5103f234a..0440bed10a6 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/storage/subscriber/QualifiedDataSourceStateSubscriberTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/QualifiedDataSourceStateSubscriberTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.storage.subscriber;
+package 
org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch;
 
 import 
org.apache.shardingsphere.infra.metadata.database.schema.QualifiedDataSource;
 import 
org.apache.shardingsphere.mode.event.dispatch.datasource.qualified.QualifiedDataSourceDeletedEvent;
diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/storage/subscriber/QualifiedDataSourceSubscriberTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/QualifiedDataSourceSubscriberTest.java
similarity index 96%
rename from 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/storage/subscriber/QualifiedDataSourceSubscriberTest.java
rename to 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/QualifiedDataSourceSubscriberTest.java
index a33a04cf158..3083d1bcee3 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/nodes/storage/subscriber/QualifiedDataSourceSubscriberTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/QualifiedDataSourceSubscriberTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.storage.subscriber;
+package 
org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch;
 
 import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
@@ -34,7 +34,6 @@ import org.apache.shardingsphere.mode.manager.ContextManager;
 import org.apache.shardingsphere.mode.manager.ContextManagerBuilderParameter;
 import 
org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.nodes.storage.event.QualifiedDataSourceStateEvent;
-import 
org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.QualifiedDataSourceSubscriber;
 import org.apache.shardingsphere.mode.metadata.MetaDataContextsFactory;
 import 
org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositoryConfiguration;
 import 
org.apache.shardingsphere.infra.state.datasource.qualified.QualifiedDataSourceState;
diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ResourceMetaDataChangedSubscriberTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/ResourceMetaDataChangedSubscriberTest.java
similarity index 93%
rename from 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ResourceMetaDataChangedSubscriberTest.java
rename to 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/ResourceMetaDataChangedSubscriberTest.java
index c70a7206ed7..252b8c91cc3 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ResourceMetaDataChangedSubscriberTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/ResourceMetaDataChangedSubscriberTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.mode.manager.cluster.coordinator.subscriber;
+package 
org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch;
 
 import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
@@ -27,13 +27,11 @@ import 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
 import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
 import org.apache.shardingsphere.infra.util.eventbus.EventBusContext;
-import org.apache.shardingsphere.metadata.persist.MetaDataPersistService;
 import org.apache.shardingsphere.mode.manager.ContextManager;
 import org.apache.shardingsphere.mode.manager.ContextManagerBuilderParameter;
 import 
org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.metadata.event.SchemaAddedEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.metadata.event.SchemaDeletedEvent;
-import 
org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.ResourceMetaDataChangedSubscriber;
 import org.apache.shardingsphere.mode.metadata.MetaDataContextsFactory;
 import 
org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositoryConfiguration;
 import org.junit.jupiter.api.BeforeEach;
@@ -64,9 +62,6 @@ class ResourceMetaDataChangedSubscriberTest {
     
     private ContextManager contextManager;
     
-    @Mock(answer = Answers.RETURNS_DEEP_STUBS)
-    private MetaDataPersistService persistService;
-    
     @Mock(answer = Answers.RETURNS_DEEP_STUBS)
     private ShardingSphereDatabase database;
     
diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/StateChangedSubscriberTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/StateChangedSubscriberTest.java
similarity index 97%
rename from 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/StateChangedSubscriberTest.java
rename to 
mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/StateChangedSubscriberTest.java
index 82c02f9d9d2..ba78ea284b5 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/StateChangedSubscriberTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/subscriber/dispatch/StateChangedSubscriberTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.mode.manager.cluster.coordinator.subscriber;
+package 
org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch;
 
 import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
@@ -36,7 +36,6 @@ import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.statu
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.ComputeNodeInstanceStateChangedEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.LabelsEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.WorkerIdEvent;
-import 
org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.StateChangedSubscriber;
 import org.apache.shardingsphere.mode.metadata.MetaDataContextsFactory;
 import 
org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositoryConfiguration;
 import org.junit.jupiter.api.BeforeEach;


Reply via email to