SlideShare a Scribd company logo
1 of 23
Download to read offline
Prasanna Rajaperumal, Engineer, Uber
Hoodie
How (and Why) Uber built
an Analytical datastore On
Spark
June, 2017
What’s our problem?
Queryable State for Analytics
Queryable state == mutations
● Pure Dimension Table e.g. Users
● Fact Tables that can get super large and needs a
materialized view e.g. Trips
● Late Arriving Data
○ Event time vs Processing time
● Delete records (Compliance)
● Data correction upstream
Analytics == Big Scans
● Super fast scans on subset of columns
● Large time ranges - Lots of data
source
Okay, so what did we want?
OLAP Database
● Scale and complexity
○ Scale horizontally [Petabytes]
○ Support Nested columns
○ Batch ingest and Analytical scans
● Latency
○ Ingest Latency ~ 10 minutes
○ Query Latency ~ upto 2 minutes
● Multi tenant - High throughput
● Transactional - ACID
● Self Healing
○ Less tunable knobs
○ Handle data skew
○ Auto scale with load
○ Failure Recovery
○ Rollback and Savepoints
source
Okay, Could you do ...?
Solutions that did not work for us
● OLAP RDBMS
○ Petabyte scale
○ Elastic scaling of compute
● No/New SQL (LSM)
○ Scan performance
○ Operations involved - Compaction
● Hack around it
○ Dump LSM Snapshot
○ Rewrite partitions too costly
○ Watermark - Approximations
● Hive Transactions
○ Hive specific solution
○ Hash bucketing - tuning?
● Apache Kudu
○ Separate storage server
○ Eco system support
source
Let's design what we want.
We have 20 minutes.
“Software Engineer engineers
the illusion of simplicity”
Grady Booch, UML Creator
Pick the area in RUM triangle
Design choices
● RUM Conjecture
○ Optimize 2 at the expense of the third
● Fast data - Write Optimized
○ Control Read Amplification
○ Query execution cost
● Fast Scans - Read Optimized
○ Control Write Amplification
○ Ingestion cost
● Choice per client/query
source
Pick Framework
Leveraging Spark’s Elasticity + Scalability + Speed
● Spark + DFS vs Storage Server
○ Batch engine vs MPP engine
■ Throughput vs Latency
■ Flexibility to go batch or streaming
■ Dynamic Resource Allocation
○ Complexity
■ Static Partitioning
■ Dedicated resources
■ Consensus
○ Scaling
■ Auto Scaling with load using Spark
○ Resiliency and Recovery (RDD)
■ Simplify Application Abstraction
■ Self Healing
○ Simplified API Layer
Correctness - ACID
Design choices
● Atomic ingest of a batch
○ Based on Processing time
○ Cross row atomicity
● Strong consistency
● Single Writer | Multiple Reader
● High query concurrency
○ Query Isolation using Snapshot
● Time travel
○ Temporal queries
source
Storage
Design choices
● Hybrid Storage
○ Row based - Recent data
○ Column based - Cold data
● Compactor
● Insert vs Update during Ingest
○ Need for Index
● Ingest parallelism vs Query parallelism
○ Max file size
Partitioning
Implementation choices
● DFS - Directory Partitioning
○ Coarse grained
○ Need finer grained
■ Hash Bucket
■ Auto create partition on insert
Introducing Hoodie
Hadoop Upsert anD Incrementals
https://github.com/uber/hoodie
https://eng.uber.com/hoodie
HoodieWriteConfig cfg = HoodieWriteConfig.newBuilder()
.withPath(path)
.withSchema(schema)
.withParallelism(500)
.withIndexConfig(HoodieIndexConfig.newBuilder()
.withIndexType(HoodieIndex.IndexType.BLOOM).build())
.withStorageConfig(HoodieStorageConfig.newBuilder()
.defaultStorage().build())
.withCompactionConfig(HoodieCompactionConfig.newBuilder()
.withCompactionStrategy(new BoundedIOCompactionStrategy()).build())
.build();
JavaRDD<HoodieRecord> inputRecords = … // input data
HoodieWriteClient client = new HoodieWriteClient(sc, cfg);
JavaRDD<WriteStatus> result = client. upsert(inputRecords, commitTime);
boolean toCommit = inspectResultFailures(result);
if(toCommit) {
client.commit(commitTime, result);
} else {
client.rollback(commitTime);
}
How do I ingest?
Show me the code !!!
Spark DAG
How is that graph looking?
Storage & Index
Implementation choices
Storage RDD
Every columnar file has one or more “redo” log
● Row based Log Format - Apache Avro
○ Append block
○ Rollback
● Columnar Format - Apache Parquet
○ Predicate pushdown
○ Columnar compression
○ Vectorized Reading
Index RDD - Insert vs Update during Ingest
● Embedded
○ Bloom Filter
● External
○ Key Value store source
Correctness
Implementation choices
● Commit File on DFS
○ Atomic rename to publish data
○ Consume from downstream Spark job
● Query Isolation
○ Multiple versions of data file
○ Query hook - InputFormat via SparkSQL
source
Compaction
Implementation
● Compaction
○ Background Spark job
○ Lock log files
○ Minor
■ IO Bound Strategy
■ Improve Query Performance
○ Major
■ No log left behind
source
SparkSession spark = SparkSession.builder()
.appName("Hoodie SparkSQL")
.config("spark.sql.hive.convertMetastoreParquet", false)
. enableHiveSupport()
.getOrCreate();
// real time query
spark.sql("select fare, begin_lon, begin_lat, timestamp from hoodie.trips_rt where fare
> 100.0").show();
// read optimized query
spark.sql("select fare, begin_lon, begin_lat, timestamp from hoodie.trips_ro where fare
> 100.0").show();
// Spark Datasource (WIP)
Dataset<Row> dataset = sqlContext.read().format(HOODIE_SOURCE_NAME)
.option("query", "SELECT driverUUID, riderUUID FROM trips").load();
How can I query?
Show me the code !!!
Query
Design choices
RUM Conjecture - Moving within the chosen area
Read Optimized View
- Pick only columnar files for querying
- Raw Parquet Query Performance
- Freshness of Major Compaction
Real Time View
- Hybrid of row and columnar data
- Brings near-real time tables
- SparkSQL with convertMetaStore=false
REALTIME
READ
OPTIMIZED
Queryexecutiontime
Data Latency
2017/02/17
Index
Index
File1_v2.parquet
2017/02/15
2017/02/16
2017/02/17
File1.avro.log
FileGroup
10 GB
5min batch
File1_v1.parquet
10 GB
5 min batch
Input
Changelog
Hoodie Dataset
Realtime View
Read Optimized
View
Spark SQL
Shopify evaluating for use
- Incremental DB ingestion onto GCS
- Early interest from multiple companies
Engage with us on Github (uber/hoodie)
- Look for “beginner-task” tagged issues
- Try out tools & utilities
Uber is hiring for “Hoodie”
- Staff Engineer
Community
Share love and code
● Productionizing on AWS S3/EFS, GCP
● Spark Datasource
● Structured Streaming Sink
● Performance in Read Path
○ Presto plugin
○ Impala
● Spark Caching and integration with Apache Arrow
● Beam Runner
Future Plans
Aim high
Questions?

More Related Content

What's hot

What's hot (20)

Optimizing S3 Write-heavy Spark workloads
Optimizing S3 Write-heavy Spark workloadsOptimizing S3 Write-heavy Spark workloads
Optimizing S3 Write-heavy Spark workloads
 
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
 
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
 
Apache Spark Overview
Apache Spark OverviewApache Spark Overview
Apache Spark Overview
 
Hadoop Query Performance Smackdown
Hadoop Query Performance SmackdownHadoop Query Performance Smackdown
Hadoop Query Performance Smackdown
 
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
 
Caching solutions with Redis
Caching solutions   with RedisCaching solutions   with Redis
Caching solutions with Redis
 
Apache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Apache Spark Data Source V2 with Wenchen Fan and Gengliang WangApache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
Apache Spark Data Source V2 with Wenchen Fan and Gengliang Wang
 
Apache Tez: Accelerating Hadoop Query Processing
Apache Tez: Accelerating Hadoop Query Processing Apache Tez: Accelerating Hadoop Query Processing
Apache Tez: Accelerating Hadoop Query Processing
 
Handling Data Skew Adaptively In Spark Using Dynamic Repartitioning
Handling Data Skew Adaptively In Spark Using Dynamic RepartitioningHandling Data Skew Adaptively In Spark Using Dynamic Repartitioning
Handling Data Skew Adaptively In Spark Using Dynamic Repartitioning
 
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
 
Introduction to Spark with Python
Introduction to Spark with PythonIntroduction to Spark with Python
Introduction to Spark with Python
 
Sqoop
SqoopSqoop
Sqoop
 
Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.
 
Top 5 Mistakes to Avoid When Writing Apache Spark Applications
Top 5 Mistakes to Avoid When Writing Apache Spark ApplicationsTop 5 Mistakes to Avoid When Writing Apache Spark Applications
Top 5 Mistakes to Avoid When Writing Apache Spark Applications
 
Building robust CDC pipeline with Apache Hudi and Debezium
Building robust CDC pipeline with Apache Hudi and DebeziumBuilding robust CDC pipeline with Apache Hudi and Debezium
Building robust CDC pipeline with Apache Hudi and Debezium
 
Introduction to Spark Streaming
Introduction to Spark StreamingIntroduction to Spark Streaming
Introduction to Spark Streaming
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache Spark
 
Introduction to Apache Sqoop
Introduction to Apache SqoopIntroduction to Apache Sqoop
Introduction to Apache Sqoop
 
Apache Sqoop: A Data Transfer Tool for Hadoop
Apache Sqoop: A Data Transfer Tool for HadoopApache Sqoop: A Data Transfer Tool for Hadoop
Apache Sqoop: A Data Transfer Tool for Hadoop
 

Similar to Incremental Processing on Large Analytical Datasets with Prasanna Rajaperumal and Vinoth Chandar

Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3  Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3
Omid Vahdaty
 
Scala like distributed collections - dumping time-series data with apache spark
Scala like distributed collections - dumping time-series data with apache sparkScala like distributed collections - dumping time-series data with apache spark
Scala like distributed collections - dumping time-series data with apache spark
Demi Ben-Ari
 

Similar to Incremental Processing on Large Analytical Datasets with Prasanna Rajaperumal and Vinoth Chandar (20)

AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned
 
Real-time analytics with Druid at Appsflyer
Real-time analytics with Druid at AppsflyerReal-time analytics with Druid at Appsflyer
Real-time analytics with Druid at Appsflyer
 
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | EnglishAWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
 
Spark Meetup at Uber
Spark Meetup at UberSpark Meetup at Uber
Spark Meetup at Uber
 
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark - Demi Ben...
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark - Demi Ben...S3, Cassandra or Outer Space? Dumping Time Series Data using Spark - Demi Ben...
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark - Demi Ben...
 
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark - Demi Be...
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark  - Demi Be...S3, Cassandra or Outer Space? Dumping Time Series Data using Spark  - Demi Be...
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark - Demi Be...
 
ApacheCon 2022_ Large scale unification of file format.pptx
ApacheCon 2022_ Large scale unification of file format.pptxApacheCon 2022_ Large scale unification of file format.pptx
ApacheCon 2022_ Large scale unification of file format.pptx
 
Streamsets and spark in Retail
Streamsets and spark in RetailStreamsets and spark in Retail
Streamsets and spark in Retail
 
Analytic Insights in Retail Using Apache Spark with Hari Shreedharan
Analytic Insights in Retail Using Apache Spark with Hari ShreedharanAnalytic Insights in Retail Using Apache Spark with Hari Shreedharan
Analytic Insights in Retail Using Apache Spark with Hari Shreedharan
 
Elasticsearch as a time series database
Elasticsearch as a time series databaseElasticsearch as a time series database
Elasticsearch as a time series database
 
Big data should be simple
Big data should be simpleBig data should be simple
Big data should be simple
 
Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3  Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3
 
Scala like distributed collections - dumping time-series data with apache spark
Scala like distributed collections - dumping time-series data with apache sparkScala like distributed collections - dumping time-series data with apache spark
Scala like distributed collections - dumping time-series data with apache spark
 
How The Weather Company Uses Apache Spark to Serve Weather Data Fast at Low Cost
How The Weather Company Uses Apache Spark to Serve Weather Data Fast at Low CostHow The Weather Company Uses Apache Spark to Serve Weather Data Fast at Low Cost
How The Weather Company Uses Apache Spark to Serve Weather Data Fast at Low Cost
 
Mixing Analytic Workloads with Greenplum and Apache Spark
Mixing Analytic Workloads with Greenplum and Apache SparkMixing Analytic Workloads with Greenplum and Apache Spark
Mixing Analytic Workloads with Greenplum and Apache Spark
 
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a ServiceZeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
 
Capacity Planning
Capacity PlanningCapacity Planning
Capacity Planning
 
EVCache: Lowering Costs for a Low Latency Cache with RocksDB
EVCache: Lowering Costs for a Low Latency Cache with RocksDBEVCache: Lowering Costs for a Low Latency Cache with RocksDB
EVCache: Lowering Costs for a Low Latency Cache with RocksDB
 
Scaling Apache Pulsar to 10 Petabytes/Day
Scaling Apache Pulsar to 10 Petabytes/DayScaling Apache Pulsar to 10 Petabytes/Day
Scaling Apache Pulsar to 10 Petabytes/Day
 
Journey through high performance django application
Journey through high performance django applicationJourney through high performance django application
Journey through high performance django application
 

More from Databricks

Democratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized PlatformDemocratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized Platform
Databricks
 
Stage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI IntegrationStage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI Integration
Databricks
 
Simplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorchSimplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorch
Databricks
 
Raven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction QueriesRaven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction Queries
Databricks
 
Processing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache SparkProcessing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache Spark
Databricks
 

More from Databricks (20)

DW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptx
 
Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1
 
Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 1 | Part 2Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 1 | Part 2
 
Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 2Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 2
 
Data Lakehouse Symposium | Day 4
Data Lakehouse Symposium | Day 4Data Lakehouse Symposium | Day 4
Data Lakehouse Symposium | Day 4
 
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
 
Democratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized PlatformDemocratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized Platform
 
Learn to Use Databricks for Data Science
Learn to Use Databricks for Data ScienceLearn to Use Databricks for Data Science
Learn to Use Databricks for Data Science
 
Why APM Is Not the Same As ML Monitoring
Why APM Is Not the Same As ML MonitoringWhy APM Is Not the Same As ML Monitoring
Why APM Is Not the Same As ML Monitoring
 
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixThe Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
 
Stage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI IntegrationStage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI Integration
 
Simplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorchSimplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorch
 
Scaling your Data Pipelines with Apache Spark on Kubernetes
Scaling your Data Pipelines with Apache Spark on KubernetesScaling your Data Pipelines with Apache Spark on Kubernetes
Scaling your Data Pipelines with Apache Spark on Kubernetes
 
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark PipelinesScaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
 
Sawtooth Windows for Feature Aggregations
Sawtooth Windows for Feature AggregationsSawtooth Windows for Feature Aggregations
Sawtooth Windows for Feature Aggregations
 
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen SinkRedis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
 
Re-imagine Data Monitoring with whylogs and Spark
Re-imagine Data Monitoring with whylogs and SparkRe-imagine Data Monitoring with whylogs and Spark
Re-imagine Data Monitoring with whylogs and Spark
 
Raven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction QueriesRaven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction Queries
 
Processing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache SparkProcessing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache Spark
 
Massive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta LakeMassive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta Lake
 

Recently uploaded

Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
shambhavirathore45
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
MarinCaroMartnezBerg
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
amitlee9823
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
shivangimorya083
 

Recently uploaded (20)

Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
 

Incremental Processing on Large Analytical Datasets with Prasanna Rajaperumal and Vinoth Chandar

  • 1. Prasanna Rajaperumal, Engineer, Uber Hoodie How (and Why) Uber built an Analytical datastore On Spark June, 2017
  • 2. What’s our problem? Queryable State for Analytics Queryable state == mutations ● Pure Dimension Table e.g. Users ● Fact Tables that can get super large and needs a materialized view e.g. Trips ● Late Arriving Data ○ Event time vs Processing time ● Delete records (Compliance) ● Data correction upstream Analytics == Big Scans ● Super fast scans on subset of columns ● Large time ranges - Lots of data source
  • 3. Okay, so what did we want? OLAP Database ● Scale and complexity ○ Scale horizontally [Petabytes] ○ Support Nested columns ○ Batch ingest and Analytical scans ● Latency ○ Ingest Latency ~ 10 minutes ○ Query Latency ~ upto 2 minutes ● Multi tenant - High throughput ● Transactional - ACID ● Self Healing ○ Less tunable knobs ○ Handle data skew ○ Auto scale with load ○ Failure Recovery ○ Rollback and Savepoints source
  • 4. Okay, Could you do ...? Solutions that did not work for us ● OLAP RDBMS ○ Petabyte scale ○ Elastic scaling of compute ● No/New SQL (LSM) ○ Scan performance ○ Operations involved - Compaction ● Hack around it ○ Dump LSM Snapshot ○ Rewrite partitions too costly ○ Watermark - Approximations ● Hive Transactions ○ Hive specific solution ○ Hash bucketing - tuning? ● Apache Kudu ○ Separate storage server ○ Eco system support source
  • 5. Let's design what we want. We have 20 minutes.
  • 6. “Software Engineer engineers the illusion of simplicity” Grady Booch, UML Creator
  • 7. Pick the area in RUM triangle Design choices ● RUM Conjecture ○ Optimize 2 at the expense of the third ● Fast data - Write Optimized ○ Control Read Amplification ○ Query execution cost ● Fast Scans - Read Optimized ○ Control Write Amplification ○ Ingestion cost ● Choice per client/query source
  • 8. Pick Framework Leveraging Spark’s Elasticity + Scalability + Speed ● Spark + DFS vs Storage Server ○ Batch engine vs MPP engine ■ Throughput vs Latency ■ Flexibility to go batch or streaming ■ Dynamic Resource Allocation ○ Complexity ■ Static Partitioning ■ Dedicated resources ■ Consensus ○ Scaling ■ Auto Scaling with load using Spark ○ Resiliency and Recovery (RDD) ■ Simplify Application Abstraction ■ Self Healing ○ Simplified API Layer
  • 9. Correctness - ACID Design choices ● Atomic ingest of a batch ○ Based on Processing time ○ Cross row atomicity ● Strong consistency ● Single Writer | Multiple Reader ● High query concurrency ○ Query Isolation using Snapshot ● Time travel ○ Temporal queries source
  • 10. Storage Design choices ● Hybrid Storage ○ Row based - Recent data ○ Column based - Cold data ● Compactor ● Insert vs Update during Ingest ○ Need for Index ● Ingest parallelism vs Query parallelism ○ Max file size
  • 11. Partitioning Implementation choices ● DFS - Directory Partitioning ○ Coarse grained ○ Need finer grained ■ Hash Bucket ■ Auto create partition on insert
  • 12. Introducing Hoodie Hadoop Upsert anD Incrementals https://github.com/uber/hoodie https://eng.uber.com/hoodie
  • 13. HoodieWriteConfig cfg = HoodieWriteConfig.newBuilder() .withPath(path) .withSchema(schema) .withParallelism(500) .withIndexConfig(HoodieIndexConfig.newBuilder() .withIndexType(HoodieIndex.IndexType.BLOOM).build()) .withStorageConfig(HoodieStorageConfig.newBuilder() .defaultStorage().build()) .withCompactionConfig(HoodieCompactionConfig.newBuilder() .withCompactionStrategy(new BoundedIOCompactionStrategy()).build()) .build(); JavaRDD<HoodieRecord> inputRecords = … // input data HoodieWriteClient client = new HoodieWriteClient(sc, cfg); JavaRDD<WriteStatus> result = client. upsert(inputRecords, commitTime); boolean toCommit = inspectResultFailures(result); if(toCommit) { client.commit(commitTime, result); } else { client.rollback(commitTime); } How do I ingest? Show me the code !!!
  • 14. Spark DAG How is that graph looking?
  • 15. Storage & Index Implementation choices Storage RDD Every columnar file has one or more “redo” log ● Row based Log Format - Apache Avro ○ Append block ○ Rollback ● Columnar Format - Apache Parquet ○ Predicate pushdown ○ Columnar compression ○ Vectorized Reading Index RDD - Insert vs Update during Ingest ● Embedded ○ Bloom Filter ● External ○ Key Value store source
  • 16. Correctness Implementation choices ● Commit File on DFS ○ Atomic rename to publish data ○ Consume from downstream Spark job ● Query Isolation ○ Multiple versions of data file ○ Query hook - InputFormat via SparkSQL source
  • 17. Compaction Implementation ● Compaction ○ Background Spark job ○ Lock log files ○ Minor ■ IO Bound Strategy ■ Improve Query Performance ○ Major ■ No log left behind source
  • 18. SparkSession spark = SparkSession.builder() .appName("Hoodie SparkSQL") .config("spark.sql.hive.convertMetastoreParquet", false) . enableHiveSupport() .getOrCreate(); // real time query spark.sql("select fare, begin_lon, begin_lat, timestamp from hoodie.trips_rt where fare > 100.0").show(); // read optimized query spark.sql("select fare, begin_lon, begin_lat, timestamp from hoodie.trips_ro where fare > 100.0").show(); // Spark Datasource (WIP) Dataset<Row> dataset = sqlContext.read().format(HOODIE_SOURCE_NAME) .option("query", "SELECT driverUUID, riderUUID FROM trips").load(); How can I query? Show me the code !!!
  • 19. Query Design choices RUM Conjecture - Moving within the chosen area Read Optimized View - Pick only columnar files for querying - Raw Parquet Query Performance - Freshness of Major Compaction Real Time View - Hybrid of row and columnar data - Brings near-real time tables - SparkSQL with convertMetaStore=false REALTIME READ OPTIMIZED Queryexecutiontime Data Latency
  • 20. 2017/02/17 Index Index File1_v2.parquet 2017/02/15 2017/02/16 2017/02/17 File1.avro.log FileGroup 10 GB 5min batch File1_v1.parquet 10 GB 5 min batch Input Changelog Hoodie Dataset Realtime View Read Optimized View Spark SQL
  • 21. Shopify evaluating for use - Incremental DB ingestion onto GCS - Early interest from multiple companies Engage with us on Github (uber/hoodie) - Look for “beginner-task” tagged issues - Try out tools & utilities Uber is hiring for “Hoodie” - Staff Engineer Community Share love and code
  • 22. ● Productionizing on AWS S3/EFS, GCP ● Spark Datasource ● Structured Streaming Sink ● Performance in Read Path ○ Presto plugin ○ Impala ● Spark Caching and integration with Apache Arrow ● Beam Runner Future Plans Aim high