[
https://issues.apache.org/jira/browse/NIFI-8437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17325083#comment-17325083
]
Matthew Lannan commented on NIFI-8437:
--------------------------------------
Looks like a simple fix would be to check if the InputStream is markSupported
before calling reset().
{code:java}
finally { if(contentStream.markSupported()){contentStream.reset(); }}{code}
https://github.com/apache/nifi/blob/7fe8858d22f580ad9dcd96ebafb59dbe5e73f5cb/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/schema/inference/InferSchemaAccessStrategy.java#L54
> RecordReader 'Infer Schema' for large records may throw BufferedInputStream
> error
> ---------------------------------------------------------------------------------
>
> Key: NIFI-8437
> URL: https://issues.apache.org/jira/browse/NIFI-8437
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.12.1
> Environment: Mac, BigSur 11.2.3, 32MB RAM, 8 Core Intel i9, 1 TB
> storage
> Reporter: Matthew Lannan
> Priority: Major
> Labels: easyfix, newbie
> Attachments: Nifi-stack-trace.txt,
> PDF_Encode_Decode_template-with-bug.xml
>
>
> In the RecordReader(s), if the Schema Access Strategy is set to Infer Schema
> and the record is a single large record(tested with record ~50MB), the
> InferSchemaAccessStrategy will error.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)