Tag - saiku

OpenBI saiku saiku-query nexus    2017-07-19 21:33:43    18

一、下载saiku-query的源码:

https://github.com/OSBI/saiku-query.git

二、修改文件:1、setting.xml文件(以下为关键代码):

<servers>
<server>  
  <id>releases</id>  
  <username>admin</username>  
  <password>admin123</password>  
</server>  
<server>  
  <id>snapshots</id>  
  <username>admin</username>  
  <password>admin123</password>  
</server>
<server>  
  <id>thirdparty</id>  
  <username>admin</username>  
  <password>admin123</password>  
</server>
<server>  
  <id>snapshots-host</id>  
  <username>admin</username>  
  <password>admin123</password>  
</server>
</servers> 
...........
<repositories>
  <repository>
   <id>snapshots</id>
   <name>Snapshots</name>
   <url>http://192.168.10.140:8081/nexus/content/repositories/snapshots</url>
  </repository>
  <repository>
   <id>releases</id>
   <name>Releases</name>
   <url>http://192.168.10.140:8081/nexus/content/repositories/releases</url>
  </repository>
  <repository>
   <id>snapshots-host</id>
   <name>SnapshotsHost</name>
   <url>http://192.168.10.140:8081/
saiku saiku-query nexus OpenBI    2017-07-19 21:28:25    15
参考关于0.1版本的构建过程:http://blog.liuyingguang.cn/blog/post/lightingfire/build-%E5%B9%B6deploy-saiku-query0.1%E5%88%B0nexus

修改pom文件
其中,红色的为原有被注释的
绿色的为添加的
蓝色地方比较重要,在saiku-query的0.4版本中,居然依赖了0.1的版本,但是源码中却没有相关0.1的分支或者标签,所以此处可以注释,打包也成功了,但是是否存在不稳定或者不全的现象,尚未可知


修改后如下:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.saiku</groupId>
    <artifactId>saiku-query</artifactId>
    <version>0.4-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>query</name>
    <url>http://maven.apache.org</url>

    <!-- <distributionManagement>
        <repository>
            <id>deployment</id>
            <name>Internal Releases</name>
            <url>http://repo.meteorite.bi/content/repositories/alabs-release-local/</url>
        </repository>
        <snapshotRepository>
            <id>deployment<
saiku H2 mysql OpenBI    2017-07-19 21:09:26    8

参考原文,略作修改:http://www.cnblogs.com/avivaye/p/4881106.html

以上链接文章的思路是正确的,有略微的遗漏,saiku-beans.properties中也存在与用户相关的H2数据库配置,并且在id为“userDaoDataSource”的bean中有用到,为了避免出现问题,将其一并替换,并修改原文中部分配置到配置文件中

修改web.xml,将原有的与用户相关的h2数据库配置注释

<code class="hljs"><context-<span class="hljs-built_in">param</span>>
        <<span class="hljs-built_in">param</span>-name>db.url</<span class="hljs-built_in">param</span>-name>
        <<span class="hljs-built_in">param</span>-<span class="hljs-built_in">value</span>>jdbc:h2:../../data/saiku;MODE=MySQL</<span class="hljs-built_in">param</span>-<span class="hljs-built_in">value</span>>
    </context-<span class="hljs-built_in">param</span>>
    <context-<span class="hljs-built_in">param</span>>
        <<span class="hljs-built_in">param</span>-name>db.user</<span class="hljs-built_in">param</span>-name>
        <<span class="hljs-built_in">param</span>-<span class="hljs-built_in">value</span>>sa</<span class="hljs-built_in">param</span>-<span class="hljs-built_in">value</span
saiku OpenBI    2017-07-19 21:07:57    26
近日整理了saiku(branch 3.8-release)的构建步骤,分享出来以供大家参考

红色的为原有被注释的
绿色的为添加的
蓝色地方比较重要,为我修改的地方,与上方红色对照下

前提是需要下载mondrian-4.3.0.1-SPARK的包放到自己的nexus中

源码地址:
    https://github.com/OSBI/saiku
使用版本:
    branch:release-3.8

1、修改saiku根目录的pom.xml文件
<?xml version="1.0" encoding="UTF-8"?>
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.saikuanalytics</groupId>
    <artifactId>saiku</artifactId>
    <packaging>pom</packaging>
    <version>3.8-RC5</version>
    <name>Saiku Module Project</name>
    <scm>
        <developerConnection>
            scm:git:git@github.com:OSBI/saiku.git
        </developerConnection>
        <tag>saiku-3.1-SNAPSHOT</tag>
    </scm>
    <modules>
        <module>saiku-core</module>
        <module>saiku-ui</module>
        <module>saiku-webapp</module>
        <module>saiku-server</module>
        <module
saiku mondrian 缓存 OpenBI    2017-07-19 20:45:01    9

saiku提供了刷新缓存的方法:

org.saiku.web.rest.resources.OlapDiscoverResource.refreshConnections()
或者页面调用URL:http://localhost:8090/saiku/rest/saiku/anonymousUser/discover/refresh
        其最终刷新Mondrian缓存的方法是:
        


 

by 刘迎光@萤火虫工作室 
OpenBI交流群:495266201 
MicroService 微服务交流群:217722918 
mail: liuyg#liuyingguang.cn 
博主首页(==防止爬虫==):http://blog.liuyingguang.cn

1/2