Failed to create instance of org.apache.hadoop.hive.metastore.HiveMetaStoreClient

I just installed the bush and mysql .. and copied mysqlconnector to the hive_home / lib folder

but when I try to show the databases and create table commands at the hive> prompt, giving me an error as shown below:

create database saty;
FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

and my hive_site.xml

<property>    
  <name>javax.jdo.option.ConnectionURL</name>         
  <value>jdbc:mysql://localhost:3306/hadoop?CreateDatabaseIfNotExist=true</value>         
  <description>JDBC connect string for a JDBC metastore</description>
</property>

<property>
  <name>javax.jdo.option.ConnectionDriverName</name>
  <value>com.mysql.jdbc.Driver</value>
  <description>Driver class name for a JDBC metastore</description>
</property>

<property>
  <name>hive.metastore.warehouse.dir</name>
  <value>/user/hive/warehouse</value>
  <description>location of default database for the warehouse</description>
</property>

and I don't have a directory named / user / hive / warehouse in my file system.

I created this path with the mkdir .. command and tried after rebooting .. the bot still gets the error.

Regards, Sathya

+4
source share
4 answers

Try to specify these two properties

<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>username</value>
<description>Username to use against metastore database</description>
</property>

<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>password</value>
<description>Password to use against metastore database</description>
</property>

, mysql db sepcified JDBC.

GRANT ALL ON Databasename.* TO username@'%' IDENTIFIED BY 'password';
+2

, selinux, Postgres .

/etc/rc 3.d/S64postgresql -

echo 0 > /selinux/enforce # selinux

node .

, :

  • /
0

-hiveconf hive.root.logger = warn, , , .

, , mysql, : " . : " READ-COMMITTED " InnoDB binlog" ". binlog_format " statement "" binlog_format = mixed", hive meta .

, .

0

All Articles