public class ProtoByteUtils
extends java.lang.Object
Users can utilize the methods in this class to facilitate the integration of Proto data processing within Apache Beam pipelines, allowing for the seamless transformation of Proto messages to Beam Rows and vice versa.
Constructor and Description |
---|
ProtoByteUtils() |
Modifier and Type | Method and Description |
---|---|
static Schema |
getBeamSchemaFromProto(java.lang.String fileDescriptorPath,
java.lang.String messageName)
Retrieves a Beam Schema from a Protocol Buffer message.
|
static SerializableFunction<byte[],Row> |
getProtoBytesToRowFunction(java.lang.String fileDescriptorPath,
java.lang.String messageName) |
static SerializableFunction<Row,byte[]> |
getRowToProtoBytes(java.lang.String fileDescriptorPath,
java.lang.String messageName) |
public static Schema getBeamSchemaFromProto(java.lang.String fileDescriptorPath, java.lang.String messageName)
fileDescriptorPath
- The path to the File Descriptor Set file.messageName
- The name of the Protocol Buffer message.public static SerializableFunction<byte[],Row> getProtoBytesToRowFunction(java.lang.String fileDescriptorPath, java.lang.String messageName)
public static SerializableFunction<Row,byte[]> getRowToProtoBytes(java.lang.String fileDescriptorPath, java.lang.String messageName)