Need advice about which tool to choose?Ask the StackShare community!

Apache Drill

71
170
+ 1
16
Apache Spark

3K
3.5K
+ 1
140
Add tool

Apache Drill vs Apache Spark: What are the differences?

Introduction:

Apache Drill and Apache Spark are both powerful open-source big data processing frameworks. While they share some similarities, they also have significant differences in terms of capabilities and use cases. In this comparison, we will highlight the key differences between Apache Drill and Apache Spark.

  1. Data Processing Paradigm: Apache Drill is designed to provide real-time interactive query capabilities on various data sources, including structured and semi-structured data. It supports schema-free data exploration and querying on top of different storage systems without the need for pre-defined schemas or ETL processes. On the other hand, Apache Spark is a unified analytics engine that provides distributed data processing capabilities, supporting batch processing, interactive queries, and streaming. It follows a batch-based data processing paradigm and requires data to be structured or semi-structured with a pre-defined schema.

  2. Query Optimizations: Apache Drill leverages the advantages of schema-free data by performing on-the-fly schema discovery and pushing down query operations to the storage layer. It uses a query execution engine that is aware of the data's structure and optimizes the queries accordingly, providing interactive response times. In contrast, Apache Spark optimizes query execution by applying various query optimization techniques, such as predicate pushdown, join reordering, and column pruning. It optimizes the execution plan based on the data's schema and parallelizes the processing across a cluster, ensuring efficient data processing for large-scale data.

  3. Supported Data Sources: Apache Drill supports a wide range of data sources, including traditional databases (e.g., MySQL, PostgreSQL), NoSQL databases (e.g., MongoDB, HBase), file systems (e.g., HDFS, S3), and cloud storage (e.g., Google Cloud Storage, Azure Blob Storage). It can query and join data across different data sources seamlessly. On the other hand, Apache Spark supports similar data sources but also provides connectors for additional sources such as message queues (e.g., Apache Kafka) and real-time streaming sources (e.g., Apache Kafka, Apache Flume).

  4. Ease of Use: Apache Drill is designed to have a schema-free approach and provides an SQL-like query language for querying various data sources. It simplifies the data exploration process, as it does not require upfront schema definition or complex ETL workflows. However, it may have limitations in handling complex data transformations or optimizing advanced analytic queries. In contrast, Apache Spark provides a rich set of APIs in multiple programming languages (Scala, Java, Python, R) that allow developers to perform complex data processing tasks and build sophisticated analytics applications. It provides more flexibility and control over the data processing logic and has extensive support for advanced analytics and machine learning.

  5. Performance and Scalability: Apache Drill emphasizes low latency and real-time query capabilities, making it suitable for interactive data exploration and querying on large datasets. It achieves performance gains by leveraging parallel processing and distributed query execution across a cluster. Apache Spark, on the other hand, provides high throughput and scalability for batch processing and large-scale data analysis. It achieves scalability by distributing the data and computation across the cluster, allowing it to handle massive datasets.

  6. Ecosystem and Integration: Apache Drill integrates well with the Apache Hadoop ecosystem, providing seamless integration with tools like Apache Hive, Apache HBase, and Apache Parquet. It can leverage the data storage and processing capabilities of these tools to provide a unified querying experience. In contrast, Apache Spark has a comprehensive ecosystem and supports integration with various tools and frameworks, including Hadoop, Hive, HBase, Spark SQL, and machine learning libraries like MLlib and TensorFlow. It provides a unified and streamlined experience for big data processing, analytics, and machine learning.

In Summary, Apache Drill and Apache Spark differ in their data processing paradigms, query optimization techniques, supported data sources, ease of use, performance and scalability, and ecosystem integrations. Apache Drill offers a schema-free, real-time interactive querying experience on diverse data sources, while Apache Spark provides a unified analytics engine with a broader range of data processing capabilities, advanced analytics, and machine learning support.

Advice on Apache Drill and Apache Spark
Nilesh Akhade
Technical Architect at Self Employed · | 5 upvotes · 546.5K views

We have a Kafka topic having events of type A and type B. We need to perform an inner join on both type of events using some common field (primary-key). The joined events to be inserted in Elasticsearch.

In usual cases, type A and type B events (with same key) observed to be close upto 15 minutes. But in some cases they may be far from each other, lets say 6 hours. Sometimes event of either of the types never come.

In all cases, we should be able to find joined events instantly after they are joined and not-joined events within 15 minutes.

