Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

QueryCassandra throws AvroRuntimeException: Unknown datum type java.util.Date: Exception

avatar
Explorer

Hi, I was trying to fetch records from Cassandra's table with the help of Query Cassandra processor.

I have timestamp field in the table for the date of birth and I store one record using the query 

INSERT INTO temp (id,dob,name)values (e7ae5cf3-d358-4d99-b900-85902fda9bb0, 1426349294842,'vinod');

While accessing this table in NIFI, I am getting the following error, need help here.

 

[4:20 PM] E, Azhagesan
    QueryCassandra[id=30619000-1586-3d6f-6d69-ed09ac1306d3] due to uncaught Exception: org.apache.avro.file.DataFileWriter$AppendWriteException: org.apache.avro.AvroRuntimeException: Unknown datum type java.util.Date: Tue Jun 16 13:10:29 IST 2020
org.apache.avro.file.DataFileWriter$AppendWriteException: org.apache.avro.AvroRuntimeException: Unknown datum type java.util.Date: Tue Jun 16 13:10:29 IST 2020
    at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:308)
    at org.apache.nifi.processors.cassandra.QueryCassandra.convertToAvroStream(QueryCassandra.java:358)
    at org.apache.nifi.processors.cassandra.QueryCassandra$1.process(QueryCassandra.java:220)
    at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2746)
    at org.apache.nifi.processors.cassandra.QueryCassandra.onTrigger(QueryCassandra.java:211)
    at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
    at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1176)
    at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)
    at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
    at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.avro.AvroRuntimeException: Unknown datum type java.util.Date: Tue Jun 16 13:10:29 IST 2020
    at org.apache.avro.generic.GenericData.getSchemaName(GenericData.java:741)
    at org.apache.avro.generic.GenericData.resolveUnion(GenericData.java:706)
    at org.apache.avro.generic.GenericDatumWriter.resolveUnion(GenericDatumWriter.java:192)
    at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:110)
    at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:73)
    at org.apache.avro.generic.GenericDatumWriter.writeField(GenericDatumWriter.java:153)
    at org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:143)
    at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:105)
    at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:73)
    at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:60)
    at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:302)
    ... 16 common frames omitted

 

1 REPLY 1

avatar
Explorer

I have seen in some article says timestamp only introduced in Avro 1.8.x. Anyone knows which avro version used in NIFI 1.11.4?