Kylin

   is an open source Distributed Analytics Engine from eBay Inc。that provides SQL interface and multi-dimensional analysis (OLAP) on Hadoop supporting extremely large datasets

亮点

1.Compression and Encoding Support

2.Incremental Refresh of Cubes

3.Approximate Query Capability for distinct Count (HyperLogLog)

4.Leverage HBase Coprocessor for query latency

5.Job Management and Monitoring

6.Easy Web interface to manage, build, monitor and query cubes

7.Security capability to set ACL at Cube/Project Level

8.Support LDAP Integration

HyperLogLog:

  从事统计数据。统计一组不同元素且数量很大的数据集时,是一个挑战。

  Hyper LogLog计数器就是估算Nmax为基数的数据集仅需使用loglog(Nmax)+O(1) bits就可以。

  如线性计数器的Hyper LogLog计数器允许设计人员指定所需的精度值,在Hyper LogLog的情况下,这是通过定义所需的相对标准差和预期要计数的最大基数。

  大部分计数器通过一个输入数据流M,并应用一个哈希函数设置h(M)来工作。这将产生一个S = h(M) of {0,1}^∞字符串的可观测结果。通过分割哈希输入流成m个子字符串,并对每个子输入流保持m的值可观测 ,这就是相当一个新Hyper LogLog(一个子m就是一个新的Hyper LogLog)。

  利用额外的观测值的平均值,产生一个计数器,其精度随着m的增长而提高,这只需要对输入集合中的每个元素执行几步操作就可以完成。

  其结果是,这个计数器可以仅使用1.5 kb的空间计算精度为2%的十亿个不同的数据元素。与执行 HashSet所需的120 兆字节进行比较,这种算法的效率很明显。

ACL

  访问控制列表(Access Control List,ACL) 是路由器交换机接口的指令列表,用来控制端口进出的数据包。ACL适用于所有的被路由协议,如IP、IPX、AppleTalk等。

  信息点间通信和内外网络的通信都是企业网络中必不可少的业务需求,为了保证内网的安全性,需要通过安全策略来保障非授权用户只能访问特定的网络资源,从而达到对访问进行控制的目的。简而言之,ACL可以过滤网络中的流量,是控制访问的一种网络技术手段。
  配置ACL后,可以限制网络流量,允许特定设备访问,指定转发特定端口数据包等。如可以配置ACL,禁止局域网内的设备访问外部公共网络,或者只能使用FTP服务。ACL既可以在路由器上配置,也可以在具有ACL功能的业务软件上进行配置。
  ACL是物联网中保障系统安全性的重要技术,在设备硬件层安全基础上,通过对在软件层面对设备间通信进行访问控制,使用可编程方法指定访问规则,防止非法设备破坏系统安全,非法获取系统数据。
 
 
 
SQL
• SQL translated to MapReduce jobs
  – Hive
  – Stinger without Tez
• SQL processed by a MPP Engine
  – Impala
  – Drill
  – Presto
  – Spark + Shark
• SQL process by a existing SQL Engine + HDFS
  – EMC Greenplum (postgres)
  – Taobao Garude (mysql)
• OLAP on Hadoop in other Companies
  – Adobe: HBase Cube
  – LinkedIn: Avatara
  – Salesforce.com: Phoenix
 

why do we Build Kylin

• Why existing SQL-on-Hadoop solutions fall short?

  The existing SQL-on-Hadoop needs to scan partial or whole data set to answer a user query. Moreover, table join may trigger the huge data transfer across host.  Due to large scan range and network traffic latency, many queries are very slow (minute+latency).

• What is MOLAP/ROLAP?

  – MOLAP (Multi-dimensional OLAP) is to pre-compute data along different dimensions of interest and store resultant values in the cube. MOLAP is much faster but is inflexible.  Kylin is more like MOLAP.

  – ROLAP (Relational-OLAP) is to use star or snow-flake schema to do runtime aggregation. ROLAP is flexible but much slower. All existing SQL-on-Hadoop is kind of ROLAP.

• How does Kylin support ROLAP/MOLAP?
  Kylin builds data cube (MOLAP) from hive table (ROLAP) according to the metadata definition.
  – If the query can be fulfilled by data cube, Kylin will route the query to data cube that is MOLAP.
  – If the query can’t be fulfilled by data cube, Kylin will route the query to hive table that is ROLAP.
  – Basically, you can think Kylin as HOLAP(Hybrid OLAP) on top of MOLAP and ROLAP.

