SlideShare a Scribd company logo
1 of 36
© Hortonworks Inc. 2015 Page 1
Apache Tez – Present and Future
Jeff Zhang
Rajesh Balamohan
© Hortonworks Inc. 2015
Outline
•Tez Introduction
•Tez Feature Deep Dive
•Tez Improvement & Debuggability
•Tez Status & Roadmap
© Hortonworks Inc. 2015
I/O Synchronization
Barrier
I/O Synchronization
Barrier
Job 1 ( Join a & b )
Job 3 ( Group by of c )
Job 2 (Group by of
a Join b)
Job 4 (Join of S & R )
Hive - MR
Example of MR versus Tez
Page 3
Single Job
Hive - Tez
Join a & b
Group by of a Join b
Group by of c
Job 4 (Join of S & R )
© Hortonworks Inc. 2015
Tez – Introduction
Page 4
• Distributed execution framework
targeted towards data-processing
applications.
• Based on expressing a computation
as a dataflow graph (DAG).
• Highly customizable to meet a broad
spectrum of use cases.
• Built on top of YARN – the resource
management framework for
Hadoop.
• Open source Apache project and
Apache licensed.
© Hortonworks Inc. 2015
What is DAG & Why DAG
Projection
Filter
GroupBy
…
Join
Union
Intersect
…
Split
…
• Directed Acyclic Graph
• Any complicated DAG can been composed of the following 3 basic
paradigm of DAG
– Sequential
– Merge
– Divide
© Hortonworks Inc. 2015
Anatomy of DAG
Logic View
Vertex
Task_1 Task_2 Task_3
Runtime View
Task
TaskAttempt_1 TaskAttempt_2
© Hortonworks Inc. 2015
Expressing DAG in Tez
• Logic View (DAG API )
–Allow user to express computation by using DAG
–Topological structure of the data computation flow
• Runtime API (I/P/O)
–Application logic of each computation unit
–How to move/read/write data between vertices
© Hortonworks Inc. 2015
Logic View (DAG API)
Page 8
• Vertex (Processor, Parallelism, Resource, etc…)
• Edge (EdgeProperty)
–DataMovement
– ScatterGather (Join, GroupBy … )
– BroadCast ( Pig Replicated Join / Hive Broadcast Join )
– One2One ( Pig Order by )
– Custom
© Hortonworks Inc. 2015
Runtime View (Runtime API)
Page 9
ProcessorInput Output
• Input
– Through which processor receives data on an edge
– One vertex can have multiple inputs
• Processor
– Application Logic (One vertex one processor)
– Consume the inputs and produce the outputs
• Output
– Through which processor write data to an edge
– One vertex can have multiple outputs
• Example of Input/Output/Processor
– MRInput & MROutput (InputFormat/OutptFormat)
– OrderedGroupedKVInput & OrderedPartitionedKVOutput (ScatterGather)
– UnorderedKVInput & UnorderedKVOutput (Broadcast & 1-1)
– PigProcessor/HiveProcessor
© Hortonworks Inc. 2015
Benefit of DAG
• Easier to express computation in DAG
• No intermediate data written to HDFS
• Less pressure on NameNode
• No resource queuing effort & less resource contention
• More optimization opportunity with more global context
© Hortonworks Inc. 2015
Outline
•Tez Introduction
•Tez Feature Deep Dive
•Tez Improvement & Debuggability
•Tez Status & Roadmap
© Hortonworks Inc. 2015
Container-Reuse
• Reuse the same container across DAG/Vertices/Tasks
• Benefit of Container-Reuse
–Reduce overhead of launching JVM
–Reduce overhead of negotiate with Resource Manager
–Reduce overhead of resource localization
–Reduced network IO
–Less resources consumed
–Object Caching
© Hortonworks Inc. 2015
Tez Session
• Multiple Jobs/DAGs in one AM
• Container-reuse across Jobs/DAGs
• Share data between Jobs/DAGs
© Hortonworks Inc. 2015
Dynamic Parallelism Estimation
• VertexManager
–Listen to the other vertices
status
–Coordinate and schedule its
tasks
–Communication between
vertices
© Hortonworks Inc. 2015
ATS Integration
• Tez is fully integrated with YARN ATS (Application Timeline
Service)
–DAG Status, DAG Metrics, Task Status, Task Metrics are captured
• Diagnostics & Performance analysis
–Data Source for monitoring & diagnostics
–Data Source for performance analysis
© Hortonworks Inc. 2015
Recovery
• AM can crash in corner cases
–OOM
–Node failure
–…
• Continue from the last checkpoint
• Transparent to end users
AM Crash
© Hortonworks Inc. 2015
Order By of Pig
f = Load ‘foo’ as (x, y);
o = Order f by x;Sample
Aggregate
(Calculate Histogram)
HDFS
Partition
Sort
Broadcast
Load &
Sample
Aggregate
(Calculate Histogram)
Partition
Sort
1-1
ScatterGather
ScatterGather
© Hortonworks Inc. 2015
Outline
•Tez Introduction
•Tez Feature Deep Dive
•Tez Improvement & Debuggability
•Tez Status & Roadmap
© Hortonworks Inc. 2015
• Performance
–Speculation
–Better use of JVM Memory
–Intermediate File Improvements
–Shuffle Improvements
• Debuggability
–Job Analysis Tools
–Shuffle Performance Analysis Tool
–Local Mode
–Tez UI
© Hortonworks Inc. 2015
Speculation
• Maintains Periodic Runtime Statistics of Tasks
• Similar to Legacy MR speculation
–Trigger speculative attempt when estimated runtime > mean runtime
• Good for Cluster Having Good & Slow Nodes.
• <TBD>
© Hortonworks Inc. 2015
Intermediate File Format Improvements
• Key value format used for storing
intermediate format in Tez
• Drawbacks of earlier format
–Needs larger buffer in memory (due to
duplicate keys)
–Unwanted key comparison of identical
keys during merge sort
–Bigger file size in disk
–Not ideal for all use cases
• New Intermediate File Format
–Works based on (K, List<V>)
–Lesser key comparisons during merge
sort
–Provides 57% memory efficiency and
23% improvement in disk storage
Task
Spill 1 Spill 2 Spill 3
Merged Spill
Key
Len
Value Len Key Bytes Value Bytes
Key
Len
Value Len Key Bytes Value Bytes
Key
Len
Value Len Key Bytes Value Bytes
Key
Len
Value Len Key Bytes Value Bytes
………………………
EOF Marker
Key
Len
Key Bytes Value Len Value Bytes V_END
Key
Len
Key Bytes Value Len Value Bytes V_END
Key
Len
Key Bytes Value Len Value Bytes V_END
Key
Len
Key Bytes Value Len Value Bytes V_END
EOF Marker
………………………
…
…
…
Old IFile Format
New IFile Format
RLE
RLE
RLE
© Hortonworks Inc. 2015
Better use of JVM Memory
• PipelinedSorter can support > 2 GB sort buffers
–Containers with higher RAM no longer limited by 2 GB sort buffer limits
–Avoids unnecessary spills
• Reduced key comparison costs in PipelinedSorter
• <TBD>
© Hortonworks Inc. 2015
Better use of JVM Memory - Contd
• BytesWritable Improvements
–Provides FastByteSerialization
–Saves 8 bytes per key-value pair
–Reduces IFile size by 25%
–Reduces SERDE costs
• WeightbedMemoryDistributor
for better memory management
in tasks
–Observed 26% runtime
improvements
• Enabled RLE in reducer codepath
–Improved Job Runtime
–Reduced IO Cost
• <TBD>
© Hortonworks Inc. 2015
Source Task
….
….
Broadcast Shuffle Improvements
Task 1
Task 2
Task N
…
Task 1
Task 2
Task N
…
Task 1
Task 2
Task N
…
Broadcast
From local disk
From local disk
Source Task
….
….
Task 1
Task 2
Task N
…
Task 1
Task 2
Task N
…
Task 1
Task 2
Task N
…
Broadcast
Before Fix After Fix
© Hortonworks Inc. 2015
PipelinedShuffle Improvments
• Final merge in source
task is avoided.
– Less IO
• Consumers are
informed about spill
events in advance
– Better usage of
network bandwidth
– Overlap CPU with
network
– For sorted/unsorted
outputs, send data to
consumers in chunks
• Observed 20% runtime
improvement in
queries involving heavy
skews
Task 1
Spill 1
Task 2
Reduce Task 1 Reduce Task 1Reduce Task 1Reduce Task 1Reduce Task N
…..
…..
…..
…..
Spill 1 Spill 2 Spill 3
Task 1
Spill 1
Task 2
Spill 1 Spill 2 Spill 3
Reduce Task 1 Reduce Task 1Reduce Task 1Reduce Task 1Reduce Task N
…..
…..
…..
…..
Merged Spill
Normal Shuffle Path
Pipelined Shuffle Path
© Hortonworks Inc. 2015
Job Analysis Tools
• DAG Swimlane
–“$TEZ_HOME/tez-tools/swimlanes/sh yarn-swimlanes.sh <app_id>”
Prewarm
Container Reuse
Remote Reads
© Hortonworks Inc. 2015
Shuffle Performance Analysis Tools
• Analyze shuffle performance between source / destination
nodes
© Hortonworks Inc. 2015
Shuffle Performance Analysis Tools
• Analyze shuffle performance between source / destination
nodes
© Hortonworks Inc. 2015
Better Debuggability– Local Mode
• Test Tez Jobs without Hadoop Cluster
• Enables Fast Prototyping
• Fast Unit Testing
• Runs on Single JVM (easy for debugging)
• Scheduling / RPC invocations Skipped
© Hortonworks Inc. 2015
Better Debuggability- Tez-UI
© Hortonworks Inc. 2015
Better Debuggability- Tez-UI
© Hortonworks Inc. 2015
Better Debuggability - Tez-UI
© Hortonworks Inc. 2015
Better Debuggability - Tez-UI
© Hortonworks Inc. 2015
RoadMap
• Shared Output Edges
• Multiple Edges between Vertices
• Local Mode Stabilization
• Optimizing (include/exclude) Vertex at Runtime
• <TBD>
© Hortonworks Inc. 2015
Tez – Adoption
• Apache Hive
• Start from Hive 0.13
• set hive.exec.engine = tez
• Apache Pig
• Start from Pig 0.14
• pig -x tez
• Cascading
• Cascading 3.0 WIP
Page 35
© Hortonworks Inc. 2015
Thank You!
Questions & Answers
Page 36

