[Mondrian] HiveDialect not being found
jhyde at pentaho.com
Wed Jul 4 00:10:26 EDT 2012
On Jul 3, 2012, at 4:35 PM, Craig Soules wrote:
I'm sure someone has seen this before, so hopefully this will be easy to answer.
I think this is a new issue. (Some other problems are logged in http://jira.pentaho.com/browse/MONDRIAN-789.) But I'll give it my best shot...
I'm trying to hook up Mondrian to Hive. I noticed that there is a HiveDialect implementation, but that it was not listed in the META-INF/services/mondrian.spi.Dialect file in the 3.4.1 release. I've tried several methods for adding it (described below), but I keep feeling the following error:
mondrian.olap.MondrianException: Mondrian Error:Internal error: while quoting identifier
Caused by: java.sql.SQLException: Method not supported
... 8 more
I believe this indicates that the default JdbcDialectImpl is being used instead of the HiveDialect
You are correct. HiveDialect overrides deduceIdentifierQuoteString, but only the base method occurs in the stack.
... I can't seem to figure out why or how to fix it. I tried unpacking mondian.jar, adding a line for the HiveDialect, and re-packing it. I have also tried re-building Mondrian from scratch with that line added to the build's version of the file, also with no success.
You're trying to do the right thing. I don't know why adding a line to mondrian.spi.Dialect doesn't work.
Are you running under a web server such as tomcat? Sometimes web servers will unpack to their working directory and your modified version won't be seen.
I know that my JDBC parameters are correct, because I can see Mondrian connecting to Hive, but because Hive's JDBC driver is not full-featured (thus the need for the HiveDialect), I keep getting this failure.
Any pointers or help on this would be much appreciated!
Reading the code, there is probably a problem in JdbcDialectImpl.getProduct. It never returns DatabaseProduct.HIVE. Try adding an appropriate 'else if' clause.
I will add a line to mondrian.spi.Dialect. Even thought the Hive dialect is only beta quality, we might as well register it. I will also add a Dialect parameter to Mondrian's connect string; we might as well allow people to explicitly specify a dialect class, if they know what they want.
Hope this helps. Please let me know whether or not this solves your problem. I'd like to resolve this issue.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mondrian