Coder Social home page Coder Social logo

Comments (4)

rpbouman avatar rpbouman commented on July 27, 2024

Hi @hustszh! SOrry for the late reply - I should've replied earlier.

I have one question about xmondrian cache. Once I modify the schema, or update the data in dw, I have to restart xmondrian server. Otherwise, I will get the old one. Would you have any suggestion to flush xmondrian cache?

Currently, I have nothing in xmondrian that does this for you. But you're very right - it should certainly be possible to do this in a graceful way.

To tell you the truth, I currently do not know how to do this. My hunch is there must be already something that allows you to do this, but I did not configure it in the web.xml.

Should I write some codes to flush cache during xmondrian server is running? How to do it?

What would help is if you could look at the Mondrian documentation and see if there is a servlet already that could be used for this. Or maybe take a look at how Pentaho does it. If you could report your findings back here, then we can think about how to put this into xmondrian.

Thanks!

from xmondrian.

dmitry-sloutskov avatar dmitry-sloutskov commented on July 27, 2024

Greetings,
This can be done in the Pentaho BI control panel, by clicking tools->refresh->mondrian cache, imho... this equivalent to

#!bin/bash
user=XXX
pass=XXX
host=localhost
schema=Reporting%20schemas

wget --no-check-certificate http://${host}:2310/pentaho/content/analyzer/ajax/clearCache?catalog=${schema}\&userid=${user}\&password=${pass}

Documentation http://mondrian.pentaho.com/api/mondrian/rolap/CacheControlImpl.html
I think, it should be help http://wiki.bizcubed.com.au/xwiki/bin/view/Main/Search?text=Flush+Mondrian+Cache

Roland, it would be very good to have this functionality in xmondrian.

I think, something like this

<%
java.util.Iterator<mondrian.rolap.RolapSchema> schemaIterator = mondrian.rolap.RolapSchema.getRolapSchemas();
while (schemaIterator.hasNext()) {
   mondrian.rolap.RolapSchema schema = schemaIterator.next();
   mondrian.olap.CacheControl cacheControl = schema.getInternalConnection().getCacheControl(null);

   for (mondrian.olap.Cube cube: schema.getCubes()) {
     cacheControl.flush (cacheControl.createMeasuresRegion(cube));
   }
}
String redirectURL = request.getHeader("Referer");
response.sendRedirect(redirectURL);
%>

Unfortunately, I'm not the best java-programmer.

from xmondrian.

fetanchaud avatar fetanchaud commented on July 27, 2024

IMHO you will find an answer there

https://mondrian.pentaho.com/documentation/schema.php#Dynamic_datasource_xmla_servlet

from xmondrian.

rpbouman avatar rpbouman commented on July 27, 2024

Thanks all. I will gladly accept a pull request for this.

from xmondrian.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.