public class AggregationManager extends RolapAggregationManager
RolapAggregationManager
manages all Aggregation
s
in the system. It is a singleton class.Modifier and Type | Class and Description |
---|---|
static class |
AggregationManager.PinSetImpl
Implementation of
RolapAggregationManager.PinSet
using a HashSet . |
RolapAggregationManager.PinSet
Modifier and Type | Field and Description |
---|---|
SegmentCacheManager |
cacheMgr |
Constructor and Description |
---|
AggregationManager(MondrianServer server)
Creates the AggregationManager.
|
Modifier and Type | Method and Description |
---|---|
RolapAggregationManager.PinSet |
createPinSet()
Creates a
RolapAggregationManager.PinSet . |
static AggStar |
findAgg(RolapStar star,
BitKey levelBitKey,
BitKey measureBitKey,
boolean[] rollup)
Finds an aggregate table in the given star which has the desired levels
and measures.
|
static Pair<String,List<SqlStatement.Type>> |
generateSql(mondrian.rolap.agg.GroupingSetsList groupingSetsList,
List<StarPredicate> compoundPredicateList)
Generates the query to retrieve the cells for a list of segments.
|
CacheControl |
getCacheControl(RolapConnection connection,
PrintWriter pw)
Returns an API with which to explicitly manage the contents of the cache.
|
SegmentCacheManager |
getCacheMgr() |
Object |
getCellFromAllCaches(CellRequest request) |
Object |
getCellFromCache(CellRequest request)
Retrieves the value of a cell from the cache.
|
Object |
getCellFromCache(CellRequest request,
RolapAggregationManager.PinSet pinSet) |
String |
getDrillThroughSql(DrillThroughCellRequest request,
StarPredicate starPredicateSlicer,
List<OlapElement> fields,
boolean countOnly)
Generates a SQL statement which will return the rows which contribute to
this request.
|
org.apache.log4j.Logger |
getLogger()
Returns the log4j logger.
|
static AggregationManager |
instance()
Deprecated.
No longer a singleton, and will be removed in mondrian-4.
Use
MondrianServer.getAggregationManager() .
To get a server, call
MondrianServer.forConnection(mondrian.olap.Connection) ,
passing in a null connection if you absolutely must. |
static void |
loadAggregation(SegmentCacheManager cacheMgr,
int cellRequestCount,
List<RolapStar.Measure> measures,
RolapStar.Column[] columns,
AggregationKey aggregationKey,
StarColumnPredicate[] predicates,
GroupingSetsCollector groupingSetsCollector,
List<Future<Map<Segment,SegmentWithData>>> segmentFutures)
Called by FastBatchingCellReader.load where the
RolapStar creates an Aggregation if needed.
|
void |
shutdown() |
getCacheCellReader, makeCacheRegion, makeDrillThroughRequest, makeRequest, makeRequest
public final SegmentCacheManager cacheMgr
public AggregationManager(MondrianServer server)
public final org.apache.log4j.Logger getLogger()
public static AggregationManager instance()
MondrianServer.getAggregationManager()
.
To get a server, call
MondrianServer.forConnection(mondrian.olap.Connection)
,
passing in a null connection if you absolutely must.public static void loadAggregation(SegmentCacheManager cacheMgr, int cellRequestCount, List<RolapStar.Measure> measures, RolapStar.Column[] columns, AggregationKey aggregationKey, StarColumnPredicate[] predicates, GroupingSetsCollector groupingSetsCollector, List<Future<Map<Segment,SegmentWithData>>> segmentFutures)
cacheMgr
- Cache managercellRequestCount
- Number of missed cells that led to this requestmeasures
- Measures to loadcolumns
- this is the CellRequest's constrained columnsaggregationKey
- this is the CellRequest's constraint keypredicates
- Array of constraints on each columngroupingSetsCollector
- grouping sets collectorsegmentFutures
- List of futures into which each statement will
place a list of the segments it has loaded, when it completespublic CacheControl getCacheControl(RolapConnection connection, PrintWriter pw)
connection
- Server whose cache to controlpw
- Print writer, for tracingpublic Object getCellFromCache(CellRequest request)
RolapAggregationManager
getCellFromCache
in class RolapAggregationManager
request
- Cell requestUtil.nullValue
if cell's value is nullpublic Object getCellFromCache(CellRequest request, RolapAggregationManager.PinSet pinSet)
getCellFromCache
in class RolapAggregationManager
public Object getCellFromAllCaches(CellRequest request)
public String getDrillThroughSql(DrillThroughCellRequest request, StarPredicate starPredicateSlicer, List<OlapElement> fields, boolean countOnly)
RolapAggregationManager
getDrillThroughSql
in class RolapAggregationManager
request
- Cell requeststarPredicateSlicer
- A StarPredicate representing slicer positions
that could not be represented by the CellRequest, or
null
if no additional predicate is necessary.countOnly
- If true, return a statment which returns only the countpublic static Pair<String,List<SqlStatement.Type>> generateSql(mondrian.rolap.agg.GroupingSetsList groupingSetsList, List<StarPredicate> compoundPredicateList)
public static AggStar findAgg(RolapStar star, BitKey levelBitKey, BitKey measureBitKey, boolean[] rollup)
If there no aggregate is an exact match, returns a more granular aggregate which can be rolled up, and sets rollup to true. If one or more of the measures are distinct-count measures rollup is possible only in limited circumstances.
star
- StarlevelBitKey
- Set of levelsmeasureBitKey
- Set of measuresrollup
- Out parameter, is set to true if the aggregate is not
an exact matchpublic RolapAggregationManager.PinSet createPinSet()
RolapAggregationManager
RolapAggregationManager.PinSet
.createPinSet
in class RolapAggregationManager
public void shutdown()
public SegmentCacheManager getCacheMgr()
Copyright © 2018 Hitachi Vantara. All rights reserved.