hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanjeev sagar <sanjeev.sa...@gmail.com>
Subject Issue with Hive remote connection to mysql metastore
Date Wed, 01 Jun 2011 00:46:00 GMT
Hello All, I'm having an issue while connecting hive on (client machine) to
Hadoop server running mysql based metastore.

My client side configuration for hive-site.xml file are below. I'm not sure
about the value i'm using for hive.metastore.uris

I did not find much info on this. I saw mails using value with thrift or
file. I was not sure if either one of them is valid for using mysql
metastore remotely.

<!-- Hive client parameters for remote metastore --> <property>

   <name>hive.metastore.warehouse.dir</name>

   <value>/user/hive/warehouse</value>

   <description>location of default database for the warehouse</description>
</property>



<property>

  <name>hive.metastore.uris</name>

  <value>thrift://testh1:3306</value>

  <description>controls whether to connect to remote metastore server
</description> </property>



<property>

  <name>hive.metastore.local</name>

  <value>false</value>

  <description>controls whether to connect to remove metastore server
</description> </property>

Message in the hive log file:


2011-05-31 17:29:24,414 ERROR exec.DDLTask

(SessionState.java:printError(343)) - FAILED: Error in metadata:

org.apache.thrift.transport.TTransportException

org.apache.hadoop.hive.ql.metadata.HiveException:

org.apache.thrift.transport.TTransportException

        at

org.apache.hadoop.hive.ql.metadata.Hive.getDatabase(Hive.java:1028)

        at

org.apache.hadoop.hive.ql.metadata.Hive.databaseExists(Hive.java:1013)

        at

org.apache.hadoop.hive.ql.exec.DDLTask.showTables(DDLTask.java:1691)

        at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:289)

        at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:130)

        at

org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)

        at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1063)

        at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:900)

        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:748)

        at

org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:164)

        at

org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:241)

        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:456)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.hadoop.util.RunJar.main(RunJar.java:186)

Caused by: org.apache.thrift.transport.TTransportException

        at

org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)

        at

org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)

        at

org.apache.thrift.protocol.TBinaryProtocol.readStringBody(TBinaryProtocol.java:354)

        at

org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:215)

        at

org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_get_database(ThriftHiveMetastore.java:351)

        at

org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.get_database(ThriftHiveMetastore.java:336)

        at

org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getDatabase(HiveMetaStoreClient.java:634)

        at

org.apache.hadoop.hive.ql.metadata.Hive.getDatabase(Hive.java:1024)

        ... 16 more



2011-05-31 17:29:24,418 ERROR ql.Driver

(SessionState.java:printError(343)) - FAILED: Execution Error, return
code 1 from org.apache.hadoop.hive.ql.exec.DDLTask


Can some one assist me that what config i need to connect hive on clinet to
hadoop cluseter server with mysql metastore? Do i need to start the thrift
server by using hive --service metastore ?? if yes then where on client or
server???

Highly appreciate it.


-- 
Sanjeev Sagar

Mime
View raw message