You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Dominik Przybysz (Jira)" <ji...@apache.org> on 2020/10/05 07:15:00 UTC

[jira] [Updated] (NIFI-7882) Null as default value in avro generates exception

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

Dominik Przybysz updated NIFI-7882:
-----------------------------------
    Description: 
When I have a record without value for fields, then missing fields will be populated with default values from schema. It was added in https://issues.apache.org/jira/browse/NIFI-4030

But when null is default value then avro 1.8.1 returns org.apache.avro.JsonProperties$Null which cannot be converted to null value (the issue in avro is described in https://issues.apache.org/jira/browse/AVRO-1954) and processors fail with error:

{code}
ERROR o.a.n.p.standard.ConvertRecord - ConvertRecord[id=37460cbe-17f1-4456-a6b9-f4ed1baa4c45] Failed to process FlowFile[0,436030859382835.mockFlowFile,161B]; will route to failure: org.apache.avro.file.DataFileWriter$AppendWriteException: org.apache.avro.AvroRuntimeException: Unknown datum type org.apache.avro.JsonProperties$Null: org.apache.avro.JsonProperties$Null@1723f29f
{code}

Probably Apache Nifi should upgrade to newer avro or backport the fix from avro 1.9.x to AvroTypeUtil

  was:
When I have a record without value for fields, then missing fields will be populated with default values from schema. It was added in https://issues.apache.org/jira/browse/NIFI-4030

But when null is default value then avro 1.8.1 returns org.apache.avro.JsonProperties$Null which cannot be converted to null value (the issue in avro is described in https://issues.apache.org/jira/browse/AVRO-1954)

Probably Apache Nifi should upgrade to newer avro or backport the fix from avro 1.9.x to AvroTypeUtil


> Null as default value in avro generates exception
> -------------------------------------------------
>
>                 Key: NIFI-7882
>                 URL: https://issues.apache.org/jira/browse/NIFI-7882
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.12.1
>            Reporter: Dominik Przybysz
>            Priority: Major
>
> When I have a record without value for fields, then missing fields will be populated with default values from schema. It was added in https://issues.apache.org/jira/browse/NIFI-4030
> But when null is default value then avro 1.8.1 returns org.apache.avro.JsonProperties$Null which cannot be converted to null value (the issue in avro is described in https://issues.apache.org/jira/browse/AVRO-1954) and processors fail with error:
> {code}
> ERROR o.a.n.p.standard.ConvertRecord - ConvertRecord[id=37460cbe-17f1-4456-a6b9-f4ed1baa4c45] Failed to process FlowFile[0,436030859382835.mockFlowFile,161B]; will route to failure: org.apache.avro.file.DataFileWriter$AppendWriteException: org.apache.avro.AvroRuntimeException: Unknown datum type org.apache.avro.JsonProperties$Null: org.apache.avro.JsonProperties$Null@1723f29f
> {code}
> Probably Apache Nifi should upgrade to newer avro or backport the fix from avro 1.9.x to AvroTypeUtil



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