More Related Content

What's hot

The Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/AvroThe Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
Databricks
 

What's hot (20)

Tez Shuffle Handler: Shuffling at Scale with Apache Hadoop
Tez Shuffle Handler: Shuffling at Scale with Apache HadoopTez Shuffle Handler: Shuffling at Scale with Apache Hadoop
Tez Shuffle Handler: Shuffling at Scale with Apache Hadoop
 
Transactional SQL in Apache Hive
Transactional SQL in Apache HiveTransactional SQL in Apache Hive
Transactional SQL in Apache Hive
 
The Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/AvroThe Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
 
File Format Benchmark - Avro, JSON, ORC & Parquet
File Format Benchmark - Avro, JSON, ORC & ParquetFile Format Benchmark - Avro, JSON, ORC & Parquet
File Format Benchmark - Avro, JSON, ORC & Parquet
 
Hive tuning
Hive tuningHive tuning
Hive tuning
 
Apache Tez - A unifying Framework for Hadoop Data Processing
Apache Tez - A unifying Framework for Hadoop Data ProcessingApache Tez - A unifying Framework for Hadoop Data Processing
Apache Tez - A unifying Framework for Hadoop Data Processing
 
Spark shuffle introduction
Spark shuffle introductionSpark shuffle introduction
Spark shuffle introduction
 
