You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by "Ricky Nguyen (Updated) (JIRA)" <ji...@apache.org> on 2011/10/27 01:53:32 UTC
[jira] [Updated] (OODT-341) XMLPS should be able to stream large
results
[ https://issues.apache.org/jira/browse/OODT-341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ricky Nguyen updated OODT-341:
------------------------------
Attachment: rickdn-grid-oodt-341.patch
rickdn-xmlps-oodt-341.patch
2 patches, one for xmlps component, one for web grid component.
This proposed solution provides a ResultSetInputStream that wraps a given ResultSet. The internal buffer of the ResultSetInputStream contains a single row of the result, still using the CDERow/CDEValue objects, still using MappingFuncs and constant fields.
Now that I look at this patch again, the CDELargeResult and LargeProductQueryHandler are not required. We could just override the CDEResult#getInputStream() to return a ResultSetInputStream.
> XMLPS should be able to stream large results
> --------------------------------------------
>
> Key: OODT-341
> URL: https://issues.apache.org/jira/browse/OODT-341
> Project: OODT
> Issue Type: Improvement
> Components: xmlps
> Affects Versions: 0.4
> Reporter: Ricky Nguyen
> Fix For: 0.4
>
> Attachments: rickdn-grid-oodt-341.patch, rickdn-xmlps-oodt-341.patch
>
>
> Currently, XMLPS stores *ALL* the rows of a ResultSet in a CDEResult object. In addition, this CDEResult is converted to a String for the HTTPResponse, nearly doubling the memory usage. With large results, heap space can easily run out, despite increasing max heap space for the servlet container (e.g. -Xmx1024m). XMLPS should be able to stream/chunk its results, taking into consideration the following:
> # ResultSets _represent_ an iterable collection of rows without actually _storing_ all the rows in memory
> # HTTPResponse#getOutputStream() offers a streaming response, where chunked transfer-encoding and content-length headers are managed automatically by the servlet container (such as Tomcat)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira