开发SDK。
SDK就是Software Development Kit的缩写,中文意思就是“软件开发工具包”。
封装(Encapsulation)是面向对象方法的重要原则,就是把对象的属性和操作(或服务)结合为一个独立的整体,并尽可能隐藏对象的内部实现细节。
封装是把过程和数据包围起来,对数据的访问只能通过已定义的接口。面向对象计算始于这个基本概念,即现实世界可以被描绘成一系列完全自治、封装的对象,这些对象通过一个受保护的接口访问其他对象。封装是一种信息隐藏技术,在java中通过关键字private实现封装。什么是封装?封装把对象的所有组成部分组合在一起,封装定义程序如何引用对象的数据,封装实际上使用方法将类的数据隐藏起来,控制用户对类的修改和访问数据的程度。
()注册表编辑器)
日志采集工作常用的IP,上面所示的日志采集工作采用的是下图所示IP地址链接。
数据导出执行的sql语句如下:
#######27号数据############
//在/tmp/2016-07-20目录下导出数据:
//
insert overwrite local directory'/tmp/2016-07-20' row format delimited fields terminated by ','
select'2016-07-20',t1.dim_oem_id,t1.usernum,t2.usernum,t3.usernum from
(select dim_oem_id,count(distinctdim_user_hid) usernum from sum1_user where vod=1 and metric_fristdate>=date_sub('2016-07-20',6)and metric_fristdate<='2016-07-20' group by dim_oem_id) t1
join
(select dim_oem_id,count(distinctdim_user_hid) usernum from sum1_user where vod=1 andmetric_fristdate>=date_sub('2016-07-20',13) and metric_fristdate<=date_sub('2016-07-20',7)group by dim_oem_id) t2
on(t1.dim_oem_id=t2.dim_oem_id)
join
(select t.dim_oem_id,count(distinctt.dim_user_hid) usernum from
(select dim_oem_id,dim_user_hid fromsum1_user where vod=1 and metric_fristdate>=date_sub('2016-07-20',13)andmetric_fristdate<=date_sub('2016-07-20',7)) t
join
(select dim_oem_id,dim_user_hid fromfact_vod_history where metric_isrepeatmod=0 andday>=date_sub('2016-07-20',6) andday<='2016-07-20') m on(
t.dim_user_hid=m.dim_user_hid)group by t.dim_oem_id) t3 on(t1.dim_oem_id=t3.dim_oem_id);
hive命令下,执行完毕后得到的结果如下:
上面所示的sql导出语句,导出的统计内容为:统计日期、OEM编号、本周新增用户、上周新增用户、上周新增留存。