Replace generated code with source .proto files

This change replaces the generated Messages.java file with the source .proto files.
It also includes the pom.xml changes needed to install protoc from Maven Central, and use it to compile the wrapper java code.
This commit is contained in:
Nakul Joshi 2024-05-31 18:59:47 -07:00
parent 35b150009a
commit 2d5e761e34
3 changed files with 44 additions and 2661 deletions

View file

@ -48,6 +48,7 @@
</licenses>
<properties>
<protobuf.version>3.21.12</protobuf.version>
<sqlite4java.version>1.0.392</sqlite4java.version>
<sqlite4java.native>libsqlite4java</sqlite4java.native>
<sqlite4java.libpath>${project.build.directory}/test-lib</sqlite4java.libpath>
@ -95,7 +96,7 @@
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.21.12</version>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
@ -180,6 +181,13 @@
</developers>
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.6.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
@ -195,6 +203,21 @@
</pluginManagement>
<plugins>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>

View file

@ -0,0 +1,20 @@
syntax = "proto2";
package software.amazon.kinesis.retrieval.kpl;
message Tag {
required string key = 1;
optional string value = 2;
}
message Record {
required uint64 partition_key_index = 1;
optional uint64 explicit_hash_key_index = 2;
required bytes data = 3;
repeated Tag tags = 4;
}
message AggregatedRecord {
repeated string partition_key_table = 1;
repeated string explicit_hash_key_table = 2;
repeated Record records = 3;
}