[ 
https://issues.apache.org/jira/browse/NIFI-8045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Sampson updated NIFI-8045:
--------------------------------
    Description: 
Attempts to use the Avro schema's "fixed" type result in an error:
{code:java}
2020-11-25 15:36:28,187 ERROR [Timer-Driven Process Thread-5] 
o.a.n.processors.standard.ValidateRecord 
ValidateRecord[id=0008e1f7-0176-1000-ffff-ffffdc31ab2d] Failed to process 
StandardFlowFileRecord[uuid=fd2c0bb8-6d2e-4468-a1da-cb862ff33f61,claim=StandardContentClaim
 [resourceClaim=StandardResourceClaim[id=1606318132008-3243, container=default, 
section=171], offset=552175, 
length=47],offset=0,name=fd2c0bb8-6d2e-4468-a1da-cb862ff33f61,size=47]; will 
route to failure: org.apache.avro.SchemaParseException: "fixed" is not a 
defined name. The type of the "id" field must be a defined name or a {"type": 
...} expression.
org.apache.avro.SchemaParseException: "fixed" is not a defined name. The type 
of the "id" field must be a defined name or a {"type": ...} expression.
        at org.apache.avro.Schema.parse(Schema.java:1265)
        at org.apache.avro.Schema$Parser.parse(Schema.java:1032)
        at org.apache.avro.Schema$Parser.parse(Schema.java:1020)
        at 
org.apache.nifi.processors.standard.ValidateRecord.getValidationSchema(ValidateRecord.java:478)
        at 
org.apache.nifi.processors.standard.ValidateRecord.onTrigger(ValidateRecord.java:272)
        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:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
{code}

Attached template/flow re-create this with a simply generated JSON content 
passed to a ValidateRecord processor.

  was:
Attempts to use the Avro schema's "fixed" type result in an error:
<code:java>
2020-11-25 15:36:28,187 ERROR [Timer-Driven Process Thread-5] 
o.a.n.processors.standard.ValidateRecord 
ValidateRecord[id=0008e1f7-0176-1000-ffff-ffffdc31ab2d] Failed to process 
StandardFlowFileRecord[uuid=fd2c0bb8-6d2e-4468-a1da-cb862ff33f61,claim=StandardContentClaim
 [resourceClaim=StandardResourceClaim[id=1606318132008-3243, container=default, 
section=171], offset=552175, 
length=47],offset=0,name=fd2c0bb8-6d2e-4468-a1da-cb862ff33f61,size=47]; will 
route to failure: org.apache.avro.SchemaParseException: "fixed" is not a 
defined name. The type of the "id" field must be a defined name or a {"type": 
...} expression.
org.apache.avro.SchemaParseException: "fixed" is not a defined name. The type 
of the "id" field must be a defined name or a {"type": ...} expression.
        at org.apache.avro.Schema.parse(Schema.java:1265)
        at org.apache.avro.Schema$Parser.parse(Schema.java:1032)
        at org.apache.avro.Schema$Parser.parse(Schema.java:1020)
        at 
org.apache.nifi.processors.standard.ValidateRecord.getValidationSchema(ValidateRecord.java:478)
        at 
org.apache.nifi.processors.standard.ValidateRecord.onTrigger(ValidateRecord.java:272)
        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:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
<code>

Attached template/flow re-create this with a simply generated JSON content 
passed to a ValidateRecord processor.


> Avro Schemas should support 'fixed' field types
> -----------------------------------------------
>
>                 Key: NIFI-8045
>                 URL: https://issues.apache.org/jira/browse/NIFI-8045
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.11.4
>            Reporter: Chris Sampson
>            Priority: Major
>         Attachments: avro-fixed.json, avro-fixed.xml
>
>
> Attempts to use the Avro schema's "fixed" type result in an error:
> {code:java}
> 2020-11-25 15:36:28,187 ERROR [Timer-Driven Process Thread-5] 
> o.a.n.processors.standard.ValidateRecord 
> ValidateRecord[id=0008e1f7-0176-1000-ffff-ffffdc31ab2d] Failed to process 
> StandardFlowFileRecord[uuid=fd2c0bb8-6d2e-4468-a1da-cb862ff33f61,claim=StandardContentClaim
>  [resourceClaim=StandardResourceClaim[id=1606318132008-3243, 
> container=default, section=171], offset=552175, 
> length=47],offset=0,name=fd2c0bb8-6d2e-4468-a1da-cb862ff33f61,size=47]; will 
> route to failure: org.apache.avro.SchemaParseException: "fixed" is not a 
> defined name. The type of the "id" field must be a defined name or a {"type": 
> ...} expression.
> org.apache.avro.SchemaParseException: "fixed" is not a defined name. The type 
> of the "id" field must be a defined name or a {"type": ...} expression.
>       at org.apache.avro.Schema.parse(Schema.java:1265)
>       at org.apache.avro.Schema$Parser.parse(Schema.java:1032)
>       at org.apache.avro.Schema$Parser.parse(Schema.java:1020)
>       at 
> org.apache.nifi.processors.standard.ValidateRecord.getValidationSchema(ValidateRecord.java:478)
>       at 
> org.apache.nifi.processors.standard.ValidateRecord.onTrigger(ValidateRecord.java:272)
>       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:1149)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>       at java.lang.Thread.run(Thread.java:748)
> {code}
> Attached template/flow re-create this with a simply generated JSON content 
> passed to a ValidateRecord processor.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to