How to understand and analyze Apache Hive query execution plan for performanc...
How to understand and analyze Apache Hive query execution plan for performanc...How to understand and analyze Apache Hive query execution plan for performanc...
How to understand and analyze Apache Hive query execution plan for performanc...
 
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
 
Understanding Query Plans and Spark UIs
Understanding Query Plans and Spark UIsUnderstanding Query Plans and Spark UIs
Understanding Query Plans and Spark UIs
 
Processing Large Data with Apache Spark -- HasGeek
Processing Large Data with Apache Spark -- HasGeekProcessing Large Data with Apache Spark -- HasGeek
Processing Large Data with Apache Spark -- HasGeek
 
Transactional operations in Apache Hive: present and future
Transactional operations in Apache Hive: present and futureTransactional operations in Apache Hive: present and future
Transactional operations in Apache Hive: present and future
 
Optimizing Hive Queries
Optimizing Hive QueriesOptimizing Hive Queries
Optimizing Hive Queries
 
Introduction to Apache Flink - Fast and reliable big data processing
Introduction to Apache Flink - Fast and reliable big data processingIntroduction to Apache Flink - Fast and reliable big data processing
Introduction to Apache Flink - Fast and reliable big data processing
 
The Parquet Format and Performance Optimization Opportunities
The Parquet Format and Performance Optimization OpportunitiesThe Parquet Format and Performance Optimization Opportunities
The Parquet Format and Performance Optimization Opportunities
 
LLAP: long-lived execution in Hive
LLAP: long-lived execution in HiveLLAP: long-lived execution in Hive
LLAP: long-lived execution in Hive
 
Achieving 100k Queries per Hour on Hive on Tez
Achieving 100k Queries per Hour on Hive on TezAchieving 100k Queries per Hour on Hive on Tez
Achieving 100k Queries per Hour on Hive on Tez
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache Spark
 
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudAmazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
 
Simplify CDC Pipeline with Spark Streaming SQL and Delta Lake
Simplify CDC Pipeline with Spark Streaming SQL and Delta LakeSimplify CDC Pipeline with Spark Streaming SQL and Delta Lake
Simplify CDC Pipeline with Spark Streaming SQL and Delta Lake
 

Viewers also liked

Viewers also liked (20)

Quick Introduction to Apache Tez
Quick Introduction to Apache TezQuick Introduction to Apache Tez
Quick Introduction to Apache Tez
 
