Support Questions
Find answers, ask questions, and share your expertise

Connection to hiveserver2 using sqoop


Hi, I would like to connect to Hiveserver2 of my sandbox. But I am facing a problem with the connection string. I have a java exception saying that there is an error when creating database manager as you can see on the joined picture. Can anyone help me with the rigth string?



Re: Connection to hiveserver2 using sqoop

Super Mentor


Can you please copy the hive-jdbc JARs to the sqoop client directory and then try with the "--driver org.apache.hive.jdbc.HiveDriver" as following:

# cp -f /usr/hdp/current/hive-server2/lib/hive-jdbc.jar /usr/hdp/current/spark-client/lib/

# sqoop list-databases --connect "jdbc:hive2://" --driver org.apache.hive.jdbc.HiveDriver


All SQL managers does not support the "list-databases" so you might notice the following error while listing databases.

ERROR manager.SqlManager: Generic SqlManager.listDatabases() not implemented.
Could not retrieve database list from server
ERROR tool.ListDatabasesTool: manager.listDatabases() returned null

. So try the following "list-tables" to validate the same.


# sqoop list-tables --connect "jdbc:hive2://;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2" --driver org.apache.hive.jdbc.HiveDriver --username hive -P