SerDe may be needed to deserialize the result from Hive server. But I also thought the results are in delimited form (LazySimpleSerDe or MetadataTypedColumnSetSerDe or something like that) so it is possible to decouple hadoop jar but will take some work.
________________________________
From: Bill Graham <billgraham@gmail.com>
Reply-To: <hive-user@hadoop.apache.org>, <billgraham@gmail.com>
Date: Tue, 15 Sep 2009 22:54:50 -0700
To: Vijay <techvd@gmail.com>
Cc: <hive-user@hadoop.apache.org>
Subject: Re: Problems using hive JDBC driver on Windows (with Squirrel SQL Client)
Good question. The JDBC package relies on the hive serde2 package, which has at least the following Hadoop dependencies:
org.apache.hadoop.conf.Configuration;
org.apache.hadoop.io.*;
org.apache.hadoop.util.StringUtils;
Someone more familiar with the serde2 package of the Hive codebase could comment better as to why these deps exist.
On Tue, Sep 15, 2009 at 3:46 PM, Vijay wrote:
Thanks a lot Bill! That was my problem. I thought my code base was pretty recent. Apparently not!!
I have a follow up question. Why does the hive jdbc driver need all of the jar files under lib *and* the hadoop core jar file? It seems like the jdbc driver is primarily acting as a thrift client to the thrift server. Shouldn't the requirements then be much more light-weight?
On Tue, Sep 15, 2009 at 2:31 PM, Bill Graham wrote:
Hi Vijay,
Check your classpath to make sure you've got the correct hive-jdbc.jar version built using either the trunk or the current 4.0 branch. HiveStatement.java:390 used to throw 'java.sql.SQLException: Method not supported' before HIVE-679 was committed. In the current code base after the commit, the setMaxRows method is on lines 422-425.
thanks,
BIll
On Tue, Sep 15, 2009 at 2:13 PM, Vijay wrote:
I'm having trouble getting the hive jdbc driver to work on Windows. I'm following the Squirrel SQL Client setup from the Hive/HiveJDBCInterface wiki page. Everything works great when Squirrel SQL Client is running on Linux but on Windows it doesn't. Squirrel can connect to the hive server fine so the setup is alright. However, when I issue a query, it doesn't seem to execute at all. I see this exception in the Squirrel client:
2009-09-15 14:10:35,268 [Thread-5] ERROR net.sourceforge.squirrel_sql.client.session.SQLExecuterTask - Can't Set MaxRows
java.sql.SQLException: Method not supported
at org.apache.hadoop.hive.jdbc.HiveStatement.setMaxRows(HiveStatement.java:390)
at net.sourceforge.squirrel_sql.client.session.SQLExecuterTask.setMaxRows(SQLExecuterTask.java:318)
at net.sourceforge.squirrel_sql.client.session.SQLExecuterTask.run(SQLExecuterTask.java:157)
at net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
at java.lang.Thread.run(Thread.java:619)
I don't seem to get this exception on Linux. I can't get the Squirrel client to not set max rows but I'm not entirely sure that's the real problem.
Any help is appreciated.
Vijay