Apache Tez – Present and Future
Apache Tez – Present and FutureApache Tez – Present and Future
Apache Tez – Present and Future
 
Yahoo's Experience Running Pig on Tez at Scale
Yahoo's Experience Running Pig on Tez at ScaleYahoo's Experience Running Pig on Tez at Scale
Yahoo's Experience Running Pig on Tez at Scale
 
Pig on Tez: Low Latency Data Processing with Big Data
Pig on Tez: Low Latency Data Processing with Big DataPig on Tez: Low Latency Data Processing with Big Data
Pig on Tez: Low Latency Data Processing with Big Data
 
Oozie sweet
Oozie sweetOozie sweet
Oozie sweet
 
Introduction to Hortonworks Data Cloud for AWS
Introduction to Hortonworks Data Cloud for AWSIntroduction to Hortonworks Data Cloud for AWS
Introduction to Hortonworks Data Cloud for AWS
 
Apache Hadoop Crash Course - HS16SJ
Apache Hadoop Crash Course - HS16SJApache Hadoop Crash Course - HS16SJ
Apache Hadoop Crash Course - HS16SJ
 
Data Lake for the Cloud: Extending your Hadoop Implementation
Data Lake for the Cloud: Extending your Hadoop ImplementationData Lake for the Cloud: Extending your Hadoop Implementation
Data Lake for the Cloud: Extending your Hadoop Implementation
 
GTC China 2016
GTC China 2016GTC China 2016
GTC China 2016
 
Internet of Things Crash Course Workshop at Hadoop Summit
Internet of Things Crash Course Workshop at Hadoop SummitInternet of Things Crash Course Workshop at Hadoop Summit
Internet of Things Crash Course Workshop at Hadoop Summit
 
Hortonworks Technical Workshop: HDP everywhere - cloud considerations using...
Hortonworks Technical Workshop:   HDP everywhere - cloud considerations using...Hortonworks Technical Workshop:   HDP everywhere - cloud considerations using...
Hortonworks Technical Workshop: HDP everywhere - cloud considerations using...
 
Spark crash course workshop at Hadoop Summit
Spark crash course workshop at Hadoop SummitSpark crash course workshop at Hadoop Summit
Spark crash course workshop at Hadoop Summit
 
S3Guard: What's in your consistency model?
S3Guard: What's in your consistency model?S3Guard: What's in your consistency model?
S3Guard: What's in your consistency model?
 
Hortonworks Data Cloud for AWS
Hortonworks Data Cloud for AWS Hortonworks Data Cloud for AWS
Hortonworks Data Cloud for AWS
 
The AI Era Ignited by GPU Deep Learning
The AI Era Ignited by GPU Deep Learning The AI Era Ignited by GPU Deep Learning
The AI Era Ignited by GPU Deep Learning
 
#HSTokyo16 Apache Spark Crash Course
#HSTokyo16 Apache Spark Crash Course #HSTokyo16 Apache Spark Crash Course
#HSTokyo16 Apache Spark Crash Course
 
Hadoop crash course workshop at Hadoop Summit
Hadoop crash course workshop at Hadoop SummitHadoop crash course workshop at Hadoop Summit
Hadoop crash course workshop at Hadoop Summit
 
HBaseCon 2013: Compaction Improvements in Apache HBase
HBaseCon 2013: Compaction Improvements in Apache HBaseHBaseCon 2013: Compaction Improvements in Apache HBase
HBaseCon 2013: Compaction Improvements in Apache HBase
 
Building a Modern Data Architecture with Enterprise Hadoop
Building a Modern Data Architecture with Enterprise HadoopBuilding a Modern Data Architecture with Enterprise Hadoop
Building a Modern Data Architecture with Enterprise Hadoop
 
AI For Enterprise
AI For EnterpriseAI For Enterprise
AI For Enterprise
 

Similar to Apache Tez – Present and Future

Distributed Data processing in a Cloud
Distributed Data processing in a CloudDistributed Data processing in a Cloud
Distributed Data processing in a Cloud
elliando dias
 

Similar to Apache Tez – Present and Future (20)

Apache Tez – Present and Future
Apache Tez – Present and FutureApache Tez – Present and Future
Apache Tez – Present and Future
 
Apache Tez : Accelerating Hadoop Query Processing
Apache Tez : Accelerating Hadoop Query ProcessingApache Tez : Accelerating Hadoop Query Processing
Apache Tez : Accelerating Hadoop Query Processing
 
YARN Ready: Integrating to YARN with Tez
YARN Ready: Integrating to YARN with Tez YARN Ready: Integrating to YARN with Tez
YARN Ready: Integrating to YARN with Tez
 
Tez big datacamp-la-bikas_saha
Tez big datacamp-la-bikas_sahaTez big datacamp-la-bikas_saha
Tez big datacamp-la-bikas_saha
 
