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

Shai Erera edited comment on LUCENE-1774 at 8/3/09 6:55 AM:
------------------------------------------------------------

I like that idea. DeleteDocTask today defines a "delete.log.step", but it's 
defined only for that task. There is no "search.log.step" for example. 

Having a pattern like log.step.<Task Class name> will allow us to support it in 
PerfTask by doing something like:
{code}
    logStep = config.get("log.step", DEFAULT_LOG_STEP);
    if (logStep <= 0) {
      logStep = Integer.MAX_VALUE;
    }

    // Check if a log step for the current task is defined
    logStep = config.get("log.step." + getClass().getSimpleName(), 
DEFAULT_LOG_STEP);
    if (logStep <= 0) {
      logStep = Integer.MAX_VALUE;
    }

{code}

And so we can support a log.step for any task, irregardless of whether that 
task included support for it or not. And we can remove the delete.log.step 
param (new in 2.9 so no problem). Note that the above code is 1.5 dependent, 
but I can make it 1.4 compliant w/ a TODO to switch to getSimpleName() in 1.5.

What do you think? Shall I open an issue for that? Or can you reopen that issue 
and I'll prepare a patch?

      was (Author: shaie):
    I like that idea. DeleteDocTask today defines a "delete.log.step", but it's 
defined only for that task. There is no "search.log.step" for example. 

Having a pattern like log.step.<Task Class name> will allow us to support it in 
PerfTask by doing something like:
{code}
    logStep = config.get("log.step", DEFAULT_LOG_STEP);
    if (logStep <= 0) {
      logStep = Integer.MAX_VALUE;
    }

    // Check if a log step for the current task is defined
    logStep = config.get("log.step" + getClass().getSimpleName(), 
DEFAULT_LOG_STEP);
    if (logStep <= 0) {
      logStep = Integer.MAX_VALUE;
    }

{code}

And so we can support a log.step for any task, irregardless of whether that 
task included support for it or not. And we can remove the delete.log.step 
param (new in 2.9 so no problem). Note that the above code is 1.5 dependent, 
but I can make it 1.4 compliant w/ a TODO to switch to getSimpleName() in 1.5.

What do you think? Shall I open an issue for that? Or can you reopen that issue 
and I'll prepare a patch?
  
> In a benchmark alg, if you use a log.step thats higher than the number of 
> docs you add, whacky high numbers are logged for doc adds
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1774
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1774
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/benchmark
>            Reporter: Mark Miller
>            Priority: Trivial
>


-- 
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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to