2016.7.21

开发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编号、本周新增用户、上周新增用户、上周新增留存。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • The UICollectionView class manages an ordered collection ...
    lixiaoshuai阅读 4,125评论 0 0
  • auction room 拍卖室 anonymous bidders 匿名出价人 hundred thousand...
    草莽书生阅读 1,638评论 0 0
  • 1 滴滴战略副总裁朱景士:与Uber中国合并纯属谣言 昨天有消息称Uber的投资者有意与滴滴签署合作协议,并在探讨...
    胖花喵阅读 708评论 0 0
  • 今天导出广东联通7月份的数据,包含点播和直播的数据明细: insert overwrite local direc...
    辉格食品阅读 1,163评论 0 0
  • 通过渲染相机图像和使用位置跟踪信息来显示复杂内容并构建自定义AR视图。 概观 ARKit库包含了使用SceneKi...
    fighting300阅读 4,687评论 0 2