Apache Tez -- A modern processing engine
Apache Tez -- A modern processing engineApache Tez -- A modern processing engine
Apache Tez -- A modern processing engine
 
February 2014 HUG : Tez Details and Insides
February 2014 HUG : Tez Details and InsidesFebruary 2014 HUG : Tez Details and Insides
February 2014 HUG : Tez Details and Insides
 
Apache Tez : Accelerating Hadoop Query Processing
Apache Tez : Accelerating Hadoop Query ProcessingApache Tez : Accelerating Hadoop Query Processing
Apache Tez : Accelerating Hadoop Query Processing
 
Apache Hadoop YARN - The Future of Data Processing with Hadoop
Apache Hadoop YARN - The Future of Data Processing with HadoopApache Hadoop YARN - The Future of Data Processing with Hadoop
Apache Hadoop YARN - The Future of Data Processing with Hadoop
 
Distributed Data processing in a Cloud
Distributed Data processing in a CloudDistributed Data processing in a Cloud
Distributed Data processing in a Cloud
 
try
trytry
try
 
3. Apache Tez Introducation - Apache Kylin Meetup @Shanghai
3. Apache Tez Introducation - Apache Kylin Meetup @Shanghai3. Apache Tez Introducation - Apache Kylin Meetup @Shanghai
3. Apache Tez Introducation - Apache Kylin Meetup @Shanghai
 
Hadoop
HadoopHadoop
Hadoop
 
Tez Data Processing over Yarn
Tez Data Processing over YarnTez Data Processing over Yarn
Tez Data Processing over Yarn
 
Tez: Accelerating Data Pipelines - fifthel
Tez: Accelerating Data Pipelines - fifthelTez: Accelerating Data Pipelines - fifthel
Tez: Accelerating Data Pipelines - fifthel
 
Stinger Initiative: Leveraging Hive & Yarn for High-Performance/Interactive Q...
Stinger Initiative: Leveraging Hive & Yarn for High-Performance/Interactive Q...Stinger Initiative: Leveraging Hive & Yarn for High-Performance/Interactive Q...
Stinger Initiative: Leveraging Hive & Yarn for High-Performance/Interactive Q...
 
Hanborq optimizations on hadoop map reduce 20120221a
Hanborq optimizations on hadoop map reduce 20120221aHanborq optimizations on hadoop map reduce 20120221a
Hanborq optimizations on hadoop map reduce 20120221a
 
Map reducecloudtech
Map reducecloudtechMap reducecloudtech
Map reducecloudtech
 
Introduction to Hadoop and Big Data
Introduction to Hadoop and Big DataIntroduction to Hadoop and Big Data
Introduction to Hadoop and Big Data
 
Gruter TECHDAY 2014 Realtime Processing in Telco
Gruter TECHDAY 2014 Realtime Processing in TelcoGruter TECHDAY 2014 Realtime Processing in Telco
Gruter TECHDAY 2014 Realtime Processing in Telco
 
Hanborq Optimizations on Hadoop MapReduce
Hanborq Optimizations on Hadoop MapReduceHanborq Optimizations on Hadoop MapReduce
Hanborq Optimizations on Hadoop MapReduce
 

More from DataWorks Summit

HBase Global Indexing to support large-scale data ingestion at Uber
HBase Global Indexing to support large-scale data ingestion at UberHBase Global Indexing to support large-scale data ingestion at Uber
HBase Global Indexing to support large-scale data ingestion at Uber
DataWorks Summit
 
Security Framework for Multitenant Architecture
Security Framework for Multitenant ArchitectureSecurity Framework for Multitenant Architecture
Security Framework for Multitenant Architecture
DataWorks Summit
 
Computer Vision: Coming to a Store Near You
Computer Vision: Coming to a Store Near YouComputer Vision: Coming to a Store Near You
Computer Vision: Coming to a Store Near You
DataWorks Summit
 

More from DataWorks Summit (20)

Data Science Crash Course
Data Science Crash CourseData Science Crash Course
Data Science Crash Course
 
Floating on a RAFT: HBase Durability with Apache Ratis
Floating on a RAFT: HBase Durability with Apache RatisFloating on a RAFT: HBase Durability with Apache Ratis
Floating on a RAFT: HBase Durability with Apache Ratis
 
Tracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFi
Tracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFiTracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFi
Tracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFi
 
HBase Tales From the Trenches - Short stories about most common HBase operati...
HBase Tales From the Trenches - Short stories about most common HBase operati...HBase Tales From the Trenches - Short stories about most common HBase operati...
HBase Tales From the Trenches - Short stories about most common HBase operati...
 
