private static void checkIfAggregationSizeIsTooLarge(List list) { final IntegerProperty property = MondrianProperties.instance().MaxConstraints; final int maxConstraints = property.get(); if (list.size() > maxConstraints) { throw newEvalException( null, "Aggregation is not supported over a list" + " with more than " + maxConstraints + " predicates" + " (see property " + property.getPath() + ")"); } }
/** * Returns the default memory notification percentage. * * <p>This is the value of the Mondrian * {@link MondrianProperties#MemoryMonitorThreshold} property. * * @return the default threshold percentage. */ public int getDefaultThresholdPercentage() { return MondrianProperties.instance().MemoryMonitorThreshold.get(); }
private static boolean isArgSizeSupported( RolapEvaluator evaluator, int argSize) { boolean argSizeNotSupported = false; // Note: arg size 0 is accepted as valid CJ argument // This is used to push down the "1 = 0" predicate // into the emerging CJ so that the entire CJ can // be natively evaluated. // First check that the member list will not result in a predicate // longer than the underlying DB could support. if (argSize > MondrianProperties.instance().MaxConstraints.get()) { argSizeNotSupported = true; } return !argSizeNotSupported; }
private static boolean isArgSizeSupported( RolapEvaluator evaluator, int argSize) { boolean argSizeNotSupported = false; // Note: arg size 0 is accepted as valid CJ argument // This is used to push down the "1 = 0" predicate // into the emerging CJ so that the entire CJ can // be natively evaluated. // First check that the member list will not result in a predicate // longer than the underlying DB could support. if (argSize > MondrianProperties.instance().MaxConstraints.get()) { argSizeNotSupported = true; } return !argSizeNotSupported; }
AxisMemberList() { this.countOnly = false; this.members = new ConcatenableList<Member>(); this.totalCellCount = 1; this.axisCount = 0; // Now that the axes are evaluated, make sure that the number of // cells does not exceed the result limit. this.limit = MondrianProperties.instance().ResultLimit.get(); }
public static void checkCancelOrTimeout( long currentIteration, Execution execution) { int checkCancelOrTimeoutInterval = MondrianProperties.instance() .CheckCancelOrTimeoutInterval.get(); if (execution != null) { synchronized (execution) { if (checkCancelOrTimeoutInterval > 0 && currentIteration % checkCancelOrTimeoutInterval == 0) { execution.checkCancelOrTimeout(); } } } } }
private void checkResultLimit(int currentCount) { final int limit = MondrianProperties.instance().ResultLimit.get(); if (limit > 0 && currentCount > limit) { throw MondrianResource.instance() .SegmentFetchLimitExceeded.ex(limit); } }
/** * Creates an Aggregation. * * @param aggregationKey the key specifying the axes, the context and * the RolapStar for this Aggregation */ public Aggregation( AggregationKey aggregationKey) { this.compoundPredicateList = aggregationKey.getCompoundPredicateList(); this.star = aggregationKey.getStar(); this.constrainedColumnsBitKey = aggregationKey.getConstrainedColumnsBitKey(); this.maxConstraints = MondrianProperties.instance().MaxConstraints.get(); this.creationTimestamp = new Date(); }
/** * Creates a FastBatchingCellReader. * * @param execution Execution that calling statement belongs to. Allows us * to check for cancel * @param cube Cube that requests belong to * @param aggMgr Aggregation manager */ public FastBatchingCellReader( Execution execution, RolapCube cube, AggregationManager aggMgr) { this.execution = execution; assert cube != null; assert execution != null; this.cube = cube; this.aggMgr = aggMgr; cacheMgr = aggMgr.cacheMgr; pinnedSegments = this.aggMgr.createPinSet(); cacheEnabled = !MondrianProperties.instance().DisableCaching.get(); cellRequestLimit = MondrianProperties.instance().CellBatchSize.get() <= 0 ? 100000 // TODO Make this logic into a pluggable algorithm. : MondrianProperties.instance().CellBatchSize.get(); }
densityThreshold = 1; int countThreshold = properties.SparseSegmentCountThreshold.get(); if (countThreshold < 0) { countThreshold = 0;
public CrossJoinAnalyzer( TupleList simplifiedList, SubstitutionMap substitutionMap) { long nativizeMaxResults = MondrianProperties.instance().NativizeMaxResults.get(); arity = simplifiedList.getArity(); tempTuple = new Member[arity]; tempTupleAsList = Arrays.asList(tempTuple); resultLimit = nativizeMaxResults <= 0 ? Integer.MAX_VALUE : (int) Math.min(nativizeMaxResults, Integer.MAX_VALUE); resultList = TupleCollections.createList(arity); reassemblyGuide = classifyMembers(simplifiedList, substitutionMap); nativeMembers = findNativeMembers(); nativeIndices = findNativeIndices(); }
private static void crossProd(Evaluator evaluator, int currLen) { long iterationLimit = MondrianProperties.instance().IterationLimit.get(); final int productLen = currLen * evaluator.getIterationLength(); if (iterationLimit > 0) { if (productLen > iterationLimit) { throw MondrianResource.instance() .IterationLimitExceeded.ex(iterationLimit); } } evaluator.setIterationLength(currLen); }
public RolapResultShepherd() { final IntegerProperty property = MondrianProperties.instance().RolapConnectionShepherdNbThreads; final int maximumPoolSize = property.get(); executor = Util.getExecutorService(
private boolean isHighCardinality(Exp funArg, Evaluator evaluator) { Level level = findLevel(funArg); if (level != null) { int cardinality = evaluator.getSchemaReader() .getLevelCardinality(level, false, true); final int minThreshold = MondrianProperties.instance() .NativizeMinThreshold.get(); final boolean isHighCard = cardinality > minThreshold; logHighCardinality( ESTIMATE_MESSAGE, minThreshold, cardinality, isHighCard); return isHighCard; } return false; }
private boolean useDefaultMemberChildrenConstraint(RolapMember parent) { int threshold = MondrianProperties.instance() .LevelPreCacheThreshold.get(); return !enabled || parent.getHierarchy().isRagged() || (!isDegenerate(parent.getLevel()) && threshold > 0 && getChildLevelCardinality(parent) < threshold); }
.LevelPreCacheThreshold.get(); if (threshold <= 0) { return false;
private ExpCompiler createCompiler( final Evaluator evaluator, final Validator validator, List<ResultStyle> resultStyleList) { ExpCompiler compiler = ExpCompiler.Factory.getExpCompiler( evaluator, validator, resultStyleList); final int expDeps = MondrianProperties.instance().TestExpDependencies.get(); final ProfileHandler profileHandler = statement.getProfileHandler(); if (profileHandler != null) { // Cannot test dependencies and profile at the same time. Profiling // trumps. compiler = RolapUtil.createProfilingCompiler(compiler); } else if (expDeps > 0) { compiler = RolapUtil.createDependencyTestingCompiler(compiler); } return compiler; }
/** * Check the resultSize against the result limit setting. Throws * LimitExceededDuringCrossjoin exception if limit exceeded. * * When it is called from RolapNativeSet.checkCrossJoin(), it is only * possible to check the known input size, because the final CJ result * will come from the DB(and will be checked against the limit when * fetching from the JDBC result set, in SqlTupleReader.prepareTuples()) * * @param resultSize Result limit * @throws ResourceLimitExceededException */ public static void checkCJResultLimit(long resultSize) { int resultLimit = MondrianProperties.instance().ResultLimit.get(); // Throw an exeption, if the size of the crossjoin exceeds the result // limit. if (resultLimit > 0 && resultLimit < resultSize) { throw MondrianResource.instance().LimitExceededDuringCrossjoin.ex( resultSize, resultLimit); } // Throw an exception if the crossjoin exceeds a reasonable limit. // (Yes, 4 billion is a reasonable limit.) if (resultSize > Integer.MAX_VALUE) { throw MondrianResource.instance().LimitExceededDuringCrossjoin.ex( resultSize, Integer.MAX_VALUE); } }
List<Member> tuple = simplifiedList.get(0); long nativizeMinThreshold = MondrianProperties.instance().NativizeMinThreshold.get(); long estimatedCardinality = simplifiedList.size();
ResolvedFunCall call) int opSize = MondrianProperties.instance().CrossJoinOptimizerSize.get(); if (list.isEmpty()) { return list;