[Mondrian] Multithreading, Parallel Batch / Query Execution

Tushar Apshankar tapshank at thoughtworks.com
Wed Apr 25 08:57:32 EDT 2007


To improve performance, we started looking at ReentrantReadWriteLock and 
ConcurrentHashMap (from java.util.concurrent) package.
We are also looking at ThreadPoolExecutor and related classes to implment 
parallel query / batch execution (most of these classes are also available 
in java.util.concurrent as well as backport jar).
Since compatibility with Java 1.4 is essential, we started looking at the 
build script retroweave target that uses Retroweaver 1.2.4.

Retroweaver without our changes works fine. We ran into problems while 
using the current retroweaver version and build target after our changes. 

We have a simple class LockTest to reproduce the problem:
package mondrian;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.concurrent.locks.Lock;

public class LockTest {
    ConcurrentHashMap<String, String> cache = new 
ConcurrentHashMap<String, String>();
    ReentrantReadWriteLock lock;
    Lock r ; 
    Lock w ;
    public LockTest()
        cache = new ConcurrentHashMap();
        lock = new ReentrantReadWriteLock();
        System.out.println("Before lock = " + lock);
        w = lock.writeLock();
        r = lock.readLock();
        System.out.println("After lock = " + lock);

    public static void main(String[] args) {
        LockTest lt = new LockTest();
        System.out.println("i am inside main method");
When we retroweave it with retroweaver 1.2.4 (using ANT as well as 
retroweaver UI) and run the weaved class using Java 1.4.2, we get 
java.lang.NoSuchMethodError. Stack is:

[Loaded java.lang.StackTraceElement from C:\j2sdk1.4.2_14\jre\lib\rt.jar]
        at mondrian.LockTest.<init>(LockTest.java:26)
        at mondrian.LockTest.main(LockTest.java:34):

We have backport jar in our class path (please note that we are NOT 
getting ClassNotFoundExcecption).
Did someone face this issue earlier? Please let us know if we are missing 
something here.

We also tried out retroweaver 2.0 without success.

As an alternative, we tried Retrotranslator(
http://retrotranslator.sourceforge.net) and everything worked in first 
attempt. We propose to create a new target for Retrotranslator and add the 
related libraries. Please let us know your thoughts on this

Thanks and regards,
Tushar, Ajit

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20070425/6046b78f/attachment.html 

More information about the Mondrian mailing list