1

I installed Hadoop on windows and also setup hive. When I start hive using hive.cmd, I get the following error

16/12/28 18:14:05 WARN conf.HiveConf: HiveConf of name hive.server2.enable.impersonation does not exist

java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

It has not created the metastore_db folder in the hive\bin path.

I also tried using the schematool to initialize the schemas. But it gives me "'schematool' is not recognized as an internal or external command, operable program or batch file."

My environment variables are as follows :

HIVE_BIN_PATH : C:\hadoop-2.7.1.tar\apache-hive-2.1.1-bin\bin
HIVE_HOME : C:\hadoop-2.7.1.tar\apache-hive-2.1.1-bin
HIVE_LIB : C:\hadoop-2.7.1.tar\apache-hive-2.1.1-bin\lib
PATH : C:\hadoop-2.7.1.tar\hadoop-2.7.1\bin;C:\apache\db-derby-10.12.1.1-bin\bin;C:\hadoop-2.7.1.tar\apache-hive-2.1.1-bin\bin;

Here is my hive-site.xml

    <?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:derby://localhost:1527/metastore_db;create=true</value>
    <description>JDBC connect string for a JDBC metastore</description>
</property>
<property>
    <name>javax.jdo.option.ConnectionDriverName</name>
    <value>org.apache.derby.jdbc.ClientDriver</value>
    <description>Driver class name for a JDBC metastore</description>
</property>
<property>
    <name>hive.server2.enable.impersonation</name>
    <value>true</value>
    <description>Enable user impersonation for HiveServer2</description>
</property>
<property>
    <name>hive.server2.authentication</name>
    <value>NONE</value>
</property>
<property>
    <name>datanucleus.autoCreateTables</name>
    <value>True</value>
</property>
<property>
    <name>hive.metastore.schema.verification</name>
    <value>true</value>
</property>
</configuration>

I have added the derby.jar, derby-client.jar and derbytools.jar to the hive\lib folder. I have also added the slf4j-api-1.5.8.jar to the hive\lib folder. But it still does not work. Any pointers on this one?

mrsrinivas
  • 34,112
  • 13
  • 125
  • 125
Supriya
  • 91
  • 2
  • 13
  • 1
    This error got rectified after the property "hive.metastore.schema.verification" was set to false in hive-site.xml – Supriya Jan 01 '17 at 10:50
  • I am now trying to write a simple java program to connect to the hive db. But, the java application gives "java.sql.SQLException: org.apache.thrift.transport.TTransportException" .... I have added all the required jars ... libthrift-0.9.0.jar, libfb303-0.9.0.jar, hive-service-0.13.0.jar, hive-metastore-0.13.0.jar, hive-exec-0.13.0.jar and hive-jdbc-0.10.0.jar..... Any pointers on this? – Supriya Jan 01 '17 at 10:53
  • You can try executing the actions suggested in this answer: http://stackoverflow.com/a/10845065/2026277 – Jaime Caffarel Jan 01 '17 at 18:35
  • This error was because of a jar file version conflict between the client and server. This issue is resolved now..... Thanks for the help! – Supriya Jan 09 '17 at 05:30

0 Answers0