![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hive
文章平均质量分 62
青青水草
这个作者很懒,什么都没留下…
展开
-
hive 调优
hive 本地模式 根据数据量的大小,可以开启hive的本地模式:hive.exec.mode.local.auto 该参数的默认值为false。 也可以把该属性配置到hive-site.xml中。 hive并行执行 hive并行执行,hive可以把一个查询转化成一个或者多个阶段,这些阶段并不是完全相互依赖的,也就是说有些阶段是可以并行执行的,这样就可以使整个job的执行时原创 2017-04-28 13:05:59 · 308 阅读 · 0 评论 -
hive 表修改字段类型
hive> alter table tcdc_recmd_hotelsales_predict change column sales_predict at decimal(30,11);原创 2017-05-27 15:40:13 · 37243 阅读 · 1 评论 -
hive 创建表
HQL对sql语句的扩展,可以定义表的数据文件存储在什么位置,以及定义表文件存储格式。 create table if not exists hives.employees( name string comment 'employee name', salary float comment 'employee salary', subordinates array comment 'names原创 2017-04-24 14:48:24 · 979 阅读 · 0 评论 -
hive 表装载数据详解
表结构: create table if not exists china_partition( ProvinceID int, ProvinceName string, CityID int, CityName string, ZipCode int, DistrictID int, DistrictName string) partitioned by ( Province string,C原创 2017-04-25 18:10:20 · 969 阅读 · 0 评论 -
分区表,管理表
创建分区表: create table if not exists china_partition( ProvinceID int, ProvinceName string, CityID int, CityName string, ZipCode int, DistrictID int, DistrictName string) partitioned by ( Province string原创 2017-04-25 11:19:37 · 3723 阅读 · 0 评论 -
Hive 数据库相关基本语法
创建数据库: hive> create database if not exists hive2; OK Time taken: 0.257 seconds hive> drop table hive2; OK Time taken: 0.224 seconds 创建存在的数据库,系统会报错: hive> create database hive2; FAILED: Execution Er原创 2017-04-24 13:38:45 · 612 阅读 · 0 评论 -
Hive 建表 加载数据 查询
hive 创建表,加载,查询原创 2017-04-20 17:25:15 · 392 阅读 · 0 评论 -
hive 索引
hive的索引功能是有限的。一张表的索引数据是存储在另外一张表中的。通过explain可以查看某条查询语句是否使用到了索引。 给分区表china_partition 表创建索引: hive> create index china_partition_index on table china_partition(provinceid) as "org.apache.hadoop.hive.ql原创 2017-04-27 15:22:12 · 311 阅读 · 0 评论 -
hive UDF 1.2.2
package com.cc.hiveudf; import org.apache.hadoop.hive.ql.exec.Description; import org.apache.hadoop.hive.ql.exec.UDF; import org.apache.hadoop.hive.ql.exec.UDFArgumentException; import org.apache.had原创 2017-05-02 16:04:10 · 459 阅读 · 0 评论 -
hive 大数据量 参数设置
hive> set mapred.map.output.compression.codec=org.apache.hadoop.io.compress.SnappyCodec; hive> set mapred.map.output.compression.codec; mapred.map.output.compression.codec=org.apache.hadoop.io.compres原创 2017-05-02 10:46:06 · 1571 阅读 · 0 评论 -
hive map-side join
hive 在map端进行连接的过程叫map-side join,应为hive可以和内存中的小表进行逐一匹配,进而可以省略掉常规操作的reduce过程。 hive 启动map-side join 需要把参数hive.auto.convert.join 参数设置为ture hive> set hive.auto.convert.join; hive.auto.convert.join=true原创 2017-04-27 10:21:10 · 537 阅读 · 0 评论