SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Cloudera Impala:
    A Modern SQL Engine for Apache Hadoop
    Marcel Kornacker
    Software Engineer, Architect of Cloudera Impala
    January 10, 2013




1
Welcome to the webinar!
    • All lines are muted
    • Q&A after the presentation
    • Ask questions at any time by typing them in the
      “Questions” pane on your GoToWebinar panel
    • Recording of this webinar will be available on demand
      at cloudera.com




2
Speaker Bio: Marcel Kornacker
    Marcel Kornacker is a tech lead at Cloudera for new
    products development and creator of the Cloudera Impala
    project.
    Following his graduation in 2000 with a PhD in databases
    from UC Berkeley, he held engineering positions at several
    database-related start-up companies. Marcel joined Google
    in 2003 where he worked on several ads serving and
    storage infrastructure projects, then became tech lead for
    the distributed query engine component of Google's F1
    project.


3
Impala Overview: Goals
•   General-purpose SQL query engine:
     •   should work both for analytical and transactional workloads
     •   will support queries that take from milliseconds to hours
•   Runs directly within Hadoop:
     •   reads widely used Hadoop file formats
     •   talks to widely used Hadoop storage managers
     •   runs on same nodes that run Hadoop processes
•   High performance:
     •   C++ instead of Java
     •   runtime code generation
     •   completely new execution engine that doesn't build on MapReduce
User View of Impala: Overview
•   Runs as a distributed service in cluster: one Impala daemon on each
    node with data
•   User submits query via ODBC/Beeswax Thrift API to any of the
    daemons
•   Query is distributed to all nodes with relevant data
•   If any node fails, the query fails
•   Impala uses Hive's metadata interface, connects to Hive's metastore
•   Supported file formats:
      •   text files (GA: with compression, including lzo)
      •   sequence files with snappy/gzip compression
      •   GA: Avro data files
      •   GA: Trevni (columnar format; more on that later)
User View of Impala: SQL
•   SQL support:
      •   patterned after Hive's version of SQL
      •   limited to Select, Project, Join, Union, Subqueries, Aggregation and
          Insert
      •   only equi-joins; no non-equi joins, no cross products
      •   Order By only with Limit
      •   GA: DDL support (CREATE, ALTER)
•   Functional limitations:
      •   no custom UDFs, file formats, SerDes
      •   no beyond SQL (buckets, samples, transforms, arrays, structs, maps,
          xpath, json)
      •   only hash joins; joined table has to fit in memory:
            • beta: of single node
            • GA: aggregate memory of all (executing) nodes
User View of Impala: Apache HBase
•   HBase functionality:
     •   uses Hive's mapping of HBase table into metastore table
     •   predicates on rowkey columns are mapped into start/stop
         row
     •   predicates on other columns are mapped into
         SingleColumnValueFilters
•   HBase functional limitations:
     •   no nested-loop joins
     •   all data stored as text
Impala Architecture
• Two binaries: impalad and statestored
• Impala daemon (impalad)
     •   handles client requests and all internal requests related to
         query execution
     •   exports Thrift services for these two roles
•   State store daemon (statestored)
     •   provides name service and metadata distribution
     •   also exports a Thrift service
Impala Architecture
•   Query execution phases
     •   request arrives via odbc/beeswax Thrift API
     •   planner turns request into collections of plan fragments
     •   coordinator initiates execution on remote impalad's
     •   during execution
           • intermediate results are streamed between executors
           • query results are streamed back to client
           • subject to limitations imposed to blocking operators
             (top-n, aggregation)
Impala Architecture: Planner
• join order = FROM clause order GA target: rudimentary cost-
  based optimizer
• 2-phase planning process:
     •   single-node plan: left-deep tree of plan operators
     •   plan partitioning: partition single-node plan to maximize scan locality,
         minimize data movement
•   plan operators: Scan, HashJoin, HashAggregation, Union, TopN,
    Exchange
•   distributed aggregation: pre-aggregation in all nodes, merge
    aggregation in single node. GA: hash-partitioned aggregation:
    re-partition aggregation input on grouping columns in order to
    reduce per-node memory requirement
Impala Architecture: Planner
•   Example: query with join and aggregation
    SELECT state, SUM(revenue)
    FROM HdfsTbl h JOIN HbaseTbl b ON (...)
    GROUP BY 1 ORDER BY 2 desc LIMIT 10

       TopN
                                                  Agg
                          TopN
       Agg                                       Hash
       Hash                Agg                   Join
       Join                                HDFS                   HBase
                           Exch                         Exch
                                           Scan                    Scan
    HDFS      HBase     at coordinator   at DataNodes          at region servers
    Scan       Scan
Impala Architecture: Query Execution
Request arrives via odbc/beeswax Thrift API


     SQL App                               Hive
                                                     HDFS NN   Statestore
      ODBC                             Metastore
                         SQL
                       request

     Query Planner                Query Planner           Query Planner
   Query Coordinator             Query Coordinator      Query Coordinator
    Query Executor               Query Executor          Query Executor
   HDFS DN     HBase             HDFS DN     HBase      HDFS DN    HBase
Impala Architecture: Query Execution
Planner turns request into collections of plan fragments
Coordinator initiates execution on remote impalad's

      SQL App                     Hive
                                            HDFS NN   Statestore
       ODBC                   Metastore




     Query Planner       Query Planner           Query Planner
    Query Coordinator   Query Coordinator      Query Coordinator
     Query Executor      Query Executor         Query Executor
    HDFS DN     HBase   HDFS DN     HBase      HDFS DN    HBase
