I have a use case where Topics hold data in Json format and no matter what combination of schema enablers I do the AmazonKinesisSinkTask.addUserRecord call will always force a call to the sinkRecord.valueSchema() ...
private ListenableFuture<UserRecordResult> addUserRecord(KinesisProducer kp, String streamName, String partitionKey,
boolean usePartitionAsHashKey, SinkRecord sinkRecord) {
// If configured use kafka partition key as explicit hash key
// This will be useful when sending data from same partition into
// same shard
if (usePartitionAsHashKey)
return kp.addUserRecord(streamName, partitionKey, Integer.toString(sinkRecord.kafkaPartition()),
DataUtility.parseValue(sinkRecord.valueSchema(), sinkRecord.value()));
else
return kp.addUserRecord(streamName, partitionKey,
DataUtility.parseValue(sinkRecord.valueSchema(), sinkRecord.value()));
}
I guess this means I NEED TO PROVIDE a schema to the value ??? I am getting the following exception as the valueSchema is returning null value :
Caused by: java.lang.NullPointerException
at com.amazon.kinesis.kafka.DataUtility.parseValue(DataUtility.java:31)
at com.amazon.kinesis.kafka.AmazonKinesisSinkTask.addUserRecord(AmazonKinesisSinkTask.java:235)
I have a use case where Topics hold data in Json format and no matter what combination of schema enablers I do the AmazonKinesisSinkTask.addUserRecord call will always force a call to the sinkRecord.valueSchema() ...
I guess this means I NEED TO PROVIDE a schema to the value ??? I am getting the following exception as the valueSchema is returning null value :
Caused by: java.lang.NullPointerException at com.amazon.kinesis.kafka.DataUtility.parseValue(DataUtility.java:31) at com.amazon.kinesis.kafka.AmazonKinesisSinkTask.addUserRecord(AmazonKinesisSinkTask.java:235)