[Mondrian] Mondrian with Hive

Venkatesh U venkatesh.umaashankar at gmail.com
Wed Feb 29 13:08:52 EST 2012


Hi,
 I got the db connection working by using the latest jar, some fix was done
20 days back
http://repository.pentaho.org/artifactory/pentaho/org/apache/hadoop/hive/hive-jdbc/0.7.0-pentaho-SNAPSHOT/hive-jdbc-0.7.0-pentaho-SNAPSHOT.jar

But now i am facing some other issue, looks like either HiveDialect is not
getting picked up or there is the bug in the same.

mondrian.olap.MondrianException: Mondrian
Error:java.util.concurrent.ExecutionException:
mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while
executing query [select {[Measures]} ON COLUMNS from [Test_cube] ] at
mondrian.rolap.RolapResultShepherd.shepherdExecution(RolapResultShepherd.java:152)
at mondrian.rolap.RolapConnection.execute(RolapConnection.java:580) at
mondrian.rolap.RolapConnection.execute(RolapConnection.java:565) at
mondrian.web.servlet.MdxQueryServlet.processRequest(MdxQueryServlet.java:92)
at mondrian.web.servlet.MdxQueryServlet.doGet(MdxQueryServlet.java:241) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662) Caused by:
java.util.concurrent.ExecutionException: mondrian.olap.MondrianException:
Mondrian Error:Internal error: Error while executing query [select
{[Measures]} ON COLUMNS from [Test_cube] ] at
java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) at
java.util.concurrent.FutureTask.get(FutureTask.java:83) at
mondrian.rolap.RolapResultShepherd.shepherdExecution(RolapResultShepherd.java:126)
... 22 more Caused by: mondrian.olap.MondrianException: Mondrian
Error:Internal error: Error while executing query [select {[Measures]} ON
COLUMNS from [Test_cube] ] at
mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:912) at
mondrian.olap.Util.newInternal(Util.java:2038) at
mondrian.olap.Util.newError(Util.java:2054) at
mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:667) at
mondrian.rolap.RolapConnection.access$000(RolapConnection.java:52) at
mondrian.rolap.RolapConnection$1.call(RolapConnection.java:586) at
mondrian.rolap.RolapConnection$1.call(RolapConnection.java:585) at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
java.util.concurrent.FutureTask.run(FutureTask.java:138) ... 3 more Caused
by: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error
while loading segment; sql=[select sum('test_fact'.'fact_1') as 'm0' from
'test_fact' as 'test_fact'] at
mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:912) at
mondrian.olap.Util.newInternal(Util.java:2038) at
mondrian.olap.Util.newError(Util.java:2054) at
mondrian.rolap.SqlStatement.handle(SqlStatement.java:294) at
mondrian.rolap.SqlStatement.execute(SqlStatement.java:206) at
mondrian.rolap.RolapUtil.executeQuery(RolapUtil.java:279) at
mondrian.rolap.agg.SegmentLoader.createExecuteSql(SegmentLoader.java:672)
at mondrian.rolap.agg.SegmentLoader.load(SegmentLoader.java:121) at
mondrian.rolap.agg.Aggregation.load(Aggregation.java:180) at
mondrian.rolap.agg.AggregationManager.loadAggregation(AggregationManager.java:98)
at
mondrian.rolap.FastBatchingCellReader$Batch.loadAggregation(FastBatchingCellReader.java:471)
at
mondrian.rolap.FastBatchingCellReader$Batch.loadAggregation(FastBatchingCellReader.java:406)
at
mondrian.rolap.FastBatchingCellReader.loadAggregation(FastBatchingCellReader.java:182)
at
mondrian.rolap.FastBatchingCellReader.loadAggregations(FastBatchingCellReader.java:163)
at mondrian.rolap.RolapResult.executeBody(RolapResult.java:811) at
mondrian.rolap.RolapResult.<init>(RolapResult.java:445) at
mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:633)
... 8 more Caused by: java.sql.SQLException: Query returned non-zero code:
11, cause: FAILED: Parse Error: line 1:23 mismatched input ''fact_1''
expecting Identifier near '.' in expression specification at
org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:189)
at
org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
at mondrian.rolap.SqlStatement.execute(SqlStatement.java:161) ... 20 more
java.util.concurrent.ExecutionException: mondrian.olap.MondrianException:
Mondrian Error:Internal error: Error while executing query [select
{[Measures]} ON COLUMNS from [Test_cube] ]mondrian.olap.MondrianException:
Mondrian Error:Internal error: Error while executing query [select
{[Measures]} ON COLUMNS from [Test_cube] ] at
mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:912) at
mondrian.olap.Util.newInternal(Util.java:2038) at
mondrian.olap.Util.newError(Util.java:2054) at
mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:667) at
mondrian.rolap.RolapConnection.access$000(RolapConnection.java:52) at
mondrian.rolap.RolapConnection$1.call(RolapConnection.java:586) at
mondrian.rolap.RolapConnection$1.call(RolapConnection.java:585) at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
java.util.concurrent.FutureTask.run(FutureTask.java:138) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662) Caused by:
mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while
loading segment; sql=[select sum('test_fact'.'fact_1') as 'm0' from
'test_fact' as 'test_fact'] at
mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:912) at
mondrian.olap.Util.newInternal(Util.java:2038) at
mondrian.olap.Util.newError(Util.java:2054) at
mondrian.rolap.SqlStatement.handle(SqlStatement.java:294) at
mondrian.rolap.SqlStatement.execute(SqlStatement.java:206) at
mondrian.rolap.RolapUtil.executeQuery(RolapUtil.java:279) at
mondrian.rolap.agg.SegmentLoader.createExecuteSql(SegmentLoader.java:672)
at mondrian.rolap.agg.SegmentLoader.load(SegmentLoader.java:121) at
mondrian.rolap.agg.Aggregation.load(Aggregation.java:180) at
mondrian.rolap.agg.AggregationManager.loadAggregation(AggregationManager.java:98)
at
mondrian.rolap.FastBatchingCellReader$Batch.loadAggregation(FastBatchingCellReader.java:471)
at
mondrian.rolap.FastBatchingCellReader$Batch.loadAggregation(FastBatchingCellReader.java:406)
at
mondrian.rolap.FastBatchingCellReader.loadAggregation(FastBatchingCellReader.java:182)
at
mondrian.rolap.FastBatchingCellReader.loadAggregations(FastBatchingCellReader.java:163)
at mondrian.rolap.RolapResult.executeBody(RolapResult.java:811) at
mondrian.rolap.RolapResult.<init>(RolapResult.java:445) at
mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:633)
... 8 more Caused by: java.sql.SQLException: Query returned non-zero code:
11, cause: FAILED: Parse Error: line 1:23 mismatched input ''fact_1''
expecting Identifier near '.' in expression specification at
org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:189)
at
org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
at mondrian.rolap.SqlStatement.execute(SqlStatement.java:161) ... 20 more
mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while
loading segment; sql=[select sum('test_fact'.'fact_1') as 'm0' from
'test_fact' as 'test_fact'] at
mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:912) at
mondrian.olap.Util.newInternal(Util.java:2038) at
mondrian.olap.Util.newError(Util.java:2054) at
mondrian.rolap.SqlStatement.handle(SqlStatement.java:294) at
mondrian.rolap.SqlStatement.execute(SqlStatement.java:206) at
mondrian.rolap.RolapUtil.executeQuery(RolapUtil.java:279) at
mondrian.rolap.agg.SegmentLoader.createExecuteSql(SegmentLoader.java:672)
at mondrian.rolap.agg.SegmentLoader.load(SegmentLoader.java:121) at
mondrian.rolap.agg.Aggregation.load(Aggregation.java:180) at
mondrian.rolap.agg.AggregationManager.loadAggregation(AggregationManager.java:98)
at
mondrian.rolap.FastBatchingCellReader$Batch.loadAggregation(FastBatchingCellReader.java:471)
at
mondrian.rolap.FastBatchingCellReader$Batch.loadAggregation(FastBatchingCellReader.java:406)
at
mondrian.rolap.FastBatchingCellReader.loadAggregation(FastBatchingCellReader.java:182)
at
mondrian.rolap.FastBatchingCellReader.loadAggregations(FastBatchingCellReader.java:163)
at mondrian.rolap.RolapResult.executeBody(RolapResult.java:811) at
mondrian.rolap.RolapResult.<init>(RolapResult.java:445) at
mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:633) at
mondrian.rolap.RolapConnection.access$000(RolapConnection.java:52) at
mondrian.rolap.RolapConnection$1.call(RolapConnection.java:586) at
mondrian.rolap.RolapConnection$1.call(RolapConnection.java:585) at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at
java.util.concurrent.FutureTask.run(FutureTask.java:138) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662) Caused by: java.sql.SQLException:
Query returned non-zero code: 11, cause: FAILED: Parse Error: line 1:23
mismatched input ''fact_1'' expecting Identifier near '.' in expression
specification at
org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:189)
at
org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
at mondrian.rolap.SqlStatement.execute(SqlStatement.java:161) ... 20 more
Query returned non-zero code: 11, cause: FAILED: Parse Error: line 1:23
mismatched input ''fact_1'' expecting Identifier near '.' in expression
specificatio

On Wed, Feb 29, 2012 at 11:27 PM, Luc Boudreau <lucboudreau at gmail.com>wrote:

> Looks like the driver is rejecting Apache DBCP's call to
> setAutoCommit(). This has to be fixed in the hive driver.
>
> Luc
>
>
> On Wed, Feb 29, 2012 at 11:49 AM, Venkatesh U
> <venkatesh.umaashankar at gmail.com> wrote:
> > Hi,
> >  I have downloaded the latest version of mondrian-3.3.0.14703
> > and hive-0.7.1-cdh3u3. My hive server is running and i have defined a
> simple
> > schema. But the jdbc connection does not seem to work.
> >
> > Here are the steps i followed,
> >
> > -> I copied $HIVE_HOME/lib/*jar to mondrian-webapp/WEB-INF/lib and also
> > created a symobolic link to $HIVE_HOME/conf
> > in mondrian-webapp/WEB-INF/classes directory
> > -> copied hadoop*core*jar to WEB-INF/lib
> > -> Modified web.xml as below
> >
> >  <context-param>
> >     <param-name>connectString</param-name>
> >
> >
> <param-value>Provider=mondrian;Jdbc=jdbc:hive://localhost:9999/default;Catalog=/WEB-INF/queries/TestHive.xml;JdbcDrivers=org.apache.hadoop.hive.jdbc.HiveDriver</param-value>
> >   </context-param>
> >
> > but I am getting the below error
> >
> > Results: Error:
> >
> > mondrian.olap.MondrianException: Mondrian Error:Internal error: Error
> while
> > creating SQL connection: Jdbc=jdbc:hive://localhost:9999/default
> >       at
> mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:912)
> >       at mondrian.olap.Util.newInternal(Util.java:2038)
> >       at mondrian.olap.Util.newError(Util.java:2054)
> >       at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:232)
> >       at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:195)
> >       at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:239)
> >       at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:60)
> >       at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:1121)
> >       at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:913)
> >       at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:151)
> >       at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:87)
> >       at
> mondrian.olap.DriverManager.getConnection(DriverManager.java:112)
> >       at mondrian.olap.DriverManager.getConnection(DriverManager.java:71)
> >       at mondrian.olap.DriverManager.getConnection(DriverManager.java:53)
> >       at
> >
> mondrian.web.servlet.MdxQueryServlet.processRequest(MdxQueryServlet.java:90)
> >       at
> mondrian.web.servlet.MdxQueryServlet.doGet(MdxQueryServlet.java:241)
> >       at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> >       at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >       at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> >       at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >       at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
> >       at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
> >       at
> >
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> >       at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
> >       at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> >       at
> > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
> >       at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> >       at
> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> >       at
> >
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
> >       at
> >
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
> >       at
> >
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
> >       at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> >       at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> >       at java.lang.Thread.run(Thread.java:662)
> > Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a
> > connection, pool exhausted
> >       at
> >
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:103)
> >       at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:212)
> >       ... 30 more
> > Caused by: java.util.NoSuchElementException: Could not create a validated
> > object, cause: Method not supported - setAutoCommit(true)
> >       at
> >
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:806)
> >       at
> >
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
> >       ... 31 more
> > Cannot get a connection, pool exhaustedjava.util.NoSuchElementException:
> > Could not create a validated object, cause: Method not supported -
> > setAutoCommit(true)
> >       at
> >
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:806)
> >       at
> >
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
> >       at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:212)
> >       at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:195)
> >       at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:239)
> >       at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:60)
> >       at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:1121)
> >       at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:913)
> >       at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:151)
> >       at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:87)
> >       at
> mondrian.olap.DriverManager.getConnection(DriverManager.java:112)
> >       at mondrian.olap.DriverManager.getConnection(DriverManager.java:71)
> >       at mondrian.olap.DriverManager.getConnection(DriverManager.java:53)
> >       at
> >
> mondrian.web.servlet.MdxQueryServlet.processRequest(MdxQueryServlet.java:90)
> >       at
> mondrian.web.servlet.MdxQueryServlet.doGet(MdxQueryServlet.java:241)
> >       at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> >       at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >       at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> >       at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >       at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
> >       at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
> >       at
> >
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> >       at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
> >       at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> >       at
> > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
> >       at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> >       at
> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> >       at
> >
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
> >       at
> >
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
> >       at
> >
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
> >       at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> >       at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> >       at java.lang.Thread.run(Thread.java:662)
> >
> >
> > What version of mondrian works with hive ? or Am i missing something?
> >
> >
> > _______________________________________________
> > Mondrian mailing list
> > Mondrian at pentaho.org
> > http://lists.pentaho.org/mailman/listinfo/mondrian
> >
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20120229/da4198b2/attachment-0001.html 


More information about the Mondrian mailing list