Connecting to Hiveserver2
17 September, 2014
The default database driver shipped with Yellowfin is not compatible with Hiveserver2. To get this up and running follow the instructions below.
King regards,
Bas
## Copy files
Copy the following files to a folder somewhere on the Yellowfin server:
/usr/lib/hadoop/ (path in Hortonworks HDP2.1)
[code]hadoop-common-2.4.0.2.1.4.0-632.jar[/code]
/usr/lib/hive/lib (path in Hortonworks HDP2.1)
[code]commons-codec-1.4.jar
commons-logging-1.1.3.jar
guava-11.0.2.jar
hive-common-0.13.0.2.1.4.0-632.jar
hive-jdbc-0.13.0.jar
hive-service-0.13.0.jar
httpclient-4.2.5.jar
httpcore-4.2.5.jar
libthrift-0.9.0.jar
slf4j-api-1.7.7.jar[/code]
## Change ownership and permissions
cd /opt/Yellowfin/appserver/webapps/ROOT/WEB-INF/lib
sudo chown yellowfin:yellowfin *
sudo chmod 644 *
NOTE: yellowfin is the user who runs the yellowfin proces
## Edit file
Add the following at the bottom of the JDBCDrivers section in '/opt/Yellowfin/appserver/webapps/ROOT/WEB-INF/web.xml'
[code]org.apache.hive.jdbc.HiveDriver[/code]
NOTE: dont forget to end the line above the newly pasted line with a comma
## Restart Yellowfin
cd /opt/yellowinf/appserver/bin
sudo su yellowfin -c ./shutdown.sh
sudo su yellowfin -c ./startup.sh
NOTE: yellowfin is the user who runs the yellowfin proces
## Create Data Source
Connection method: JDBC
Database: Apache Hive 2
Driver Path: /opt/Yellowfin/appserver/webapps/ROOT/WEB-INF/lib
Test connection
[quote="">EDIT: extra file guava-11.0.2.jar[/quote]
King regards,
Bas
## Copy files
Copy the following files to a folder somewhere on the Yellowfin server:
/usr/lib/hadoop/ (path in Hortonworks HDP2.1)
[code]hadoop-common-2.4.0.2.1.4.0-632.jar[/code]
/usr/lib/hive/lib (path in Hortonworks HDP2.1)
[code]commons-codec-1.4.jar
commons-logging-1.1.3.jar
guava-11.0.2.jar
hive-common-0.13.0.2.1.4.0-632.jar
hive-jdbc-0.13.0.jar
hive-service-0.13.0.jar
httpclient-4.2.5.jar
httpcore-4.2.5.jar
libthrift-0.9.0.jar
slf4j-api-1.7.7.jar[/code]
## Change ownership and permissions
cd /opt/Yellowfin/appserver/webapps/ROOT/WEB-INF/lib
sudo chown yellowfin:yellowfin *
sudo chmod 644 *
NOTE: yellowfin is the user who runs the yellowfin proces
## Edit file
Add the following at the bottom of the JDBCDrivers section in '/opt/Yellowfin/appserver/webapps/ROOT/WEB-INF/web.xml'
[code]org.apache.hive.jdbc.HiveDriver[/code]
NOTE: dont forget to end the line above the newly pasted line with a comma
## Restart Yellowfin
cd /opt/yellowinf/appserver/bin
sudo su yellowfin -c ./shutdown.sh
sudo su yellowfin -c ./startup.sh
NOTE: yellowfin is the user who runs the yellowfin proces
## Create Data Source
Connection method: JDBC
Database: Apache Hive 2
Driver Path: /opt/Yellowfin/appserver/webapps/ROOT/WEB-INF/lib
Test connection
[quote="">EDIT: extra file guava-11.0.2.jar[/quote]
NICE!