Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #7 from blueapron/update-to-1.0
Browse files Browse the repository at this point in the history
Upgrade to Kafka 1.0, improve legacy_name usability
  • Loading branch information
makearl authored Mar 29, 2018
2 parents 433be31 + d12e5f2 commit cd2fe32
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,6 @@ Create the JAR:
mvn clean package
```

Copy the JAR to `/usr/share/java/kafka-serde-tools` on your local Kafka Connect instance to make the
Copy the JAR with dependencies (`kafka-connect-protobuf-converter-*-jar-with-dependencies.jar`) to
`/usr/share/java/kafka-serde-tools` on your local Kafka Connect instance to make the
converter available in Kafka Connect.
22 changes: 20 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.blueapron</groupId>
<artifactId>kafka-connect-protobuf-converter</artifactId>
<packaging>jar</packaging>
<version>1.3.0</version>
<version>2.0.0</version>

<properties>
<protobuf.version>3.4.0</protobuf.version>
Expand All @@ -18,7 +18,7 @@
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-api</artifactId>
<version>0.10.2.1</version>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
Expand Down Expand Up @@ -61,6 +61,24 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private String getProtoMapKey(String descriptorContainingTypeName, String connec
private String getConnectFieldName(Descriptors.FieldDescriptor descriptor) {
String name = descriptor.getName();
for (Map.Entry<Descriptors.FieldDescriptor, Object> option: descriptor.getOptions().getAllFields().entrySet()) {
if (option.getKey().getFullName().equalsIgnoreCase(this.legacyName)) {
if (option.getKey().getName().equalsIgnoreCase(this.legacyName)) {
name = option.getValue().toString();
}
}
Expand Down

0 comments on commit cd2fe32

Please sign in to comment.