/** * 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 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() + ")"); } }
/** * Sets the value of this integer property. The value is limited to the * min/max range given during construction. * * @return the previous value, or if not set: the default value. If no * default value exists, 0 if that value is in the range [minValue, * maxValue], or minValue if 0 is not in the range */ public int set(int value) { String prevValue = setString(Integer.toString(limit(value))); if (prevValue == null) { prevValue = getDefaultValue(); if (prevValue == null) { return noValue(); } } int v = Integer.parseInt(prevValue); return limit(v); }
/** * Retrieves the value of this integer property according to these rules. * * <ul> * <li>If the property has no value, returns the default value.</li> * <li>If there is no default value and {@link #minValue} <= 0 <= * {@link #maxValue}, returns 0.</li> * <li>If there is no default value and 0 is not in the min/max range, * returns {@link #minValue}.</li> * </ul> */ public int get() { final String value = getInternal(null, false); if (value == null) { return noValue(); } int v = Integer.parseInt(value); // need to limit value in case setString() was called directly with // an out-of-range value return limit(v); }
/** * Retrieves the value of this integer property. If the property has no * value, returns the default value. If there is no default value, returns * the given default value. In all cases, the returned value is limited to * the min/max value range given during construction. */ public int get(int defaultValue) { final String value = getInternal( Integer.toString(defaultValue), false); if (value == null) { return limit(defaultValue); } int v = Integer.parseInt(value); return limit(v); }
public void rejectedExecution( Runnable r, ThreadPoolExecutor executor) { throw MondrianResource.instance().QueryLimitReached.ex( maximumPoolSize, property.getPath()); } });
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(); }
MondrianProperties.instance().ExecutionHistorySize.get(), 0.8f, false) MondrianProperties.instance().ExecutionHistorySize.get(); private static final long serialVersionUID = 1L; protected boolean removeEldestEntry( MondrianProperties.instance().ExecutionHistorySize.get(), 0.8f, false) MondrianProperties.instance().ExecutionHistorySize.get(); private static final long serialVersionUID = 1L; protected boolean removeEldestEntry( MondrianProperties.instance().ExecutionHistorySize.get(), 0.8f, false) MondrianProperties.instance().ExecutionHistorySize.get(); private static final long serialVersionUID = 1L; protected boolean removeEldestEntry( MondrianProperties.instance().ExecutionHistorySize.get(), 0.8f, false) MondrianProperties.instance().ExecutionHistorySize.get();
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); }