You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Doron Cohen (JIRA)" <ji...@apache.org> on 2007/03/16 02:23:09 UTC

[jira] Resolved: (LUCENE-829) StandardBenchmarker#makeDocument does not explicitly close opened files

     [ https://issues.apache.org/jira/browse/LUCENE-829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doron Cohen resolved LUCENE-829.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2
    Lucene Fields: [Patch Available]  (was: [New])

Commited the fix for this. 
There were actually two more cases like this. 

Thanks Karl!


> StandardBenchmarker#makeDocument does not explicitly close opened files
> -----------------------------------------------------------------------
>
>                 Key: LUCENE-829
>                 URL: https://issues.apache.org/jira/browse/LUCENE-829
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Karl Wettin
>         Assigned To: Doron Cohen
>             Fix For: 2.2
>
>         Attachments: LUCENE-829.patch
>
>
> StandardBenchmarker#makeDocument(File in, String[] tags, boolean stored, boolean tokenized, boolean tfv)
>         BufferedReader reader = new BufferedReader(new FileReader(in));
> Above reader is not closed until GC hits it. Can cause problems in cases where ulimit is set too low.
> I did this:
>         while ((line = reader.readLine()) != null)
>         {
>             body.append(line).append(' ');
>         }
> +        reader.close();

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Re: [jira] Resolved: (LUCENE-829) StandardBenchmarker#makeDocument does not explicitly close opened files

Posted by Doron Cohen <DO...@il.ibm.com>.
karl wettin <ka...@gmail.com> wrote on 17/03/2007 09:43:45:

> Also found this in ReutersQueryMaker:
>
> private void prepareQueries() throws Exception {
>      // analyzer (default is standard analyzer)
>      Analyzer anlzr= (Analyzer) Class.forName(config.get("analyzer",
>      "org.apache.lucene.analysis.StandardAnalyzer")).newInstance();
>
>
> It should be
>
>
> "org.apache.lucene.analysis.standard.StandardAnalyzer")).newInstance();
>

Nice catch, I fixed that (and the 3 more like this).
Thanks Karl!

- Doron

>
> --
> karl


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Re: [jira] Resolved: (LUCENE-829) StandardBenchmarker#makeDocument does not explicitly close opened files

Posted by karl wettin <ka...@gmail.com>.
16 mar 2007 kl. 02.23 skrev Doron Cohen (JIRA):

>
>      [ https://issues.apache.org/jira/browse/LUCENE-829? 
> page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Doron Cohen resolved LUCENE-829.
> --------------------------------
>
>        Resolution: Fixed
>     Fix Version/s: 2.2
>     Lucene Fields: [Patch Available]  (was: [New])
>
> Commited the fix for this.
> There were actually two more cases like this.

Also found this in ReutersQueryMaker:

private void prepareQueries() throws Exception {
     // analyzer (default is standard analyzer)
     Analyzer anlzr= (Analyzer) Class.forName(config.get("analyzer",
     "org.apache.lucene.analysis.StandardAnalyzer")).newInstance();


It should be

      
"org.apache.lucene.analysis.standard.StandardAnalyzer")).newInstance();


-- 
karl

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org