• Hive错误记录


    创建表报错

    Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException
    (message:For direct MetaStore DB connections, we don't support retries at the client level.) (state=08S01,code=1)
    
    • 注意,这里使用的hive链接为:jdbc:mysql://10.1.1.5:3306/hive?createDatabaseIfNotExist=true
    • 如果数据库不存在会自动创建hive数据库,这时的hive数据编码会是默认数据库编码(我这里是UTF-8).修正数据库编码后正常创建表
    • alter database hive character set latin1;

    load数据错误

    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:308)
    	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:148)
    	at com.sun.proxy.$Proxy9.appendPartition(Unknown Source)
    	at org.apache.hadoop.hive.ql.metadata.Hive.getPartition(Hive.java:1849)
    	... 22 more
    
    • 还是因为数据库字符集的原因,我这里数据库默认已经是latin,发现库中部分表仍然是UTF8,修改表为latin后导入数据仍然报错
    • 解决办法,备份原有hive数据库并删除,然后新创建hive数据库,指定字符集latin(navicate有可能默认帮你设置UTF-8,创建后需再次查看是否为latin)
    • 重启hive导入数据,成功
  • 相关阅读:
    Java基于Socket文件传输示例
    mysql 改变编码
    POI应用:利用word模板批量生成word文档(java中word文档的读写)
    Win 7—FTP服务器配置
    Chrome 快捷键
    JAVA中使用FTPClient上传下载 java利用ftp协议上传文件(by me)
    JAVA中使用FTPClient上传下载
    如何去除TD之间的空隙
    较丰富的教程
    输入年月 返回当月天数.html
  • 原文地址:https://www.cnblogs.com/0xcafedaddy/p/7520857.html
Copyright © 2020-2023  润新知