Kylin知识点介绍
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等。
– 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.
体系结构:

• 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知识点介绍的更多相关文章
- Kylin web界面 知识点介绍
Big Data Era: 1.More and more data becoming available on Hadoop2.Limitations in existing Business ...
- c语言学习之基础知识点介绍(十):数组
本节主要介绍数组. 一.数组 /* 数组:一个变量可以存n个变量. 语法:类型 数组名[长度(正整数)]; 例如:int score[5];//定义了一个int类型的数组,长度为5,可以保存5个数据. ...
- c语言学习之基础知识点介绍(七):循环结构
本节主要介绍循环结构 一.while循环 /* 语法: while(表达式){ //循环体; } 注意:循环变量.循环条件和循环控制语句三者缺一不可. 例如: */ ; //循环变量 ){ //循环条 ...
- c语言学习之基础知识点介绍(三):scanf函数
本节继续介绍c语言的基础知识点. scanf函数:用来接收用户输入的数据. 语法:scanf("格式化控制符",地址列表); 取地址要用到取地址符:&(shift+7) 例 ...
- c语言学习之基础知识点介绍(二):格式化控制符和变量的补充
上节简单介绍了c语言中的一些基础知识点,本节将对之前介绍的不够详细的知识点进行补充. 格式化控制符的消息介绍: %d的其他控制符: 1.%md:m代表这个整数位占用多少位,m是一个整数.实际数字不足的 ...
- oc语言学习之基础知识点介绍(五):OC进阶
一.点语法介绍 /* 以前封装后,要给属性赋值,必须调用方法 这样做,有两个缺点: 1.代码量多,调用方法要写的东西多. 2.看起来并不像是给属性赋值,也不像取值. 我们用点语法就可以更好的解决! 点 ...
- oc语言学习之基础知识点介绍(四):方法的重写、多态以及self、super的介绍
一.方法重写 /* 重写:当子类继承了父类的方法时,如果觉得父类的方法不适合,那么可以对这个方法进行重新实现,那么这个就重写. 注意:也就是说,一定只能发生在父类和子类关系中. 然后是子类重新实现父类 ...
- oc语言学习之基础知识点介绍(二):类和对象的进一步介绍
一.类.对象在内存中的存储 /* 内存分区: 栈:局部变量 堆:程序员自己写代码申请开辟的 程序员自己维护,编译器现在帮我们自动优化了,它在合适的给我们加上了释放空间的语句,所以我们现在写的对象不会造 ...
- c语言学习之基础知识点介绍(二十):预处理指令
一.预处理指令的介绍 预处理命令:在编译之前触发的一系列操作(命令)就叫预处理命令. 特点:以#开头,不要加分号. #include: 文件包含指令 把指定文件的内容复制到相应的位置 #define: ...
随机推荐
- <转>jmeter(三)SOAP/XML-RPC Request
本博客转载自:http://www.cnblogs.com/imyalost/category/846346.html 个人感觉不错,对jmeter讲解非常详细,担心以后找不到了,所以转发出来,留着慢 ...
- 怎样从外网访问内网Linux系统?
本地安装了一个Linux系统,只能在局域网内访问到,怎样从外网也能访问到本地的Linux系统呢?本文将介绍具体的实现步骤. 1. 准备工作 1.1 启动Linux系统 默认Linux系统ssh服务端端 ...
- 使用Wisdom RESTClient自动化测试REST API,如何取消对返回的body内容的校验?
使用Wisdom RESTClient V1.1 自动化测试API,默认是对返回HTTP状态码和body内容进行校验的. 如果您的API返回body内容是变化的,可以通过设置来取消对body内容的校验 ...
- Struts2 的 配置
三.Struts2配置 Struts2的核心配置文件 1.名称和位置是固定的 在src下struts.xml 2.Struts根标签 Package Action Result Action Pa ...
- make是如何工作的
在默认的方式下,也就是我们只输入make命令.那么,1.make会在当前目录下找名字叫“Makefile”或“makefile”的文件.2.如果找到,它会找文件中的第一个目标文件(target),在上 ...
- AirTest源码分析之运行器
from: https://blog.csdn.net/u012897401/article/details/82900562 使用:根据airtest文档说明,可以通过命令行来启动air脚本,需要传 ...
- git-tag 标签相关操作
标签可以针对某一时间点的版本做标记,常用于版本发布. 列出标签 $ git tag # 在控制台打印出当前仓库的所有标签$ git tag -l ‘v0.1.*’ # 搜索符合模式的标签 打标签 gi ...
- win7 powershell配色方案
首先我是参考微软的word的, look~ Windows PowerShell 配置文件 要配置powershell很简单, 就几步 1.显示 Windows PowerShell 配置文件的路径 ...
- 你不知道的JavaScript(1)LHS查询和RHS查询
打算把<你不知道的JavaScript>中的知识点整理下,写点自己的心得,同时也敦促自己看书. 先做个整体的介绍,最后会再给个综合的例子. RHS 查询与简单地查找某个变量的值别无二致,而 ...
- UVa 11019 Matrix Matcher - Hash
题目传送门 快速的vjudge传送门 快速的UVa传送门 题目大意 给定两个矩阵S和T,问T在S中出现了多少次. 不会AC自动机做法. 考虑一维的字符串Hash怎么做. 对于一个长度为$l$的字符串$ ...