You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Andrew Gaul (JIRA)" <ji...@apache.org> on 2014/08/26 01:18:58 UTC
[jira] [Resolved] (JCLOUDS-284) Use FileBackedOutputStream for
non-repeatable InputStream payloads
[ https://issues.apache.org/jira/browse/JCLOUDS-284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Gaul resolved JCLOUDS-284.
---------------------------------
Resolution: Fixed
Fix Version/s: 1.8.0
I addressed this issue by removing all in-memory buffering, using streaming classes like `HashingInputStream` where appropriate.
> Use FileBackedOutputStream for non-repeatable InputStream payloads
> ------------------------------------------------------------------
>
> Key: JCLOUDS-284
> URL: https://issues.apache.org/jira/browse/JCLOUDS-284
> Project: jclouds
> Issue Type: Improvement
> Components: jclouds-blobstore
> Affects Versions: 1.6.2, 1.7.0
> Reporter: Andrew Gaul
> Assignee: Andrew Gaul
> Fix For: 1.8.0
>
>
> Presently we call newByteArrayPayload(toByteArray(payload)) when payload is non-repeatable. Instead, we should copy the payload to a FileBackedOutputStream and wrap it in an InputStreamSupplierPayload. Note that this requires lifetime management and calling FileBackedOutputStream.close to remove the temporary file. This change would allow jclouds to limit its memory use, avoiding denial of service situations, and support bigger streaming payload by spooling them to disk. We also need to provide a property to control the per-stream memory usage. Inspired by:
> https://github.com/jclouds/jclouds-karaf/pull/23
--
This message was sent by Atlassian JIRA
(v6.2#6252)