[
https://issues.apache.org/jira/browse/JENA-44?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13091078#comment-13091078
]
Paolo Castagna commented on JENA-44:
------------------------------------
Hi Stephen, thanks. Your patch for JENA-44 is great as well as the work you
have done for JENA-99. It made this tiny and trivial which is good.
However, I am not completely clear on what happens if cancel is called on a
QueryIterSort.
I saw that there is a TODO "Port the tests below to use the new DataBags",
however those tests from the tests for ExternalBindingSort which had a flag to
be cancelled. Should we have a Canceable interface and should DataBag<T>
extends Canceable? Or, this is not necessary and we can just catch
QueryCancelledException and call close() as you have done in
SortedBindingIterator.
I've tried to port the tests in TestSortedDataBag to use the new DataBags, but
I struggled because there is not notion of cancellation for DataBags.
> Support external sorting of bindings in ARQ
> -------------------------------------------
>
> Key: JENA-44
> URL: https://issues.apache.org/jira/browse/JENA-44
> Project: Jena
> Issue Type: New Feature
> Components: ARQ
> Reporter: Sam Tunnicliffe
> Assignee: Paolo Castagna
> Priority: Minor
> Attachments: JENA-44-0.patch,
> JENA-44-Depends-on-JENA-99-r1157891.patch, JENA-44_ARQ_r1156212.patch,
> JENA-44_ARQ_r8531.patch, JENA-44_ARQ_r8724.patch
>
>
> In QueryIterSort, the sorting of the contents of an Iterator<Binding> is done
> in memory, using Arrays.sort. This can be problematic where the set to be
> sorted is large. A possible solution could be to use an external, disk-backed
> algorithm. A hybrid approach may be better, whereby we attempt the in-memory
> sort, but when the number of bindings encountered goes over a certain number,
> resort to the disk-backed variant.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira