calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Hyde <jh...@apache.org>
Subject Re: Modrian with Kylin
Date Thu, 21 May 2015 18:45:07 GMT
As author of both Mondrian and Calcite, I care about this issue. And by the
way I think Kylin would be a great engine for Mondrian to run on -- fast
SQL with aggregate tables, automatically maintained & used.

I saw you also posted on dev@kylin. I have replied to the thread on that
list.

Also I am watching https://issues.apache.org/jira/browse/KYLIN-776.

Julian


On Wed, May 20, 2015 at 3:02 AM, divye sheth <divs.sheth@gmail.com> wrote:

> Hi Devs,
>
> I am trying to get Mondrian to run over Kylin but get an exception while
> creating a connection to Kylin via Mondrian below are the steps that I have
> followed:
>
> 1. Setup Kylin using On-hadoop Install
> 2. Execute the ./sample.sh script to create sample cube in Kylin
> 3. Build Cube
> 4. Test queries against the cube. Also tested using JDBC driver.
>
> But when I try to execute MDX using Mondrian on top of Kylin I get an
> exception trace as follows:
> *[Mondrian Monitor]:[2015-05-20
> 14:55:34,563][DEBUG][mondrian.server.MonitorImpl$Actor.run(MonitorImpl.java:975)]
> - StatementEndEvent(0)*
> *java.lang.RuntimeException: cannot convert to long
> (net.hydromatic.optiq.runtime.AbstractCursor$StringAccessor@fff056c)*
> * at
> net.hydromatic.optiq.runtime.AbstractCursor$AccessorImpl.cannotConvert(AbstractCursor.java:287)*
> * at
> net.hydromatic.optiq.runtime.AbstractCursor$AccessorImpl.getLong(AbstractCursor.java:243)*
> * at
> net.hydromatic.optiq.runtime.AbstractCursor$AccessorImpl.getInt(AbstractCursor.java:239)*
> * at
> net.hydromatic.avatica.AvaticaResultSet.getInt(AvaticaResultSet.java:220)*
> * at
> org.apache.commons.dbcp.DelegatingResultSet.getInt(DelegatingResultSet.java:225)*
> * at
> mondrian.rolap.aggmatcher.JdbcSchema$Table.loadColumns(JdbcSchema.java:972)*
> * at mondrian.rolap.aggmatcher.JdbcSchema$Table.load(JdbcSchema.java:775)*
> * at
> mondrian.rolap.RolapSchema$PhysTable.populateColumns(RolapSchema.java:1853)*
> * at
> mondrian.rolap.RolapSchema$PhysRelationImpl.ensurePopulated(RolapSchema.java:1519)*
> * at
> mondrian.rolap.RolapSchema$PhysTable.ensurePopulated(RolapSchema.java:1729)*
> * at
> mondrian.rolap.RolapSchemaLoader.registerTable(RolapSchemaLoader.java:1051)*
> * at
> mondrian.rolap.RolapSchemaLoader.validatePhysicalSchema(RolapSchemaLoader.java:715)*
> * at
> mondrian.rolap.RolapSchemaLoader.loadStage2(RolapSchemaLoader.java:376)*
> * at
> mondrian.rolap.RolapSchemaLoader.loadStage1(RolapSchemaLoader.java:336)*
> * at
> mondrian.rolap.RolapSchemaLoader.loadStage0(RolapSchemaLoader.java:272)*
> * at
> mondrian.rolap.RolapSchemaLoader.createSchema(RolapSchemaLoader.java:4303)*
> * at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:210)*
> * at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:62)*
> * at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:160)*
> * at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:84)*
> * at mondrian.olap.DriverManager.getConnection(DriverManager.java:112)*
> * at mondrian.olap.DriverManager.getConnection(DriverManager.java:68)*
> * at
> mondrian.olap4j.MondrianOlap4jConnection.<init>(MondrianOlap4jConnection.java:153)*
> * at
> mondrian.olap4j.FactoryJdbc4Plus$AbstractConnection.<init>(FactoryJdbc4Plus.java:323)*
> * at
> mondrian.olap4j.FactoryJdbc41Impl$MondrianOlap4jConnectionJdbc41.<init>(FactoryJdbc41Impl.java:118)*
> * at
> mondrian.olap4j.FactoryJdbc41Impl.newConnection(FactoryJdbc41Impl.java:32)*
> * at
> mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:139)*
> * at java.sql.DriverManager.getConnection(DriverManager.java:571)*
> * at java.sql.DriverManager.getConnection(DriverManager.java:233)*
> * at com.fractal.mondrian.kylin.MondrianKylin.main(MondrianKylin.java:27)*
>
> I tried searching a lot but the only link I could find related to this
> issue was
>
> https://groups.google.com/forum/#!searchin/optiq-dev/mondrian/optiq-dev/qMd5FyOtp28/-BBsC4ScKe0J
>
> *Kylin Version: 0.7-1*
> *Hadoop: 2.6*
> *Hbase: 0.98*
> *Hive: 1.0.1*
> *Mondrian Jar: 4.3*
>
> Source Code:
> *Class.forName("mondrian.olap4j.MondrianOlap4jDriver");*
>
> * String jdbcURL = "jdbc:kylin://localhost:7070/learn_kylin";*
> * String cnxURL = "jdbc:mondrian:Jdbc=" + jdbcURL + ";";*
> * cnxURL += "JdbcDrivers=org.apache.kylin.jdbc.Driver;";*
> * cnxURL += "JdbcUser=ADMIN;";*
> * cnxURL += "JdbcPassword=KYLIN;";*
> * cnxURL += "Catalog=file:/home/divye/Documents/kylin/learn_kylin.xml;";*
>
> * System.out.println("cnxURL ==> " + cnxURL);*
>
> * Connection conn = DriverManager.getConnection(cnxURL);*
> * OlapConnection olapConnection = (OlapConnection) conn*
> * .unwrap(OlapConnection.class);*
> * System.out.println(olapConnection);*
> * String query = "SELECT NON EMPTY( {[Measures].[Price]}) ON COLUMNS, NON
> EMPTY({[Category].[CategoryHierarchy].[Category Name].Members}) on ROWS
> from [Data Cube]";*
>
> * CellSet cellSet = olapConnection.createStatement().executeOlapQuery(*
> * query);*
> * System.out.println("--------------------------------------------");*
> * CellSetFormatter csf = new TraditionalCellSetFormatter();*
> *    PrintWriter pw = new PrintWriter(System.out);*
> *    csf.format(cellSet, pw);*
> *    pw.flush();*
> * csf = new RectangularCellSetFormatter(true);*
> *    pw = new PrintWriter(System.out);*
> *    csf.format(cellSet, pw);*
> *    pw.flush();*
>
>
>
> Attached is the mondrian xml for reference that corresponds to the cube in
> Kylin.
> I am not pretty sure what am I doing wrong, any help/pointers would be
> appreciated a lot.
>
> Thanks
> Divye Sheth
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message