Skip to content

Commit a4af341

Browse files
committed
Add Etcd metadata store provider plugin
Etcd metadata store support is being removed from Pulsar core (PIP-462). This module provides it as an external plugin for users who still need it. The plugin can be loaded by adding the shaded jar to the Pulsar classpath and setting the system property: -Dpulsar.metadata.store.providers=org.apache.pulsar.metadata.impl.EtcdMetadataStoreProvider
1 parent c3cf0b2 commit a4af341

27 files changed

Lines changed: 1798 additions & 0 deletions

File tree

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<module>pulsar-auth-contrib</module>
4040
<module>pulsar-rpc-contrib</module>
4141
<module>pulsar-admin-mcp-contrib</module>
42+
<module>pulsar-metadata-etcd-contrib</module>
4243
</modules>
4344

4445
<properties>
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
16+
-->
17+
<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">
18+
<modelVersion>4.0.0</modelVersion>
19+
<parent>
20+
<groupId>org.apache</groupId>
21+
<artifactId>pulsar-java-contrib</artifactId>
22+
<version>1.0.0-SNAPSHOT</version>
23+
</parent>
24+
25+
<artifactId>pulsar-metadata-etcd-contrib</artifactId>
26+
<name>Pulsar Metadata Etcd Contrib</name>
27+
<description>Etcd metadata store provider plugin for Apache Pulsar</description>
28+
29+
<properties>
30+
<jetcd.version>0.7.7</jetcd.version>
31+
<grpc.version>1.60.0</grpc.version>
32+
<jackson-dataformat-yaml.version>2.17.2</jackson-dataformat-yaml.version>
33+
<failsafe.version>3.3.2</failsafe.version>
34+
<pulsar-metadata.version>4.2.0-SNAPSHOT</pulsar-metadata.version>
35+
</properties>
36+
37+
<dependencies>
38+
39+
<dependency>
40+
<groupId>com.fasterxml.jackson.dataformat</groupId>
41+
<artifactId>jackson-dataformat-yaml</artifactId>
42+
<version>${jackson-dataformat-yaml.version}</version>
43+
</dependency>
44+
45+
<dependency>
46+
<groupId>dev.failsafe</groupId>
47+
<artifactId>failsafe</artifactId>
48+
<version>${failsafe.version}</version>
49+
</dependency>
50+
51+
<dependency>
52+
<groupId>io.etcd</groupId>
53+
<artifactId>jetcd-core</artifactId>
54+
<version>${jetcd.version}</version>
55+
<exclusions>
56+
<exclusion>
57+
<groupId>io.grpc</groupId>
58+
<artifactId>grpc-netty</artifactId>
59+
</exclusion>
60+
<exclusion>
61+
<groupId>io.netty</groupId>
62+
<artifactId>*</artifactId>
63+
</exclusion>
64+
<exclusion>
65+
<groupId>javax.annotation</groupId>
66+
<artifactId>javax.annotation-api</artifactId>
67+
</exclusion>
68+
</exclusions>
69+
</dependency>
70+
71+
<dependency>
72+
<groupId>io.etcd</groupId>
73+
<artifactId>jetcd-test</artifactId>
74+
<version>${jetcd.version}</version>
75+
<scope>test</scope>
76+
<exclusions>
77+
<exclusion>
78+
<groupId>io.etcd</groupId>
79+
<artifactId>jetcd-api</artifactId>
80+
</exclusion>
81+
<exclusion>
82+
<groupId>io.etcd</groupId>
83+
<artifactId>jetcd-core</artifactId>
84+
</exclusion>
85+
</exclusions>
86+
</dependency>
87+
88+
<dependency>
89+
<groupId>io.grpc</groupId>
90+
<artifactId>grpc-netty-shaded</artifactId>
91+
<version>${grpc.version}</version>
92+
</dependency>
93+
94+
<dependency>
95+
<groupId>io.grpc</groupId>
96+
<artifactId>grpc-protobuf</artifactId>
97+
<version>${grpc.version}</version>
98+
</dependency>
99+
100+
<dependency>
101+
<groupId>io.grpc</groupId>
102+
<artifactId>grpc-stub</artifactId>
103+
<version>${grpc.version}</version>
104+
</dependency>
105+
<dependency>
106+
<groupId>org.apache.pulsar</groupId>
107+
<artifactId>pulsar-metadata</artifactId>
108+
<version>${pulsar-metadata.version}</version>
109+
<scope>provided</scope>
110+
</dependency>
111+
</dependencies>
112+
113+
<build>
114+
<plugins>
115+
<plugin>
116+
<groupId>org.apache.maven.plugins</groupId>
117+
<artifactId>maven-shade-plugin</artifactId>
118+
<version>3.6.0</version>
119+
<executions>
120+
<execution>
121+
<goals>
122+
<goal>shade</goal>
123+
</goals>
124+
<phase>package</phase>
125+
<configuration>
126+
<createDependencyReducedPom>true</createDependencyReducedPom>
127+
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
128+
<minimizeJar>false</minimizeJar>
129+
<artifactSet>
130+
<includes>
131+
<include>io.etcd:*</include>
132+
<include>io.vertx:*</include>
133+
</includes>
134+
</artifactSet>
135+
<relocations>
136+
<relocation>
137+
<pattern>io.vertx</pattern>
138+
<shadedPattern>org.apache.pulsar.jetcd.shaded.io.vertx</shadedPattern>
139+
</relocation>
140+
<relocation>
141+
<pattern>io.grpc.netty</pattern>
142+
<shadedPattern>io.grpc.netty.shaded.io.grpc.netty</shadedPattern>
143+
</relocation>
144+
<relocation>
145+
<pattern>io.netty</pattern>
146+
<shadedPattern>io.grpc.netty.shaded.io.netty</shadedPattern>
147+
</relocation>
148+
</relocations>
149+
<filters>
150+
<filter>
151+
<artifact>*:*</artifact>
152+
<excludes>
153+
<exclude>META-INF/*.SF</exclude>
154+
<exclude>META-INF/*.DSA</exclude>
155+
<exclude>META-INF/*.RSA</exclude>
156+
</excludes>
157+
</filter>
158+
</filters>
159+
<transformers>
160+
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
161+
<manifestEntries>
162+
<Multi-Release>true</Multi-Release>
163+
</manifestEntries>
164+
</transformer>
165+
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"></transformer>
166+
</transformers>
167+
</configuration>
168+
</execution>
169+
</executions>
170+
</plugin>
171+
</plugins>
172+
</build>
173+
174+
<inceptionYear>2025</inceptionYear>
175+
</project>

0 commit comments

Comments
 (0)