- 博客(13)
- 资源 (1)
- 收藏
- 关注
原创 hive 表修改字段类型
hive> alter table tcdc_recmd_hotelsales_predict change column sales_predict at decimal(30,11);
2017-05-27 15:40:13
38594
1
原创 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
525
原创 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
1642
原创 hive 调优
hive 本地模式根据数据量的大小,可以开启hive的本地模式:hive.exec.mode.local.auto 该参数的默认值为false。也可以把该属性配置到hive-site.xml中。hive并行执行hive并行执行,hive可以把一个查询转化成一个或者多个阶段,这些阶段并不是完全相互依赖的,也就是说有些阶段是可以并行执行的,这样就可以使整个job的执行时
2017-04-28 13:05:59
330
原创 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
349
原创 hive map-side join
hive 在map端进行连接的过程叫map-side join,应为hive可以和内存中的小表进行逐一匹配,进而可以省略掉常规操作的reduce过程。hive 启动map-side join 需要把参数hive.auto.convert.join 参数设置为turehive> set hive.auto.convert.join;hive.auto.convert.join=true
2017-04-27 10:21:10
578
原创 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
1003
原创 分区表,管理表
创建分区表: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
3827
原创 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
1012
原创 Hive 数据库相关基本语法
创建数据库:hive> create database if not exists hive2;OKTime taken: 0.257 secondshive> drop table hive2;OKTime taken: 0.224 seconds创建存在的数据库,系统会报错:hive> create database hive2;FAILED: Execution Er
2017-04-24 13:38:45
668
原创 windowns安装git客户端
第一步下载git 客户端点击打开链接安装完成后,运行git命令,出现如下界面表示安装成功:从git服务器上clone项目,需要密码Windows配置Git SSH,避免clone时要输入git服务器密码$ ssh-keygen -t rsa -C "nihaoma_ff@163.com"找到这个文件,用文本打开,复制到git服务器上在git服务器端存
2017-04-20 11:32:05
319
原创 Linux系统搭建git服务器
安装git,我使用的centos,访问这个地址查看自己的安装命令 https://git-scm.com/download/linuxyum install git创建一个git用户用来运行git服务[root@localhost ~]#adduser git初始化一个git仓库创建目录:mkdir /project/data/git/ -p初始化git仓库:这里我们选择/pro
2017-04-20 10:27:44
406
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人