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. 【2017-03-13】Tsql 数学函数、字符串函数、转换函数、时间日期函数

    一.数学函数(针对值类型操作) 1.ceiling():取上限 只要小数点后有数字大于0,整数位自动进1 2.floor():取下限 将小数点位舍去,不管小数点位大小 3.round(四舍五入的值,保 ...

  2. 从windows本地IDE启动远程Linux文件进行调试

    1)  因为WingIDE调用putty和plink进行ssh连接,需要先设置putty. 点击下载putty,并解压,把解压路径附到操作系统PATH环境变量中,之后重新启动WingIDE,让它重新读 ...

  3. 仿照admin的stark自定义组件的功能实现

    仿照admin的stark自定义组件的功能实现:其中最主要的就是增删改查的实现 1.查:首先页面中显示表头和数据,都是动态的,而不是写死的. (1) 先看表头和表单数据:这个是查看的视图函数,但是为了 ...

  4. Hive批量删除历史分区

    批量删除历史分区和数据可以采用如下操作: -- 删除20180101之前的所有分区 alter table example_table_name drop if exists partition (d ...

  5. LDA模型了解及相关知识

    什么是LDA? LDA是基于贝叶斯模型的,涉及到贝叶斯模型离不开“先验分布”,“数据(似然)”和"后验分布"三块.贝叶斯相关知识:先验分布 + 数据(似然)= 后验分布. 贝叶斯模 ...

  6. Linux基础命令---uniq

    uniq 将文件中重复出现的行删除,结果送到标准输出或者指定文件.在使用uniq指令之前,必须使用sort对内容进行排序,否则没有效果.如果没有选项,则将匹配的行合并到第一个匹配项. 此命令的适用范围 ...

  7. 利用PHP将图片转换成base64编码的实现方法

    先来说一下为什么我们要对图片base64编码 base64是当前网络上最为常见的传输8Bit字节代码的编码方式其中之一.base64主要不是加密,它主要的用途是把某些二进制数转成普通字符用于网络传输. ...

  8. 运行tomcat报Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]"

    解决方法1:   手动设置MaxPermSize大小,如果是linux系统,修改TOMCAT_HOME/bin/catalina.sh,如果是windows系统,修改TOMCAT_HOME/bin/c ...

  9. Spring IOC 和 AOP

    一. IOC 1. 概念及原理 IOC: Inversion of Control(控制反转)是一种设计思想,就是容器控制应用程序所需要的外部资源的创建和管理,然后将其反转给应用程序.对象及其依赖对象 ...

  10. echo 换行与否

    echo默认是有换行的, -n的时候, 是不换行的.