Return-Path: X-Original-To: apmail-nifi-commits-archive@minotaur.apache.org Delivered-To: apmail-nifi-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A93CD176F3 for ; Mon, 23 Mar 2015 12:25:02 +0000 (UTC) Received: (qmail 35233 invoked by uid 500); 23 Mar 2015 12:24:46 -0000 Delivered-To: apmail-nifi-commits-archive@nifi.apache.org Received: (qmail 35197 invoked by uid 500); 23 Mar 2015 12:24:46 -0000 Mailing-List: contact commits-help@nifi.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.incubator.apache.org Delivered-To: mailing list commits@nifi.incubator.apache.org Received: (qmail 35188 invoked by uid 99); 23 Mar 2015 12:24:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Mar 2015 12:24:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 23 Mar 2015 12:24:45 +0000 Received: (qmail 31882 invoked by uid 99); 23 Mar 2015 12:24:25 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Mar 2015 12:24:25 +0000 Date: Mon, 23 Mar 2015 12:24:24 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: commits@nifi.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (NIFI-396) StandardProcessSession allows InputStream to be accessed after returning from callback MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/NIFI-396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14375806#comment-14375806 ] ASF subversion and git services commented on NIFI-396: ------------------------------------------------------ Commit e05c9fd20e41cbb25f2e86b8a5b5791e6de65bcb in incubator-nifi's branch refs/heads/NIFI-250 from [~mcgilman] [ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=e05c9fd ] Squashed commit of the following: commit 7e96bb903c4051613b5192e81aeaeef7997a9c1d Author: Matt Gilman Date: Sun Mar 22 23:09:18 2015 -0400 Conflicts: nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateRegularExpression.java nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExtractText.java commit 7fc79a34b7bee4b92988a36c64f8585b7fec8d33 Author: Matt Gilman Date: Sun Mar 22 22:40:51 2015 -0400 NIFI-353: - Only showing up to 1.5kb of the content in the hex view. commit 36f11c3d9d8466fa3f207b5fc859375b33370b53 Author: Matt Gilman Date: Sun Mar 22 16:27:19 2015 -0400 NIFI-353: - Disabling the content viewer by default. commit f78f74dc8dcc21e8f01ae65cb17a6db80c2f3a6c Author: Matt Gilman Date: Sun Mar 22 16:24:45 2015 -0400 NIFI-353: - Adding error handling around the call into the content viewer extension. - Using forward instead of include when showing errors. commit b43fe6f935ce5697f551e5a3b30f7703b49f64a7 Author: Matt Gilman Date: Sun Mar 22 00:30:34 2015 -0400 NIFI-353: - Clean up. - Fixing authority check for DFM with check for Provenance. commit 61fc0467437a6fb0b9db4f1331699c23155aa3a6 Author: Matt Gilman Date: Sat Mar 21 22:19:19 2015 -0400 NIFI-353: - Fixing artifact versions. commit 2bd1a18f3ca5258f745ddf4681f79ea2741aaa78 Author: Matt Gilman Date: Fri Mar 20 20:59:44 2015 -0400 NIFI-353: - Fixing artifact versions. commit c2eaa192eae7e977ffd50033a007693f636a6322 Author: Matt Gilman Date: Fri Mar 20 20:15:40 2015 -0400 NIFI-353: - Javadocs. - Updating the styles of the content labels. commit 3410197b7d88444de5c6f74622d67a1b0cc39e6a Author: Matt Gilman Date: Fri Mar 20 19:40:02 2015 -0400 Squashed commit of the following: commit e88ed13d8d7221f5a91588f553d039d3917494be Merge: 93b361e 3f36236 Author: Mark Payne Date: Fri Mar 20 09:11:39 2015 -0400 Merge branch 'inputstream-callback-protection' of https://github.com/rowolabi/incubator-nifi into develop commit 93b361e69bd046d6b2e0f561d8b2231a4505b6a9 Merge: c9eb237 a6740a6 Author: Mark Payne Date: Thu Mar 19 11:49:11 2015 -0400 Merge branch 'develop' of http://git-wip-us.apache.org/repos/asf/incubator-nifi into develop commit c9eb237895a94a27fc6f760b82b16ac3e2cdab95 Author: Mark Payne Date: Thu Mar 19 11:40:01 2015 -0400 NIFI-443: Removed stopFunnel from ProcessGroup because we don't want to allow it commit 8b911c5aab2a4b8283510a3423e3c8962a533b96 Author: Mark Payne Date: Thu Mar 19 11:04:46 2015 -0400 NIFI-443: Always start funnels when added to process group, even when autoResumeState is false commit a6740a6e2c87f4c994d305db55c0777dc4f99976 Author: joewitt Date: Thu Mar 19 01:21:32 2015 -0400 NIFI-399 addressed items in the ticket commit ad18853b589d80331e2f4574bce35d79bce09c28 Author: joewitt Date: Wed Mar 18 10:59:13 2015 -0400 NIFI-399 initial port commit 3f3623647367421cd8eb318668144aca1afb9bf4 Author: Bobby Owolabi Date: Thu Mar 19 01:43:17 2015 -0400 NIFI-396 reverting accidentially modified whitespace in TestStandardProcessSession commit cd183be4410bdc88de7d3a0026452ab62eb10621 Author: Bobby Owolabi Date: Thu Mar 19 01:18:22 2015 -0400 NIFI-396 updated the javadocs of ProcessSession to reflect that a FlowFileAccessExcpetion will be thrown if an Input/Output Stream is attempted to be accessed after the callback is executed. commit e2760f8c980583d285137134e05c435c930fb4d2 Author: Bobby Owolabi Date: Thu Mar 19 00:54:24 2015 -0400 NIFI-396 added a DisableOnCloseInputStream class; modified StandardProcessSession to prevent access of the Input/OutputStreams after callbacks have been executed; updated tests commit 7272d0df58c23d099809bf96993b55d73c617476 Author: Bobby Owolabi Date: Wed Mar 18 23:30:57 2015 -0400 NIFI-396 created tests to demonstrate the situations where the ProcessSession throws an Exception and where it doesn't after it returns from the callback commit eb5ec703ba0d5c188822a37f6d7eed14af56a594 Author: Oscar de la Pena Date: Thu Mar 19 10:10:09 2015 +0800 Fixes incorrect messages count in Provenance reporter. Adds Unit test to verify fix commit b1873d86649d22fcf39956c93371be124a2e161b Author: Matt Gilman Date: Wed Mar 18 23:08:57 2015 -0400 NIFI-353: - Adjusting the layout of the file name and content type. commit 0ebb54a501825cb68134f009c4810fb79e49c39f Merge: ecbccae dea9e22 Author: Matt Gilman Date: Wed Mar 18 21:23:37 2015 -0400 Merge branch 'develop' into NIFI-353 commit ecbccae7343561e25acc9383b64b8c155f2c5700 Merge: 4c44843 1cca300 Author: Matt Gilman Date: Tue Mar 17 23:20:39 2015 -0400 Merge branch 'develop' into NIFI-353 commit 4c448436c5f84ac5bd4b3afad1b75f40c45c6d54 Author: Matt Gilman Date: Tue Mar 17 23:20:24 2015 -0400 NIFI-353: - Modifying the hexview plugin to address html escape issues and no longer rendering the base64 padding characters. commit 1a05c9db63cbbe21e08b40a87da14526653c41e1 Author: joewitt Date: Mon Mar 16 16:58:52 2015 -0400 NIFI-353 merged to latest dev post 002 release and fixed pom references. Viewer looks great commit 2b07b0bc1da9f4da6f40c31258c66afed30ffa4e Merge: f920902 eb757a4 Author: joewitt Date: Mon Mar 16 16:38:08 2015 -0400 Merge branch 'develop' into NIFI-353 commit f92090233fb3ad804cb1881d183592dfd30ffc99 Author: Matt Gilman Date: Sun Mar 15 23:51:31 2015 -0400 NIFI-353: - Addressing issues when running clustered. - Javadocs. commit 73a54eeb859fe9c8822141b59ee79eba8d1e6dff Author: Matt Gilman Date: Sun Mar 15 09:16:24 2015 -0400 NIFI-353: - Adding support for text/plain. commit c117a5c6f16c173ba971097fb9a14e9ed495f25b Author: Matt Gilman Date: Sun Mar 15 08:41:34 2015 -0400 NIFI-353: - Fixing dependency issue. - Setting the default content viewer path. - Restoring correct content type in the standard viewer META-INF. commit 12c867daea51d45b80767f82b1f8cf0ec249bb55 Merge: e7d77fe cc890e2 Author: Matt Gilman Date: Sat Mar 14 10:11:30 2015 -0400 Merge branch 'develop' into NIFI-353 commit e7d77fedbdac106803c553626050e380c8b51287 Author: Matt Gilman Date: Thu Mar 12 23:01:36 2015 -0400 NIFI-353 - Javadocs. - Cleaning up dependencies. commit a81e1ecbf85b34d5af2054b43118830f0d4fbfa3 Merge: 173177c 7198912 Author: Matt Gilman Date: Thu Mar 12 21:40:45 2015 -0400 Merge branch 'develop' into NIFI-353 commit 173177c918e6c07c1c98d807ecc7f8be6d0fa637 Author: Matt Gilman Date: Wed Mar 11 23:21:43 2015 -0400 NIFI-353: - Cleaning up error handling. - Showing the file name and content type. commit 098f9709dc0cac7a475d21c08d72de839260952c Author: Matt Gilman Date: Tue Mar 10 23:21:01 2015 -0400 NIFI-353: - Better error handling when unable to interpret the request, unable to find the content, and no viewer is registered for the detected content type. commit ee28e9de729dad477cc97b46d9a5e9cd9ef84609 Author: Matt Gilman Date: Sun Mar 8 22:57:15 2015 -0400 NIFI-353: - Replacing dependency on tika parsers with icu4j. commit a50a6b6e8bf393bb4d47672f69c13e1fa3bc202c Author: Matt Gilman Date: Sun Mar 8 22:21:49 2015 -0400 NIFI-353: - Allowing the user to toggle between viewing the original content, the formatted content, and the raw bytes in a hex dump. commit d100a2839bb2aef5af0de00f5e78ecc9c7f1ad0a Merge: 347e4e0 342ca17 Author: Matt Gilman Date: Sun Mar 8 13:54:24 2015 -0400 Merge branch 'develop' into NIFI-353 commit 347e4e024d4e990e6eb17a2101c31db79200f7a7 Author: Matt Gilman Date: Thu Mar 5 23:20:39 2015 -0500 NIFI-353: - Updating markup generation flow. - Adding a combo box to view the content in original, formatted, or hex form (still not functional). commit 37b5ca48f43cd3bb80b080e14c7cc2478da859aa Merge: 4819228 5e0026c Author: Matt Gilman Date: Wed Mar 4 21:44:10 2015 -0500 Merge branch 'develop' into NIFI-353 commit 48192289e492ed98bcc433925a70203570223c2a Merge: cc0b6fe 50744bf Author: Matt Gilman Date: Wed Feb 25 22:53:29 2015 -0500 Merge branch 'develop' into NIFI-353 commit cc0b6fe2f2b852457824357ff493b5c4e9d44ccd Author: Matt Gilman Date: Wed Feb 25 22:50:23 2015 -0500 NIFI-353: - Starting to moving the hex viewer into the main content viewer web application that comes bundled in framework. Previously it was only in the standard content viewer extension but we want to be able to render the content in hex for all types of data. commit 60c411de0dab6e0dc099e9b1fb04adfb1c2507f1 Author: Matt Gilman Date: Tue Feb 24 23:15:21 2015 -0500 NIFI-353: - Starting to add support for the hex viewer. commit efe8e06827488b1156edd5ea65e712d2eb675ef2 Author: Matt Gilman Date: Sun Feb 22 21:48:09 2015 -0500 NIFI-353: - Adding support for viewing xml documents. - Adding supporting to fold the json and xml documents. commit 1955926a857daede8091a761e984d22273ada235 Author: Matt Gilman Date: Sat Feb 21 21:49:48 2015 -0500 NIFI-353: - Allowing the content to be obtained by either stream or as a string (with the char encoding detected using tika). - Set the json viewer size during window resize events. commit 43f6e3c0585436176527344febc860586ded3b60 Author: Matt Gilman Date: Sat Feb 21 16:36:43 2015 -0500 NIFI-353: - Starting to add support for viewing JSON. - Updating codemirror to add support for JSON and XML. commit 8f54adf1c1e6cc581ee501d6f1182dac2ff63512 Merge: 605a05b 57b5d58 Author: Matt Gilman Date: Sat Feb 21 08:02:47 2015 -0500 Merge branch 'develop' into NIFI-353 commit 605a05b89f09bd16311d6321d6a1eeee881880b5 Author: Matt Gilman Date: Thu Feb 19 23:15:54 2015 -0500 NIFI-353: - Adding mime type detection using tika. commit bd9ef8431bc66f567d8e526e06f0635de2417254 Author: Matt Gilman Date: Wed Feb 18 23:35:28 2015 -0500 NIFI-353: - Continuing to wire up the content viewer controller to NiFi (standalone/clustered) and the content type specific renderer. commit 2334e4888e48764b93671b8ac2a00d26a07dc3bc Author: Matt Gilman Date: Tue Feb 17 23:00:07 2015 -0500 NIFI-353: - Updating the mark up on the content page. commit 78bab591d1c717077c7ee975c5ab4cf17c02d139 Merge: b1b2eaf 0047fa4 Author: Matt Gilman Date: Tue Feb 17 22:48:33 2015 -0500 Merge branch 'develop' into NIFI-353 commit b1b2eafe807c8f2e6cccb1a51736db8badd5d03b Author: Matt Gilman Date: Tue Feb 17 22:47:26 2015 -0500 NIFI-353: - Creating an interface for retrieving content. - Creating an interface for reading content bytes. - Integrating these concepts into the exiting content viewer controller. commit cd0a1bd42ac4b953cb1d8c979d7041373555882a Author: Matt Gilman Date: Mon Feb 16 17:08:32 2015 -0500 NIFI-353: - Renaming data-viewer to content-viewer. commit 48b1572f177e2292ddbacc92a3a5838cc45c7a42 Author: Matt Gilman Date: Mon Feb 16 15:45:15 2015 -0500 NIFI-353: - Renaming data-viewer to content-viewer. commit b50953d9d22881bcdc34edf1a34557d975b6dcc7 Author: Matt Gilman Date: Sun Feb 15 18:20:17 2015 -0500 NIFI-353: - Starting to integrate the data viewer controller into the Jetty Server. - Starting to set up the data viewer controller. - Starting to set up the standard data viewer. > StandardProcessSession allows InputStream to be accessed after returning from callback > -------------------------------------------------------------------------------------- > > Key: NIFI-396 > URL: https://issues.apache.org/jira/browse/NIFI-396 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework > Reporter: Mark Payne > Labels: beginner > Fix For: 0.1.0 > > > When StandardProcessSession.read(FlowFile, InputStreamCallback) or StandardProcessSession.write(FlowFile, StreamCallback) is called, the InputStream that is provided to the callback can be accessed after returning from the callback. For example: > final ObjectHolder inputStreamHolder = new ObjectHolder<>(null); > session.read(flowFile, new InputStreamCallback() { > @Override > public void process(InputStream in) throws IOException { > inputStreamHolder.set(in); > } > }); > // read from inputStreamHolder.get() > At this point, attempting to read from inputStreamHolder.get() should throw an IOException but does not. > This is because the stream that is returned by StandardProcessSession is wrapping a NonCloseableInputStream. This NonCloseableInputStream should instead be a DisableOnCloseInputStream (which does not exist but should be written in a very similar fashion to DisableOnCloseOutputStream). > The JavaDocs for ProcessSession should also be updated to indicate that the streams provided will be managed by the framework and will not be accessible once the callback returns. -- This message was sent by Atlassian JIRA (v6.3.4#6332)