Topic HIVE connection

Mashud started the topic:
2016-01-29 21:10

HIVE connection

Hi,

I am having issue creating hive datastore, here are my inputs:

jdbc:hive2://phpvcoredev03:10000/flex_a

Error:
Cannot create PoolableConnectionFactory (Could not establish connection to jdbc:hive2://phpvcoredev03:10000/flex_a: Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{use:database=flex_a}))

Could not establish connection to jdbc:hive2://phpvcoredev03:10000/flex_a: Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{use:database=flex_a})

Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{use:database=flex_a})


I did a search on the error and i found out it may be a possible hive-jdbc.jar version error.

The version i have for datacleaner is 4.5.4 which contains hive-jdbc-1.2.1.jar, and the version we have on the box is:


hive-hwi-1.0.0-mapr.jar
hive-jdbc-1.0.0-mapr.jar
hive-jdbc-1.0.0-mapr-standalone.jar
hive-json-serde-0.2.jar
hive-metastore-1.0.0-mapr.jar

I just wanted to confirm if this is the cause for the error and what are my options in resolving this issue.

Thanks
Kasper Sørensen replied:
2016-02-01 16:33
The issue here is the same as with HBase which you also reported [1]. And the fix should be similar - to make a classpath in your launch of DC that loads your specific Hive version before the one that is bundled normally in DC.

[1] http://datacleaner.org/topic/1111/HBASE-connection
Mashud replied:
2016-02-02 21:15
Hi,

I followed the steps and copied hive jar files from our linux machine to mashudlib folder, i was able to make a successfully connection when clicking on the test connection button but when trying to query the hive table i am getting org.apache.metamodel.MetaModelException: Could not determine default schema name: Method not supported error message.

Note: We have 1 additional hive jar file called: hive-jdbc-1.0.0-mapr-standalone.jar, but when i add this to the cmd line it fails to load the DC UI, so i took that out and kept the remaining jar files.


cmd command

java -cp mashudlib/hive-accumulo-handler-1.0.0-mapr.jar;mashudlib/hive-ant-1.0.0-mapr.jar;mashudlib/hive-beeline-1.0.0-mapr.jar;mashudlib/hive-cli-1.0.0-mapr.jar;mashudlib/hive-common-1.0.0-mapr.jar;mashudlib/hive-contrib-1.0.0-mapr.jar;mashudlib/hive-exec-1.0.0-mapr.jar;mashudlib/hive-hbase-handler-1.0.0-mapr.jar;mashudlib/hive-hwi-1.0.0-mapr.jar;mashudlib/hive-jdbc-1.0.0-mapr.jar;mashudlib/hive-json-serde-0.2.jar;mashudlib/hive-metastore-1.0.0-mapr.jar;mashudlib/hive-serde-1.0.0-mapr.jar;mashudlib/hive-service-1.0.0-mapr.jar;mashudlib/hive-shims-0.20-1.0.0-mapr.jar;mashudlib/hive-shims-0.20S-1.0.0-mapr.jar;mashudlib/hive-shims-0.23-1.0.0-mapr.jar;mashudlib/hive-shims-1.0.0-mapr.jar;mashudlib/hive-shims-common-1.0.0-mapr.jar;mashudlib/hive-shims-common-secure-1.0.0-mapr.jar;mashudlib/hive-testutils-1.0.0-mapr.jar;datacleaner.jar com.hi.datacleaner.Main



Error:

Unexpected error!


Message:
org.apache.metamodel.MetaModelException: Could not determine default schema name: Method not supported
Level:
SEVERE
Stack Trace:
Could not determine default schema name: Method not supported
org.apache.metamodel.jdbc.JdbcUtils.wrapException(JdbcUtils.java:68)
org.apache.metamodel.jdbc.JdbcDataContext.getDefaultSchemaName(JdbcDataContext.java:675)
org.apache.metamodel.AbstractDataContext.getDefaultSchema(AbstractDataContext.java:123)
org.datacleaner.connection.SchemaNavigator.getDefaultSchema(SchemaNavigator.java:56)
org.datacleaner.panels.DatastorePanel$5.actionPerformed(DatastorePanel.java:207)
javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.setPressed(Unknown Source)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
java.awt.Component.processMouseEvent(Unknown Source)
javax.swing.JComponent.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Unknown Source)
java.awt.Container.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Window.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.EventQueue.dispatchEventImpl(Unknown Source)
java.awt.EventQueue.access$500(Unknown Source)
java.awt.EventQueue$3.run(Unknown Source)
java.awt.EventQueue$3.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue$4.run(Unknown Source)
java.awt.EventQueue$4.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.run(Unknown Source)
Method not supported
org.apache.hive.jdbc.HiveDatabaseMetaData.getURL(HiveDatabaseMetaData.java:749)
org.apache.commons.dbcp.DelegatingDatabaseMetaData.getURL(DelegatingDatabaseMetaData.java:646)
org.apache.metamodel.jdbc.JdbcDataContext.getDefaultSchemaName(JdbcDataContext.java:638)
org.apache.metamodel.AbstractDataContext.getDefaultSchema(AbstractDataContext.java:123)
org.datacleaner.connection.SchemaNavigator.getDefaultSchema(SchemaNavigator.java:56)
org.datacleaner.panels.DatastorePanel$5.actionPerformed(DatastorePanel.java:207)
javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.setPressed(Unknown Source)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
java.awt.Component.processMouseEvent(Unknown Source)
javax.swing.JComponent.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Unknown Source)
java.awt.Container.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Window.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.EventQueue.dispatchEventImpl(Unknown Source)
java.awt.EventQueue.access$500(Unknown Source)
java.awt.EventQueue$3.run(Unknown Source)
java.awt.EventQueue$3.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue$4.run(Unknown Source)
java.awt.EventQueue$4.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.run(Unknown Source)
Kasper Sørensen replied:
2016-02-03 09:59
Hi Mashud,

The error here is coming from Hive's JDBC driver :-/ It throws an error when we're asking what the schema name is. I guess that's probably because Hive does not have a schema concept, but databases who don't use schemas are still supposed to answer the question with a "no schema name" like response. Unfortunately this is not something I can easily patch. We may find a way to work around it in a future release, but it seems to be a child decease of the old Hive driver version.
Jordan replied:
2016-09-28 15:26
Ah crap, this is a duplicate of the topic I just posted [ https://datacleaner.org/topic/1143/Hive-Impala-connections-won%27t-work here] .

This also likely means that this product is completely useless for my company. Oh well. :(
Seetharam replied:
2016-10-26 10:08
this is not used for my company i think so
You are not signed in.
You need to be signed in to participate in the discussion.