Optimizing Geospatial Operations with Server-side Programming in HBase and Ac...
Optimizing Geospatial Operations with Server-side Programming in HBase and Ac...Optimizing Geospatial Operations with Server-side Programming in HBase and Ac...
Optimizing Geospatial Operations with Server-side Programming in HBase and Ac...
 
Managing the Dewey Decimal System
Managing the Dewey Decimal SystemManaging the Dewey Decimal System
Managing the Dewey Decimal System
 
Practical NoSQL: Accumulo's dirlist Example
Practical NoSQL: Accumulo's dirlist ExamplePractical NoSQL: Accumulo's dirlist Example
Practical NoSQL: Accumulo's dirlist Example
 
HBase Global Indexing to support large-scale data ingestion at Uber
HBase Global Indexing to support large-scale data ingestion at UberHBase Global Indexing to support large-scale data ingestion at Uber
HBase Global Indexing to support large-scale data ingestion at Uber
 
Scaling Cloud-Scale Translytics Workloads with Omid and Phoenix
Scaling Cloud-Scale Translytics Workloads with Omid and PhoenixScaling Cloud-Scale Translytics Workloads with Omid and Phoenix
Scaling Cloud-Scale Translytics Workloads with Omid and Phoenix
 
Building the High Speed Cybersecurity Data Pipeline Using Apache NiFi
Building the High Speed Cybersecurity Data Pipeline Using Apache NiFiBuilding the High Speed Cybersecurity Data Pipeline Using Apache NiFi
Building the High Speed Cybersecurity Data Pipeline Using Apache NiFi
 
Supporting Apache HBase : Troubleshooting and Supportability Improvements
Supporting Apache HBase : Troubleshooting and Supportability ImprovementsSupporting Apache HBase : Troubleshooting and Supportability Improvements
Supporting Apache HBase : Troubleshooting and Supportability Improvements
 
Security Framework for Multitenant Architecture
Security Framework for Multitenant ArchitectureSecurity Framework for Multitenant Architecture
Security Framework for Multitenant Architecture
 
Presto: Optimizing Performance of SQL-on-Anything Engine
Presto: Optimizing Performance of SQL-on-Anything EnginePresto: Optimizing Performance of SQL-on-Anything Engine
Presto: Optimizing Performance of SQL-on-Anything Engine
 
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
 
Extending Twitter's Data Platform to Google Cloud
Extending Twitter's Data Platform to Google CloudExtending Twitter's Data Platform to Google Cloud
Extending Twitter's Data Platform to Google Cloud
 
Event-Driven Messaging and Actions using Apache Flink and Apache NiFi
Event-Driven Messaging and Actions using Apache Flink and Apache NiFiEvent-Driven Messaging and Actions using Apache Flink and Apache NiFi
Event-Driven Messaging and Actions using Apache Flink and Apache NiFi
 
Securing Data in Hybrid on-premise and Cloud Environments using Apache Ranger
Securing Data in Hybrid on-premise and Cloud Environments using Apache RangerSecuring Data in Hybrid on-premise and Cloud Environments using Apache Ranger
Securing Data in Hybrid on-premise and Cloud Environments using Apache Ranger
 
Big Data Meets NVM: Accelerating Big Data Processing with Non-Volatile Memory...
Big Data Meets NVM: Accelerating Big Data Processing with Non-Volatile Memory...Big Data Meets NVM: Accelerating Big Data Processing with Non-Volatile Memory...
Big Data Meets NVM: Accelerating Big Data Processing with Non-Volatile Memory...
 
Computer Vision: Coming to a Store Near You
Computer Vision: Coming to a Store Near YouComputer Vision: Coming to a Store Near You
Computer Vision: Coming to a Store Near You
 
Big Data Genomics: Clustering Billions of DNA Sequences with Apache Spark
Big Data Genomics: Clustering Billions of DNA Sequences with Apache SparkBig Data Genomics: Clustering Billions of DNA Sequences with Apache Spark
Big Data Genomics: Clustering Billions of DNA Sequences with Apache Spark
 

Recently uploaded

Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 

