You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by tu...@apache.org on 2023/09/26 02:13:30 UTC

[shardingsphere] branch master updated: Remove nacos in ShardingSphere mode and move to ShardingSphere plugin repository (#28584)

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

tuichenchuxin 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 267ddcdcf34 Remove nacos in ShardingSphere mode and move to ShardingSphere plugin repository (#28584)
267ddcdcf34 is described below

commit 267ddcdcf3406f495ea1331a16a20fd6b9ab61ab
Author: Zhengqiang Duan <du...@apache.org>
AuthorDate: Tue Sep 26 10:13:23 2023 +0800

    Remove nacos in ShardingSphere mode and move to ShardingSphere plugin repository (#28584)
---
 docs/document/content/dev-manual/mode.cn.md        |   1 -
 docs/document/content/dev-manual/mode.en.md        |   1 -
 .../builtin-algorithm/metadata-repository.cn.md    |  15 -
 .../builtin-algorithm/metadata-repository.en.md    |  15 -
 .../optional-plugins/_index.cn.md                  |   1 -
 .../optional-plugins/_index.en.md                  |   1 -
 .../optional-plugins/_index.cn.md                  |   1 -
 .../optional-plugins/_index.en.md                  |   1 -
 examples/pom.xml                                   |   5 -
 .../main/resources/template/resources/registry.ftl |  14 +-
 .../base/seata-at/src/test/resources/registry.conf |  14 +-
 .../type/cluster/repository/provider/nacos/pom.xml |  53 ---
 .../repository/cluster/nacos/NacosRepository.java  | 363 --------------------
 .../repository/cluster/nacos/entity/KeyValue.java  |  35 --
 .../cluster/nacos/entity/ServiceController.java    |  63 ----
 .../cluster/nacos/entity/ServiceMetaData.java      |  56 ---
 .../nacos/listener/NamingEventListener.java        | 132 --------
 .../cluster/nacos/listener/WatchData.java          |  39 ---
 .../cluster/nacos/props/NacosProperties.java       |  32 --
 .../cluster/nacos/props/NacosPropertyKey.java      |  66 ----
 .../cluster/nacos/util/NacosMetaDataUtils.java     |  82 -----
 ...ode.repository.cluster.ClusterPersistRepository |  18 -
 .../cluster/nacos/NacosRepositoryTest.java         | 377 ---------------------
 .../cluster/nacos/props/NacosPropertiesTest.java   |  62 ----
 mode/type/cluster/repository/provider/pom.xml      |   1 -
 25 files changed, 4 insertions(+), 1444 deletions(-)

diff --git a/docs/document/content/dev-manual/mode.cn.md b/docs/document/content/dev-manual/mode.cn.md
index 6ce9fb78ac3..edcda0e8cba 100644
--- a/docs/document/content/dev-manual/mode.cn.md
+++ b/docs/document/content/dev-manual/mode.cn.md
@@ -37,5 +37,4 @@ chapter = true
 |-----------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 | ZooKeeper | 基于 ZooKeeper 的持久化 | [`org.apache.shardingsphere.mode.repository.cluster.zookeeper.ZookeeperRepository`](https://github.com/apache/shardingsphere/blob/master/mode/type/cluster/repository/provider/zookeeper/src/main/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/ZookeeperRepository.java) |
 | etcd      | 基于 Etcd 的持久化      | [`org.apache.shardingsphere.mode.repository.cluster.etcd.EtcdRepository`](https://github.com/apache/shardingsphere/blob/master/mode/type/cluster/repository/provider/etcd/src/main/java/org/apache/shardingsphere/mode/repository/cluster/etcd/EtcdRepository.java)                          |
-| Nacos     | 基于 Nacos 的持久化     | [`org.apache.shardingsphere.mode.repository.cluster.nacos.NacosRepository`](https://github.com/apache/shardingsphere/blob/master/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/NacosRepository.java)                     |
 | Consul    | 基于 Consul 的持久化    | [`org.apache.shardingsphere.mode.repository.cluster.consul.ConsulRepository`](https://github.com/apache/shardingsphere/blob/master/mode/type/cluster/repository/provider/consul/src/main/java/org/apache/shardingsphere/mode/repository/cluster/consul/ConsulRepository.java)                |
diff --git a/docs/document/content/dev-manual/mode.en.md b/docs/document/content/dev-manual/mode.en.md
index 0f44fd25a76..0fab555b840 100644
--- a/docs/document/content/dev-manual/mode.en.md
+++ b/docs/document/content/dev-manual/mode.en.md
@@ -37,5 +37,4 @@ Cluster mode configuration information persistence definition
 |----------------------|-----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 | ZooKeeper            | ZooKeeper based persistence | [`org.apache.shardingsphere.mode.repository.cluster.zookeeper.ZookeeperRepository`](https://github.com/apache/shardingsphere/blob/master/mode/type/cluster/repository/provider/zookeeper/src/main/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/ZookeeperRepository.java) |
 | etcd                 | Etcd based persistence      | [`org.apache.shardingsphere.mode.repository.cluster.etcd.EtcdRepository`](https://github.com/apache/shardingsphere/blob/master/mode/type/cluster/repository/provider/etcd/src/main/java/org/apache/shardingsphere/mode/repository/cluster/etcd/EtcdRepository.java)                          |
-| Nacos                | Nacos based persistence     | [`org.apache.shardingsphere.mode.repository.cluster.nacos.NacosRepository`](https://github.com/apache/shardingsphere/blob/master/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/NacosRepository.java)                     |
 | Consul               | Consul based persistence    | [`org.apache.shardingsphere.mode.repository.cluster.consul.ConsulRepository`](https://github.com/apache/shardingsphere/blob/master/mode/type/cluster/repository/provider/consul/src/main/java/org/apache/shardingsphere/mode/repository/cluster/consul/ConsulRepository.java)                |
diff --git a/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.cn.md b/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.cn.md
index 40cdac63afe..5181f984e9c 100644
--- a/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.cn.md
+++ b/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.cn.md
@@ -54,21 +54,6 @@ Apache ShardingSphere 为不同的运行模式提供了不同的元数据持久
 | timeToLiveSeconds | long   | 临时数据失效的秒数 | 30    |
 | connectionTimeout | long   | 连接超时秒数    | 30    |
 
-### Nacos 持久化
-
-类型:Nacos
-
-适用模式:Cluster
-
-可配置属性:
-
-| *名称*                      | *数据类型* | *说明*              | *默认值*  |
-|---------------------------|--------|-------------------|--------|
-| clusterIp                 | String | 集群中的唯一标识          | 真实主机IP |
-| retryIntervalMilliseconds | long   | 重试间隔毫秒数           | 500    |
-| maxRetries                | int    | 客户端检查数据可用性的最大重试次数 | 3      |
-| timeToLiveSeconds         | int    | 临时实例失效的秒数         | 30     |
-
 ### Consul 持久化
 
 类型:Consul
diff --git a/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.en.md b/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.en.md
index 3a399402029..d2ad3e30aba 100644
--- a/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.en.md
+++ b/docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.en.md
@@ -54,21 +54,6 @@ Attributes:
 | timeToLiveSeconds | long   | Seconds of ephemeral data live | 30              |
 | connectionTimeout | long   | Seconds of connection timeout  | 30              |
 
-### Nacos Repository
-
-Type: Nacos
-
-Mode: Cluster
-
-Attributes:
-
-| *Name*                    | *Type* | *Description*                                     | *Default Value* |
-|---------------------------|--------|---------------------------------------------------|-----------------|
-| clusterIp                 | String | Unique identifier in cluster                      | Host IP         |
-| retryIntervalMilliseconds | long   | Milliseconds of retry interval                    | 500             |
-| maxRetries                | int    | Max retries for client to check data availability | 3               |
-| timeToLiveSeconds         | int    | Seconds of ephemeral instance live                | 30              |
-
 ### Consul Repository
 
 Type: Consul
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.cn.md
index c71734713de..be62924a0bd 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.cn.md
@@ -46,7 +46,6 @@ ShardingSphere 默认情况下仅包含核心 SPI 的实现,在 Git Source 存
 - 集群模式配置信息持久化定义
   - `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-zookeeper`,基于 Zookeeper 的持久化实现
   - `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-etcd`,基于 Etcd 的持久化实现
-  - `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-nacos`,基于 Nacos 的持久化实现
   - `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-consul`,基于 Consul 的持久化实现
 - XA 分布式事务管理器
   - `org.apache.shardingsphere:shardingsphere-transaction-xa-narayana`,基于 Narayana 的 XA 分布式事务管理器
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.en.md
index f07d87c6b40..ddae142a7b5 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/_index.en.md
@@ -46,7 +46,6 @@ All optional plugins are listed below in the form of `groupId:artifactId`.
 - Cluster mode configuration information persistence definition
   - `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-zookeeper`, Zookeeper based persistence
   - `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-etcd`, Etcd based persistence
-  - `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-nacos`, Nacos based persistence
   - `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-consul`, Consul based persistence
 - XA transaction manager provider definition
   - `org.apache.shardingsphere:shardingsphere-transaction-xa-narayana`, XA distributed transaction manager based on Narayana
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.cn.md
index ad289661b7a..7ebe0657767 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.cn.md
@@ -33,7 +33,6 @@ ShardingSphere 默认情况下仅包含核心 SPI 的实现,在 Git Source 存
 - 单机模式配置信息持久化定义
   - `org.apache.shardingsphere:shardingsphere-standalone-mode-repository-jdbc`,基于 JDBC 的持久化
 - 集群模式配置信息持久化定义
-  - `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-nacos`,基于 Nacos 的持久化实现
   - `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-consul`,基于 Consul 的持久化实现
 - XA 分布式事务管理器
   - `org.apache.shardingsphere:shardingsphere-transaction-xa-narayana`,基于 Narayana 的 XA 分布式事务管理器
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.en.md b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.en.md
index d10f6a21f17..f2d85e42cdc 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/_index.en.md
@@ -33,7 +33,6 @@ All optional plugins are listed below in the form of `groupId:artifactId`.
 - Standalone mode configuration information persistence definition
   - `org.apache.shardingsphere:shardingsphere-standalone-mode-repository-jdbc`, JDBC based persistence
 - Cluster mode configuration information persistence definition
-  - `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-nacos`, Nacos based persistence
   - `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-consul`, Consul based persistence
 - XA transaction manager provider definition
   - `org.apache.shardingsphere:shardingsphere-transaction-xa-narayana`, XA distributed transaction manager based on Narayana
diff --git a/examples/pom.xml b/examples/pom.xml
index add9a8d68b6..4c4921f69fb 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -117,11 +117,6 @@
                 <artifactId>shardingsphere-cluster-mode-repository-etcd</artifactId>
                 <version>${project.version}</version>
             </dependency>
-            <dependency>
-                <groupId>org.apache.shardingsphere</groupId>
-                <artifactId>shardingsphere-cluster-mode-repository-nacos</artifactId>
-                <version>${project.version}</version>
-            </dependency>
             <dependency>
                 <groupId>org.apache.shardingsphere</groupId>
                 <artifactId>shardingsphere-infra-common</artifactId>
diff --git a/examples/shardingsphere-jdbc-example-generator/src/main/resources/template/resources/registry.ftl b/examples/shardingsphere-jdbc-example-generator/src/main/resources/template/resources/registry.ftl
index 3be5402d98f..95ef824f7b5 100644
--- a/examples/shardingsphere-jdbc-example-generator/src/main/resources/template/resources/registry.ftl
+++ b/examples/shardingsphere-jdbc-example-generator/src/main/resources/template/resources/registry.ftl
@@ -16,14 +16,9 @@
 #
 
 registry {
-  # file 、nacos 、eureka、redis、zk
+  # file 、eureka、redis、zk
   type = "file"
 
-  nacos {
-    serverAddr = "localhost"
-    namespace = "public"
-    cluster = "default"
-  }
   eureka {
     serviceUrl = "http://localhost:1001/eureka"
     application = "default"
@@ -45,14 +40,9 @@ registry {
 }
 
 config {
-  # file、nacos 、apollo、zk
+  # file、apollo、zk
   type = "file"
 
-  nacos {
-    serverAddr = "localhost"
-    namespace = "public"
-    cluster = "default"
-  }
   apollo {
     app.id = "fescar-server"
     apollo.meta = "http://192.168.1.204:8801"
diff --git a/kernel/transaction/type/base/seata-at/src/test/resources/registry.conf b/kernel/transaction/type/base/seata-at/src/test/resources/registry.conf
index 3be5402d98f..95ef824f7b5 100644
--- a/kernel/transaction/type/base/seata-at/src/test/resources/registry.conf
+++ b/kernel/transaction/type/base/seata-at/src/test/resources/registry.conf
@@ -16,14 +16,9 @@
 #
 
 registry {
-  # file 、nacos 、eureka、redis、zk
+  # file 、eureka、redis、zk
   type = "file"
 
-  nacos {
-    serverAddr = "localhost"
-    namespace = "public"
-    cluster = "default"
-  }
   eureka {
     serviceUrl = "http://localhost:1001/eureka"
     application = "default"
@@ -45,14 +40,9 @@ registry {
 }
 
 config {
-  # file、nacos 、apollo、zk
+  # file、apollo、zk
   type = "file"
 
-  nacos {
-    serverAddr = "localhost"
-    namespace = "public"
-    cluster = "default"
-  }
   apollo {
     app.id = "fescar-server"
     apollo.meta = "http://192.168.1.204:8801"
diff --git a/mode/type/cluster/repository/provider/nacos/pom.xml b/mode/type/cluster/repository/provider/nacos/pom.xml
deleted file mode 100644
index 15f90bd3c67..00000000000
--- a/mode/type/cluster/repository/provider/nacos/pom.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.shardingsphere</groupId>
-        <artifactId>shardingsphere-cluster-mode-repository-provider</artifactId>
-        <version>5.4.1-SNAPSHOT</version>
-    </parent>
-    <artifactId>shardingsphere-cluster-mode-repository-nacos</artifactId>
-    <name>${project.artifactId}</name>
-    
-    <properties>
-        <nacos.version>1.4.2</nacos.version>
-    </properties>
-    
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>shardingsphere-cluster-mode-repository-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.shardingsphere</groupId>
-            <artifactId>shardingsphere-test-util</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        
-        <dependency>
-            <groupId>com.alibaba.nacos</groupId>
-            <artifactId>nacos-client</artifactId>
-            <version>${nacos.version}</version>
-        </dependency>
-    </dependencies>
-</project>
diff --git a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/NacosRepository.java b/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/NacosRepository.java
deleted file mode 100644
index 0a076804be0..00000000000
--- a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/NacosRepository.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.cluster.nacos;
-
-import com.alibaba.nacos.api.exception.NacosException;
-import com.alibaba.nacos.api.naming.NamingFactory;
-import com.alibaba.nacos.api.naming.NamingService;
-import com.alibaba.nacos.api.naming.PreservedMetadataKeys;
-import com.alibaba.nacos.api.naming.pojo.Instance;
-import com.google.common.base.Preconditions;
-import com.google.common.base.Strings;
-import lombok.SneakyThrows;
-import org.apache.shardingsphere.infra.instance.util.IpUtils;
-import org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository;
-import org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositoryConfiguration;
-import org.apache.shardingsphere.mode.repository.cluster.exception.ClusterPersistRepositoryException;
-import org.apache.shardingsphere.mode.repository.cluster.listener.DataChangedEventListener;
-import org.apache.shardingsphere.mode.repository.cluster.lock.holder.DistributedLockHolder;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.entity.KeyValue;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.entity.ServiceController;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.entity.ServiceMetaData;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.listener.NamingEventListener;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.props.NacosProperties;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.props.NacosPropertyKey;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.util.NacosMetaDataUtils;
-
-import java.security.SecureRandom;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.Properties;
-import java.util.Random;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-/**
- * Registry repository of Nacos.
- */
-public final class NacosRepository implements ClusterPersistRepository {
-    
-    private final Random random = new SecureRandom();
-    
-    private NamingService client;
-    
-    private NacosProperties nacosProps;
-    
-    private ServiceController serviceController;
-    
-    @Override
-    public void init(final ClusterPersistRepositoryConfiguration config) {
-        nacosProps = new NacosProperties(config.getProps());
-        client = createClient(config);
-        initServiceMetaData();
-    }
-    
-    private NamingService createClient(final ClusterPersistRepositoryConfiguration config) {
-        Properties props = new Properties();
-        props.setProperty("serverAddr", config.getServerLists());
-        props.setProperty("namespace", config.getNamespace());
-        props.setProperty("username", nacosProps.getValue(NacosPropertyKey.USERNAME));
-        props.setProperty("password", nacosProps.getValue(NacosPropertyKey.PASSWORD));
-        try {
-            return NamingFactory.createNamingService(props);
-        } catch (final NacosException ex) {
-            throw new ClusterPersistRepositoryException(ex);
-        }
-    }
-    
-    private void initServiceMetaData() {
-        try {
-            String clusterIp = nacosProps.getValue(NacosPropertyKey.CLUSTER_IP);
-            String ip = Strings.isNullOrEmpty(clusterIp) ? IpUtils.getIp() : clusterIp;
-            serviceController = new ServiceController();
-            for (ServiceMetaData each : serviceController.getAllServices()) {
-                Integer port = client.getAllInstances(each.getServiceName(), false).stream()
-                        .filter(instance -> ip.equals(instance.getIp())).map(Instance::getPort).max(Comparator.naturalOrder()).orElse(Integer.MIN_VALUE);
-                each.setIp(ip);
-                each.setPort(new AtomicInteger(port));
-            }
-        } catch (final NacosException ex) {
-            throw new ClusterPersistRepositoryException(ex);
-        }
-    }
-    
-    @Override
-    public void persistEphemeral(final String key, final String value) {
-        try {
-            Preconditions.checkNotNull(value, "Value can not be null");
-            if (!findExistedInstance(key, true).isEmpty()) {
-                delete(key);
-            }
-            put(key, value, true);
-        } catch (final NacosException ex) {
-            throw new ClusterPersistRepositoryException(ex);
-        }
-    }
-    
-    @Override
-    public void persistExclusiveEphemeral(final String key, final String value) {
-        try {
-            Preconditions.checkState(findExistedInstance(key, true).isEmpty(), "Key `%s` already exists", key);
-            put(key, value, true);
-        } catch (final NacosException ex) {
-            throw new ClusterPersistRepositoryException(ex);
-        }
-    }
-    
-    @Override
-    public DistributedLockHolder getDistributedLockHolder() {
-        return null;
-    }
-    
-    @Override
-    public void watch(final String key, final DataChangedEventListener listener) {
-        try {
-            for (ServiceMetaData each : serviceController.getAllServices()) {
-                NamingEventListener eventListener = each.getListener();
-                if (null != eventListener) {
-                    eventListener.put(key, listener);
-                    return;
-                }
-                eventListener = new NamingEventListener();
-                eventListener.put(key, listener);
-                each.setListener(eventListener);
-                client.subscribe(each.getServiceName(), eventListener);
-            }
-        } catch (final NacosException ex) {
-            throw new ClusterPersistRepositoryException(ex);
-        }
-    }
-    
-    @Override
-    public String getDirectly(final String key) {
-        try {
-            for (ServiceMetaData each : serviceController.getAllServices()) {
-                Optional<Instance> instance = findExistedInstance(key, each.isEphemeral()).stream().max(Comparator.comparing(NacosMetaDataUtils::getTimestamp));
-                if (instance.isPresent()) {
-                    return NacosMetaDataUtils.getValue(instance.get());
-                }
-            }
-            return null;
-        } catch (final NacosException ex) {
-            throw new ClusterPersistRepositoryException(ex);
-        }
-    }
-    
-    @Override
-    public List<String> getChildrenKeys(final String key) {
-        try {
-            Stream<String> concatKeys = Stream.empty();
-            for (ServiceMetaData each : serviceController.getAllServices()) {
-                Stream<String> keys = findExistedInstance(each.isEphemeral()).stream()
-                        .map(instance -> {
-                            String fullPath = NacosMetaDataUtils.getKey(instance);
-                            if (fullPath.startsWith(key + PATH_SEPARATOR)) {
-                                String pathWithoutPrefix = fullPath.substring((key + PATH_SEPARATOR).length());
-                                return pathWithoutPrefix.contains(PATH_SEPARATOR) ? pathWithoutPrefix.substring(0, pathWithoutPrefix.indexOf(PATH_SEPARATOR)) : pathWithoutPrefix;
-                            }
-                            return null;
-                        }).filter(Objects::nonNull);
-                concatKeys = Stream.concat(concatKeys, keys);
-            }
-            return concatKeys.distinct().sorted(Comparator.reverseOrder()).collect(Collectors.toList());
-        } catch (final NacosException ex) {
-            throw new ClusterPersistRepositoryException(ex);
-        }
-    }
-    
-    @Override
-    public boolean isExisted(final String key) {
-        return false;
-    }
-    
-    @Override
-    public void persist(final String key, final String value) {
-        try {
-            Preconditions.checkNotNull(value, "Value can not be null");
-            Optional<Instance> instance = findExistedInstance(key, false).stream().max(Comparator.comparing(NacosMetaDataUtils::getTimestamp));
-            if (instance.isPresent()) {
-                update(instance.get(), value);
-            } else {
-                put(key, value, false);
-            }
-        } catch (final NacosException ex) {
-            throw new ClusterPersistRepositoryException(ex);
-        }
-    }
-    
-    @Override
-    public void update(final String key, final String value) {
-        // TODO
-    }
-    
-    private void update(final Instance instance, final String value) throws NacosException {
-        Map<String, String> metaDataMap = instance.getMetadata();
-        String key = NacosMetaDataUtils.getKey(instance);
-        metaDataMap.put(key, value);
-        metaDataMap.put(NacosMetaDataUtils.UTC_ZONE_OFFSET.toString(), String.valueOf(NacosMetaDataUtils.getTimestamp()));
-        instance.setMetadata(metaDataMap);
-        ServiceMetaData persistentService = serviceController.getPersistentService();
-        client.registerInstance(persistentService.getServiceName(), instance);
-        Collection<KeyValue> keyValues = new LinkedList<>();
-        keyValues.add(new KeyValue(key, value, instance.isEphemeral()));
-        waitValue(keyValues);
-    }
-    
-    private void put(final String key, final String value, final boolean ephemeral) throws NacosException {
-        final Collection<KeyValue> keyValues = buildParentPath(key);
-        ServiceMetaData serviceMetaData = serviceController.getService(ephemeral);
-        Instance instance = new Instance();
-        instance.setIp(serviceMetaData.getIp());
-        instance.setPort(serviceMetaData.getPort());
-        instance.setEphemeral(ephemeral);
-        Map<String, String> metadataMap = new HashMap<>(5, 1F);
-        if (ephemeral) {
-            fillEphemeralMetaData(metadataMap);
-        }
-        metadataMap.put(key, value);
-        metadataMap.put(NacosMetaDataUtils.UTC_ZONE_OFFSET.toString(), String.valueOf(NacosMetaDataUtils.getTimestamp()));
-        instance.setMetadata(metadataMap);
-        client.registerInstance(serviceMetaData.getServiceName(), instance);
-        keyValues.add(new KeyValue(key, value, ephemeral));
-        waitValue(keyValues);
-    }
-    
-    private Collection<KeyValue> buildParentPath(final String key) throws NacosException {
-        Collection<KeyValue> result = new LinkedList<>();
-        StringBuilder parentPath = new StringBuilder();
-        String[] partPath = key.split(PATH_SEPARATOR);
-        for (int index = 1; index < partPath.length - 1; index++) {
-            String path = parentPath.append(PATH_SEPARATOR).append(partPath[index]).toString();
-            if (findExistedInstance(path, false).isEmpty()) {
-                result.addAll(build(path));
-            }
-        }
-        return result;
-    }
-    
-    private Collection<KeyValue> build(final String key) throws NacosException {
-        Collection<KeyValue> result = new LinkedList<>();
-        if (findExistedInstance(key, false).isEmpty()) {
-            Instance instance = new Instance();
-            ServiceMetaData persistentService = serviceController.getPersistentService();
-            instance.setIp(persistentService.getIp());
-            instance.setPort(persistentService.getPort());
-            instance.setEphemeral(false);
-            Map<String, String> metaDataMap = new HashMap<>(2, 1F);
-            metaDataMap.put(key, "");
-            metaDataMap.put(NacosMetaDataUtils.UTC_ZONE_OFFSET.toString(), String.valueOf(NacosMetaDataUtils.getTimestamp()));
-            instance.setMetadata(metaDataMap);
-            client.registerInstance(persistentService.getServiceName(), instance);
-            result.add(new KeyValue(key, "", false));
-        }
-        return result;
-    }
-    
-    private void fillEphemeralMetaData(final Map<String, String> metaDataMap) {
-        int timeToLiveSeconds = nacosProps.getValue(NacosPropertyKey.TIME_TO_LIVE_SECONDS);
-        metaDataMap.put(PreservedMetadataKeys.HEART_BEAT_INTERVAL, String.valueOf(timeToLiveSeconds * 1000 / 3));
-        metaDataMap.put(PreservedMetadataKeys.HEART_BEAT_TIMEOUT, String.valueOf(timeToLiveSeconds * 1000 * 2 / 3));
-        metaDataMap.put(PreservedMetadataKeys.IP_DELETE_TIMEOUT, String.valueOf(timeToLiveSeconds * 1000));
-    }
-    
-    @Override
-    public void delete(final String key) {
-        try {
-            for (ServiceMetaData each : serviceController.getAllServices()) {
-                Collection<Instance> instances = findExistedInstance(each.isEphemeral()).stream()
-                        .filter(instance -> {
-                            String fullPath = NacosMetaDataUtils.getKey(instance);
-                            return fullPath.startsWith(key + PATH_SEPARATOR) || key.equals(fullPath);
-                        })
-                        .sorted(Comparator.comparing(NacosMetaDataUtils::getKey).reversed()).collect(Collectors.toList());
-                Collection<KeyValue> keyValues = new LinkedList<>();
-                for (Instance instance : instances) {
-                    client.deregisterInstance(each.getServiceName(), instance);
-                    keyValues.add(new KeyValue(NacosMetaDataUtils.getKey(instance), null, each.isEphemeral()));
-                }
-                waitValue(keyValues);
-            }
-        } catch (final NacosException ex) {
-            throw new ClusterPersistRepositoryException(ex);
-        }
-    }
-    
-    private Collection<Instance> findExistedInstance(final String key, final boolean ephemeral) throws NacosException {
-        return client.getAllInstances(serviceController.getService(ephemeral).getServiceName(), false).stream()
-                .filter(each -> Objects.equals(key, NacosMetaDataUtils.getKey(each))).collect(Collectors.toList());
-    }
-    
-    private Collection<Instance> findExistedInstance(final boolean ephemeral) throws NacosException {
-        return client.getAllInstances(serviceController.getService(ephemeral).getServiceName(), false);
-    }
-    
-    @SneakyThrows(InterruptedException.class)
-    private void waitValue(final Collection<KeyValue> keyValues) throws NacosException {
-        if (!isAvailable(keyValues)) {
-            long retryIntervalMilliseconds = nacosProps.getValue(NacosPropertyKey.RETRY_INTERVAL_MILLISECONDS);
-            int maxRetries = nacosProps.getValue(NacosPropertyKey.MAX_RETRIES);
-            for (int retry = 0; retry < maxRetries; retry++) {
-                Thread.sleep(getSleepTimeMs(retry, retryIntervalMilliseconds));
-                if (isAvailable(keyValues)) {
-                    return;
-                }
-            }
-            throw new NacosException(NacosException.RESOURCE_NOT_FOUND, "Wait value availability timeout exceeded");
-        }
-    }
-    
-    private boolean isAvailable(final Collection<KeyValue> keyValues) throws NacosException {
-        Map<Boolean, List<KeyValue>> keyValueMap = keyValues.stream().collect(Collectors.groupingBy(KeyValue::isEphemeral));
-        for (Entry<Boolean, List<KeyValue>> entry : keyValueMap.entrySet()) {
-            ServiceMetaData service = serviceController.getService(entry.getKey());
-            Map<String, List<Instance>> instanceMap = client.getAllInstances(service.getServiceName(), false).stream().collect(Collectors.groupingBy(NacosMetaDataUtils::getKey));
-            keyValues.removeIf(keyValue -> {
-                String key = keyValue.getKey();
-                String value = keyValue.getValue();
-                return instanceMap.containsKey(key) ? instanceMap.get(key).stream().anyMatch(each -> Objects.equals(NacosMetaDataUtils.getValue(each), value)) : null == value;
-            });
-        }
-        return keyValues.isEmpty();
-    }
-    
-    private long getSleepTimeMs(final int retryCount, final long baseSleepTimeMs) {
-        return baseSleepTimeMs * Math.max(1, random.nextInt(1 << (retryCount + 1)));
-    }
-    
-    @Override
-    public void close() {
-        try {
-            client.shutDown();
-        } catch (final NacosException ex) {
-            throw new ClusterPersistRepositoryException(ex);
-        }
-    }
-    
-    @Override
-    public String getType() {
-        return "Nacos";
-    }
-}
diff --git a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/entity/KeyValue.java b/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/entity/KeyValue.java
deleted file mode 100644
index a11b5cbc526..00000000000
--- a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/entity/KeyValue.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.cluster.nacos.entity;
-
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-
-/**
- * Key value.
- */
-@RequiredArgsConstructor
-@Getter
-public final class KeyValue {
-    
-    private final String key;
-    
-    private final String value;
-    
-    private final boolean ephemeral;
-}
diff --git a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/entity/ServiceController.java b/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/entity/ServiceController.java
deleted file mode 100644
index 5b613961ecf..00000000000
--- a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/entity/ServiceController.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.cluster.nacos.entity;
-
-import lombok.Getter;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-/**
- * Service controller.
- */
-public final class ServiceController {
-    
-    private static final String PERSISTENT_SERVICE_NAME = "PERSISTENT";
-    
-    private static final String EPHEMERAL_SERVICE_NAME = "EPHEMERAL";
-    
-    @Getter
-    private final ServiceMetaData persistentService = new ServiceMetaData(PERSISTENT_SERVICE_NAME, false);
-    
-    @Getter
-    private final ServiceMetaData ephemeralService = new ServiceMetaData(EPHEMERAL_SERVICE_NAME, true);
-    
-    private final Map<Boolean, ServiceMetaData> serviceMap = Stream.of(persistentService, ephemeralService).collect(Collectors.toMap(ServiceMetaData::isEphemeral, Function.identity()));
-    
-    /**
-     * Get all services.
-     * 
-     * @return all services
-     */
-    public Collection<ServiceMetaData> getAllServices() {
-        return serviceMap.values();
-    }
-    
-    /**
-     * Get service.
-     * 
-     * @param ephemeral is ephemeral service
-     * @return ephemeral service or persistent service
-     */
-    public ServiceMetaData getService(final boolean ephemeral) {
-        return serviceMap.get(ephemeral);
-    }
-}
diff --git a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/entity/ServiceMetaData.java b/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/entity/ServiceMetaData.java
deleted file mode 100644
index 75314a59b29..00000000000
--- a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/entity/ServiceMetaData.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.cluster.nacos.entity;
-
-import com.google.common.base.Preconditions;
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-import lombok.Setter;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.listener.NamingEventListener;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * Service meta data.
- */
-@RequiredArgsConstructor
-@Getter
-@Setter
-public final class ServiceMetaData {
-    
-    private final String serviceName;
-    
-    private String ip;
-    
-    private AtomicInteger port;
-    
-    private NamingEventListener listener;
-    
-    private final boolean ephemeral;
-    
-    /**
-     * Get incremental port.
-     * 
-     * @return incremental port
-     */
-    public int getPort() {
-        int result = port.incrementAndGet();
-        Preconditions.checkState(Integer.MIN_VALUE != result, "Specified cluster ip exceeded the maximum number of persisting");
-        return result;
-    }
-}
diff --git a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/listener/NamingEventListener.java b/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/listener/NamingEventListener.java
deleted file mode 100644
index 09516f5bce0..00000000000
--- a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/listener/NamingEventListener.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.cluster.nacos.listener;
-
-import com.alibaba.nacos.api.naming.listener.Event;
-import com.alibaba.nacos.api.naming.listener.EventListener;
-import com.alibaba.nacos.api.naming.listener.NamingEvent;
-import com.alibaba.nacos.api.naming.pojo.Instance;
-import org.apache.shardingsphere.mode.event.DataChangedEvent;
-import org.apache.shardingsphere.mode.event.DataChangedEvent.Type;
-import org.apache.shardingsphere.mode.repository.cluster.listener.DataChangedEventListener;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.util.NacosMetaDataUtils;
-
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-/**
- * Naming event listener.
- */
-public final class NamingEventListener implements EventListener {
-    
-    private Map<String, Instance> preInstances = new HashMap<>();
-    
-    private final Map<String, DataChangedEventListener> prefixListenerMap = new HashMap<>();
-    
-    @Override
-    public void onEvent(final Event event) {
-        if (!(event instanceof NamingEvent)) {
-            return;
-        }
-        NamingEvent namingEvent = (NamingEvent) event;
-        Collection<Instance> instances = namingEvent.getInstances().stream().sorted(Comparator.comparing(NacosMetaDataUtils::getKey)).collect(Collectors.toList());
-        Collection<WatchData> watchDataList = new LinkedList<>();
-        synchronized (this) {
-            instances.forEach(instance -> prefixListenerMap.forEach((prefixPath, listener) -> {
-                String key = NacosMetaDataUtils.getKey(instance);
-                if (key.startsWith(prefixPath)) {
-                    Instance preInstance = preInstances.remove(key);
-                    WatchData watchData = new WatchData(key, preInstance, instance, listener);
-                    watchDataList.add(watchData);
-                }
-            }));
-            preInstances.values().stream().sorted(Comparator.comparing(NacosMetaDataUtils::getKey).reversed()).forEach(instance -> prefixListenerMap.forEach((prefixPath, listener) -> {
-                String key = NacosMetaDataUtils.getKey(instance);
-                if (key.startsWith(prefixPath)) {
-                    WatchData watchData = new WatchData(key, instance, null, listener);
-                    watchDataList.add(watchData);
-                }
-            }));
-            watchDataList.forEach(this::watch);
-            setPreInstances(instances);
-        }
-    }
-    
-    private void watch(final WatchData watchData) {
-        String key = watchData.getKey();
-        Instance preInstance = watchData.getPreInstance();
-        Instance instance = watchData.getInstance();
-        DataChangedEventListener listener = watchData.getListener();
-        Type changedType = getEventChangedType(preInstance, instance);
-        switch (changedType) {
-            case ADDED:
-            case UPDATED:
-                listener.onChange(new DataChangedEvent(key, NacosMetaDataUtils.getValue(instance), changedType));
-                break;
-            case DELETED:
-                listener.onChange(new DataChangedEvent(key, NacosMetaDataUtils.getValue(preInstance), changedType));
-                break;
-            default:
-        }
-    }
-    
-    private Type getEventChangedType(final Instance preInstance, final Instance instance) {
-        if (null == preInstance && null != instance) {
-            return DataChangedEvent.Type.ADDED;
-        }
-        if (null != preInstance && null != instance && NacosMetaDataUtils.getTimestamp(preInstance) != NacosMetaDataUtils.getTimestamp(instance)) {
-            return DataChangedEvent.Type.UPDATED;
-        }
-        if (null != preInstance && null == instance) {
-            return DataChangedEvent.Type.DELETED;
-        }
-        return DataChangedEvent.Type.IGNORED;
-    }
-    
-    /**
-     * Update pre instances.
-     *
-     * @param instances instances
-     */
-    public void setPreInstances(final Collection<Instance> instances) {
-        preInstances = instances.stream().filter(instance -> {
-            for (String each : prefixListenerMap.keySet()) {
-                if (NacosMetaDataUtils.getKey(instance).startsWith(each)) {
-                    return true;
-                }
-            }
-            return false;
-        }).collect(Collectors.toMap(NacosMetaDataUtils::getKey, Function.identity(),
-                (oldValue, currentValue) -> NacosMetaDataUtils.getTimestamp(oldValue) > NacosMetaDataUtils.getTimestamp(currentValue) ? oldValue : currentValue));
-    }
-    
-    /**
-     * Put prefix path and listener.
-     *
-     * @param prefixPath prefix path
-     * @param listener listener
-     */
-    public synchronized void put(final String prefixPath, final DataChangedEventListener listener) {
-        prefixListenerMap.put(prefixPath, listener);
-    }
-}
diff --git a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/listener/WatchData.java b/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/listener/WatchData.java
deleted file mode 100644
index 939bb037a9c..00000000000
--- a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/listener/WatchData.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.cluster.nacos.listener;
-
-import com.alibaba.nacos.api.naming.pojo.Instance;
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.mode.repository.cluster.listener.DataChangedEventListener;
-
-/**
- * Watch data.
- */
-@Getter
-@RequiredArgsConstructor
-public final class WatchData {
-    
-    private final String key;
-    
-    private final Instance preInstance;
-    
-    private final Instance instance;
-    
-    private final DataChangedEventListener listener;
-}
diff --git a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/props/NacosProperties.java b/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/props/NacosProperties.java
deleted file mode 100644
index 5b4e3a5b7e6..00000000000
--- a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/props/NacosProperties.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.cluster.nacos.props;
-
-import org.apache.shardingsphere.infra.props.TypedProperties;
-
-import java.util.Properties;
-
-/**
- * Typed properties of Nacos.
- */
-public final class NacosProperties extends TypedProperties<NacosPropertyKey> {
-    
-    public NacosProperties(final Properties props) {
-        super(NacosPropertyKey.class, props);
-    }
-}
diff --git a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/props/NacosPropertyKey.java b/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/props/NacosPropertyKey.java
deleted file mode 100644
index fbec54ac9ee..00000000000
--- a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/props/NacosPropertyKey.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.cluster.nacos.props;
-
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.infra.props.TypedPropertyKey;
-
-/**
- * Typed property key of Nacos.
- */
-@RequiredArgsConstructor
-@Getter
-public enum NacosPropertyKey implements TypedPropertyKey {
-    
-    /**
-     * Cluster ip.
-     */
-    CLUSTER_IP("clusterIp", "", String.class),
-    
-    /**
-     * Retry interval milliseconds when checking whether value is available.
-     */
-    RETRY_INTERVAL_MILLISECONDS("retryIntervalMilliseconds", String.valueOf(500), long.class),
-    
-    /**
-     * Max Retry times when checking whether value is available.
-     */
-    MAX_RETRIES("maxRetries", String.valueOf(3), int.class),
-    
-    /**
-     * Time to live seconds.
-     */
-    TIME_TO_LIVE_SECONDS("timeToLiveSeconds", String.valueOf(30), int.class),
-    
-    /**
-     * Username.
-     */
-    USERNAME("username", "", String.class),
-    
-    /**
-     * Password.
-     */
-    PASSWORD("password", "", String.class);
-    
-    private final String key;
-    
-    private final String defaultValue;
-    
-    private final Class<?> type;
-}
diff --git a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/util/NacosMetaDataUtils.java b/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/util/NacosMetaDataUtils.java
deleted file mode 100644
index c56447c8427..00000000000
--- a/mode/type/cluster/repository/provider/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/util/NacosMetaDataUtils.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.cluster.nacos.util;
-
-import com.alibaba.nacos.api.exception.NacosException;
-import com.alibaba.nacos.api.naming.PreservedMetadataKeys;
-import com.alibaba.nacos.api.naming.pojo.Instance;
-import lombok.AccessLevel;
-import lombok.NoArgsConstructor;
-import lombok.SneakyThrows;
-
-import java.time.LocalDateTime;
-import java.time.ZoneOffset;
-
-/**
- * Nacos meta data utility class.
- */
-@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class NacosMetaDataUtils {
-    
-    public static final ZoneOffset UTC_ZONE_OFFSET = ZoneOffset.of("+8");
-    
-    /**
-     * Get timestamp.
-     * 
-     * @param instance instance
-     * @return timestamp
-     */
-    public static long getTimestamp(final Instance instance) {
-        return Long.parseLong(instance.getMetadata().get(UTC_ZONE_OFFSET.toString()));
-    }
-    
-    /**
-     * Get timestamp.
-     * 
-     * @return timeStamp
-     */
-    public static long getTimestamp() {
-        return LocalDateTime.now().toInstant(UTC_ZONE_OFFSET).toEpochMilli();
-    }
-    
-    /**
-     * Get value.
-     * 
-     * @param instance instance
-     * @return value
-     */
-    public static String getValue(final Instance instance) {
-        return instance.getMetadata().get(getKey(instance));
-    }
-    
-    /**
-     * Get key.
-     * 
-     * @param instance instance
-     * @return key
-     */
-    @SneakyThrows(NacosException.class)
-    public static String getKey(final Instance instance) {
-        return instance.getMetadata().keySet().stream()
-                .filter(entryKey -> !PreservedMetadataKeys.HEART_BEAT_INTERVAL.equals(entryKey)
-                        && !PreservedMetadataKeys.HEART_BEAT_TIMEOUT.equals(entryKey)
-                        && !PreservedMetadataKeys.IP_DELETE_TIMEOUT.equals(entryKey)
-                        && !UTC_ZONE_OFFSET.toString().equals(entryKey))
-                .findFirst().orElseThrow(() -> new NacosException(NacosException.RESOURCE_NOT_FOUND, "Failed to find key "));
-    }
-}
diff --git a/mode/type/cluster/repository/provider/nacos/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository b/mode/type/cluster/repository/provider/nacos/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository
deleted file mode 100644
index 7ab9d965fcb..00000000000
--- a/mode/type/cluster/repository/provider/nacos/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-org.apache.shardingsphere.mode.repository.cluster.nacos.NacosRepository
diff --git a/mode/type/cluster/repository/provider/nacos/src/test/java/org/apache/shardingsphere/mode/repository/cluster/nacos/NacosRepositoryTest.java b/mode/type/cluster/repository/provider/nacos/src/test/java/org/apache/shardingsphere/mode/repository/cluster/nacos/NacosRepositoryTest.java
deleted file mode 100644
index efccc41fb4e..00000000000
--- a/mode/type/cluster/repository/provider/nacos/src/test/java/org/apache/shardingsphere/mode/repository/cluster/nacos/NacosRepositoryTest.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.cluster.nacos;
-
-import com.alibaba.nacos.api.exception.NacosException;
-import com.alibaba.nacos.api.naming.NamingService;
-import com.alibaba.nacos.api.naming.PreservedMetadataKeys;
-import com.alibaba.nacos.api.naming.listener.Event;
-import com.alibaba.nacos.api.naming.listener.EventListener;
-import com.alibaba.nacos.api.naming.listener.NamingEvent;
-import com.alibaba.nacos.api.naming.pojo.Instance;
-import com.google.common.util.concurrent.SettableFuture;
-import org.apache.shardingsphere.mode.event.DataChangedEvent;
-import org.apache.shardingsphere.mode.repository.cluster.exception.ClusterPersistRepositoryException;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.entity.ServiceController;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.entity.ServiceMetaData;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.props.NacosProperties;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.props.NacosPropertyKey;
-import org.apache.shardingsphere.mode.repository.cluster.nacos.util.NacosMetaDataUtils;
-import org.apache.shardingsphere.mode.spi.PersistRepository;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.mockito.AdditionalAnswers;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.internal.configuration.plugins.Plugins;
-import org.mockito.junit.jupiter.MockitoExtension;
-import org.mockito.plugins.MemberAccessor;
-import org.mockito.stubbing.VoidAnswer2;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Properties;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-@ExtendWith(MockitoExtension.class)
-class NacosRepositoryTest {
-    
-    private static final NacosRepository REPOSITORY = new NacosRepository();
-    
-    @Mock
-    private NamingService client;
-    
-    private ServiceController serviceController;
-    
-    @BeforeEach
-    void initClient() throws ReflectiveOperationException {
-        MemberAccessor accessor = Plugins.getMemberAccessor();
-        accessor.set(REPOSITORY.getClass().getDeclaredField("nacosProps"), REPOSITORY, new NacosProperties(new Properties()));
-        accessor.set(REPOSITORY.getClass().getDeclaredField("client"), REPOSITORY, client);
-        accessor.invoke(REPOSITORY.getClass().getDeclaredMethod("initServiceMetaData"), REPOSITORY);
-        serviceController = (ServiceController) accessor.get(REPOSITORY.getClass().getDeclaredField("serviceController"), REPOSITORY);
-    }
-    
-    @Test
-    void assertGetLatestKey() throws NacosException {
-        int total = 2;
-        String key = "/test/children/keys/persistent/1";
-        List<Instance> instances = new LinkedList<>();
-        for (int count = 1; count <= total; count++) {
-            Instance instance = new Instance();
-            Map<String, String> metaDataMap = new HashMap<>(2, 1F);
-            metaDataMap.put(key, "value" + count);
-            metaDataMap.put(NacosMetaDataUtils.UTC_ZONE_OFFSET.toString(), String.valueOf(count));
-            instance.setMetadata(metaDataMap);
-            instances.add(instance);
-        }
-        ServiceMetaData persistentService = serviceController.getPersistentService();
-        when(client.getAllInstances(persistentService.getServiceName(), false)).thenReturn(instances);
-        String value = REPOSITORY.getDirectly(key);
-        assertThat(value, is("value2"));
-    }
-    
-    @Test
-    void assertGetChildrenKeys() throws NacosException {
-        Instance instance = new Instance();
-        String key = "/test/children/keys/persistent/0";
-        instance.setMetadata(Collections.singletonMap(key, "value0"));
-        ServiceMetaData persistentService = serviceController.getPersistentService();
-        when(client.getAllInstances(persistentService.getServiceName(), false)).thenReturn(Collections.singletonList(instance));
-        instance = new Instance();
-        key = "/test/children/keys/ephemeral/0";
-        instance.setMetadata(Collections.singletonMap(key, "value0"));
-        ServiceMetaData ephemeralService = serviceController.getEphemeralService();
-        when(client.getAllInstances(ephemeralService.getServiceName(), false)).thenReturn(Collections.singletonList(instance));
-        List<String> childrenKeys = REPOSITORY.getChildrenKeys("/test/children/keys");
-        assertThat(childrenKeys.size(), is(2));
-        assertThat(childrenKeys.get(0), is("persistent"));
-        assertThat(childrenKeys.get(1), is("ephemeral"));
-    }
-    
-    @Test
-    void assertPersistNotExistKey() throws NacosException {
-        String key = "/test/children/keys/persistent/1";
-        doAnswer(AdditionalAnswers.answerVoid(getRegisterInstanceAnswer())).when(client).registerInstance(anyString(), any(Instance.class));
-        REPOSITORY.persist(key, "value4");
-        ArgumentCaptor<Instance> instanceArgumentCaptor = ArgumentCaptor.forClass(Instance.class);
-        ArgumentCaptor<String> stringArgumentCaptor = ArgumentCaptor.forClass(String.class);
-        verify(client, times(5)).registerInstance(stringArgumentCaptor.capture(), instanceArgumentCaptor.capture());
-        Instance registerInstance = instanceArgumentCaptor.getValue();
-        String registerType = stringArgumentCaptor.getValue();
-        ServiceMetaData persistentService = serviceController.getPersistentService();
-        assertThat(registerType, is(persistentService.getServiceName()));
-        assertThat(registerInstance.isEphemeral(), is(false));
-        assertThat(NacosMetaDataUtils.getValue(registerInstance), is("value4"));
-    }
-    
-    @Test
-    void assertPersistExistKey() throws NacosException {
-        String ip = "127.0.0.1";
-        Instance instance = new Instance();
-        instance.setIp(ip);
-        instance.setEphemeral(false);
-        String key = "/test/children/keys/persistent/0";
-        instance.setMetadata(new HashMap<>(Collections.singletonMap(key, "value0")));
-        List<Instance> instances = new LinkedList<>();
-        buildParentPath(key, instances);
-        instances.add(instance);
-        ServiceMetaData persistentService = serviceController.getPersistentService();
-        when(client.getAllInstances(persistentService.getServiceName(), false)).thenReturn(instances);
-        doAnswer(AdditionalAnswers.answerVoid(getRegisterInstanceAnswer())).when(client).registerInstance(anyString(), any(Instance.class));
-        REPOSITORY.persist(key, "value4");
-        ArgumentCaptor<Instance> instanceArgumentCaptor = ArgumentCaptor.forClass(Instance.class);
-        ArgumentCaptor<String> stringArgumentCaptor = ArgumentCaptor.forClass(String.class);
-        verify(client).registerInstance(stringArgumentCaptor.capture(), instanceArgumentCaptor.capture());
-        Instance registerInstance = instanceArgumentCaptor.getValue();
-        String registerType = stringArgumentCaptor.getValue();
-        assertThat(registerType, is(persistentService.getServiceName()));
-        assertThat(registerInstance.getIp(), is(ip));
-        assertThat(registerInstance.isEphemeral(), is(false));
-        assertThat(NacosMetaDataUtils.getValue(registerInstance), is("value4"));
-    }
-    
-    @Test
-    void assertPersistEphemeralExistKey() throws NacosException {
-        final String key = "/test/children/keys/ephemeral/1";
-        final Instance instance = new Instance();
-        instance.setEphemeral(true);
-        Map<String, String> metaDataMap = new HashMap<>(4, 1F);
-        metaDataMap.put(PreservedMetadataKeys.HEART_BEAT_INTERVAL, String.valueOf(2000));
-        metaDataMap.put(PreservedMetadataKeys.HEART_BEAT_TIMEOUT, String.valueOf(4000));
-        metaDataMap.put(PreservedMetadataKeys.IP_DELETE_TIMEOUT, String.valueOf(6000));
-        metaDataMap.put(key, "value0");
-        instance.setMetadata(metaDataMap);
-        List<Instance> instances = new LinkedList<>();
-        buildParentPath(key, instances);
-        ServiceMetaData persistentService = serviceController.getPersistentService();
-        when(client.getAllInstances(persistentService.getServiceName(), false)).thenReturn(instances);
-        instances = new LinkedList<>();
-        instances.add(instance);
-        ServiceMetaData ephemeralService = serviceController.getEphemeralService();
-        when(client.getAllInstances(ephemeralService.getServiceName(), false)).thenReturn(instances);
-        doAnswer(AdditionalAnswers.answerVoid(getDeregisterInstanceAnswer())).when(client).deregisterInstance(anyString(), any(Instance.class));
-        doAnswer(AdditionalAnswers.answerVoid(getRegisterInstanceAnswer())).when(client).registerInstance(anyString(), any(Instance.class));
-        REPOSITORY.persistEphemeral(key, "value4");
-        ArgumentCaptor<Instance> instanceArgumentCaptor = ArgumentCaptor.forClass(Instance.class);
-        ArgumentCaptor<String> stringArgumentCaptor = ArgumentCaptor.forClass(String.class);
-        verify(client).deregisterInstance(anyString(), any(Instance.class));
-        verify(client).registerInstance(stringArgumentCaptor.capture(), instanceArgumentCaptor.capture());
-        Instance registerInstance = instanceArgumentCaptor.getValue();
-        String registerType = stringArgumentCaptor.getValue();
-        assertThat(registerType, is(ephemeralService.getServiceName()));
-        assertThat(registerInstance.isEphemeral(), is(true));
-        assertThat(NacosMetaDataUtils.getValue(registerInstance), is("value4"));
-        Map<String, String> metaData = registerInstance.getMetadata();
-        long timeToLiveSeconds = Long.parseLong(NacosPropertyKey.TIME_TO_LIVE_SECONDS.getDefaultValue());
-        assertThat(metaData.get(PreservedMetadataKeys.HEART_BEAT_INTERVAL), is(String.valueOf(timeToLiveSeconds * 1000 / 3)));
-        assertThat(metaData.get(PreservedMetadataKeys.HEART_BEAT_TIMEOUT), is(String.valueOf(timeToLiveSeconds * 1000 * 2 / 3)));
-        assertThat(metaData.get(PreservedMetadataKeys.IP_DELETE_TIMEOUT), is(String.valueOf(timeToLiveSeconds * 1000)));
-    }
-    
-    private void buildParentPath(final String key, final List<Instance> instances) {
-        StringBuilder parentPath = new StringBuilder();
-        final String[] partPath = key.split(PersistRepository.PATH_SEPARATOR);
-        for (int index = 1; index < partPath.length - 1; index++) {
-            parentPath.append(PersistRepository.PATH_SEPARATOR);
-            parentPath.append(partPath[index]);
-            String path = parentPath.toString();
-            Instance instance = new Instance();
-            instance.setEphemeral(false);
-            instance.setMetadata(Collections.singletonMap(path, ""));
-            instances.add(instance);
-        }
-    }
-    
-    @Test
-    void assertPersistEphemeralNotExistKey() throws NacosException {
-        String key = "/test/children/keys/ephemeral/0";
-        doAnswer(AdditionalAnswers.answerVoid(getRegisterInstanceAnswer())).when(client).registerInstance(anyString(), any(Instance.class));
-        REPOSITORY.persistEphemeral(key, "value0");
-        ArgumentCaptor<Instance> instanceArgumentCaptor = ArgumentCaptor.forClass(Instance.class);
-        ArgumentCaptor<String> stringArgumentCaptor = ArgumentCaptor.forClass(String.class);
-        verify(client, times(5)).registerInstance(stringArgumentCaptor.capture(), instanceArgumentCaptor.capture());
-        Instance registerInstance = instanceArgumentCaptor.getValue();
-        String registerType = stringArgumentCaptor.getValue();
-        ServiceMetaData ephemeralService = serviceController.getEphemeralService();
-        assertThat(registerType, is(ephemeralService.getServiceName()));
-        assertThat(registerInstance.isEphemeral(), is(true));
-        assertThat(NacosMetaDataUtils.getValue(registerInstance), is("value0"));
-        Map<String, String> metaData = registerInstance.getMetadata();
-        long timeToLiveSeconds = Long.parseLong(NacosPropertyKey.TIME_TO_LIVE_SECONDS.getDefaultValue());
-        assertThat(metaData.get(PreservedMetadataKeys.HEART_BEAT_INTERVAL), is(String.valueOf(timeToLiveSeconds * 1000 / 3)));
-        assertThat(metaData.get(PreservedMetadataKeys.HEART_BEAT_TIMEOUT), is(String.valueOf(timeToLiveSeconds * 1000 * 2 / 3)));
-        assertThat(metaData.get(PreservedMetadataKeys.IP_DELETE_TIMEOUT), is(String.valueOf(timeToLiveSeconds * 1000)));
-    }
-    
-    @Test
-    void assertDeleteExistKey() throws NacosException {
-        int total = 3;
-        List<Instance> instances = new LinkedList<>();
-        for (int count = 1; count <= total; count++) {
-            String key = "/test/children/keys/ephemeral/" + count;
-            Instance instance = new Instance();
-            instance.setEphemeral(true);
-            instance.setMetadata(Collections.singletonMap(key, "value" + count));
-            instances.add(instance);
-        }
-        ServiceMetaData ephemeralService = serviceController.getEphemeralService();
-        when(client.getAllInstances(ephemeralService.getServiceName(), false)).thenReturn(instances);
-        instances = new LinkedList<>();
-        String key = "/test/children/keys/persistent/0";
-        Instance instance = new Instance();
-        instance.setEphemeral(false);
-        instance.setMetadata(Collections.singletonMap(key, "value0"));
-        instances.add(instance);
-        ServiceMetaData persistentService = serviceController.getPersistentService();
-        when(client.getAllInstances(persistentService.getServiceName(), false)).thenReturn(instances);
-        doAnswer(AdditionalAnswers.answerVoid(getDeregisterInstanceAnswer())).when(client).deregisterInstance(anyString(), any(Instance.class));
-        REPOSITORY.delete("/test/children/keys");
-        verify(client, times(4)).deregisterInstance(anyString(), any(Instance.class));
-    }
-    
-    @Test
-    void assertDeleteNotExistKey() throws NacosException {
-        REPOSITORY.delete("/test/children/keys/persistent/1");
-        verify(client, times(0)).deregisterInstance(anyString(), any(Instance.class));
-    }
-    
-    @Test
-    void assertWatchAdded() throws NacosException, ExecutionException, InterruptedException {
-        ServiceMetaData ephemeralService = serviceController.getEphemeralService();
-        ephemeralService.setListener(null);
-        String key = "key/key";
-        String value = "value2";
-        Instance instance = new Instance();
-        instance.setMetadata(Collections.singletonMap(key, value));
-        Event event = new NamingEvent(ephemeralService.getServiceName(), Collections.singletonList(instance));
-        doAnswer(AdditionalAnswers.answerVoid(getListenerAnswer(null, event))).when(client).subscribe(anyString(), any(EventListener.class));
-        SettableFuture<DataChangedEvent> settableFuture = SettableFuture.create();
-        REPOSITORY.watch(key, settableFuture::set);
-        DataChangedEvent dataChangedEvent = settableFuture.get();
-        assertThat(dataChangedEvent.getType(), is(DataChangedEvent.Type.ADDED));
-        assertThat(dataChangedEvent.getKey(), is(key));
-        assertThat(dataChangedEvent.getValue(), is(value));
-    }
-    
-    @Test
-    void assertWatchUpdate() throws NacosException, ExecutionException, InterruptedException {
-        ServiceMetaData persistentService = serviceController.getPersistentService();
-        persistentService.setListener(null);
-        String key = "key/key";
-        long epochMilliseconds = NacosMetaDataUtils.getTimestamp();
-        Instance preInstance = new Instance();
-        Map<String, String> metaDataMap = new HashMap<>();
-        metaDataMap.put(key, "value1");
-        metaDataMap.put(NacosMetaDataUtils.UTC_ZONE_OFFSET.toString(), String.valueOf(epochMilliseconds));
-        preInstance.setMetadata(metaDataMap);
-        final Instance instance = new Instance();
-        metaDataMap = new HashMap<>();
-        metaDataMap.put(key, "value2");
-        metaDataMap.put(NacosMetaDataUtils.UTC_ZONE_OFFSET.toString(), String.valueOf(epochMilliseconds + 1));
-        instance.setMetadata(metaDataMap);
-        Event event = new NamingEvent(persistentService.getServiceName(), Collections.singletonList(instance));
-        doAnswer(AdditionalAnswers.answerVoid(getListenerAnswer(preInstance, event))).when(client).subscribe(anyString(), any(EventListener.class));
-        SettableFuture<DataChangedEvent> settableFuture = SettableFuture.create();
-        REPOSITORY.watch(key, settableFuture::set);
-        DataChangedEvent dataChangedEvent = settableFuture.get();
-        assertThat(dataChangedEvent.getType(), is(DataChangedEvent.Type.UPDATED));
-        assertThat(dataChangedEvent.getKey(), is(key));
-        assertThat(dataChangedEvent.getValue(), is("value2"));
-    }
-    
-    @Test
-    void assertWatchDelete() throws NacosException, ExecutionException, InterruptedException {
-        ServiceMetaData persistentService = serviceController.getPersistentService();
-        persistentService.setListener(null);
-        String key = "key/key";
-        Instance preInstance = new Instance();
-        preInstance.setMetadata(Collections.singletonMap(key, "value1"));
-        Event event = new NamingEvent(persistentService.getServiceName(), Collections.emptyList());
-        doAnswer(AdditionalAnswers.answerVoid(getListenerAnswer(preInstance, event))).when(client).subscribe(anyString(), any(EventListener.class));
-        SettableFuture<DataChangedEvent> settableFuture = SettableFuture.create();
-        REPOSITORY.watch(key, settableFuture::set);
-        DataChangedEvent dataChangedEvent = settableFuture.get();
-        assertThat(dataChangedEvent.getType(), is(DataChangedEvent.Type.DELETED));
-        assertThat(dataChangedEvent.getKey(), is(key));
-        assertThat(dataChangedEvent.getValue(), is("value1"));
-    }
-    
-    @Test
-    void assertClose() throws NacosException {
-        REPOSITORY.close();
-        verify(client).shutDown();
-    }
-    
-    @Test
-    void assertPersistNotAvailable() {
-        assertThrows(ClusterPersistRepositoryException.class, () -> REPOSITORY.persist("/test/children/keys/persistent/1", "value4"));
-    }
-    
-    @Test
-    void assertExceededMaximum() {
-        ServiceMetaData ephemeralService = serviceController.getEphemeralService();
-        ephemeralService.setPort(new AtomicInteger(Integer.MAX_VALUE));
-        assertThrows(IllegalStateException.class, () -> REPOSITORY.persistEphemeral("/key2", "value"));
-    }
-    
-    private VoidAnswer2<String, EventListener> getListenerAnswer(final Instance preInstance, final Event event) {
-        return (serviceName, listener) -> {
-            MemberAccessor accessor = Plugins.getMemberAccessor();
-            if (null != preInstance) {
-                Map<String, Instance> preInstances = new HashMap<>();
-                preInstances.put(NacosMetaDataUtils.getKey(preInstance), preInstance);
-                accessor.set(listener.getClass().getDeclaredField("preInstances"), listener, preInstances);
-            }
-            listener.onEvent(event);
-        };
-    }
-    
-    private VoidAnswer2<String, Instance> getRegisterInstanceAnswer() {
-        return (serviceName, instance) -> {
-            List<Instance> instances = client.getAllInstances(serviceName, false);
-            instances.removeIf(each -> Objects.equals(each.getIp(), instance.getIp()) && each.getPort() == instance.getPort());
-            instances.add(instance);
-            when(client.getAllInstances(serviceName, false)).thenReturn(instances);
-        };
-    }
-    
-    private VoidAnswer2<String, Instance> getDeregisterInstanceAnswer() {
-        return (serviceName, instance) -> {
-            List<Instance> instances = client.getAllInstances(serviceName, false);
-            instances.remove(instance);
-            when(client.getAllInstances(serviceName, false)).thenReturn(instances);
-        };
-    }
-}
diff --git a/mode/type/cluster/repository/provider/nacos/src/test/java/org/apache/shardingsphere/mode/repository/cluster/nacos/props/NacosPropertiesTest.java b/mode/type/cluster/repository/provider/nacos/src/test/java/org/apache/shardingsphere/mode/repository/cluster/nacos/props/NacosPropertiesTest.java
deleted file mode 100644
index 7e04a0810d3..00000000000
--- a/mode/type/cluster/repository/provider/nacos/src/test/java/org/apache/shardingsphere/mode/repository/cluster/nacos/props/NacosPropertiesTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.mode.repository.cluster.nacos.props;
-
-import org.apache.shardingsphere.test.util.PropertiesBuilder;
-import org.apache.shardingsphere.test.util.PropertiesBuilder.Property;
-import org.junit.jupiter.api.Test;
-
-import java.util.Properties;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-class NacosPropertiesTest {
-    
-    @Test
-    void assertGetValue() {
-        NacosProperties actual = new NacosProperties(createProperties());
-        assertThat(actual.getValue(NacosPropertyKey.CLUSTER_IP), is("127.0.0.1"));
-        assertThat(actual.getValue(NacosPropertyKey.RETRY_INTERVAL_MILLISECONDS), is(1000L));
-        assertThat(actual.getValue(NacosPropertyKey.MAX_RETRIES), is(5));
-        assertThat(actual.getValue(NacosPropertyKey.TIME_TO_LIVE_SECONDS), is(60));
-        assertThat(actual.getValue(NacosPropertyKey.USERNAME), is("nacos"));
-        assertThat(actual.getValue(NacosPropertyKey.PASSWORD), is("nacos"));
-    }
-    
-    private Properties createProperties() {
-        return PropertiesBuilder.build(
-                new Property(NacosPropertyKey.CLUSTER_IP.getKey(), "127.0.0.1"),
-                new Property(NacosPropertyKey.RETRY_INTERVAL_MILLISECONDS.getKey(), "1000"),
-                new Property(NacosPropertyKey.MAX_RETRIES.getKey(), "5"),
-                new Property(NacosPropertyKey.TIME_TO_LIVE_SECONDS.getKey(), "60"),
-                new Property(NacosPropertyKey.USERNAME.getKey(), "nacos"),
-                new Property(NacosPropertyKey.PASSWORD.getKey(), "nacos"));
-    }
-    
-    @Test
-    void assertGetDefaultValue() {
-        NacosProperties actual = new NacosProperties(new Properties());
-        assertThat(actual.getValue(NacosPropertyKey.CLUSTER_IP), is(""));
-        assertThat(actual.getValue(NacosPropertyKey.RETRY_INTERVAL_MILLISECONDS), is(500L));
-        assertThat(actual.getValue(NacosPropertyKey.MAX_RETRIES), is(3));
-        assertThat(actual.getValue(NacosPropertyKey.TIME_TO_LIVE_SECONDS), is(30));
-        assertThat(actual.getValue(NacosPropertyKey.USERNAME), is(""));
-        assertThat(actual.getValue(NacosPropertyKey.PASSWORD), is(""));
-    }
-}
diff --git a/mode/type/cluster/repository/provider/pom.xml b/mode/type/cluster/repository/provider/pom.xml
index f6c0480c848..c51a3ef34b6 100644
--- a/mode/type/cluster/repository/provider/pom.xml
+++ b/mode/type/cluster/repository/provider/pom.xml
@@ -30,7 +30,6 @@
     <modules>
         <module>zookeeper</module>
         <module>etcd</module>
-        <module>nacos</module>
         <module>consul</module>
     </modules>
 </project>