[Mondrian] LastNonEmpty CellRequestQuantumExceededException

Matt Campbell mcampbell at pentaho.com
Wed Nov 26 09:41:34 EST 2014


Hi Hilario,

CellRequestQuantumExceededException gets thrown when the number of cell requests exceeds the defined threshold (100K by default).  It’s not really an exception, though. It’s a way of short-circuiting evaluation so that the already batched set of requests can be processed.

Given that your query is pulling 200 years of month level members within the LNE, and then evaluating that in the context of each of a few hundred cities, I guess it’s not surprising that you would exceed the threshold.

Just as an aside, there’s couple of things I note with your query:  first, you’re doing an Aggregate() of what LastNonEmpty returns.  LNE returns a single member, so there’s no reason to Aggregate.  You could just use a tuple.  Second, the query is grabbing the LNE month in the context of each city.  This incurs the performance overhead of computing the LNE for each specific city (which may be exactly what you want and need).  If you really only need the LNE month overall, and then to see the Cities price within that month, then you could put the LNE within a named set.  That will cause the last month to be evaluated once in the context of the slicer, and will avoid much of the performance overhead.

HTH



From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf Of Hilario Fernandes
Sent: Wednesday, November 19, 2014 1:17 PM
To: Mondrian mailing list
Subject: [Mondrian] LastNonEmpty CellRequestQuantumExceededException

Hi everyone,

I'm getting the CellRequestQuantumExceededException thrown as an error, and sometimes as a warn dependind on the MDX query. This happens while using LastNonEmpty and specifically when the set given as argument is larger.

For example, the following query:

WITH
MEMBER [Measures].[LastMonthPrice] AS
Aggregate(LastNonEmpty([Data.YEAR_MONTH].Members, [Measures].[Price_SUM]), [Measures].[Price_SUM])
SELECT
NON EMPTY {[Measures].[LastMonthPrice]} ON COLUMNS,
NON EMPTY {[City].[City].Members} ON ROWS
FROM [Cube]

I get several warnings like this:


WARN  olap.ResultBase Mondrian: exception in executeStripe.
mondrian.olap.fun.MondrianEvaluationException: Expected value of type MEMBER; got value 'mondrian.olap.fun.MondrianEvaluationException: Exception while executing function LastNonEmpty: mondrian.rolap.agg.CellRequestQuantumExceededException
            at mondrian.rolap.agg.CellRequestQuantumExceededException.<clinit>(CellRequestQuantumExceededException.java:37)
            at mondrian.rolap.FastBatchingCellReader.recordCellRequest(FastBatchingCellReader.java:177)
            at mondrian.rolap.FastBatchingCellReader.get(FastBatchingCellReader.java:154)
            at mondrian.rolap.RolapEvaluator.evaluateCurrent(RolapEvaluator.java:661)
            at mondrian.calc.impl.MemberValueCalc.evaluate(MemberValueCalc.java:100)
            at mondrian.olap.fun.UdfResolver$CalcExp.evaluateScalar(UdfResolver.java:311)
            at mondrian.udf.LastNonEmptyUdf.execute(LastNonEmptyUdf.java:70)
            at mondrian.olap.fun.UdfResolver$ScalarCalcImpl.evaluate(UdfResolver.java:198)
            at mondrian.calc.impl.GenericCalc.evaluateMember(GenericCalc.java:149)
            at mondrian.olap.fun.SetFunDef$SetListCalc$2.evaluateVoid(SetFunDef.java:166)
            at mondrian.olap.fun.SetFunDef$SetListCalc.evaluateList(SetFunDef.java:194)
            at mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:65)
            at mondrian.olap.ExpCacheDescriptor.evaluate(ExpCacheDescriptor.java:100)
            at mondrian.rolap.RolapEvaluator.getCachedResult(RolapEvaluator.java:955)
            at mondrian.olap.fun.CacheFunDef$1.evaluate(CacheFunDef.java:63)
            at mondrian.calc.impl.GenericIterCalc.evaluateList(GenericIterCalc.java:55)
            at mondrian.olap.fun.AbstractAggregateFunDef.evaluateCurrentList(AbstractAggregateFunDef.java:77)
            at mondrian.olap.fun.AggregateFunDef$AggregateCalc.evaluate(AggregateFunDef.java:102)
            at mondrian.rolap.RolapEvaluator.evaluateCurrent(RolapEvaluator.java:688)
            at mondrian.calc.impl.MemberArrayValueCalc.evaluate(MemberArrayValueCalc.java:77)
            at mondrian.olap.fun.FunUtil.evaluateMembers(FunUtil.java:418)
            at mondrian.olap.fun.FunUtil.partiallySortMembers(FunUtil.java:715)
            at mondrian.olap.fun.TopBottomCountFunDef$3.partiallySortList(TopBottomCountFunDef.java:145)
            at mondrian.olap.fun.TopBottomCountFunDef$3.evaluateList(TopBottomCountFunDef.java:109)
            at mondrian.calc.impl.AbstractListCalc.evaluateIterable(AbstractListCalc.java:71)
            at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:880)
            at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:705)
            at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:661)
            at mondrian.rolap.RolapResult.<init>(RolapResult.java:289)
            at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:672)
            at mondrian.rolap.RolapConnection.access$000(RolapConnection.java:52)
            at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:623)
            at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:622)
            at java.util.concurrent.FutureTask.run(FutureTask.java:262)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at java.lang.Thread.run(Thread.java:744)
' (class mondrian.olap.fun.MondrianEvaluationException)
            at mondrian.olap.fun.FunUtil.newEvalException(FunUtil.java:82)
            at mondrian.rolap.RolapEvaluator.newEvalException(RolapEvaluator.java:1003)
            at mondrian.calc.impl.GenericCalc.evaluateMember(GenericCalc.java:153)
            at mondrian.olap.fun.SetFunDef$SetListCalc$2.evaluateVoid(SetFunDef.java:166)
            at mondrian.olap.fun.SetFunDef$SetListCalc.evaluateList(SetFunDef.java:194)
            at mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:65)
            at mondrian.olap.ExpCacheDescriptor.evaluate(ExpCacheDescriptor.java:100)
            at mondrian.rolap.RolapEvaluator.getCachedResult(RolapEvaluator.java:955)
            at mondrian.olap.fun.CacheFunDef$1.evaluate(CacheFunDef.java:63)
            at mondrian.calc.impl.GenericIterCalc.evaluateList(GenericIterCalc.java:55)
            at mondrian.olap.fun.AbstractAggregateFunDef.evaluateCurrentList(AbstractAggregateFunDef.java:77)
            at mondrian.olap.fun.AggregateFunDef$AggregateCalc.evaluate(AggregateFunDef.java:102)
            at mondrian.rolap.RolapEvaluator.evaluateCurrent(RolapEvaluator.java:688)
            at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:1077)
            at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:1227)
            at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:1227)
            at mondrian.rolap.RolapResult.executeBody(RolapResult.java:917)
            at mondrian.rolap.RolapResult.<init>(RolapResult.java:474)
            at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:672)
            at mondrian.rolap.RolapConnection.access$000(RolapConnection.java:52)
            at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:623)
            at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:622)
            at java.util.concurrent.FutureTask.run(FutureTask.java:262)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at java.lang.Thread.run(Thread.java:744)



City has a few hundred members and the date is considering dates between 1900 and 2100.

Any ideas?

Thanks


--
Hilario Fernandes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20141126/21afbfd1/attachment-0001.html 


More information about the Mondrian mailing list