zoukankan      html  css  js  c++  java
  • [saiku] 配置saiku实时展现查询数据

    缘起:

    在默认的情况下,saiku是不能对数据进行实时展现的,只能通过刷新按钮或者重启服务器来刷新数据
    
    这样以来会有很多的麻烦,每天得手动去刷新,这个操作只有管理员可以操作,在刷新以前客户看到的都是缓存中的旧数据。
    
    有人说写个shell去定时更新不行吗?这个做法当然可以。
    
    除了这个做法,还可以让saiku查询完数据后即时加载。
    
    不用数据库连接池,加载完成后立刻清除缓存中的数据,系统下次在加载的时候发现缓存是空的,就会自动去查询新数据,这样以来就可以做到实时展现.

    具体修改如下:

    (1)编辑 saiku/ui/js/saiku/Settings.js
    
    将 LOCALSTORAGE_EXPIRATION: 10 * 60 * 60 * 1000 /* 10 hours, in ms */
    
    修改为:LOCALSTORAGE_EXPIRATION: 1
    
    (2)编辑 saiku/plugin.spring.xml
    
    <bean id="connectionManager" class="org.saiku.plugin.PentahoSecurityAwareConnectionManager" init-method="init" destroy-method="destroy"> <property name="dataSourceManager" ref="pentahoDsManager" /> <property name="userAware" value="false" /> <property name="connectionPooling" value="true" /> </bean> 修改为: <bean id="connectionManager" class="org.saiku.plugin.PentahoSecurityAwareConnectionManager" init-method="init" destroy-method="destroy"> <property name="dataSourceManager" ref="pentahoDsManager" /> <property name="userAware" value="false" /> <property name="connectionPooling" value="false" /> </bean> (3)编辑mondrian/mondrian.properties 将 mondrian.rolap.star.disableCaching=false 修改为:mondrian.rolap.star.disableCaching=true
  • 相关阅读:
    C# 图像处理(图像缩放、屏幕截取、图像合并、保存图像)
    C# string ASCII相互转换
    BitNami Redmine Stack迁移
    win10开始菜单打不开怎么办?
    (.text+0x18): undefined reference to `main'
    CUDA 计算pi (π)
    C++ 对TXT 的串并行读写
    Matlab 与 c++对txt 文档的读写格式
    Git 初级使用 windows & Ubuntu
    Leetcode 题解 Remove Duplicates from Sorted List
  • 原文地址:https://www.cnblogs.com/avivaye/p/4880976.html
Copyright © 2011-2022 走看看