Apache Tez – Present and Future

  • 1. © Hortonworks Inc. 2015 Page 1 Apache Tez – Present and Future Jeff Zhang Rajesh Balamohan
  • 2. © Hortonworks Inc. 2015 Outline •Tez Introduction •Tez Feature Deep Dive •Tez Improvement & Debuggability •Tez Status & Roadmap
  • 3. © Hortonworks Inc. 2015 I/O Synchronization Barrier I/O Synchronization Barrier Job 1 ( Join a & b ) Job 3 ( Group by of c ) Job 2 (Group by of a Join b) Job 4 (Join of S & R ) Hive - MR Example of MR versus Tez Page 3 Single Job Hive - Tez Join a & b Group by of a Join b Group by of c Job 4 (Join of S & R )
  • 4. © Hortonworks Inc. 2015 Tez – Introduction Page 4 • Distributed execution framework targeted towards data-processing applications. • Based on expressing a computation as a dataflow graph (DAG). • Highly customizable to meet a broad spectrum of use cases. • Built on top of YARN – the resource management framework for Hadoop. • Open source Apache project and Apache licensed.
  • 5. © Hortonworks Inc. 2015 What is DAG & Why DAG Projection Filter GroupBy … Join Union Intersect … Split … • Directed Acyclic Graph • Any complicated DAG can been composed of the following 3 basic paradigm of DAG – Sequential – Merge – Divide
  • 6. © Hortonworks Inc. 2015 Anatomy of DAG Logic View Vertex Task_1 Task_2 Task_3 Runtime View Task TaskAttempt_1 TaskAttempt_2
  • 7. © Hortonworks Inc. 2015 Expressing DAG in Tez • Logic View (DAG API ) –Allow user to express computation by using DAG –Topological structure of the data computation flow • Runtime API (I/P/O) –Application logic of each computation unit –How to move/read/write data between vertices
  • 8. © Hortonworks Inc. 2015 Logic View (DAG API) Page 8 • Vertex (Processor, Parallelism, Resource, etc…) • Edge (EdgeProperty) –DataMovement – ScatterGather (Join, GroupBy … ) – BroadCast ( Pig Replicated Join / Hive Broadcast Join ) – One2One ( Pig Order by ) – Custom
  • 9. © Hortonworks Inc. 2015 Runtime View (Runtime API) Page 9 ProcessorInput Output • Input – Through which processor receives data on an edge – One vertex can have multiple inputs • Processor – Application Logic (One vertex one processor) – Consume the inputs and produce the outputs • Output – Through which processor write data to an edge – One vertex can have multiple outputs • Example of Input/Output/Processor – MRInput & MROutput (InputFormat/OutptFormat) – OrderedGroupedKVInput & OrderedPartitionedKVOutput (ScatterGather) – UnorderedKVInput & UnorderedKVOutput (Broadcast & 1-1) – PigProcessor/HiveProcessor
  • 10. © Hortonworks Inc. 2015 Benefit of DAG • Easier to express computation in DAG • No intermediate data written to HDFS • Less pressure on NameNode • No resource queuing effort & less resource contention • More optimization opportunity with more global context
  • 11. © Hortonworks Inc. 2015 Outline •Tez Introduction •Tez Feature Deep Dive •Tez Improvement & Debuggability •Tez Status & Roadmap
  • 12. © Hortonworks Inc. 2015 Container-Reuse • Reuse the same container across DAG/Vertices/Tasks • Benefit of Container-Reuse –Reduce overhead of launching JVM –Reduce overhead of negotiate with Resource Manager –Reduce overhead of resource localization –Reduced network IO –Less resources consumed –Object Caching
  • 13. © Hortonworks Inc. 2015 Tez Session • Multiple Jobs/DAGs in one AM • Container-reuse across Jobs/DAGs • Share data between Jobs/DAGs
  • 14. © Hortonworks Inc. 2015 Dynamic Parallelism Estimation • VertexManager –Listen to the other vertices status –Coordinate and schedule its tasks –Communication between vertices
  • 15. © Hortonworks Inc. 2015 ATS Integration • Tez is fully integrated with YARN ATS (Application Timeline Service) –DAG Status, DAG Metrics, Task Status, Task Metrics are captured • Diagnostics & Performance analysis –Data Source for monitoring & diagnostics –Data Source for performance analysis
  • 16. © Hortonworks Inc. 2015 Recovery • AM can crash in corner cases –OOM –Node failure –… • Continue from the last checkpoint • Transparent to end users AM Crash
  • 17. © Hortonworks Inc. 2015 Order By of Pig f = Load ‘foo’ as (x, y); o = Order f by x;Sample Aggregate (Calculate Histogram) HDFS Partition Sort Broadcast Load & Sample Aggregate (Calculate Histogram) Partition Sort 1-1 ScatterGather ScatterGather
  • 18. © Hortonworks Inc. 2015 Outline •Tez Introduction •Tez Feature Deep Dive •Tez Improvement & Debuggability •Tez Status & Roadmap
  • 19. © Hortonworks Inc. 2015 • Performance –Speculation –Better use of JVM Memory –Intermediate File Improvements –Shuffle Improvements • Debuggability –Job Analysis Tools –Shuffle Performance Analysis Tool –Local Mode –Tez UI
  • 20. © Hortonworks Inc. 2015 Speculation • Maintains Periodic Runtime Statistics of Tasks • Similar to Legacy MR speculation –Trigger speculative attempt when estimated runtime > mean runtime • Good for Cluster Having Good & Slow Nodes. • <TBD>
  • 21. © Hortonworks Inc. 2015 Intermediate File Format Improvements • Key value format used for storing intermediate format in Tez • Drawbacks of earlier format –Needs larger buffer in memory (due to duplicate keys) –Unwanted key comparison of identical keys during merge sort –Bigger file size in disk –Not ideal for all use cases • New Intermediate File Format –Works based on (K, List<V>) –Lesser key comparisons during merge sort –Provides 57% memory efficiency and 23% improvement in disk storage Task Spill 1 Spill 2 Spill 3 Merged Spill Key Len Value Len Key Bytes Value Bytes Key Len Value Len Key Bytes Value Bytes Key Len Value Len Key Bytes Value Bytes Key Len Value Len Key Bytes Value Bytes ……………………… EOF Marker Key Len Key Bytes Value Len Value Bytes V_END Key Len Key Bytes Value Len Value Bytes V_END Key Len Key Bytes Value Len Value Bytes V_END Key Len Key Bytes Value Len Value Bytes V_END EOF Marker ……………………… … … … Old IFile Format New IFile Format RLE RLE RLE
  • 22. © Hortonworks Inc. 2015 Better use of JVM Memory • PipelinedSorter can support > 2 GB sort buffers –Containers with higher RAM no longer limited by 2 GB sort buffer limits –Avoids unnecessary spills • Reduced key comparison costs in PipelinedSorter • <TBD>
  • 23. © Hortonworks Inc. 2015 Better use of JVM Memory - Contd • BytesWritable Improvements –Provides FastByteSerialization –Saves 8 bytes per key-value pair –Reduces IFile size by 25% –Reduces SERDE costs • WeightbedMemoryDistributor for better memory management in tasks –Observed 26% runtime improvements • Enabled RLE in reducer codepath –Improved Job Runtime –Reduced IO Cost • <TBD>
  • 24. © Hortonworks Inc. 2015 Source Task …. …. Broadcast Shuffle Improvements Task 1 Task 2 Task N … Task 1 Task 2 Task N … Task 1 Task 2 Task N … Broadcast From local disk From local disk Source Task …. …. Task 1 Task 2 Task N … Task 1 Task 2 Task N … Task 1 Task 2 Task N … Broadcast Before Fix After Fix
  • 25. © Hortonworks Inc. 2015 PipelinedShuffle Improvments • Final merge in source task is avoided. – Less IO • Consumers are informed about spill events in advance – Better usage of network bandwidth – Overlap CPU with network – For sorted/unsorted outputs, send data to consumers in chunks • Observed 20% runtime improvement in queries involving heavy skews Task 1 Spill 1 Task 2 Reduce Task 1 Reduce Task 1Reduce Task 1Reduce Task 1Reduce Task N ….. ….. ….. ….. Spill 1 Spill 2 Spill 3 Task 1 Spill 1 Task 2 Spill 1 Spill 2 Spill 3 Reduce Task 1 Reduce Task 1Reduce Task 1Reduce Task 1Reduce Task N ….. ….. ….. ….. Merged Spill Normal Shuffle Path Pipelined Shuffle Path
  • 26. © Hortonworks Inc. 2015 Job Analysis Tools • DAG Swimlane –“$TEZ_HOME/tez-tools/swimlanes/sh yarn-swimlanes.sh <app_id>” Prewarm Container Reuse Remote Reads
  • 27. © Hortonworks Inc. 2015 Shuffle Performance Analysis Tools • Analyze shuffle performance between source / destination nodes
  • 28. © Hortonworks Inc. 2015 Shuffle Performance Analysis Tools • Analyze shuffle performance between source / destination nodes
  • 29. © Hortonworks Inc. 2015 Better Debuggability– Local Mode • Test Tez Jobs without Hadoop Cluster • Enables Fast Prototyping • Fast Unit Testing • Runs on Single JVM (easy for debugging) • Scheduling / RPC invocations Skipped
  • 30. © Hortonworks Inc. 2015 Better Debuggability- Tez-UI
  • 31. © Hortonworks Inc. 2015 Better Debuggability- Tez-UI
  • 32. © Hortonworks Inc. 2015 Better Debuggability - Tez-UI
  • 33. © Hortonworks Inc. 2015 Better Debuggability - Tez-UI
  • 34. © Hortonworks Inc. 2015 RoadMap • Shared Output Edges • Multiple Edges between Vertices • Local Mode Stabilization • Optimizing (include/exclude) Vertex at Runtime • <TBD>
  • 35. © Hortonworks Inc. 2015 Tez – Adoption • Apache Hive • Start from Hive 0.13 • set hive.exec.engine = tez • Apache Pig • Start from Pig 0.14 • pig -x tez • Cascading • Cascading 3.0 WIP Page 35
  • 36. © Hortonworks Inc. 2015 Thank You! Questions & Answers Page 36

Editor's Notes

  1. Hive has written it’s own processor