美文网首页
hive使用过程中踩过的坑

hive使用过程中踩过的坑

作者: 星辰fml | 来源:发表于2019-05-21 10:41 被阅读0次
  • 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)。
    原因:在创建mysql时使用的字符集不对,需要修改hive数据库的字符集。
    解决:在mysql中使用命令修改hive数据库字符集:alter database hive character set latin1;

  • Cannot execute statement:impossible to write to binary long since BINLOG_FORMAT = STATEMENT...
    当启动时报错
    Caused by: javax.jdo.JDOException:Couldnt obtain a new sequence(unique id):Cannot execute statement:impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITED.
    NestedThrowables: java.sql.SQLException:Cannot execute statement:impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITED or READ UNCOMMITED.
    原因:这是由于hive的元数据存储MYSQL配置不当引起的
    解决:mysql> set global binlog_format='MIXED'

  • 当执行hive客户端时出现如下错误:
    WARN conf.HiveConf:HiveConf of name hive metastore.local does not exist。
    原因:这是由于在0.10.11或者之后的HIVE版本的hive.metastore.local属性将不再使用。
    解决:将该参数从hive-site.xml文件中删除即可。

  • 在启动hive时报如下错误:
    Permission denied: user=anonymous, access=EECUTE, inode="/tmp":hadoop:supergroup:drwx----
    原因:这是由于Hive没有hdfs:/tmp目录的权限,赋权限即可
    解决:使用hadoop命令修改权限:hadoop dfs -chmod -R 777 /tmp

  • 在删除表的时候卡死
    原因:由于是先创建的表,之后再修改的hive数据库的字符集,所以卡死。
    解决:将hive数据库删除,再使用mysql重新创建,创建后修改字符集为latin1,在mysql删除hive数据库时,需要将hive停止,不然mysql也会卡死。

  • 如果数据已经存在HDFS上,在不修改原HDFS的目录结构下受益Hive的分区的功能的解决:
    修改表,添加分区并指定存储路径:
    HDFS上的存放路径:hdfs://user/name/floder/2017/03/01/file1,file2,file3
    /2017/03/02/file4,file5
    ....
    /2017/05/03/file100,file101
    解决:alter table tableName
    add partition(yr=2017,mon=03,day=01) localtion '/user/name/folder/2017/03/01';
    location:指定存放在hdfs的路径,hive不会修改此hdfs的目录的格式名称。

相关文章

  • 大数据爬坑收录

    爬出过的坑 大数据运维过程就是一个踩坑的过程。如下分享一些踩过的坑,以供参考。 Hive Spark Flink ...

  • 2019-08-01 疑难杂症之- hive踩坑

    很多时候,你以为你懂了,其实你并没有。采坑指南就是将踩过的坑记住。 1、hive 表新增字段时,采坑 2、hive...

  • hive使用过程中踩过的坑

    hive创建表时出现:Error: Error while processing statement: FAILE...

  • Hive性能优化

    Hive性能优化 1.概述继续《那些年使用Hive踩过的坑》一文中的剩余部分,本篇博客赘述了在工作中总结Hive的...

  • 交互设计师所要避免的几个坑

    前言 工作中难免会踩到几个坑,即使现在不踩以后还会踩,只有踩过才会深刻记住,踩过说明爱过!但是踩过的坑必须把坑填满...

  • 聊聊微信 Xlog

    同步地址 本文介绍 MARS xlog 使用以及使用过程中踩过的坑 xlog 是什么 xlog 是微信开源框架 M...

  • JAVA分布式开发中遇到的哪些坑(一)

    一、Spring使用过程中的踩坑记录 Spring通过注解使用多数据源 坑:@Autowired 按 byType...

  • Hive踩坑合集

    转载请在文章起始处注明出处,谢谢。 坑1、split的时候,NULL和''的区别 如果字符串最后的#没拼接数据: ...

  • vue踩过的坑

    vue踩过的坑

  • CDH5.7 hive+sqoop踩坑实践

    为了做一个基于hive的大数据采集平台,最近踩了不少的坑。 首先是想采用开源的项目代码搭建hadoop+hive+...

网友评论

      本文标题:hive使用过程中踩过的坑

      本文链接:https://www.haomeiwen.com/subject/bfsdzqtx.html