Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EA75A200CD9 for ; Thu, 3 Aug 2017 20:15:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E8E9416C026; Thu, 3 Aug 2017 18:15:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 145F416BFAC for ; Thu, 3 Aug 2017 20:15:05 +0200 (CEST) Received: (qmail 56547 invoked by uid 500); 3 Aug 2017 18:15:05 -0000 Mailing-List: contact issues-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list issues@nifi.apache.org Received: (qmail 56538 invoked by uid 99); 3 Aug 2017 18:15:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2017 18:15:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id BC9F11A08E9 for ; Thu, 3 Aug 2017 18:15:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id TBgj0x51s8xa for ; Thu, 3 Aug 2017 18:15:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id DB6315FCE2 for ; Thu, 3 Aug 2017 18:15:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 1262FE0D39 for ; Thu, 3 Aug 2017 18:15:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 74B352464E for ; Thu, 3 Aug 2017 18:15:00 +0000 (UTC) Date: Thu, 3 Aug 2017 18:15:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@nifi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (NIFI-4215) Avro schemas with records that have a field of themselves fail to parse, causing stackoverflow exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 03 Aug 2017 18:15:07 -0000 [ https://issues.apache.org/jira/browse/NIFI-4215?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16113= 222#comment-16113222 ]=20 ASF GitHub Bot commented on NIFI-4215: -------------------------------------- GitHub user Wesley-Lawrence opened a pull request: https://github.com/apache/nifi/pull/2052 NIFI-4215 NiFi can now parse an Avro schema of a record that referenc= =E2=80=A6 =E2=80=A6es an already defined record, including itself. =20 Thank you for submitting a contribution to Apache NiFi. =20 In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: =20 ### For all changes: - [=E2=9C=93] Is there a JIRA ticket associated with this PR? Is it ref= erenced=20 in the commit message? =20 - [=E2=9C=93] Does your PR title start with NIFI-XXXX where XXXX is the= JIRA number you are trying to resolve? Pay particular attention to the hyp= hen "-" character. =20 - [=E2=9C=93] Has your PR been rebased against the latest commit within= the target branch (typically master)? =20 - [=E2=9C=93] Is your initial contribution a single, squashed commit? =20 ### For code changes: - [=E2=9C=93] Have you ensured that the full suite of tests is executed= via mvn -Pcontrib-check clean install at the root nifi folder? - [=E2=9C=93] Have you written or updated unit tests to verify your cha= nges? - [N/A] If adding new dependencies to the code, are these dependencies = licensed in a way that is compatible for inclusion under [ASF 2.0](http://w= ww.apache.org/legal/resolved.html#category-a)?=20 - [N/A] If applicable, have you updated the LICENSE file, including the= main LICENSE file under nifi-assembly? - [N/A] If applicable, have you updated the NOTICE file, including the = main NOTICE file found under nifi-assembly? - [N/A] If adding new Properties, have you added .displayName in additi= on to .name (programmatic access) for each of the new properties? =20 ### For documentation related changes: - [N/A] Have you ensured that format looks appropriate for the output i= n which it is rendered? =20 ### Note: Please ensure that once the PR is submitted, you check travis-ci for bu= ild issues and submit an update to your PR as soon as possible. You can merge this pull request into a Git repository by running: $ git pull https://github.com/Wesley-Lawrence/nifi NIFI-4215 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/2052.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2052 =20 ---- commit 2423fd346031bbb66124863250080b356d029d90 Author: Wesley-Lawrence Date: 2017-08-03T17:48:31Z NIFI-4215 NiFi can now parse an Avro schema of a record that references= an already defined record, including itself. ---- > Avro schemas with records that have a field of themselves fail to parse, = causing stackoverflow exception > -------------------------------------------------------------------------= ------------------------------- > > Key: NIFI-4215 > URL: https://issues.apache.org/jira/browse/NIFI-4215 > Project: Apache NiFi > Issue Type: Bug > Affects Versions: 1.4.0 > Reporter: Wesley L Lawrence > Priority: Minor > Attachments: nifi-4215.patch > > > Noticed this while attempting to use the AvroSchemaRegsitry with some com= plex schema. Boiled down, Avro lets you define a schema such as; > {code} > {=20 > "namespace": "org.apache.nifi.testing",=20 > "name": "CompositRecord",=20 > "type": "record",=20 > "fields": [=20 > {=20 > "name": "id",=20 > "type": "int"=20 > },=20 > {=20 > "name": "value",=20 > "type": "string"=20 > },=20 > {=20 > "name": "parent",=20 > "type": [ > "null", > "CompositRecord" > ] > }=20 > ]=20 > } > {code} > The AvroSchemaRegistry (AvroTypeUtil specifically) will fail to parse, an= d generate a stackoverflow exception. > I've whipped up a fix, tested it out in 1.4.0, and am just running throug= h the contrib build before I submit a patch. -- This message was sent by Atlassian JIRA (v6.4.14#64029)