Creating In-Memory Cubes
A business view can have only one in-memory cube. When a business view contains parameters, its in-memory cube can only represent the data of one parameter scenario.
Using Logi JReport's scheduling mechanism, administrators are able to define when an in-memory cube for a business view will be created and when it will be updated at a specific time or periodically. This is especially useful for month and quarter end reports where multiple reports use the same dataset with the same parameters such as begin and end date.
In-memory cubes have no versions: once they are updated, only the latest one is kept for the business view.
If it is the first time to create in-memory cubes, the administrator needs to first configure the maximum memory allowed for all in-memory cubes.
- On the Logi JReport Administration page, select Cube on the system toolbar.
- In the Cube page, select Configuration on the task bar. This option is not available to organization admins.
- In the Maximum Cube Memory Allowed text field, specify the allowed maximum cube memory size in megabytes. The total allocated memory for each cube cannot exceed this value. It does not take into consideration the actual memory used by the in-memory or if some of the cubes are swapped to disk. This value should not be larger than 80% of your Java Heap size.
- Select OK to confirm the setting.
To create an in-memory cube:
- On the Logi JReport Administration page, select Cube on the system toolbar.
- In the Cube panel, select New Cube on the task bar. The New Cube dialog appears.
- Select next to the Select a Folder text field. In the Select Folder dialog, browse to the folder containing the required catalog and select OK.
- From the Select a Catalog drop-down list, select the required catalog in the specified folder.
- In the Select Business View box, select the business view on which to create the in-memory cube. The business view name will be used as the name of the in-memory cube.
- Select OK to confirm the selection. The tabs for defining the schedule task information are then displayed.
- In the General tab,
- Specify the parameter values if the business view uses parameters.
- Expand the Cube Information section, assign a priority to the task from the Priority drop-down list. The priority levels are from 1 to 10 in ascending order of lowest priority to highest priority (by default this property is ignored unless server.properties is modified to set queue.policy not equal to 0).
- Expand the Advanced section to configure some advanced settings.
Specify the DB user and password with which to connect to the data source. You can either use the default ones defined in the catalog or specify another DB user and password.
Check the Add TaskListener to be Invoked option to call a Java application when scheduling the task (for details, see Adding TaskListener When Scheduling Reports).
If you are in a cluster environment, you can also directly specify an active server in the cluster to perform the schedule task via the Specify a preferred server to run the task option.
If you want to enable task recovery, check Enable Auto Recover Task, then specify the maximum number of times in which to retry running the task in order to recover it, the time interval between the retries, and whether to recreate all or just the failed results.
- In the Schedule tab, specify the updating policy of the in-memory cube.
- In the Time sub tab, specify the time zone and the time for when the task is to be performed.
- To perform the task as soon as you submit it, select Run this task immediately from the Time Type drop-down list.
- To run the task at a specified time, select Run this task at, then define the time according to your requirement. Check Run missed task upon server restart so as to run the missed tasks when you restart the server.
- If you want to run the task repeatedly, select Run this task periodically, then specify the duration, date and time accordingly. Check Run missed task upon server restart so as to run the missed tasks when you restart the server.
- If you want to bind a trigger to the task, switch to the Trigger sub tab.
From the Select a trigger to bind drop-down list, select the required trigger or select the Create New button to create a new trigger (the button is not available to organization admins), then specify the trigger logic with time condition.
- Trigger Only
Performs the task only when the trigger is fired. - Trigger and Time Condition
Performs the task when both time is up and the trigger is fired.Note: When this logic is selected:
- No matter which condition is ready, the task can only be performed when its counterpart is ready.
- If you specify the task to be performed at a specific time, you must check the option Run missed task upon server restart, otherwise the task will be regarded as expired and will be deleted when the time condition is ready before the trigger condition.
- Time Condition after Trigger
Performs a task when time is up after the trigger is fired. If the time condition is ready before the trigger condition, the task will be regarded as expired and will be deleted. - Time Condition or Trigger
Performs the task when either time is up or the trigger is fired.
- Trigger Only
- In the Time sub tab, specify the time zone and the time for when the task is to be performed.
- In the Settings tab,
- In the Maximum Memory Allowed text box, provide a value for the cube. The value must be specified, otherwise you are not allowed to continue with other tabs or to finish the dialog.
- If you would like to cache the cube on disk once the available memory is exhausted, select Move the cube to disk if insufficient memory is allocated. If this option is not selected and the memory is not enough for the cube, the cube status will be disabled and an error will be shown in the log tab.
- If you would like the detail data in the business view to be cached onto disk, select Cache Detail on Disk. Otherwise if you need only the aggregation data to be cached, unselect the option.
In the Notification tab, specify to notify someone via e-mail of when the task is finished successfully or when it fails, then in the mail box, enter the information of the receivers and the mail content. To send out mail notification, an e-mail server must have been predefined by the administrator.
- Select Finish, and Logi JReport Server will then perform the task at the requested times.
After an in-memory cube is created and ready for use, all web reports, library components and visual analyses based on the same business view as the cube will automatically use the cube for retrieving data.
Since an in-memory cube freezes parameters in its related business view, if a report uses an in-memory cube and its business view contains parameters, when running the report, only parameters used in the report are available for specifying values and the business view parameters will be disabled for editing. In Logi JReport, a parameter may depend on another parameter; if the latter is frozen, the former will be frozen as well.