Support Questions

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

NIFI ConvertAvroToJSON java.io.IOException: Not a data file

avatar
Contributor

java.io.IOException: Not a data file.

org.apache.nifi.processor.exception.ProcessException: IOException thrown from ConvertAvroToJSON[id=4004c598-016b-1000-ffff-ffff850df8b7]: java.io.IOException: Not a data file.

at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2946)

at org.apache.nifi.processors.avro.ConvertAvroToJSON.onTrigger(ConvertAvroToJSON.java:148)

at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)

at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1162)

at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:205)

at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)

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:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.io.IOException: Not a data file.

at org.apache.avro.file.DataFileStream.initialize(DataFileStream.java:105)

at org.apache.avro.file.DataFileStream.<init>(DataFileStream.java:84)

at org.apache.nifi.processors.avro.ConvertAvroToJSON$1.process(ConvertAvroToJSON.java:179)

at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2925)

... 12 common frames omitted



109312-1560155319999.png

109331-1560155340957.png


data: {"City": "Athens", "Edition": 1896, "Sport": "Aquatics", "sub_sport": "Swimming", "Athlete": "HAJOS, Alfred", "country": "HUN", "Gender": "Men", "Event": "100m freestyle", "Event_gender": "M", "Medal": "Gold"}

1 REPLY 1

avatar
Master Guru

@jingyong zou

The issue is with the flowfile format that is passed through the processor.
As ConvertAvroToJson processor accepts only Avro format but i think you are passing Json format to the processor which is causing java.io.IOException: Not a data file error.