![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
安博里阿
这个作者很懒,什么都没留下…
展开
-
上传本地数据文件创建Hive表
create external table test(a string,b…)row formate serde‘org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe’with serdeproperties(“field.elim”=’|’,“serialization.encoding”=‘GBK’)Location ‘hdfs://nameservice1/warehouse…’stored as textfiletblpropertie原创 2021-09-10 09:45:11 · 171 阅读 · 0 评论 -
shell中的时间转换
背景:写shell脚本时候需要将20210818转换成2021-08-18以便传入sql进行过滤查询。#! /bin/bashbatch_date=$1create_time=`date -d "${batch_date}" "+%Y-%m-%d"`echo "create_time: ${create_time}"原创 2021-08-18 20:57:18 · 461 阅读 · 0 评论 -
Hive3新建托管表,count(*)一直为0排查
问题点:在新环境用hive3新建一张托管表,后台通过hdfs dfs -put方式将数据加载到新表的location。发现select count(*)一直为0。原因分析:Hive3提供了查询缓存方案。内部表会做相关信息统计。建表之后,put数据之前,表统计信息记录表rows为0。导致hive查询缓存显示为0。解决方案1执行命令Analyze table tablename compute statistics.方案2在hue中点击刷新。...原创 2021-07-14 15:31:02 · 292 阅读 · 0 评论 -
CDP-RANGER报错处理
CDP-ranger报错: 文件描述符太多:(测试该角色是否拥有过多已经打开的文件描述符,使用百分比74.3%,临界阈值:70%)将ranger主节点上的/etc/security/limits.conf中的soft nofile调高致65536。在服务器上ulimit -n 命令也调成65536,现将ranger服务的配置项“最大进程文件描述符”由空改成65536,报错可消失。...原创 2021-07-14 11:08:07 · 309 阅读 · 0 评论 -
在HUE使用hive引擎建表,带上中文commment建表失败
标题在HUE使用hive引擎建表,带上中文commment建表失败## 标题CDP环境下,更换hue server节点后,建表带有中文注释。问题描述:在hue使用hive引擎建表,带上中文comment建表失败,提示报错:ascii codec cannot decode byte 0xe4 in position 187 :ordinal not in range(128)解决方案:在所有的hue server 节点修改python默认编码,再重启hueVi /opt/cloudera/pa原创 2021-07-14 10:59:27 · 582 阅读 · 0 评论