Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix for MONDRIAN-1080. Adds a parameter (mondrian.rolap.CellBatchSize…

…) to set a hard limit on the number of cells per segment.
  • Loading branch information...
commit 6685e347a299a13a9a8621c27768a6c55a48b2e6 1 parent a1dcfce
@lucboudreau lucboudreau authored
View
10 src/main/mondrian/olap/MondrianProperties.xml
@@ -37,6 +37,16 @@ on the class path.
<Type>String</Type>
<Default>sun.jdbc.odbc.JdbcOdbcDriver,org.hsqldb.jdbcDriver,oracle.jdbc.OracleDriver,com.mysql.jdbc.Driver</Default>
</PropertyDefinition>
+ <PropertyDefinition>
+ <Name>CellBatchSize</Name>
+ <Path>mondrian.rolap.cellBatchSize</Path>
+ <Description>
+Integer property that, if set to a value greater than zero, sets a hard limit on the
+number of cells that are batched together when building segments.
+</Description>
+ <Type>int</Type>
+ <Default>-1</Default>
+ </PropertyDefinition>
<PropertyDefinition>
<Name>ResultLimit</Name>
<Path>mondrian.result.limit</Path>
View
7 src/main/mondrian/rolap/FastBatchingCellReader.java
@@ -157,7 +157,12 @@ public final void recordCellRequest(CellRequest request) {
assert !request.isUnsatisfiable();
++missCount;
cellRequests.add(request);
- if (cellRequests.size() % 5000 == 0) {
+ int limit =
+ MondrianProperties.instance().CellBatchSize.get();
+ if (limit <= 0) {
+ limit = 5000; // TODO Make this logic into a pluggable algorithm.
+ }
+ if (cellRequests.size() % limit == 0) {
// Signal that it's time to ask the cache manager if it has cells
// we need in the cache. Not really an exception.
throw CellRequestQuantumExceededException.INSTANCE;
Please sign in to comment.
Something went wrong with that request. Please try again.