Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:remove old zookeeper #14028

Merged
merged 13 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .artifacts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ dubbo-core-spi
dubbo-dependencies
dubbo-dependencies-all
dubbo-dependencies-bom
dubbo-dependencies-zookeeper
dubbo-dependencies-zookeeper-curator5
dubbo-distribution
dubbo-filter-cache
Expand Down Expand Up @@ -81,7 +80,6 @@ dubbo-remoting-http12
dubbo-remoting-netty
dubbo-remoting-netty4
dubbo-remoting-zookeeper-api
dubbo-remoting-zookeeper
dubbo-remoting-zookeeper-curator5
dubbo-rpc
dubbo-rpc-api
Expand Down
2 changes: 1 addition & 1 deletion dubbo-compatible/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-remoting-zookeeper</artifactId>
<artifactId>dubbo-remoting-zookeeper-curator5</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
Expand Down
212 changes: 0 additions & 212 deletions dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml

This file was deleted.

1 change: 0 additions & 1 deletion dubbo-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<artifactId>dubbo-dependencies</artifactId>
<packaging>pom</packaging>
<modules>
<module>dubbo-dependencies-zookeeper</module>
<module>dubbo-dependencies-zookeeper-curator5</module>
</modules>

Expand Down
3 changes: 1 addition & 2 deletions dubbo-distribution/dubbo-all-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-remoting-zookeeper</artifactId>
<artifactId>dubbo-remoting-zookeeper-curator5</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
Expand Down Expand Up @@ -502,7 +502,6 @@
<include>org.apache.dubbo:dubbo-remoting-http</include>
<include>org.apache.dubbo:dubbo-remoting-netty4</include>
<include>org.apache.dubbo:dubbo-remoting-netty</include>
<include>org.apache.dubbo:dubbo-remoting-zookeeper</include>
<include>org.apache.dubbo:dubbo-remoting-zookeeper-curator5</include>
<include>org.apache.dubbo:dubbo-rpc-api</include>
<include>org.apache.dubbo:dubbo-rpc-dubbo</include>
Expand Down
8 changes: 0 additions & 8 deletions dubbo-distribution/dubbo-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,6 @@
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-remoting-zookeeper</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-remoting-zookeeper-curator5</artifactId>
Expand Down Expand Up @@ -558,7 +551,6 @@
<include>org.apache.dubbo:dubbo-remoting-netty4</include>
<include>org.apache.dubbo:dubbo-remoting-netty</include>
<include>org.apache.dubbo:dubbo-remoting-zookeeper-api</include>
<include>org.apache.dubbo:dubbo-remoting-zookeeper</include>
<include>org.apache.dubbo:dubbo-remoting-zookeeper-curator5</include>
<include>org.apache.dubbo:dubbo-rpc-api</include>
<include>org.apache.dubbo:dubbo-rpc-dubbo</include>
Expand Down
5 changes: 0 additions & 5 deletions dubbo-distribution/dubbo-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,6 @@
<artifactId>dubbo-remoting-zookeeper-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-remoting-zookeeper</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-remoting-zookeeper-curator5</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,14 @@ public interface ZookeeperTransporter {

String CURATOR_5 = "curator5";

String CURATOR = "curator";

ZookeeperClient connect(URL url);

void destroy();

static ZookeeperTransporter getExtension(ApplicationModel applicationModel) {
ExtensionLoader<ZookeeperTransporter> extensionLoader =
applicationModel.getExtensionLoader(ZookeeperTransporter.class);
return isHighVersionCurator() ? extensionLoader.getExtension(CURATOR_5) : extensionLoader.getExtension(CURATOR);
return extensionLoader.getExtension(CURATOR_5);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existence of ZookeeperTransporter is not very meaningful, so consider removing it.

Copy link
Contributor Author

@Stellar1999 Stellar1999 Apr 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take another look. Do you think my code idea is correct? I removed the SPI and moved the ZookeeperTransporter to the module dubbo-remoting-zookeeper-curator5 in order to create an instance of Curator5ZookeeperTransporter. @CrazyHZM Thanks for your code review.

Copy link
Member

@CrazyHZM CrazyHZM Apr 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Stellar1999 ZookeeperTransporter should be renamed ZookeeperClientManager or something else.
dubbo-remoting-zookeeper-api should also be incorporated into the curator5 module.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take another look. Thanks for your guidance. @CrazyHZM
If it's alright, I will fix the sample test case.

}

static boolean isHighVersionCurator() {
Expand Down
81 changes: 0 additions & 81 deletions dubbo-remoting/dubbo-remoting-zookeeper/pom.xml

This file was deleted.

Loading
Loading