You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Pierre Villard (JIRA)" <ji...@apache.org> on 2018/11/08 08:39:00 UTC
[jira] [Updated] (NIFI-5800) If RecordSchema has an inner field
that references a schema recursively by name, hashCode() throws
StackOverflowError
[ https://issues.apache.org/jira/browse/NIFI-5800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pierre Villard updated NIFI-5800:
---------------------------------
Component/s: Core Framework
> If RecordSchema has an inner field that references a schema recursively by name, hashCode() throws StackOverflowError
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-5800
> URL: https://issues.apache.org/jira/browse/NIFI-5800
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Major
> Fix For: 1.9.0
>
>
> If we have a schema where a field is of type RECORD and references an outer-level schema, we get StackOverflowError. For example:
> {
> "name": "person",
> "namespace": "nifi",
> "type": "record",
> "fields": [
> { "name": "name", "type": "string" },
> { "name": "mother", "type": "person" }
> ]
> }
> In this case, if we attempt to add this schema to a HashMap, we get the following error:
> 2018-11-07 19:09:33,021 ERROR [Timer-Driven Process Thread-38] o.a.n.p.k.pubsub.ConsumeKafkaRecord_2_0 ConsumeKafkaRecord_2_0[id=ef6bd50b-0166-1000-ffff-fffff55a7995] Exception while processing data from kafka so will close the lease org.apache.nifi.processors.kafka.pubsub.ConsumerPool$SimpleConsumerLease@26706081 due to java.lang.StackOverflowError: java.lang.StackOverflowError
> java.lang.StackOverflowError: null
> at java.util.AbstractList.hashCode(AbstractList.java:540)
> at java.util.Collections$UnmodifiableList.hashCode(Collections.java:1307)
> at org.apache.nifi.serialization.SimpleRecordSchema.hashCode(SimpleRecordSchema.java:172)
> at org.apache.nifi.serialization.record.type.RecordDataType.hashCode(RecordDataType.java:45)
> at org.apache.nifi.serialization.record.type.ArrayDataType.hashCode(ArrayDataType.java:44)
> at org.apache.nifi.serialization.record.RecordField.hashCode(RecordField.java:108)
> at java.util.AbstractList.hashCode(AbstractList.java:541)
> at java.util.Collections$UnmodifiableList.hashCode(Collections.java:1307)
> at org.apache.nifi.serialization.SimpleRecordSchema.hashCode(SimpleRecordSchema.java:172)
> at org.apache.nifi.serialization.record.type.RecordDataType.hashCode(RecordDataType.java:45)
> at org.apache.nifi.serialization.record.type.ArrayDataType.hashCode(ArrayDataType.java:44)
> at org.apache.nifi.serialization.record.RecordField.hashCode(RecordField.java:108)
> at java.util.AbstractList.hashCode(AbstractList.java:541)
> at java.util.Collections$UnmodifiableList.hashCode(Collections.java:1307)
> at org.apache.nifi.serialization.SimpleRecordSchema.hashCode(SimpleRecordSchema.java:172)
> at org.apache.nifi.serialization.record.type.RecordDataType.hashCode(RecordDataType.java:45)
> at org.apache.nifi.serialization.record.type.ArrayDataType.hashCode(ArrayDataType.java:44)
> at org.apache.nifi.serialization.record.RecordField.hashCode(RecordField.java:108)
> at java.util.AbstractList.hashCode(AbstractList.java:541)
> at java.util.Collections$UnmodifiableList.hashCode(Collections.java:1307)
> at org.apache.nifi.serialization.SimpleRecordSchema.hashCode(SimpleRecordSchema.java:172)
> at org.apache.nifi.serialization.record.type.RecordDataType.hashCode(RecordDataType.java:45)
> at org.apache.nifi.serialization.record.type.ArrayDataType.hashCode(ArrayDataType.java:44)
> at org.apache.nifi.serialization.record.RecordField.hashCode(RecordField.java:108)
> at java.util.AbstractList.hashCode(AbstractList.java:541)
> at java.util.Collections$UnmodifiableList.hashCode(Collections.java:1307)
> at org.apache.nifi.serialization.SimpleRecordSchema.hashCode(SimpleRecordSchema.java:172)
> at org.apache.nifi.serialization.record.type.RecordDataType.hashCode(RecordDataType.java:45)
> at org.apache.nifi.serialization.record.type.ArrayDataType.hashCode(ArrayDataType.java:44)
> at org.apache.nifi.serialization.record.RecordField.hashCode(RecordField.java:108)
> at java.util.AbstractList.hashCode(AbstractList.java:541)
> at java.util.Collections$UnmodifiableList.hashCode(Collections.java:1307)
> ...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)