Impala Architecture: Query Execution
Intermediate results are streamed between impalad's Query
results are streamed back to client

     SQL App                          Hive
                                                HDFS NN   Statestore
      ODBC                        Metastore

                   query
                  results

    Query Planner            Query Planner           Query Planner
   Query Coordinator        Query Coordinator      Query Coordinator
    Query Executor           Query Executor         Query Executor
   HDFS DN     HBase        HDFS DN     HBase      HDFS DN    HBase
Impala Architecture
•   Metadata handling:
     • utilizes Hive's metastore
     • caches metadata: no synchronous metastore API calls
       during query execution
     • beta: impalad's read metadata from metastore at startup
     • GA: metadata distribution through statestore
     • post-GA: HCatalog and AccessServer
Impala Architecture
•   Execution engine
     •   written in C++
     •   runtime code generation for "big loops"
          •   example: insert batch of rows into hash table
          •   code generation with llvm
          •   inlines all expressions; no function calls inside loop
     •   all data is copied into canonical in-memory tuple format; all
         fixed-width data is located at fixed offsets
     •   uses intrinsics/special cpu instructions for text parsing,
         crc32 computation, etc.
Impala's Statestore
•   Central system state repository
      •   name service (membership)
      •   GA: metadata
      •   GA: other scheduling-relevant or diagnostic state
•   Soft-state
      •   all impalad's register at startup
      •   impalad's re-register after losing connection
      •   Impala service continues to function in absence of statestored (but:
          with increasingly stale state)
      •   State pushed to impalad's periodically
      •   Repeated failed heartbeat means impalad evicted from cluster view
•   Thrift API for service / subscription registration
Statestore: Why not ZooKeeper?
•   ZK is not a good pub-sub system
     •   Watch API is awkward and requires a lot of client logic
     •   multiple round-trips required to get data for changes to
         node's children
     •   push model is more natural for our use case
•   Don't need all the guarantees ZK provides:
     • serializability
     • persistence
     • prefer to avoid complexity where possible

•   ZK is bad at the things we care about and good at the
    things we don't
Comparing Impala to Dremel
•   What is Dremel?
     •   columnar storage for data with nested structures
     •   distributed scalable aggregation on top of that
•   Columnar storage in Hadoop: joint project between Cloudera
    and Twitter
     •   new columnar format, derived from Doug Cutting's Trevni
     •   stores data in appropriate native/binary types
     •   can also store nested structures similar to Dremel's ColumnIO
