public class GenerateKafkaEvents
extends java.lang.Object
Constructor and Description |
---|
GenerateKafkaEvents() |
Modifier and Type | Method and Description |
---|---|
static <T> byte[] |
encodeAvroSpecificRecord(java.lang.Class<T> clazz,
T record)
Encode an Avro record into byte array
|
static void |
main(java.lang.String[] args) |
public static void main(java.lang.String[] args) throws java.io.UnsupportedEncodingException, java.lang.InterruptedException
java.io.UnsupportedEncodingException
java.lang.InterruptedException
public static <T> byte[] encodeAvroSpecificRecord(java.lang.Class<T> clazz, T record) throws java.io.IOException
T
- The type of the avro record.clazz
- The class type of the avro recordrecord
- the instance of the avro recordjava.io.IOException
- on I/O errors encoding the avro record