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

Michael McCandless commented on LUCENE-1591:
--------------------------------------------

I had some trouble w/ the patch...

First, I had to edit contrib/benchmark's build.xml to add the compress JAR onto 
the classpath (things wouldn't compile otherwise).

Then I see failures in TestPerfTasksParse, eg:

{code}
    [junit] java.lang.Exception: Error: cannot understand algorithm!
    [junit]     at 
org.apache.lucene.benchmark.byTask.Benchmark.<init>(Benchmark.java:63)
    [junit]     at 
org.apache.lucene.benchmark.byTask.TestPerfTasksParse.doTestAllTasksSimpleParse(TestPerfTasksParse.java:171)
    [junit]     at 
org.apache.lucene.benchmark.byTask.TestPerfTasksParse.testAllTasksSimpleParse(TestPerfTasksParse.java:140)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [junit]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [junit]     at java.lang.reflect.Method.invoke(Method.java:597)
    [junit]     at junit.framework.TestCase.runTest(TestCase.java:164)
    [junit]     at junit.framework.TestCase.runBare(TestCase.java:130)
    [junit]     at junit.framework.TestResult$1.protect(TestResult.java:106)
    [junit]     at junit.framework.TestResult.runProtected(TestResult.java:124)
    [junit]     at junit.framework.TestResult.run(TestResult.java:109)
    [junit]     at junit.framework.TestCase.run(TestCase.java:120)
    [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:230)
    [junit]     at junit.framework.TestSuite.run(TestSuite.java:225)
    [junit]     at 
org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
    [junit]     at 
junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
    [junit]     at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
    [junit]     at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
    [junit]     at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
    [junit] Caused by: java.lang.reflect.InvocationTargetException
    [junit]     at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [junit]     at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    [junit]     at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    [junit]     at 
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    [junit]     at 
org.apache.lucene.benchmark.byTask.utils.Algorithm.<init>(Algorithm.java:69)
    [junit]     at 
org.apache.lucene.benchmark.byTask.Benchmark.<init>(Benchmark.java:61)
    [junit]     ... 19 more
    [junit] Caused by: java.lang.IllegalArgumentException: line.file.out must 
be set
    [junit]     at 
org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask.<init>(WriteLineDocTask.java:73)
    [junit]     ... 25 more
{code}

And the new LineDocMakerTest fails with this:
{code}
    [junit] Testcase: 
testBZip2WithBzipCompressionDisabled(org.apache.lucene.benchmark.byTask.feeds.LineDocMakerTest):
  FAILED
    [junit] expected:<1> but was:<0>
    [junit] junit.framework.AssertionFailedError: expected:<1> but was:<0>
    [junit]     at 
org.apache.lucene.benchmark.byTask.feeds.LineDocMakerTest.doIndexAndSearchTest(LineDocMakerTest.java:96)
    [junit]     at 
org.apache.lucene.benchmark.byTask.feeds.LineDocMakerTest.testBZip2WithBzipCompressionDisabled(LineDocMakerTest.java:119)
{code}

WriteLineDocTest shows a similar failure.  Not sure what's up...

> Enable bzip compression in benchmark
> ------------------------------------
>
>                 Key: LUCENE-1591
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1591
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: contrib/benchmark
>            Reporter: Shai Erera
>             Fix For: 2.9
>
>         Attachments: commons-compress-dev20090413.jar, 
> commons-compress-dev20090413.jar, LUCENE-1591.patch, LUCENE-1591.patch, 
> LUCENE-1591.patch, LUCENE-1591.patch
>
>
> bzip compression can aid the benchmark package by not requiring extracting 
> bzip files (such as enwiki) in order to index them. The plan is to add a 
> config parameter bzip.compression=true/false and in the relevant tasks either 
> decompress the input file or compress the output file using the bzip streams.
> It will add a dependency on ant.jar which contains two classes similar to 
> GZIPOutputStream and GZIPInputStream which compress/decompress files using 
> the bzip algorithm.
> bzip is known to be superior in its compression performance to the gzip 
> algorithm (~20% better compression), although it does the 
> compression/decompression a bit slower.
> I wil post a patch which adds this parameter and implement it in 
> LineDocMaker, EnwikiDocMaker and WriteLineDoc task. Maybe even add the 
> capability to DocMaker or some of the super classes, so it can be inherited 
> by all sub-classes.

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