[ 
https://issues.apache.org/jira/browse/LUCENE-3635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172340#comment-13172340
 ] 

Shai Erera commented on LUCENE-3635:
------------------------------------

Thanks Doron. I ended up implementing as you propose, but first collecting all 
Closeables into an ArrayList and then calling IOUtils.close() .. it simplifies 
the code (i.e., in your example, I'd need to try-catch IOE and throw the first 
one that I've encountered, but still iterate on all).

I'll commit this to trunk and 3x.
                
> Allow setting arbitrary objects on PerfRunData
> ----------------------------------------------
>
>                 Key: LUCENE-3635
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3635
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/benchmark
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>         Attachments: LUCENE-3635.patch
>
>
> PerfRunData is used as the intermediary objects between PerfRunTasks. Just 
> like we can set IndexReader/Writer on it, it will be good if it allows 
> setting other arbitrary objects that are e.g. created by one task and used by 
> another.
> A recent example is the enhancement to the benchmark package following the 
> addition of the facet module. We had to add TaxoReader/Writer.
> The proposal is to add a HashMap<String, Object> that custom PerfTasks can 
> set()/get(). I do not propose to move IR/IW/TR/TW etc. into that map. If 
> however people think that we should, I can do that as well.

--
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to