© 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

PPTX
Apache Tez - A New Chapter in Hadoop Data Processing
PPTX
Apache Tez: Accelerating Hadoop Query Processing
PPTX
Hive: Loading Data
PPTX
Hive+Tez: A performance deep dive
PPTX
Hive + Tez: A Performance Deep Dive
PPTX
Apache Tez: Accelerating Hadoop Query Processing
PPTX
Apache Tez - Accelerating Hadoop Data Processing
PPTX
YARN Ready: Integrating to YARN with Tez
Apache Tez - A New Chapter in Hadoop Data Processing
Apache Tez: Accelerating Hadoop Query Processing
Hive: Loading Data
Hive+Tez: A performance deep dive
Hive + Tez: A Performance Deep Dive
Apache Tez: Accelerating Hadoop Query Processing
Apache Tez - Accelerating Hadoop Data Processing
YARN Ready: Integrating to YARN with Tez

What's hot (20)

PPTX
Achieving 100k Queries per Hour on Hive on Tez
PPTX
ORC File - Optimizing Your Big Data
PPTX
How to understand and analyze Apache Hive query execution plan for performanc...
PDF
Apache Spark in Depth: Core Concepts, Architecture & Internals
PPTX
Druid deep dive
PDF
The Parquet Format and Performance Optimization Opportunities
PDF
Cassandra Introduction & Features
PPTX
Emr spark tuning demystified
PPTX
Apache Spark Architecture
PDF
Presto on Apache Spark: A Tale of Two Computation Engines
PPTX
Introduction to Storm
PDF
Apache Spark Core – Practical Optimization
PPTX
Optimizing Apache Spark SQL Joins
PDF
The Apache Spark File Format Ecosystem
PPTX
Performance Optimizations in Apache Impala
PDF
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
PPTX
Apache Tez - A unifying Framework for Hadoop Data Processing
PPTX
Apache Spark Core
PDF
Apache HBase Improvements and Practices at Xiaomi
PDF
How Adobe Does 2 Million Records Per Second Using Apache Spark!
Achieving 100k Queries per Hour on Hive on Tez
ORC File - Optimizing Your Big Data
How to understand and analyze Apache Hive query execution plan for performanc...
Apache Spark in Depth: Core Concepts, Architecture & Internals
Druid deep dive
The Parquet Format and Performance Optimization Opportunities
Cassandra Introduction & Features
Emr spark tuning demystified
Apache Spark Architecture
Presto on Apache Spark: A Tale of Two Computation Engines
Introduction to Storm
Apache Spark Core – Practical Optimization
Optimizing Apache Spark SQL Joins
The Apache Spark File Format Ecosystem
Performance Optimizations in Apache Impala
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Apache Tez - A unifying Framework for Hadoop Data Processing
Apache Spark Core
Apache HBase Improvements and Practices at Xiaomi
How Adobe Does 2 Million Records Per Second Using Apache Spark!
Ad

Viewers also liked (20)

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

Similar to Apache Tez – Present and Future (20)

PPTX
Apache Tez – Present and Future
PDF
3. Apache Tez Introducation - Apache Kylin Meetup @Shanghai
PPTX
Introduction sur Tez par Olivier RENAULT de HortonWorks Meetup du 25/11/2014
PPTX
Apache Tez -- A modern processing engine
PPTX
Tez big datacamp-la-bikas_saha
PPTX
Apache Tez : Accelerating Hadoop Query Processing
PPTX
Tez Data Processing over Yarn
PPTX
Big Data Day LA 2015 - What's new and next in Apache Tez by Bikas Saha of Hor...
PPTX
February 2014 HUG : Tez Details and Insides
PDF
Tez: Accelerating Data Pipelines - fifthel
PDF
Apache Tez : Accelerating Hadoop Query Processing
PPTX
Pig on Tez - Low Latency ETL with Big Data
PPTX
Hackathon bonn
PDF
[2C1] 아파치 피그를 위한 테즈 연산 엔진 개발하기 최종
PDF
April 2013 HUG: The Stinger Initiative - Making Apache Hive 100 Times Faster
PPTX
TEZ-8 UI Walkthrough
PPTX
November 2014 HUG: Apache Tez - A Performance View into Large Scale Data-proc...
PPTX
Interactive query in hadoop
PPTX
Hadoop & cloud storage object store integration in production (final)
PPTX
Boost Performance with Scala – Learn From Those Who’ve Done It!
Apache Tez – Present and Future
3. Apache Tez Introducation - Apache Kylin Meetup @Shanghai
Introduction sur Tez par Olivier RENAULT de HortonWorks Meetup du 25/11/2014
Apache Tez -- A modern processing engine
Tez big datacamp-la-bikas_saha
Apache Tez : Accelerating Hadoop Query Processing
Tez Data Processing over Yarn
Big Data Day LA 2015 - What's new and next in Apache Tez by Bikas Saha of Hor...
February 2014 HUG : Tez Details and Insides
Tez: Accelerating Data Pipelines - fifthel
Apache Tez : Accelerating Hadoop Query Processing
Pig on Tez - Low Latency ETL with Big Data
Hackathon bonn
[2C1] 아파치 피그를 위한 테즈 연산 엔진 개발하기 최종
April 2013 HUG: The Stinger Initiative - Making Apache Hive 100 Times Faster
TEZ-8 UI Walkthrough
November 2014 HUG: Apache Tez - A Performance View into Large Scale Data-proc...
Interactive query in hadoop
Hadoop & cloud storage object store integration in production (final)
Boost Performance with Scala – Learn From Those Who’ve Done It!

More from DataWorks Summit (20)

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

Recently uploaded (20)

PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PPTX
Internet of Everything -Basic concepts details
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
Statistics on Ai - sourced from AIPRM.pdf
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PPTX
Training Program for knowledge in solar cell and solar industry
PPTX
Build Your First AI Agent with UiPath.pptx
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PPTX
future_of_ai_comprehensive_20250822032121.pptx
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
4 layer Arch & Reference Arch of IoT.pdf
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Internet of Everything -Basic concepts details
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
Statistics on Ai - sourced from AIPRM.pdf
Improvisation in detection of pomegranate leaf disease using transfer learni...
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
Data Virtualization in Action: Scaling APIs and Apps with FME
Training Program for knowledge in solar cell and solar industry
Build Your First AI Agent with UiPath.pptx
Basics of Cloud Computing - Cloud Ecosystem
Lung cancer patients survival prediction using outlier detection and optimize...
future_of_ai_comprehensive_20250822032121.pptx
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
Early detection and classification of bone marrow changes in lumbar vertebrae...
NewMind AI Weekly Chronicles – August ’25 Week IV
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
4 layer Arch & Reference Arch of IoT.pdf
Enhancing plagiarism detection using data pre-processing and machine learning...

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

  • #36: Hive has written it’s own processor