See more
Replies (2)
Recommends
on
ElasticsearchElasticsearch

The first solution that came to me is to use upsert to update ElasticSearch:

  1. Use the primary-key as ES document id
  2. Upsert the records to ES as soon as you receive them. As you are using upsert, the 2nd record of the same primary-key will not overwrite the 1st one, but will be merged with it.

Cons: The load on ES will be higher, due to upsert.

To use Flink:

  1. Create a KeyedDataStream by the primary-key
  2. In the ProcessFunction, save the first record in a State. At the same time, create a Timer for 15 minutes in the future
  3. When the 2nd record comes, read the 1st record from the State, merge those two, and send out the result, and clear the State and the Timer if it has not fired
  4. When the Timer fires, read the 1st record from the State and send out as the output record.
  5. Have a 2nd Timer of 6 hours (or more) if you are not using Windowing to clean up the State

Pro: if you have already having Flink ingesting this stream. Otherwise, I would just go with the 1st solution.

See more
Akshaya Rawat
Senior Specialist Platform at Publicis Sapient · | 3 upvotes · 385.4K views
Recommends
on
Apache SparkApache Spark

Please refer "Structured Streaming" feature of Spark. Refer "Stream - Stream Join" at https://spark.apache.org/docs/latest/structured-streaming-programming-guide.html#stream-stream-joins . In short you need to specify "Define watermark delays on both inputs" and "Define a constraint on time across the two inputs"

See more
Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Apache Drill
Pros of Apache Spark
  • 4
    NoSQL and Hadoop
  • 3
    Free
  • 3
    Lightning speed and simplicity in face of data jungle
  • 2
    Well documented for fast install
  • 1
    SQL interface to multiple datasources
  • 1
    Nested Data support
  • 1
    Read Structured and unstructured data
  • 1
    V1.10 released - https://drill.apache.org/
  • 61
    Open-source
  • 48
    Fast and Flexible
  • 8
    One platform for every big data problem
  • 8
    Great for distributed SQL like applications
  • 6
    Easy to install and to use
  • 3
    Works well for most Datascience usecases
  • 2
    Interactive Query
  • 2
    Machine learning libratimery, Streaming in real
  • 2
    In memory Computation

Sign up to add or upvote prosMake informed product decisions

Cons of Apache Drill
Cons of Apache Spark
    Be the first to leave a con
    • 4
      Speed

    Sign up to add or upvote consMake informed product decisions

    - No public GitHub repository available -

    What is Apache Drill?

    Apache Drill is a distributed MPP query layer that supports SQL and alternative query languages against NoSQL and Hadoop data storage systems. It was inspired in part by Google's Dremel.

    What is Apache Spark?

    Spark is a fast and general processing engine compatible with Hadoop data. It can run in Hadoop clusters through YARN or Spark's standalone mode, and it can process data in HDFS, HBase, Cassandra, Hive, and any Hadoop InputFormat. It is designed to perform both batch processing (similar to MapReduce) and new workloads like streaming, interactive queries, and machine learning.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Apache Drill?
    What companies use Apache Spark?
    Manage your open source components, licenses, and vulnerabilities
    Learn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Apache Drill?
    What tools integrate with Apache Spark?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    Blog Posts

    Mar 24 2021 at 12:57PM

    Pinterest

    GitJenkinsKafka+7
    5
    2191
    MySQLKafkaApache Spark+6
    4
    2049
    Aug 28 2019 at 3:10AM

    Segment

    PythonJavaAmazon S3+16
    7
    2606
    What are some alternatives to Apache Drill and Apache Spark?
    Presto
    Distributed SQL Query Engine for Big Data
    Apache Calcite
    It is an open source framework for building databases and data management systems. It includes a SQL parser, an API for building expressions in relational algebra, and a query planning engine
    Apache Impala
    Impala is a modern, open source, MPP SQL query engine for Apache Hadoop. Impala is shipped by Cloudera, MapR, and Amazon. With Impala, you can query data, whether stored in HDFS or Apache HBase – including SELECT, JOIN, and aggregate functions – in real time.
    Druid
    Druid is a distributed, column-oriented, real-time analytics data store that is commonly used to power exploratory dashboards in multi-tenant environments. Druid excels as a data warehousing solution for fast aggregate queries on petabyte sized data sets. Druid supports a variety of flexible filters, exact calculations, approximate algorithms, and other useful calculations.
    MySQL
    The MySQL software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.
    See all alternatives