I was looking for kafka-connect-hdfs connector (Confluent) support for saving byte array and Field partitioning using FlatBuffer schema.
I am recieving data in byte array from kafka. This byte array is generated from FlatBuffer. Need to save it in HDFS at path say Field1/Field2/Field3. These all fields need to be extracted from byte array using FlatBuffer schema. Also, data to be saved in HDFS need to be in bytes only. No conversion required for data.
I checked both:
- FieldPartitioner: https://github.com/confluentinc/kafka-connect-storage-common/blob/master/partitioner/src/main/java/io/confluent/connect/storage/partitioner/FieldPartitioner.java
- Supported formats: Json, Avro, Parquet. In https://github.com/confluentinc/kafka-connect-storage-cloud/blob/master/kafka-connect-s3/src/main/java/io/confluent/connect/s3/format/json/JsonRecordWriterProvider.java, though I find bytearray saved in HDFS if data is of type Kafka Struct.
I couldn't find a way to use them for my purpose.
Does anyone aware of such in built support. If not, then please guide me to resource (if any) to build custom support for both.