For direct MetaStore DB connections, we don't support retries at the client level.)

做操作hive时候,对分区表加载数据。报错

使用hive导入数据到分区中报错如下:

Failed with exception MetaException(message:For direct MetaStore DB connections, we don't support retries at the client level.)
org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:For direct MetaStore DB connections, we don't support retries at the client level.)

.......

Caused by: MetaException(message:For direct MetaStore DB connections, we don't support retries at the client level.)
    at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.reconnect(HiveMetaStoreClient.java:307)
    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:98)
    at com.sun.proxy.$Proxy9.appendPartition(Unknown Source)
    at org.apache.hadoop.hive.ql.metadata.Hive.getPartition(Hive.java:1833)
    ... 22 more

ERROR : FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask
解决:

1、在网上找了许多,发现一个解决办法,应该是hive,配置文件中取的元数据库名称有问题导致的,注:使用的是mysql作为元数据存储。

(1)删除mysql里的hive自建的hive数据库,重新创建metastore,之后修改metastore的字符集

alter database metastore character set latin1;

(2)在hive的conf目录下的hive-site.xml里修改


                javax.jdo.option.ConnectionURL
                jdbc:mysql://node1:3306/metastore?createDatabaseIfNotExist=true
                JDBC connect string for a JDBC metastore
                
 

2、是hive的lib目录下mysql驱动版本的问题

替换mysql连接驱动版本为:mysql-connector-java-5.1.47.jar

你可能感兴趣的:(大数据开发遇错问题)