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 1A068200C13 for ; Mon, 6 Feb 2017 18:53:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 187EA160B56; Mon, 6 Feb 2017 17:53:03 +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 60241160B53 for ; Mon, 6 Feb 2017 18:53:02 +0100 (CET) Received: (qmail 65625 invoked by uid 500); 6 Feb 2017 17:53:01 -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 65616 invoked by uid 99); 6 Feb 2017 17:53:01 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2017 17:53:01 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 08DB9180BB9 for ; Mon, 6 Feb 2017 17:53:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id rItZaT74kNuA for ; Mon, 6 Feb 2017 17:52:59 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id BA9B85F644 for ; Mon, 6 Feb 2017 17:52:58 +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 165A0E0237 for ; Mon, 6 Feb 2017 17:52:42 +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 C7D2925286 for ; Mon, 6 Feb 2017 17:52:41 +0000 (UTC) Date: Mon, 6 Feb 2017 17:52:41 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@nifi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (NIFI-3055) StandardRecordWriter can throw UTFDataFormatException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 06 Feb 2017 17:53:03 -0000 [ https://issues.apache.org/jira/browse/NIFI-3055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15854445#comment-15854445 ] ASF GitHub Bot commented on NIFI-3055: -------------------------------------- Github user jskora commented on the issue: https://github.com/apache/nifi/pull/1470 Closing this PR, committed on [4f72e34](https://git-wip-us.apache.org/repos/asf?p=nifi.git;a=commit;h=4f72e3491f2372c8c45afb96a765c1f5cdd2f07d). > StandardRecordWriter can throw UTFDataFormatException > ----------------------------------------------------- > > Key: NIFI-3055 > URL: https://issues.apache.org/jira/browse/NIFI-3055 > Project: Apache NiFi > Issue Type: Bug > Affects Versions: 1.0.0, 0.7.1 > Reporter: Brandon DeVries > Assignee: Joe Skora > Priority: Blocker > Fix For: 0.8.0, 1.2.0 > > > StandardRecordWriter.writeRecord()\[1] uses DataOutputStream.writeUTF()\[2] without checking the length of the value to be written. If this length is greater than 65535 (2^16 - 1), you get a UTFDataFormatException "encoded string too long..."\[3]. Ultimately, this can result in an IllegalStateException\[4], -bringing a halt to the data flow- causing PersistentProvenanceRepository "Unable to merge with other Journal Files due to..." WARNings. > Several of the field values being written in this way are pre-defined, and thus not likely an issue. However, the "details" field can be populated by a processor, and can be of an arbitrary length. -Additionally, if the detail filed is indexed (which I didn't investigate, but I'm sure is easy enough to determine), then the length might be subject to the Lucene limit discussed in NIFI-2787-. > \[1] https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/StandardRecordWriter.java#L163-L173 > \[2] http://docs.oracle.com/javase/7/docs/api/java/io/DataOutputStream.html#writeUTF%28java.lang.String%29 > \[3] http://stackoverflow.com/questions/22741556/dataoutputstream-purpose-of-the-encoded-string-too-long-restriction > \[4] https://github.com/apache/nifi/blob/5fd4a55791da27fdba577636ac985a294618328a/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/PersistentProvenanceRepository.java#L754-L755 -- This message was sent by Atlassian JIRA (v6.3.15#6346)