摘要: 1.什么是protobuff协议? Protobuf(Google Protocol Buffers)是google开发的的一套用于数据存储,网络通信时用于协议编解码的工具库.它和XML和Json数据差不多,把数据已某种形式保存起来.Protobuf相对与XML和Json的不同之处,它是一种二进制的 阅读全文
posted @ 2018-07-09 21:34 shizeqi 阅读(3055) 评论(0) 推荐(0) 编辑
摘要: 1.UDF user define function ,用户自定义函数 //current_database(),current_user(); 2.显示所有函数 $hive show functions ; 3.表生成函数 $hive explode(str,exp); //按照exp来切割str 阅读全文
posted @ 2018-07-09 17:37 shizeqi 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 1.创建视图,视图是个虚表 create view v1 as select a.id aid,a.name,b.id bid,b.orderno from customers a left outer join default.ttt b on a.id=b.cid;//创建视图字段不要重复,如果 阅读全文
posted @ 2018-07-09 15:26 shizeqi 阅读(488) 评论(0) 推荐(0) 编辑
摘要: 1.聚合处理,在组里面,每个用户购买的订单要大于1 $hive select cid count( ) max(price) from orders group by cid having count( ) 1; 2.使用hive实现wordcount $hive select split(line 阅读全文
posted @ 2018-07-09 10:55 shizeqi 阅读(334) 评论(0) 推荐(0) 编辑