[ https://issues.apache.org/jira/browse/LUCENE-2964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13005220#comment-13005220 ]
Shai Erera commented on LUCENE-2964: ------------------------------------ Big +1 ! What a nice addition Doron. Now I can change my benchmark code to stop looking like I hack Lucene w/ those package names. About the patch, looks good. I have two questions: # Can you pass 'null' to config.get() and then just compare the 'alt' to null in the next line? # Maybe instead of this 'fallback' logic, you always create a packages[] array with the first package being that of PerfTask? Then you can loop over all packages until the first one succeeds. Since this is not a hotspot section (executed once when algorithm is parsed), I think perf-wise we should be ok. It will also mean looking up the alt package names in the config before this method is invoked ... # I'd add a comment to the javadocs that if someone uses the same task name by two packages, then whichever is found first is used. > Allow benchmark tasks from alternative packages > ----------------------------------------------- > > Key: LUCENE-2964 > URL: https://issues.apache.org/jira/browse/LUCENE-2964 > Project: Lucene - Java > Issue Type: Improvement > Components: contrib/benchmark > Reporter: Doron Cohen > Assignee: Doron Cohen > Priority: Minor > Fix For: 3.2, 4.0 > > Attachments: LUCENE-2964.patch > > > Relax current limitation of all tasks in same package - that of PerfTask. > Add a property "alt.tasks.packages" - its value are comma separated full > package names. > If the task class is not found in the default package, an attempt is made to > load it from the alternate packages specified in that property. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org