The current JDBC interface for Hive only supports running queries and fetching results. Only a small subset of the metadata calls are supported.
To see how the JDBC interface can be used, see sample code.
Overwrite report-designer.sh with the code provided below.
#!/bin/sh
HADOOP_CORE={{ls $HADOOP_HOME/hadoop-*-core.jar}}
CLASSPATH=.:$HADOOP_CORE:$HIVE_HOME/conf
for i in ${HIVE_HOME}/lib/*.jar ; do
CLASSPATH=$CLASSPATH:$i
done
CLASSPATH=$CLASSPATH:launcher.jar
echo java -XX:MaxPermSize=512m -cp $CLASSPATH -jar launcher.jar
java -XX:MaxPermSize=512m -cp $CLASSPATH org.pentaho.commons.launcher.Launcher
|
Run the report designer (note step 2).
$ sh reporter-designer.sh |
Provide Hive JDBC parameters. Give the connection a name 'hive'.
URL: jdbc:hive://localhost:10000/default Driver name: org.apache.hadoop.hive.jdbc.HiveDriver Username and password are empty |
PageOfPages to Group Items By. Add key and value as Selected Items. Click next. And Finish.Enter the driver name and example URL:
Name: Hive Example URL: jdbc:hive://localhost:10000/default |
Select 'Extra Class Path -> Add' to add the following jars from your local Hive and Hadoop distribution.
HIVE_HOME/build/dist/lib/*.jar HADOOP_HOME/hadoop-*-core.jar |
Select 'List Drivers'. This will cause SQuirrel to parse your jars for JDBC drivers and might take a few seconds. From the 'Class Name' input box select the Hive driver:
org.apache.hadoop.hive.jdbc.HiveDriver |
When the connection is established you will see errors in the log console and might get a warning that the driver is not JDBC 3.0 compatible. These alerts are due to yet-to-be-implemented parts of the JDBC metadata API and can safely be ignored. To test the connection enter SHOW TABLES in the console and click the run icon.
Also note that when a query is running, support for the 'Cancel' button is not yet available.