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

menghaoran 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 97e0fe210eb Remove useless method (#19850)
97e0fe210eb is described below

commit 97e0fe210eb80062c5b7a80ae43e1de5ba4d34eb
Author: gin <[email protected]>
AuthorDate: Thu Aug 4 11:08:49 2022 +0800

    Remove useless method (#19850)
---
 .../namespace/fixture/FixtureClusterPersistRepository.java  |  5 -----
 .../fixture/ClusterPersistRepositoryFixture.java            |  5 -----
 .../process/ProcessListClusterPersistRepositoryFixture.java |  5 -----
 .../mode/repository/cluster/ClusterPersistRepository.java   |  9 ---------
 .../mode/repository/cluster/etcd/EtcdRepository.java        |  5 -----
 .../cluster/zookeeper/CuratorZookeeperRepository.java       | 13 -------------
 .../proxy/fixture/ClusterPersistRepositoryFixture.java      |  5 -----
 .../driver/fixture/TestClusterPersistRepository.java        |  5 -----
 8 files changed, 52 deletions(-)

diff --git 
a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/fixture/FixtureClusterPersistRepository.java
 
b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/fixture/FixtureClusterPersistRepository.java
index 94464d99a67..7ea39cfe794 100644
--- 
a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/fixture/FixtureClusterPersistRepository.java
+++ 
b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/fixture/FixtureClusterPersistRepository.java
@@ -58,11 +58,6 @@ public final class FixtureClusterPersistRepository 
implements ClusterPersistRepo
         registryData.put(key, value);
     }
     
-    @Override
-    public String getSequentialId(final String key, final String value) {
-        return null;
-    }
-    
     @Override
     public void delete(final String key) {
     }
diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/fixture/ClusterPersistRepositoryFixture.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/fixture/ClusterPersistRepositoryFixture.java
index 31055fe0a40..9e77127e1af 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/fixture/ClusterPersistRepositoryFixture.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/fixture/ClusterPersistRepositoryFixture.java
@@ -50,11 +50,6 @@ public final class ClusterPersistRepositoryFixture 
implements ClusterPersistRepo
     public void persistEphemeral(final String key, final String value) {
     }
     
-    @Override
-    public String getSequentialId(final String key, final String value) {
-        return null;
-    }
-    
     @Override
     public void delete(final String key) {
     }
diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/ProcessListClusterPersistRepositoryFixture.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/ProcessListClusterPersistRepositoryFix
 [...]
index fd500ee3648..83ab05075a5 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/ProcessListClusterPersistRepositoryFixture.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/ProcessListClusterPersistRepositoryFixture.java
@@ -56,11 +56,6 @@ public final class 
ProcessListClusterPersistRepositoryFixture implements Cluster
         REGISTRY_DATA.put(key, value);
     }
     
-    @Override
-    public String getSequentialId(final String key, final String value) {
-        return null;
-    }
-    
     @Override
     public void delete(final String key) {
         REGISTRY_DATA.remove(key);
diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-api/src/main/java/org/apache/shardingsphere/mode/repository/cluster/ClusterPersistRepository.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-api/src/main/java/org/apache/shardingsphere/mode/repository/cluster/ClusterPer
 [...]
index 4254e6c7c04..0bf86ed6cd6 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-api/src/main/java/org/apache/shardingsphere/mode/repository/cluster/ClusterPersistRepository.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-api/src/main/java/org/apache/shardingsphere/mode/repository/cluster/ClusterPersistRepository.java
@@ -43,15 +43,6 @@ public interface ClusterPersistRepository extends 
PersistRepository {
      */
     void persistEphemeral(String key, String value);
     
-    /**
-     * Get sequential id.
-     * 
-     * @param key key of data
-     * @param value value of data
-     * @return sequential id
-     */
-    String getSequentialId(String key, String value);
-    
     /**
      * Watch key or path of governance server.
      *
diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-etcd/src/main/java/org/apache/shardingsphere/mode/repository/cluster/etcd/EtcdRepository.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mo
 [...]
index 5dd453f156b..d080dca8735 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-etcd/src/main/java/org/apache/shardingsphere/mode/repository/cluster/etcd/EtcdRepository.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-etcd/src/main/java/org/apache/shardingsphere/mode/repository/cluster/etcd/EtcdRepository.java
@@ -106,11 +106,6 @@ public final class EtcdRepository implements 
ClusterPersistRepository {
         client.getKVClient().put(ByteSequence.from(key, 
StandardCharsets.UTF_8), ByteSequence.from(value, StandardCharsets.UTF_8), 
PutOption.newBuilder().withLeaseId(leaseId).build()).get();
     }
     
-    @Override
-    public String getSequentialId(final String key, final String value) {
-        return null;
-    }
-    
     @Override
     public void delete(final String key) {
         client.getKVClient().delete(ByteSequence.from(key, 
StandardCharsets.UTF_8), 
DeleteOption.newBuilder().withPrefix(ByteSequence.from(key, 
StandardCharsets.UTF_8)).build());
diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/CuratorZookeeperRepository.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-prov
 [...]
index 61358682878..e2dba5dfce4 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/CuratorZookeeperRepository.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/CuratorZookeeperRepository.java
@@ -200,19 +200,6 @@ public final class CuratorZookeeperRepository implements 
ClusterPersistRepositor
         }
     }
     
-    @Override
-    public String getSequentialId(final String key, final String value) {
-        try {
-            String path = 
client.create().creatingParentsIfNeeded().withMode(CreateMode.EPHEMERAL_SEQUENTIAL).forPath(key,
 value.getBytes(StandardCharsets.UTF_8));
-            return path.substring(key.length());
-            // CHECKSTYLE:OFF
-        } catch (final Exception ex) {
-            // CHECKSTYLE:ON
-            CuratorZookeeperExceptionHandler.handleException(ex);
-        }
-        return null;
-    }
-    
     @Override
     public void delete(final String key) {
         try {
diff --git 
a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/fixture/ClusterPersistRepositoryFixture.java
 
b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/fixture/ClusterPersistRepositoryFixture.java
index 0e6c1664875..37a3120ae06 100644
--- 
a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/fixture/ClusterPersistRepositoryFixture.java
+++ 
b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/fixture/ClusterPersistRepositoryFixture.java
@@ -56,11 +56,6 @@ public final class ClusterPersistRepositoryFixture 
implements ClusterPersistRepo
         REGISTRY_DATA.put(key, value);
     }
     
-    @Override
-    public String getSequentialId(final String key, final String value) {
-        return null;
-    }
-    
     @Override
     public void delete(final String key) {
     }
diff --git 
a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/java/org/apache/shardingsphere/driver/fixture/TestClusterPersistRepository.java
 
b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/java/org/apache/shardingsphere/driver/fixture/TestClusterPersistRepository.java
index d311842603e..e323990653d 100644
--- 
a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/java/org/apache/shardingsphere/driver/fixture/TestClusterPersistRepository.java
+++ 
b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/java/org/apache/shardingsphere/driver/fixture/TestClusterPersistRepository.java
@@ -58,11 +58,6 @@ public final class TestClusterPersistRepository implements 
ClusterPersistReposit
         registryData.put(key, value);
     }
     
-    @Override
-    public String getSequentialId(final String key, final String value) {
-        return null;
-    }
-    
     @Override
     public void delete(final String key) {
     }

Reply via email to