为什么每次数据库有变化都需要刷新 Pentaho 报表数据缓存 [英] Why do I need to refresh Pentaho report data cache everytime there is a change in database

查看:51
本文介绍了为什么每次数据库有变化都需要刷新 Pentaho 报表数据缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果数据库中确实存在数据,我想显示数据不可用,否则只显示该数据.我在 MySQL 中创建了一个存储过程来实现这一点,并且在 MySQL Workbench 中运行时它工作正常.程序采用两个输入参数和一个输出参数显示文本数据不可用,如果表中没有数据.

I want to display Data not available if data does exist in the database, else simply display that data. I created a stored procedure in MySQL to achieve this and it's working fine when run in MySQL Workbench. The procedure takes has two input parameters and one output parameter to display the text "Data not available, if there is no data in the table.

当我在 Pentaho Report Designer (PRD) 中调用此过程时,它在有数据时显示数据,在没有数据时显示数据不可用文本.但是每次从表中截断数据或在相关表中加载数据时,我都会刷新报表数据缓存.

When I call this procedure in Pentaho Report Designer (PRD), It shows data when there is data and data not available text when there is no data. But I have refresh report data cache every time truncate data from table or load data in the concerned table.

每次数据库发生变化时,如何手动刷新报表缓存?

How can I get away with refreshing report cache manually every time there's change in database?

推荐答案

尝试以下更改 BA 服务器中的缓存时间.
1) 停止 BA 服务器.
2) 导航到 \biserver-ee\tomcat\webapps\pentaho\WEB-INF\classes
3) 备份文件ehcache.xml
4) 打开文件 ehcache.xml
5) 向下滚动到内容.

Try following to change cache timings in BA server.
1) Stop BA server.
2) navigate to \biserver-ee\tomcat\webapps\pentaho\WEB-INF\classes
3) Take back up of file ehcache.xml
4) Open File ehcache.xml
5) Scroll down to content.

<cache name="report-dataset-cache"
maxElementsInMemory="50"
eternal="false"
overflowToDisk="false"
timeToIdleSeconds="1"
timeToLiveSeconds="2"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="1"
/>


6) 减少 timeToIdleSeconds、timeToLiveSeconds、diskExpiryThreadIntervalSeconds 的值(默认为 300 秒左右)
7) 保存并重启 BA 服务器.


6) Reduce the values of timeToIdleSeconds, timeToLiveSeconds, diskExpiryThreadIntervalSeconds (By default it would be around 300 seconds)
7) Save and Restart BA server.

改变珠三角:

在珠三角按照下图变化

这篇关于为什么每次数据库有变化都需要刷新 Pentaho 报表数据缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