[Mondrian] Mapping user requests to mondrian MDX and SQL

Baldwin, Bob robert.w.baldwin at truvenhealth.com
Fri Apr 4 10:02:12 EDT 2014

We are currently trying to map a user request for a report to the MDX and the SQL generated by Mondrian.

To do this we are intercepting the "mondrian.mdx" and "mondrian.sql" loggers with a new slf4j appender (we are bridging log4j to slf4j) to write the MDX and subsequent SQL to a database log. In an attempt to map the MDX and SQL to a specific request by user, we are setting MDC values to be used by the appender when Mondrian kicks off the log. This works fine if enough time occurs between requests to Mondrian as a new executor thread is created.

The problem, for us, occurs when a the executor thread is reused. Instead of the new MDC values being propagated to the executor, they are persisting because it's the same thread, instead of a new one which would inherit the new MDC properties from the parent thread.

Is there a way to accurately track the MDX and SQL ran per request to Mondrian and map that back to the requesting thread? I suspect forcing a new executor thread every time would solve this (if possible) but I worry about the performance implications of doing that.

Thanks for any help/direction.

Truven Health Analytics
Bob Baldwin
Software Engineer

Truven Health Analytics
O: 734.786.5365
robert.w.baldwin at truvenhealth.com<mailto:robert.w.baldwin at truvenhealth.com>

[Truven Health Analytics]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20140404/5ea960cb/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 3803 bytes
Desc: image001.gif
Url : http://lists.pentaho.org/pipermail/mondrian/attachments/20140404/5ea960cb/attachment-0001.gif 

More information about the Mondrian mailing list