[
https://issues.apache.org/jira/browse/NIFI-4883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pierre Villard resolved NIFI-4883.
----------------------------------
Resolution: Fixed
Assignee: Mark Payne
Fix Version/s: 1.6.0
> VaridateRecord processor should be able to use different schema for valid and
> invalid records
> ---------------------------------------------------------------------------------------------
>
> Key: NIFI-4883
> URL: https://issues.apache.org/jira/browse/NIFI-4883
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Koji Kawamura
> Assignee: Mark Payne
> Priority: Major
> Fix For: 1.6.0
>
>
> ValidateRecord uses the same record schema for both valid and invalid
> outgoing FlowFiles. When the processor writes invalid records using the
> schema which is incompatible for the invalid records will not be able to
> write such records and throws Exception like this:
> {code}
> 2018-02-15 10:15:09,311 ERROR [Timer-Driven Process Thread-2]
> o.a.n.processors.standard.ValidateRecord ValidateRecord[id
> =2f5c7438-b406-3811-82f4-4d8122cc87eb]
> ValidateRecord[id=2f5c7438-b406-3811-82f4-4d8122cc87eb] failed to process
> session
> due to java.lang.NumberFormatException: For input string: "01/01/1900": {}
> java.lang.NumberFormatException: For input string: "01/01/1900"
> at
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> at java.lang.Long.parseLong(Long.java:589)
> at java.lang.Long.parseLong(Long.java:631)
> at
> org.apache.nifi.serialization.record.util.DataTypeUtils.toLong(DataTypeUtils.java:822)
> at
> org.apache.nifi.avro.AvroTypeUtil.convertToAvroObject(AvroTypeUtil.java:494)
> at
> org.apache.nifi.avro.AvroTypeUtil.createAvroRecord(AvroTypeUtil.java:456)
> at
> org.apache.nifi.avro.WriteAvroResultWithSchema.writeRecord(WriteAvroResultWithSchema.java:60)
> at
> org.apache.nifi.serialization.AbstractRecordSetWriter.write(AbstractRecordSetWriter.java:59)
> at
> org.apache.nifi.processors.standard.ValidateRecord.onTrigger(ValidateRecord.java:328)
> at
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
> at
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122)
> {code}
> ValidateRecord processor should support different schema for invalid
> FlowFiles. It could be all String type auto generated schema.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)