•   Distributed aggregation: Impala
•   Impala plus columnar format: a superset of the published
    version of Dremel (which didn't support joins)
Comparing Impala to Hive
•   Hive: MapReduce as an execution engine
     •   High latency, low throughput queries
     •   Fault-tolerance model based on MapReduce's on-disk
         checkpointing; materializes all intermediate results
     •   Java runtime allows for easy late-binding of functionality:
         file formats and UDFs.
     •   Extensive layering imposes high runtime overhead
•   Impala:
     •   direct, process-to-process data exchange
     •   no fault tolerance
     •   an execution engine designed for low runtime overhead
Comparing Impala to Hive
•   Impala's performance advantage over Hive: no hard
    numbers, but
     •   Impala can get full disk throughput (~100MB/sec/disk);
         I/O-bound workloads often faster by 3-4x
     •   queries that require multiple map-reduce phases in Hive
         see a higher speedup
     •   queries that run against in-memory data see a higher
         speedup (observed up to 100x)
Impala Roadmap: GA – Q2 2013
•   New data formats:
     • lzo-compressed text
     • Avro
     • columnar

•   Better metadata handling:
     •   automatic metadata distribution through statestore
• Connectivity: jdbc
• Improved query execution: partitioned joins
• Further performance improvements
Impala Roadmap: GA – Q2 2013
•   Guidelines for production deployment:
     •   load balancing across impalad's
     •   resource isolation within MR cluster
•   Additional packages: RHEL 5.7, Ubuntu, Debian
Impala Roadmap: 2013
•   Improved HBase support:
     •   composite keys, Avro data in columns,
         index nested-loop joins,
         INSERT/UPDATE/DELETE
•   Additional SQL:
     • UDFs
     • SQL authorization and DDL
     • ORDER BY without LIMIT
     • window functions
     • support for structured data types
Impala Roadmap: 2013
•   Runtime optimizations:
     • straggler handling
     • join order optimization
     • improved cache management
     • data collocation for improved join performance

•   Resource management:
     • cluster-wide quotas
     • Teradata-style policies ("user x can never have more than 5
       concurrent queries running", etc.)
     • goal: run exploratory and production workloads in same
       cluster, against same data, w/o impacting production jobs
Questions
     •   Type it in the “Questions”    Download Impala (beta)
         panel
                                         cloudera.com/downloads
     •   Recording will be available   Learn more about Cloudera
         on demand at cloudera.com
                                        Enterprise RTQ, Powered
                                               by Impala
     •   After webinar, inquire at
         impala-user@cloudera.org          cloudera.com/impala


     •   My email:                     Join the Impala Hackathon,
                                       Monday, Feb 25 @ Cloudera
           marcel@cloudera.com                HQ in Palo Alto
                                        Register: bit.ly/DataHackDay
     Thank you for attending!

26

Weitere ähnliche Inhalte

Was ist angesagt?

Impala: Real-time Queries in Hadoop
Impala: Real-time Queries in HadoopImpala: Real-time Queries in Hadoop
Impala: Real-time Queries in HadoopCloudera, Inc.
 
An Introduction to Impala – Low Latency Queries for Apache Hadoop
An Introduction to Impala – Low Latency Queries for Apache HadoopAn Introduction to Impala – Low Latency Queries for Apache Hadoop
An Introduction to Impala – Low Latency Queries for Apache HadoopChicago Hadoop Users Group
 
Cloudera Impala: A Modern SQL Engine for Apache Hadoop
Cloudera Impala: A Modern SQL Engine for Apache HadoopCloudera Impala: A Modern SQL Engine for Apache Hadoop
Cloudera Impala: A Modern SQL Engine for Apache HadoopCloudera, Inc.
 
Cloudera Impala, updated for v1.0
Cloudera Impala, updated for v1.0Cloudera Impala, updated for v1.0
Cloudera Impala, updated for v1.0Scott Leberknight
 
Impala 2.0 - The Best Analytic Database for Hadoop
Impala 2.0 - The Best Analytic Database for HadoopImpala 2.0 - The Best Analytic Database for Hadoop
Impala 2.0 - The Best Analytic Database for HadoopCloudera, Inc.
 
HBase and Impala Notes - Munich HUG - 20131017
HBase and Impala Notes - Munich HUG - 20131017HBase and Impala Notes - Munich HUG - 20131017
HBase and Impala Notes - Munich HUG - 20131017larsgeorge
 
Building a Hadoop Data Warehouse with Impala
Building a Hadoop Data Warehouse with ImpalaBuilding a Hadoop Data Warehouse with Impala
Building a Hadoop Data Warehouse with ImpalaSwiss Big Data User Group
 
(Aaron myers) hdfs impala
(Aaron myers)   hdfs impala(Aaron myers)   hdfs impala
(Aaron myers) hdfs impalaNAVER D2
 
Cloudera Impala technical deep dive
Cloudera Impala technical deep diveCloudera Impala technical deep dive
Cloudera Impala technical deep divehuguk
 
Architecting Applications with Hadoop
Architecting Applications with HadoopArchitecting Applications with Hadoop
Architecting Applications with Hadoopmarkgrover
 
Friction-free ETL: Automating data transformation with Impala | Strata + Hado...
Friction-free ETL: Automating data transformation with Impala | Strata + Hado...Friction-free ETL: Automating data transformation with Impala | Strata + Hado...
Friction-free ETL: Automating data transformation with Impala | Strata + Hado...Cloudera, Inc.
 
Building a Hadoop Data Warehouse with Impala
Building a Hadoop Data Warehouse with ImpalaBuilding a Hadoop Data Warehouse with Impala
Building a Hadoop Data Warehouse with Impalahuguk
 
Cloudera Impala: A modern SQL Query Engine for Hadoop
Cloudera Impala: A modern SQL Query Engine for HadoopCloudera Impala: A modern SQL Query Engine for Hadoop
Cloudera Impala: A modern SQL Query Engine for HadoopCloudera, Inc.
 
SQL Engines for Hadoop - The case for Impala
SQL Engines for Hadoop - The case for ImpalaSQL Engines for Hadoop - The case for Impala
SQL Engines for Hadoop - The case for Impalamarkgrover
 
Node labels in YARN
Node labels in YARNNode labels in YARN
Node labels in YARNWangda Tan
 
Real-Time Queries in Hadoop w/ Cloudera Impala
Real-Time Queries in Hadoop w/ Cloudera ImpalaReal-Time Queries in Hadoop w/ Cloudera Impala
Real-Time Queries in Hadoop w/ Cloudera ImpalaData Science London
 

Was ist angesagt? (20)

Impala: Real-time Queries in Hadoop
Impala: Real-time Queries in HadoopImpala: Real-time Queries in Hadoop
Impala: Real-time Queries in Hadoop
 
An Introduction to Impala – Low Latency Queries for Apache Hadoop
An Introduction to Impala – Low Latency Queries for Apache HadoopAn Introduction to Impala – Low Latency Queries for Apache Hadoop
An Introduction to Impala – Low Latency Queries for Apache Hadoop
 
Cloudera Impala: A Modern SQL Engine for Apache Hadoop
Cloudera Impala: A Modern SQL Engine for Apache HadoopCloudera Impala: A Modern SQL Engine for Apache Hadoop
Cloudera Impala: A Modern SQL Engine for Apache Hadoop
 
Cloudera Impala, updated for v1.0
Cloudera Impala, updated for v1.0Cloudera Impala, updated for v1.0
Cloudera Impala, updated for v1.0
 
Incredible Impala
Incredible Impala Incredible Impala
Incredible Impala
 
Impala 2.0 - The Best Analytic Database for Hadoop
Impala 2.0 - The Best Analytic Database for HadoopImpala 2.0 - The Best Analytic Database for Hadoop
Impala 2.0 - The Best Analytic Database for Hadoop
 
HBase and Impala Notes - Munich HUG - 20131017
HBase and Impala Notes - Munich HUG - 20131017HBase and Impala Notes - Munich HUG - 20131017
HBase and Impala Notes - Munich HUG - 20131017
 
Cloudera Impala
Cloudera ImpalaCloudera Impala
Cloudera Impala
 
Building a Hadoop Data Warehouse with Impala
Building a Hadoop Data Warehouse with ImpalaBuilding a Hadoop Data Warehouse with Impala
Building a Hadoop Data Warehouse with Impala
 
(Aaron myers) hdfs impala
(Aaron myers)   hdfs impala(Aaron myers)   hdfs impala
(Aaron myers) hdfs impala
 
Cloudera Impala
Cloudera ImpalaCloudera Impala
Cloudera Impala
 
Cloudera Impala technical deep dive
Cloudera Impala technical deep diveCloudera Impala technical deep dive
Cloudera Impala technical deep dive
 
Architecting Applications with Hadoop
Architecting Applications with HadoopArchitecting Applications with Hadoop
Architecting Applications with Hadoop
 
Friction-free ETL: Automating data transformation with Impala | Strata + Hado...
Friction-free ETL: Automating data transformation with Impala | Strata + Hado...Friction-free ETL: Automating data transformation with Impala | Strata + Hado...
Friction-free ETL: Automating data transformation with Impala | Strata + Hado...
 
Building a Hadoop Data Warehouse with Impala
Building a Hadoop Data Warehouse with ImpalaBuilding a Hadoop Data Warehouse with Impala
Building a Hadoop Data Warehouse with Impala
 
Cloudera Impala: A modern SQL Query Engine for Hadoop
Cloudera Impala: A modern SQL Query Engine for HadoopCloudera Impala: A modern SQL Query Engine for Hadoop
Cloudera Impala: A modern SQL Query Engine for Hadoop
 
SQL Engines for Hadoop - The case for Impala
SQL Engines for Hadoop - The case for ImpalaSQL Engines for Hadoop - The case for Impala
SQL Engines for Hadoop - The case for Impala
 
Node labels in YARN
Node labels in YARNNode labels in YARN
Node labels in YARN
 
The Impala Cookbook
The Impala CookbookThe Impala Cookbook
The Impala Cookbook
 
Real-Time Queries in Hadoop w/ Cloudera Impala
Real-Time Queries in Hadoop w/ Cloudera ImpalaReal-Time Queries in Hadoop w/ Cloudera Impala
Real-Time Queries in Hadoop w/ Cloudera Impala
 

Ähnlich wie Cloudera Impala: A Modern SQL Engine for Apache Hadoop

impalapresentation-130130105033-phpapp02 (1)_221220_235919.pdf
impalapresentation-130130105033-phpapp02 (1)_221220_235919.pdfimpalapresentation-130130105033-phpapp02 (1)_221220_235919.pdf
impalapresentation-130130105033-phpapp02 (1)_221220_235919.pdfssusere05ec21
 
Cloudera Impala presentation
Cloudera Impala presentationCloudera Impala presentation
Cloudera Impala presentationmarkgrover
 
Jan 2013 HUG: Impala - Real-time Queries for Apache Hadoop
Jan 2013 HUG: Impala - Real-time Queries for Apache HadoopJan 2013 HUG: Impala - Real-time Queries for Apache Hadoop
Jan 2013 HUG: Impala - Real-time Queries for Apache HadoopYahoo Developer Network
 
Marcel Kornacker: Impala tech talk Tue Feb 26th 2013
Marcel Kornacker: Impala tech talk Tue Feb 26th 2013Marcel Kornacker: Impala tech talk Tue Feb 26th 2013
Marcel Kornacker: Impala tech talk Tue Feb 26th 2013Modern Data Stack France
 
Etu Solution Day 2014 Track-D: 掌握Impala和Spark
Etu Solution Day 2014 Track-D: 掌握Impala和SparkEtu Solution Day 2014 Track-D: 掌握Impala和Spark
Etu Solution Day 2014 Track-D: 掌握Impala和SparkJames Chen
 
Cloudera Impala - San Diego Big Data Meetup August 13th 2014
Cloudera Impala - San Diego Big Data Meetup August 13th 2014Cloudera Impala - San Diego Big Data Meetup August 13th 2014
Cloudera Impala - San Diego Big Data Meetup August 13th 2014cdmaxime
 
Cloudera Impala - Las Vegas Big Data Meetup Nov 5th 2014
Cloudera Impala - Las Vegas Big Data Meetup Nov 5th 2014Cloudera Impala - Las Vegas Big Data Meetup Nov 5th 2014
Cloudera Impala - Las Vegas Big Data Meetup Nov 5th 2014cdmaxime
 
Виталий Бондаренко "Fast Data Platform for Real-Time Analytics. Architecture ...
Виталий Бондаренко "Fast Data Platform for Real-Time Analytics. Architecture ...Виталий Бондаренко "Fast Data Platform for Real-Time Analytics. Architecture ...
Виталий Бондаренко "Fast Data Platform for Real-Time Analytics. Architecture ...Fwdays
 
Big Data Developers Moscow Meetup 1 - sql on hadoop
Big Data Developers Moscow Meetup 1  - sql on hadoopBig Data Developers Moscow Meetup 1  - sql on hadoop
Big Data Developers Moscow Meetup 1 - sql on hadoopbddmoscow
 
Unveiling Hive: A Comprehensive Exploration of Hive in Hadoop Ecosystem
Unveiling Hive: A Comprehensive Exploration of Hive in Hadoop EcosystemUnveiling Hive: A Comprehensive Exploration of Hive in Hadoop Ecosystem
Unveiling Hive: A Comprehensive Exploration of Hive in Hadoop Ecosystemmashoodsyed66
 
Michael stack -the state of apache h base
Michael stack -the state of apache h baseMichael stack -the state of apache h base
Michael stack -the state of apache h basehdhappy001
 
Customer Education Webcast: New Features in Data Integration and Streaming CDC
Customer Education Webcast: New Features in Data Integration and Streaming CDCCustomer Education Webcast: New Features in Data Integration and Streaming CDC
Customer Education Webcast: New Features in Data Integration and Streaming CDCPrecisely
 
Technologies for Data Analytics Platform
Technologies for Data Analytics PlatformTechnologies for Data Analytics Platform
Technologies for Data Analytics PlatformN Masahiro
 
What's the Hadoop-la about Kubernetes?
What's the Hadoop-la about Kubernetes?What's the Hadoop-la about Kubernetes?
What's the Hadoop-la about Kubernetes?DataWorks Summit
 
Stream processing on mobile networks
Stream processing on mobile networksStream processing on mobile networks
Stream processing on mobile networkspbelko82
 

Ähnlich wie Cloudera Impala: A Modern SQL Engine for Apache Hadoop (20)

impalapresentation-130130105033-phpapp02 (1)_221220_235919.pdf
impalapresentation-130130105033-phpapp02 (1)_221220_235919.pdfimpalapresentation-130130105033-phpapp02 (1)_221220_235919.pdf
impalapresentation-130130105033-phpapp02 (1)_221220_235919.pdf
 
Cloudera Impala presentation
Cloudera Impala presentationCloudera Impala presentation
Cloudera Impala presentation
 
Jan 2013 HUG: Impala - Real-time Queries for Apache Hadoop
Jan 2013 HUG: Impala - Real-time Queries for Apache HadoopJan 2013 HUG: Impala - Real-time Queries for Apache Hadoop
Jan 2013 HUG: Impala - Real-time Queries for Apache Hadoop
 
Marcel Kornacker: Impala tech talk Tue Feb 26th 2013
Marcel Kornacker: Impala tech talk Tue Feb 26th 2013Marcel Kornacker: Impala tech talk Tue Feb 26th 2013
Marcel Kornacker: Impala tech talk Tue Feb 26th 2013
 
Etu Solution Day 2014 Track-D: 掌握Impala和Spark
Etu Solution Day 2014 Track-D: 掌握Impala和SparkEtu Solution Day 2014 Track-D: 掌握Impala和Spark
Etu Solution Day 2014 Track-D: 掌握Impala和Spark
 
Impala for PhillyDB Meetup
Impala for PhillyDB MeetupImpala for PhillyDB Meetup
Impala for PhillyDB Meetup
 
Cloudera Impala - San Diego Big Data Meetup August 13th 2014
Cloudera Impala - San Diego Big Data Meetup August 13th 2014Cloudera Impala - San Diego Big Data Meetup August 13th 2014
Cloudera Impala - San Diego Big Data Meetup August 13th 2014
 
Cloudera Impala - Las Vegas Big Data Meetup Nov 5th 2014
Cloudera Impala - Las Vegas Big Data Meetup Nov 5th 2014Cloudera Impala - Las Vegas Big Data Meetup Nov 5th 2014
Cloudera Impala - Las Vegas Big Data Meetup Nov 5th 2014
 
Виталий Бондаренко "Fast Data Platform for Real-Time Analytics. Architecture ...
Виталий Бондаренко "Fast Data Platform for Real-Time Analytics. Architecture ...Виталий Бондаренко "Fast Data Platform for Real-Time Analytics. Architecture ...
Виталий Бондаренко "Fast Data Platform for Real-Time Analytics. Architecture ...
 
Big Data Developers Moscow Meetup 1 - sql on hadoop
Big Data Developers Moscow Meetup 1  - sql on hadoopBig Data Developers Moscow Meetup 1  - sql on hadoop
Big Data Developers Moscow Meetup 1 - sql on hadoop
 
Unveiling Hive: A Comprehensive Exploration of Hive in Hadoop Ecosystem
Unveiling Hive: A Comprehensive Exploration of Hive in Hadoop EcosystemUnveiling Hive: A Comprehensive Exploration of Hive in Hadoop Ecosystem
Unveiling Hive: A Comprehensive Exploration of Hive in Hadoop Ecosystem
 
Apache Spark on HDinsight Training
Apache Spark on HDinsight TrainingApache Spark on HDinsight Training
Apache Spark on HDinsight Training
 
Michael stack -the state of apache h base
Michael stack -the state of apache h baseMichael stack -the state of apache h base
Michael stack -the state of apache h base
 
Customer Education Webcast: New Features in Data Integration and Streaming CDC
Customer Education Webcast: New Features in Data Integration and Streaming CDCCustomer Education Webcast: New Features in Data Integration and Streaming CDC
Customer Education Webcast: New Features in Data Integration and Streaming CDC
 
Apache Drill
Apache DrillApache Drill
Apache Drill
 
Technologies for Data Analytics Platform
Technologies for Data Analytics PlatformTechnologies for Data Analytics Platform
Technologies for Data Analytics Platform
 
What's the Hadoop-la about Kubernetes?
What's the Hadoop-la about Kubernetes?What's the Hadoop-la about Kubernetes?
What's the Hadoop-la about Kubernetes?
 
Stream processing on mobile networks
Stream processing on mobile networksStream processing on mobile networks
Stream processing on mobile networks
 
SQL on Hadoop
SQL on HadoopSQL on Hadoop
SQL on Hadoop
 
Cheetah:Data Warehouse on Top of MapReduce
Cheetah:Data Warehouse on Top of MapReduceCheetah:Data Warehouse on Top of MapReduce
Cheetah:Data Warehouse on Top of MapReduce
 

Mehr von Cloudera, Inc.

Partner Briefing_January 25 (FINAL).pptx
Partner Briefing_January 25 (FINAL).pptxPartner Briefing_January 25 (FINAL).pptx
Partner Briefing_January 25 (FINAL).pptxCloudera, Inc.
 
Cloudera Data Impact Awards 2021 - Finalists
Cloudera Data Impact Awards 2021 - Finalists Cloudera Data Impact Awards 2021 - Finalists
Cloudera Data Impact Awards 2021 - Finalists Cloudera, Inc.
 
2020 Cloudera Data Impact Awards Finalists
2020 Cloudera Data Impact Awards Finalists2020 Cloudera Data Impact Awards Finalists
2020 Cloudera Data Impact Awards FinalistsCloudera, Inc.
 
Edc event vienna presentation 1 oct 2019
Edc event vienna presentation 1 oct 2019Edc event vienna presentation 1 oct 2019
Edc event vienna presentation 1 oct 2019Cloudera, Inc.
 
Machine Learning with Limited Labeled Data 4/3/19
Machine Learning with Limited Labeled Data 4/3/19Machine Learning with Limited Labeled Data 4/3/19
Machine Learning with Limited Labeled Data 4/3/19Cloudera, Inc.
 
Data Driven With the Cloudera Modern Data Warehouse 3.19.19
Data Driven With the Cloudera Modern Data Warehouse 3.19.19Data Driven With the Cloudera Modern Data Warehouse 3.19.19
Data Driven With the Cloudera Modern Data Warehouse 3.19.19Cloudera, Inc.
 
Introducing Cloudera DataFlow (CDF) 2.13.19
Introducing Cloudera DataFlow (CDF) 2.13.19Introducing Cloudera DataFlow (CDF) 2.13.19
Introducing Cloudera DataFlow (CDF) 2.13.19Cloudera, Inc.
 
Introducing Cloudera Data Science Workbench for HDP 2.12.19
Introducing Cloudera Data Science Workbench for HDP 2.12.19Introducing Cloudera Data Science Workbench for HDP 2.12.19
Introducing Cloudera Data Science Workbench for HDP 2.12.19Cloudera, Inc.
 
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19Cloudera, Inc.
 
Leveraging the cloud for analytics and machine learning 1.29.19
Leveraging the cloud for analytics and machine learning 1.29.19Leveraging the cloud for analytics and machine learning 1.29.19
Leveraging the cloud for analytics and machine learning 1.29.19Cloudera, Inc.
 
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19Cloudera, Inc.
 
Leveraging the Cloud for Big Data Analytics 12.11.18
Leveraging the Cloud for Big Data Analytics 12.11.18Leveraging the Cloud for Big Data Analytics 12.11.18
Leveraging the Cloud for Big Data Analytics 12.11.18Cloudera, Inc.
 
Modern Data Warehouse Fundamentals Part 3
Modern Data Warehouse Fundamentals Part 3Modern Data Warehouse Fundamentals Part 3
Modern Data Warehouse Fundamentals Part 3Cloudera, Inc.
 
Modern Data Warehouse Fundamentals Part 2
Modern Data Warehouse Fundamentals Part 2Modern Data Warehouse Fundamentals Part 2
Modern Data Warehouse Fundamentals Part 2Cloudera, Inc.
 
Modern Data Warehouse Fundamentals Part 1
Modern Data Warehouse Fundamentals Part 1Modern Data Warehouse Fundamentals Part 1
Modern Data Warehouse Fundamentals Part 1Cloudera, Inc.
 
Extending Cloudera SDX beyond the Platform
Extending Cloudera SDX beyond the PlatformExtending Cloudera SDX beyond the Platform
Extending Cloudera SDX beyond the PlatformCloudera, Inc.
 
Federated Learning: ML with Privacy on the Edge 11.15.18
Federated Learning: ML with Privacy on the Edge 11.15.18Federated Learning: ML with Privacy on the Edge 11.15.18
Federated Learning: ML with Privacy on the Edge 11.15.18Cloudera, Inc.
 
Analyst Webinar: Doing a 180 on Customer 360
Analyst Webinar: Doing a 180 on Customer 360Analyst Webinar: Doing a 180 on Customer 360
Analyst Webinar: Doing a 180 on Customer 360Cloudera, Inc.
 
Build a modern platform for anti-money laundering 9.19.18
Build a modern platform for anti-money laundering 9.19.18Build a modern platform for anti-money laundering 9.19.18
Build a modern platform for anti-money laundering 9.19.18Cloudera, Inc.
 
Introducing the data science sandbox as a service 8.30.18
Introducing the data science sandbox as a service 8.30.18Introducing the data science sandbox as a service 8.30.18
Introducing the data science sandbox as a service 8.30.18Cloudera, Inc.
 

Mehr von Cloudera, Inc. (20)

Partner Briefing_January 25 (FINAL).pptx
Partner Briefing_January 25 (FINAL).pptxPartner Briefing_January 25 (FINAL).pptx
Partner Briefing_January 25 (FINAL).pptx
 
Cloudera Data Impact Awards 2021 - Finalists
Cloudera Data Impact Awards 2021 - Finalists Cloudera Data Impact Awards 2021 - Finalists
Cloudera Data Impact Awards 2021 - Finalists
 
2020 Cloudera Data Impact Awards Finalists
2020 Cloudera Data Impact Awards Finalists2020 Cloudera Data Impact Awards Finalists
2020 Cloudera Data Impact Awards Finalists
 
Edc event vienna presentation 1 oct 2019
Edc event vienna presentation 1 oct 2019Edc event vienna presentation 1 oct 2019
Edc event vienna presentation 1 oct 2019
 
Machine Learning with Limited Labeled Data 4/3/19
Machine Learning with Limited Labeled Data 4/3/19Machine Learning with Limited Labeled Data 4/3/19
Machine Learning with Limited Labeled Data 4/3/19
 
Data Driven With the Cloudera Modern Data Warehouse 3.19.19
Data Driven With the Cloudera Modern Data Warehouse 3.19.19Data Driven With the Cloudera Modern Data Warehouse 3.19.19
Data Driven With the Cloudera Modern Data Warehouse 3.19.19
 
Introducing Cloudera DataFlow (CDF) 2.13.19
Introducing Cloudera DataFlow (CDF) 2.13.19Introducing Cloudera DataFlow (CDF) 2.13.19
Introducing Cloudera DataFlow (CDF) 2.13.19
 
Introducing Cloudera Data Science Workbench for HDP 2.12.19
Introducing Cloudera Data Science Workbench for HDP 2.12.19Introducing Cloudera Data Science Workbench for HDP 2.12.19
Introducing Cloudera Data Science Workbench for HDP 2.12.19
 
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19
 
Leveraging the cloud for analytics and machine learning 1.29.19
Leveraging the cloud for analytics and machine learning 1.29.19Leveraging the cloud for analytics and machine learning 1.29.19
Leveraging the cloud for analytics and machine learning 1.29.19
 
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19
 
Leveraging the Cloud for Big Data Analytics 12.11.18
Leveraging the Cloud for Big Data Analytics 12.11.18Leveraging the Cloud for Big Data Analytics 12.11.18
Leveraging the Cloud for Big Data Analytics 12.11.18
 
Modern Data Warehouse Fundamentals Part 3
Modern Data Warehouse Fundamentals Part 3Modern Data Warehouse Fundamentals Part 3
Modern Data Warehouse Fundamentals Part 3
 
Modern Data Warehouse Fundamentals Part 2
Modern Data Warehouse Fundamentals Part 2Modern Data Warehouse Fundamentals Part 2
Modern Data Warehouse Fundamentals Part 2
 
Modern Data Warehouse Fundamentals Part 1
Modern Data Warehouse Fundamentals Part 1Modern Data Warehouse Fundamentals Part 1
Modern Data Warehouse Fundamentals Part 1
 
Extending Cloudera SDX beyond the Platform
Extending Cloudera SDX beyond the PlatformExtending Cloudera SDX beyond the Platform
Extending Cloudera SDX beyond the Platform
 
Federated Learning: ML with Privacy on the Edge 11.15.18
Federated Learning: ML with Privacy on the Edge 11.15.18Federated Learning: ML with Privacy on the Edge 11.15.18
Federated Learning: ML with Privacy on the Edge 11.15.18
 
Analyst Webinar: Doing a 180 on Customer 360
Analyst Webinar: Doing a 180 on Customer 360Analyst Webinar: Doing a 180 on Customer 360
Analyst Webinar: Doing a 180 on Customer 360
 
Build a modern platform for anti-money laundering 9.19.18
Build a modern platform for anti-money laundering 9.19.18Build a modern platform for anti-money laundering 9.19.18
Build a modern platform for anti-money laundering 9.19.18
 
Introducing the data science sandbox as a service 8.30.18
Introducing the data science sandbox as a service 8.30.18Introducing the data science sandbox as a service 8.30.18
Introducing the data science sandbox as a service 8.30.18
 

Cloudera Impala: A Modern SQL Engine for Apache Hadoop

  • 1. Cloudera Impala: A Modern SQL Engine for Apache Hadoop Marcel Kornacker Software Engineer, Architect of Cloudera Impala January 10, 2013 1
  • 2. Welcome to the webinar! • All lines are muted • Q&A after the presentation • Ask questions at any time by typing them in the “Questions” pane on your GoToWebinar panel • Recording of this webinar will be available on demand at cloudera.com 2
  • 3. Speaker Bio: Marcel Kornacker Marcel Kornacker is a tech lead at Cloudera for new products development and creator of the Cloudera Impala project. Following his graduation in 2000 with a PhD in databases from UC Berkeley, he held engineering positions at several database-related start-up companies. Marcel joined Google in 2003 where he worked on several ads serving and storage infrastructure projects, then became tech lead for the distributed query engine component of Google's F1 project. 3
  • 4. Impala Overview: Goals • General-purpose SQL query engine: • should work both for analytical and transactional workloads • will support queries that take from milliseconds to hours • Runs directly within Hadoop: • reads widely used Hadoop file formats • talks to widely used Hadoop storage managers • runs on same nodes that run Hadoop processes • High performance: • C++ instead of Java • runtime code generation • completely new execution engine that doesn't build on MapReduce
  • 5. User View of Impala: Overview • Runs as a distributed service in cluster: one Impala daemon on each node with data • User submits query via ODBC/Beeswax Thrift API to any of the daemons • Query is distributed to all nodes with relevant data • If any node fails, the query fails • Impala uses Hive's metadata interface, connects to Hive's metastore • Supported file formats: • text files (GA: with compression, including lzo) • sequence files with snappy/gzip compression • GA: Avro data files • GA: Trevni (columnar format; more on that later)
  • 6. User View of Impala: SQL • SQL support: • patterned after Hive's version of SQL • limited to Select, Project, Join, Union, Subqueries, Aggregation and Insert • only equi-joins; no non-equi joins, no cross products • Order By only with Limit • GA: DDL support (CREATE, ALTER) • Functional limitations: • no custom UDFs, file formats, SerDes • no beyond SQL (buckets, samples, transforms, arrays, structs, maps, xpath, json) • only hash joins; joined table has to fit in memory: • beta: of single node • GA: aggregate memory of all (executing) nodes
  • 7. User View of Impala: Apache HBase • HBase functionality: • uses Hive's mapping of HBase table into metastore table • predicates on rowkey columns are mapped into start/stop row • predicates on other columns are mapped into SingleColumnValueFilters • HBase functional limitations: • no nested-loop joins • all data stored as text
  • 8. Impala Architecture • Two binaries: impalad and statestored • Impala daemon (impalad) • handles client requests and all internal requests related to query execution • exports Thrift services for these two roles • State store daemon (statestored) • provides name service and metadata distribution • also exports a Thrift service
  • 9. Impala Architecture • Query execution phases • request arrives via odbc/beeswax Thrift API • planner turns request into collections of plan fragments • coordinator initiates execution on remote impalad's • during execution • intermediate results are streamed between executors • query results are streamed back to client • subject to limitations imposed to blocking operators (top-n, aggregation)
  • 10. Impala Architecture: Planner • join order = FROM clause order GA target: rudimentary cost- based optimizer • 2-phase planning process: • single-node plan: left-deep tree of plan operators • plan partitioning: partition single-node plan to maximize scan locality, minimize data movement • plan operators: Scan, HashJoin, HashAggregation, Union, TopN, Exchange • distributed aggregation: pre-aggregation in all nodes, merge aggregation in single node. GA: hash-partitioned aggregation: re-partition aggregation input on grouping columns in order to reduce per-node memory requirement
  • 11. Impala Architecture: Planner • Example: query with join and aggregation SELECT state, SUM(revenue) FROM HdfsTbl h JOIN HbaseTbl b ON (...) GROUP BY 1 ORDER BY 2 desc LIMIT 10 TopN Agg TopN Agg Hash Hash Agg Join Join HDFS HBase Exch Exch Scan Scan HDFS HBase at coordinator at DataNodes at region servers Scan Scan
  • 12. Impala Architecture: Query Execution Request arrives via odbc/beeswax Thrift API SQL App Hive HDFS NN Statestore ODBC Metastore SQL request Query Planner Query Planner Query Planner Query Coordinator Query Coordinator Query Coordinator Query Executor Query Executor Query Executor HDFS DN HBase HDFS DN HBase HDFS DN HBase
  • 13. Impala Architecture: Query Execution Planner turns request into collections of plan fragments Coordinator initiates execution on remote impalad's SQL App Hive HDFS NN Statestore ODBC Metastore Query Planner Query Planner Query Planner Query Coordinator Query Coordinator Query Coordinator Query Executor Query Executor Query Executor HDFS DN HBase HDFS DN HBase HDFS DN HBase
  • 14. Impala Architecture: Query Execution Intermediate results are streamed between impalad's Query results are streamed back to client SQL App Hive HDFS NN Statestore ODBC Metastore query results Query Planner Query Planner Query Planner Query Coordinator Query Coordinator Query Coordinator Query Executor Query Executor Query Executor HDFS DN HBase HDFS DN HBase HDFS DN HBase
  • 15. Impala Architecture • Metadata handling: • utilizes Hive's metastore • caches metadata: no synchronous metastore API calls during query execution • beta: impalad's read metadata from metastore at startup • GA: metadata distribution through statestore • post-GA: HCatalog and AccessServer
  • 16. Impala Architecture • Execution engine • written in C++ • runtime code generation for "big loops" • example: insert batch of rows into hash table • code generation with llvm • inlines all expressions; no function calls inside loop • all data is copied into canonical in-memory tuple format; all fixed-width data is located at fixed offsets • uses intrinsics/special cpu instructions for text parsing, crc32 computation, etc.
  • 17. Impala's Statestore • Central system state repository • name service (membership) • GA: metadata • GA: other scheduling-relevant or diagnostic state • Soft-state • all impalad's register at startup • impalad's re-register after losing connection • Impala service continues to function in absence of statestored (but: with increasingly stale state) • State pushed to impalad's periodically • Repeated failed heartbeat means impalad evicted from cluster view • Thrift API for service / subscription registration
  • 18. Statestore: Why not ZooKeeper? • ZK is not a good pub-sub system • Watch API is awkward and requires a lot of client logic • multiple round-trips required to get data for changes to node's children • push model is more natural for our use case • Don't need all the guarantees ZK provides: • serializability • persistence • prefer to avoid complexity where possible • ZK is bad at the things we care about and good at the things we don't
  • 19. Comparing Impala to Dremel • What is Dremel? • columnar storage for data with nested structures • distributed scalable aggregation on top of that • Columnar storage in Hadoop: joint project between Cloudera and Twitter • new columnar format, derived from Doug Cutting's Trevni • stores data in appropriate native/binary types • can also store nested structures similar to Dremel's ColumnIO • Distributed aggregation: Impala • Impala plus columnar format: a superset of the published version of Dremel (which didn't support joins)
  • 20. Comparing Impala to Hive • Hive: MapReduce as an execution engine • High latency, low throughput queries • Fault-tolerance model based on MapReduce's on-disk checkpointing; materializes all intermediate results • Java runtime allows for easy late-binding of functionality: file formats and UDFs. • Extensive layering imposes high runtime overhead • Impala: • direct, process-to-process data exchange • no fault tolerance • an execution engine designed for low runtime overhead
  • 21. Comparing Impala to Hive • Impala's performance advantage over Hive: no hard numbers, but • Impala can get full disk throughput (~100MB/sec/disk); I/O-bound workloads often faster by 3-4x • queries that require multiple map-reduce phases in Hive see a higher speedup • queries that run against in-memory data see a higher speedup (observed up to 100x)
  • 22. Impala Roadmap: GA – Q2 2013 • New data formats: • lzo-compressed text • Avro • columnar • Better metadata handling: • automatic metadata distribution through statestore • Connectivity: jdbc • Improved query execution: partitioned joins • Further performance improvements
  • 23. Impala Roadmap: GA – Q2 2013 • Guidelines for production deployment: • load balancing across impalad's • resource isolation within MR cluster • Additional packages: RHEL 5.7, Ubuntu, Debian
  • 24. Impala Roadmap: 2013 • Improved HBase support: • composite keys, Avro data in columns, index nested-loop joins, INSERT/UPDATE/DELETE • Additional SQL: • UDFs • SQL authorization and DDL • ORDER BY without LIMIT • window functions • support for structured data types
  • 25. Impala Roadmap: 2013 • Runtime optimizations: • straggler handling • join order optimization • improved cache management • data collocation for improved join performance • Resource management: • cluster-wide quotas • Teradata-style policies ("user x can never have more than 5 concurrent queries running", etc.) • goal: run exploratory and production workloads in same cluster, against same data, w/o impacting production jobs
  • 26. Questions • Type it in the “Questions” Download Impala (beta) panel cloudera.com/downloads • Recording will be available Learn more about Cloudera on demand at cloudera.com Enterprise RTQ, Powered by Impala • After webinar, inquire at impala-user@cloudera.org cloudera.com/impala • My email: Join the Impala Hackathon, Monday, Feb 25 @ Cloudera marcel@cloudera.com HQ in Palo Alto Register: bit.ly/DataHackDay Thank you for attending! 26