体系结构:

 Kylin使用Hadoop

• Hive
  – Pre-join star schema during cube building
• MapReduce
  – Pre-aggregation metrics during cube building
• HDFS
  – Store intermediated files during cube building.
• HBase
  – Store data cube.
  – Serve query on data cube.
  – Coprocessor is used for query processing.

Kylin查询:

Kylin support ANSI-SQL: projection, filter, join, aggregation, groups and sub-query

分析查询分类

组件设计

Cube设计

Cube元数据

• Dimension
  – Normal
  – Mandatory
  – Hierarchy
  – Derived
•Measure
  – Sum
  – Count
  – Max
  – Min
  – Average
  – Distinct Count (based on HyperLogLog)

如何build cube

1.key-value

2.job流

3.存储Cube:HBase模式

4.Cube查询:查询引擎

  • Query engine: is based on Apache Calcite (http://incubator.apache.org/projects/calcite.html)
  • Apache Calcite: is an extensible open source SQL engine that is also used in Stinger/Drill/Cascading.

    • Metadata SPI
      – Provide table schema from kylin metadata
    • Optimize Rule
      – Translate the logic operator into kylin operator
    • Relational Operator
      – Find right cube
      – Translate SQL into storage engine api call
      – Generate physical execute plan by linq4j java implementation
    • Result Enumerator
      – Translate storage engine result into java implementation result.
    • SQL Function
      – Add HyperLogLog for distinct count
      – Implement date time related functions (i.e. Quarter)

  解释计划:

   存储引擎:

  • Provide cube query for query engine
    – Common iterator interface for storage engine
    – Isolate query engine from underline storage
  • Translate cube query into HBase table scan
    – Groups à Cuboid ID
    – Filters -> Scan Range (Row Key)
    – Aggregations -> Measure Columns (Row Values)
  • Scan HBase table and translate HBase result into cube result
    – HBase Result (key + value) -> Cube Result (dimensions + measures)

  优化Cube:

  • “Curse of dimensionality”: N dimension cube has 2N cuboid
    – Full Cube vs. Partial Cube

     Full Cube
      – Pre-aggregate all dimension combinations
      – “Curse of dimensionality”: N dimension cube has 2N cuboid.

     Partial Cube
      – To avoid dimension explosion, we divide the dimensions into different aggregation groups
        • 2N+M+L à 2N + 2M + 2L
      – For cube with 30 dimensions, if we divide these dimensions into 3 group, the cuboid number will reduce from 1 Billion to 3 Thousands
        • 230 à 210 + 210 + 210

      – Tradeoff between online aggregation and offline pre-aggregation

      

  • Hugh data volume
    – Dictionary Encoding

      • Data cube has lost of duplicated dimension values
      • Dictionary maps dimension values into IDs that will reduce the memory and storage footprint.
      • Dictionary is based on Trie

      

    – Incremental Building

      

  • Slow Table Scan – TopN Query on High Cardinality Dimension
    – Bitmap inverted index
    – Time range partition

    – Separate high cardinality dimension from low cardinality dimension
    – In-memory +parallel scan: block cache + endpoint coprocessor

    

Kylin里程碑:

  

相关资源:

• Web Site
  – http://kylin.io
• Google Groups
  – https://groups.google.com/forum/#!forum/kylin-olap
• Twitter
  – @KylinOLAP
• Source Code
  – https://github.com/KylinOLAP/Kylin

  

Kylin知识点介绍的更多相关文章

  1. Kylin web界面 知识点介绍

    Big Data Era: 1.More and more data becoming available on Hadoop2.Limitations in existing Business ...

  2. c语言学习之基础知识点介绍(十):数组

    本节主要介绍数组. 一.数组 /* 数组:一个变量可以存n个变量. 语法:类型 数组名[长度(正整数)]; 例如:int score[5];//定义了一个int类型的数组,长度为5,可以保存5个数据. ...

  3. c语言学习之基础知识点介绍(七):循环结构

    本节主要介绍循环结构 一.while循环 /* 语法: while(表达式){ //循环体; } 注意:循环变量.循环条件和循环控制语句三者缺一不可. 例如: */ ; //循环变量 ){ //循环条 ...

  4. c语言学习之基础知识点介绍(三):scanf函数

    本节继续介绍c语言的基础知识点. scanf函数:用来接收用户输入的数据. 语法:scanf("格式化控制符",地址列表); 取地址要用到取地址符:&(shift+7) 例 ...

  5. c语言学习之基础知识点介绍(二):格式化控制符和变量的补充

    上节简单介绍了c语言中的一些基础知识点,本节将对之前介绍的不够详细的知识点进行补充. 格式化控制符的消息介绍: %d的其他控制符: 1.%md:m代表这个整数位占用多少位,m是一个整数.实际数字不足的 ...

  6. oc语言学习之基础知识点介绍(五):OC进阶

    一.点语法介绍 /* 以前封装后,要给属性赋值,必须调用方法 这样做,有两个缺点: 1.代码量多,调用方法要写的东西多. 2.看起来并不像是给属性赋值,也不像取值. 我们用点语法就可以更好的解决! 点 ...

  7. oc语言学习之基础知识点介绍(四):方法的重写、多态以及self、super的介绍

    一.方法重写 /* 重写:当子类继承了父类的方法时,如果觉得父类的方法不适合,那么可以对这个方法进行重新实现,那么这个就重写. 注意:也就是说,一定只能发生在父类和子类关系中. 然后是子类重新实现父类 ...

  8. oc语言学习之基础知识点介绍(二):类和对象的进一步介绍

    一.类.对象在内存中的存储 /* 内存分区: 栈:局部变量 堆:程序员自己写代码申请开辟的 程序员自己维护,编译器现在帮我们自动优化了,它在合适的给我们加上了释放空间的语句,所以我们现在写的对象不会造 ...

  9. c语言学习之基础知识点介绍(二十):预处理指令

    一.预处理指令的介绍 预处理命令:在编译之前触发的一系列操作(命令)就叫预处理命令. 特点:以#开头,不要加分号. #include: 文件包含指令 把指定文件的内容复制到相应的位置 #define: ...

随机推荐

  1. 20155228 2017-5-10 课堂测试:Arrays和String单元测试

    20155228 2017-5-10 课堂测试:Arrays和String单元测试 题目和要求 在IDEA中以TDD的方式对String类和Arrays类进行学习 测试相关方法的正常,错误和边界情况 ...

  2. 【2017-2-20】C#运算符

    运算符分类: 1.算术运算符 ⑴+ - * / %(取余,模) /3; Console.Write(d); Console.ReadLine(); 则输出结果为“3”,因为10和3都是int型,dec ...

  3. 【Hive学习之一】Hive简介

    环境 虚拟机:VMware 10 Linux版本:CentOS-6.5-x86_64 客户端:Xshell4 FTP:Xftp4 jdk8 hadoop-3.1.1 apache-hive-3.1.1 ...

  4. kalinux 换源

    1.系统使用第一步建议先换源,否则将出现很多未知问题 #以下两个2选1,打开要编辑的源 sudo leafpad /etc/apt/sources.list sudo gedit /etc/apt/s ...

  5. freedom is a kind of responsibility

    张维迎教授在2017年7月1日北大国发院2017届毕业典礼上的发言<自由是一种责任> 张维迎:自由是一种责任    本文为张维迎教授在2017年7月1日北大国发院2017届毕业典礼上的发言 ...

  6. Future复习笔记

    1. Future就是对于具体的Runnable或者Callable任务的执行结果进行取消.查询是否完成.获取结果.必要时可以通过get方法获取执行结果,该方法会阻塞直到任务返回结果. Future类 ...

  7. Django ORM 操作 必知必会13条 单表查询

    ORM 操作 必知必会13条 import os # if __name__ == '__main__': # 当前文件下执行 os.environ.setdefault('DJANGO_SETTIN ...

  8. [转载]WebService服务的三种途径Endpoint Disco WSDL 有什么不同

    Endpoint: http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx   web服务的URI地址,你访问之后,就会出现web服务的相 ...

  9. 自写Jquery插件 Datagrid

    原创文章,转载请注明出处,谢谢!https://www.cnblogs.com/GaoAnLee/p/9086582.html 废话不多说,先上个整体效果: html <div id='data ...

  10. Python笔记 #19# 实现bpnn

    代码编辑&解释工具:Jupyter Notebook 快速入门 形象说明BP神经网络的用法(图片来自推特): Bpnn类最主要的三个方法: initialize方法,用于设定神经网络的层数.各 ...