apache tajo - an open source big data warehouse
TRANSCRIPT
![Page 1: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/1.jpg)
Apache Tajo: An Open Source Big Data Warehouse
(what’s new in recent releases) HadoopSphere -‐ Virtual Conclave 2015
Hyunsik Choi, Gruter Inc. (hschoi @ gruter.com)
1
![Page 2: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/2.jpg)
Agenda
• Tajo Overview • Milestones and 0.10 Features • What’s Next
2
![Page 3: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/3.jpg)
Tajo: A Big Data Warehouse System
• Apache Top-‐level project
• Distributed and scalable data warehouse system on various data sources (e.g, HDFS, S3, Hbase, …)
• Low latency, and long running batch queries in a single system
• Features • ANSI SQL compliance • Mature SQL features • ParYYoned table support • Java/Python UDF support • JDBC driver and Java-‐based asynchronous API • Read/Write support of CSV, JSON, RCFile, SequenceFile, Parquet, ORC
3
![Page 4: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/4.jpg)
����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Master����������� ������������������ Server����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������
TajoMaster����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Slave����������� ������������������ Server����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������
����������� ������������������ ����������� ������������������ ����������� ������������������
TajoWorker����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������
QueryMaster����������� ������������������
Local����������� ������������������ Query����������� ������������������ Engine����������� ������������������
StorageManager����������� ������������������
HDFS����������� ������������������ HBase����������� ������������������
����������� ������������������ ����������� ������������������ Client����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������
JDBC����������� ������������������ TSql����������� ������������������ Web����������� ������������������ UI����������� ������������������
����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Slave����������� ������������������ Server����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������
����������� ������������������ ����������� ������������������ ����������� ������������������
TajoWorker����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������
QueryMaster����������� ������������������
Local����������� ������������������ Query����������� ������������������ Engine����������� ������������������
StorageManager����������� ������������������
����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ Slave����������� ������������������ Server����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������
����������� ������������������ ����������� ������������������ ����������� ������������������
TajoWorker����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������ ����������� ������������������
QueryMaster����������� ������������������
Local����������� ������������������ Query����������� ������������������ Engine����������� ������������������
StorageManager����������� ������������������
CatalogStore����������� ������������������
DBMS����������� ������������������
HCatalog����������� ������������������ Submit����������� ������������������ ����������� ������������������ a����������� ������������������ query����������� ������������������
Manage����������� ������������������ metadata����������� ������������������
Allocate����������� ������������������ a����������� ������������������ query����������� ������������������
send����������� ������������������ tasks����������� ������������������ &����������� ������������������ monitor����������� ������������������ ����������� ������������������
send����������� ������������������ tasks����������� ������������������ &����������� ������������������ monitor����������� ������������������ ����������� ������������������
Tajo Overall Architecture
HDFS����������� ������������������ HBase����������� ������������������ HDFS����������� ������������������ HBase����������� ������������������
4
![Page 5: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/5.jpg)
Common Scenarios
• ExtracYon, TransformaYon, Loading (ETL)
• InteracYve BI/analyYcs on web-‐scale big data
• Data discovery/Exploratory analysis with R and exisYng SQL tools
5
![Page 6: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/6.jpg)
Use Cases: Replacement of Commercial DW
• Example: Biggest Telco Company in South Korea • Goal:
• Replacement of slow ETL workloads on several TB datasets • Lots daily reports generaYon about users’ behaviors • Ad-‐hoc analysis on Terabytes data sets
• Key Benefits of Tajo: • SimplificaYon of DW ETL, OLAP, and Hadoop ETL into an unified system
• Saved license over commercial DW • Much less cost, more data analysis within the same SLA
6
![Page 7: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/7.jpg)
Use Cases: Data Discovery
• Example: Music streaming service (26 million users)
• Goal: • Analysis on purchase history for target markeYng
• Benefits: • Query interacYvity on large data sets • Ability to use exisYng BI visualizaYon tools
7
![Page 8: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/8.jpg)
When Tajo is right choice?
• You want an unified system for batch and interacYve queries on Hadoop, Amazon S3, or Hbase.
• You want a mixed use of Hadoop-‐based DW and RDBMS-‐based DW or want to replace exisYng RDBMS DW.
• You want to use exisYng SQL tools on Hadoop DW
8
![Page 9: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/9.jpg)
Milestones
0.8 0.9 0.10 0.11 More features & SQL compaYbility
Stability & AnalyYcal funcYon
Eco-‐system expansion
More features • Python UDF • Nested Schema • Tablespace support • Query federaYon • Beker query scheduler
9
![Page 10: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/10.jpg)
Selected Features in 0.10
10
![Page 11: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/11.jpg)
Hbase Storage Support
• You can use SQL to access Hbase tables. • Tajo supports Hbase storage • CREATE (EXTERNAL)/DROP/INSERT (OVERWRITE)/SELECT
• Bulk InserYon through Direct HFile wriYng CREATE TABLE hbase_t1 (key TEXT, col1 TEXT, col2 INT) USING hbase WITH ( ‘table’ = ‘t1’, ‘columns’ = ‘:key,cf1:col1,cf2:col2`, ‘hbase.zookeeper.quorum’ = ‘host1:2181,host2:2181’ )
11
![Page 12: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/12.jpg)
BeNer AWS support
• OpYmized for S3 and EMR environments • Fixed many bugs related to S3 • EMR bootstrap supported in AWS Labs Github repo
• A quick guide for Tajo on EMR • hkp://www.gruter.com/blog/semng-‐up-‐a-‐tajo-‐cluster-‐on-‐amazon-‐emr/
• EMR bootstrap for Tajo on EMR • hkps://github.com/awslabs/emr-‐bootstrap-‐acYons/tree/master/tajo
12
![Page 13: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/13.jpg)
Tajo JDBC
Tajo Cluster
ETL Tools BI Tools Repor.ng tools
BeNer SQL tool support via thin JDBC
HDFS HBase S3 Swin 13
![Page 14: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/14.jpg)
Zeppelin IntegraTon
14
![Page 15: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/15.jpg)
Improved Performance and Stability
• Ooeap sort operator for ORDER BY (TAJO-‐907) • Hash shuffle IO improvement (TAJO-‐374, TAJO-‐987) • Skewness handling of hash shuffle • AutomaYc parallel degree choice during runYme • Lots of query opYmizer improvements • Add Master HA (TAJO-‐704) • More error-‐tolerant shuffle fetch (TAJO-‐789, TAJO-‐953)
15
![Page 16: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/16.jpg)
What’s New in Tajo 0.11
16
![Page 17: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/17.jpg)
Nested data and JSON support
• Nested data is becoming common • JSON, BSON, XML, Protocol Buffer, Avro, Parquet, … • Many web applicaYons in common use JSON. • MongoDB by default uses JSON document • Many Hbase users also store JSON document in a cell.
• Flakening causes lots of data/computaYon overhead.
• Tajo 0.11 naYvely supports nested data types.
17
![Page 18: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/18.jpg)
How to create a nested schema table
Use ‘RECORD’ keyword to define complex data type
18
![Page 19: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/19.jpg)
Loose schema for self-‐describing formats
You can handle schema evolving with ALTER ADD COLUMN!
19
![Page 20: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/20.jpg)
How to retrieve nested fields
Input Data
Table DefiniYon
SQL
20
![Page 21: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/21.jpg)
Query federaTon and Tablespace support
• Query support across mulYple data sources • You can perform join or union among tables on different systems.
• Benefits: • Data offload from RDBMS to Hadoop vice versa • A mixed use of exisYng RDBMS and Hadoop. • Access to NoSQL and various storages through SQL • An unified interface for SQL tools
HDFS NoSQL S3 Swin
Apache Tajo
21
![Page 22: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/22.jpg)
Sequence File
RCFile Protocol Buffer
Data Formats
Storage Types
Datasets stored in Various Formats/Storages
ORC
22
![Page 23: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/23.jpg)
Tablespace
• Tablespace • Registered storage space
• A table space is idenYfied by an unique URI
• ConfiguraYon and Policy shared in all tables in the same tablespace
• It allows users to reuse registered storages and their configuraYon.
23
![Page 24: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/24.jpg)
Tablespace ConfiguraTon
Tablespace name
Tablespace URI
24
![Page 25: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/25.jpg)
Create Table on a specified Tablespace
> CREATE TABLE uptodate (key TEXT, …) TABLESPACE hbase1;
> CREATE TABLE archive (l_orderkey bigint, …) TABLESPACE warehouse USING text WITH (‘text.delimiter’ = ‘|’);
Tablespace Name
Format name
25
![Page 26: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/26.jpg)
OperaTon Push Down
SELECT X, SUM(Y)FROM table1 WHERE x > 100GROUP BY x
Underlying Storage
Filter, ProjecYon or Groupby can be pushed down into Underlying storages (like RDBMS, Hbase, ElasYcsearch, …)
26
![Page 27: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/27.jpg)
Current Status of Storages
• Storages: • HDFS support • Amazon S3 and Openstack Swin • Hbase Scanner and Writer -‐ HFile and Put Mode • JDBC-‐based Scanner and Writer (Working) • Kara Scanner (Patch Available) • ElasYc Search (Patch Available)
• Data Formats • Text, JSON, RCFile, SequenceFile, Avro, Parquet, and ORC (Patch Available)
27
![Page 28: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/28.jpg)
Python UDF
• Python UDF and UDAF are supported in Tajo • hkp://tajo.apache.org/docs/devel/funcYons/python.html
@output_type('int4') def return_one(): return 1 @output_type('text') def helloworld(): return 'Hello, World’ @output_type('int4') def sum_py(a,b): return a+b
28
![Page 29: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/29.jpg)
Get Involved! • We are recruiYng contributors!
• General • hkp://tajo.apache.org
• Gemng Started • hkp://tajo.apache.org/docs/0.10.0/gemng_started.html
• Downloads • hkp://tajo.apache.org/downloads.html
• Jira – Issue Tracker • hkps://issues.apache.org/jira/browse/TAJO
• Join the mailing list • dev-‐[email protected] • issues-‐[email protected]
29
![Page 30: Apache Tajo - An open source big data warehouse](https://reader033.vdocuments.mx/reader033/viewer/2022051318/58709c071a28ab412b8b7d6f/html5/thumbnails/30.jpg)
Q&A
30