
hive
Rudolf__
努力成为有思想的人
展开
-
Sqoop把mysql数据导入hive,hdfs采用parquet+snappy存储
背景:1.业务和业务数据量不断增加,需要用到hadoop进行数据分析和存储,现在将mysql数据到到hive,每个mysql表结构都差不多,现在以order_node为例,它的字段类型有bigint,varchar,int,tinyint(1),tinyint(4),datetime,decimal(18,6);2.mysql表有300多张,30多张表数据量超过1000万,有5个表数据量已经过亿;3.hdfs副本数为3,为了节省存储空间,需要用parquet存储,snappy压缩,parquet+sn原创 2020-12-03 15:36:29 · 2160 阅读 · 1 评论 -
Kettle将mysql数据导入到Hive 数据类型不支持Decimal
1.我要将mysql的数据迁移到hdfs,使用etl工具Kettle2.在迁移过程中首先启动hadoop和hivehadoop启动start-all.sh,通过方位webui查看相关服务是否启动正常hive启动hive --service metastore &;hive --service hiveserver2 &;查看端口10000是否启动成功,netstat -alnp|grep 10000;3.在kettle写入的步骤报错Error setting value #124原创 2020-11-26 15:30:24 · 916 阅读 · 0 评论 -
sqoop从mysql导数到hive动态分区
1.创建有dt的普通表homs.oms_order_tmpCREATE TABLE homs.oms_order_tmp(id int,order_id bigint,order_name string,custom string,created_time string,created_by date,updated_time string,updated_by string,status tinyint,day string) COMMENT ‘订单临时表’ STORED As textfile;问题原创 2020-10-17 11:18:14 · 1193 阅读 · 0 评论 -
hive 元数据初始失败
1.驱动错误,我用的是mysql8.0,驱动改为com.mysql.cj.jdbc.Driver换驱动包2. 又报错 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThe last packet sent successfully to the server was...原创 2020-03-01 11:42:18 · 746 阅读 · 0 评论