You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Dayakar Morem (Jira)" <ji...@apache.org> on 2020/01/18 12:02:00 UTC
[jira] [Issue Comment Deleted] (NIFI-7043) UpdateRecord fails to
write schema when the record writer's Schema Access Strategy is set to
Inherit Record Schema
[ https://issues.apache.org/jira/browse/NIFI-7043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dayakar Morem updated NIFI-7043:
--------------------------------
Comment: was deleted
(was: [~asdaraujo], I tried to reproduce the issue by using the attached UpdateRecord.xml template (with Schema Access Strategy set to Inherit Record Schema) but did not get any exception.
input: [\{"id":1,"response":{"now":null}}]
output: [\{"id":1,"response":{"now":null},"new":"1"}]
So please provide more details about this issue to reproduce so that I can check and fix if any issue in Nifi code. Thanks.)
> UpdateRecord fails to write schema when the record writer's Schema Access Strategy is set to Inherit Record Schema
> ------------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-7043
> URL: https://issues.apache.org/jira/browse/NIFI-7043
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.10.0
> Reporter: Andre Araujo
> Priority: Major
> Attachments: UpdateRecord.xml
>
>
> When using an UpdateRecord processor with JsonRecordSetWriter, with Schema Access Strategy set to Inherit Record Schema, I get the exception shown below.
> This is a regression. The same flow works on NiFi 1.9.x without problems.
> As a workaround, if I change the record writer's to get the schema directly from Schema Registry, instead of inheriting it, the flow works fine.
> {code:java}
> 2020-01-17 19:56:09,289 ERROR org.apache.nifi.processors.standard.UpdateRecord: UpdateRecord[id=bdfc4119-9eaa-3a0b-ba6c-90f138fd70a9] Failed to process StandardFlowFileRecord[uuid=c0ba0dc9-fb4d-430a-8f21-c41f3cb29319,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1579290967244-1, container=default, section=1], offset=34, length=34],offset=0,name=c0ba0dc9-fb4d-430a-8f21-c41f3cb29319,size=34]; will route to failure: org.apache.nifi.processor.exception.ProcessException: Cannot write Schema Reference as Attributes because it does not contain a Schema Identifier
> org.apache.nifi.processor.exception.ProcessException: Cannot write Schema Reference as Attributes because it does not contain a Schema Identifier
> at org.apache.nifi.processors.standard.AbstractRecordProcessor$1.process(AbstractRecordProcessor.java:168)
> at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2997)
> at org.apache.nifi.processors.standard.AbstractRecordProcessor.onTrigger(AbstractRecordProcessor.java:122)
> 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)
> Caused by: org.apache.nifi.schema.access.SchemaNotFoundException: Cannot write Schema Reference as Attributes because it does not contain a Schema Identifier
> at org.apache.nifi.schema.access.HortonworksAttributeSchemaReferenceWriter.validateSchema(HortonworksAttributeSchemaReferenceWriter.java:62)
> at org.apache.nifi.serialization.SchemaRegistryRecordSetWriter.getSchemaAccessWriter(SchemaRegistryRecordSetWriter.java:150)
> at org.apache.nifi.json.JsonRecordSetWriter.createWriter(JsonRecordSetWriter.java:213)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:87)
> at com.sun.proxy.$Proxy124.createWriter(Unknown Source)
> at org.apache.nifi.processors.standard.AbstractRecordProcessor$1.process(AbstractRecordProcessor.java:150)
> ... 14 common frames omitted
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)