-
Couldn't load subscription status.
- Fork 168
Closed
Description
Hi there,
I'm trying to integrate glueSchemaRegistry with Kinesis using KPL/KCL.
Upon debugging the code I came across these lines of code and found that we don't have a way to pass the schema along the UserRecord which is calling KinesisProducer.addUserRecord(). The following piece of code is never execute because of null schema object.
if (schema != null && data != null) {
if (schema.getSchemaDefinition() == null || schema.getDataFormat() == null) {
throw new IllegalArgumentException(
String.format(
"Schema specification is not valid. SchemaDefinition or DataFormat cannot be null. SchemaDefinition: %s, DataFormat: %s",
schema.getSchemaDefinition(),
schema.getDataFormat()
)
);
}
GlueSchemaRegistrySerializer serializer = glueSchemaRegistrySerializerInstance.get(config);
byte[] encodedBytes = serializer.encode(stream, schema, data.array());
data = ByteBuffer.wrap(encodedBytes);
}
Metadata
Metadata
Assignees
Labels
No labels