Get Advice Icon

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

CDAP

41
108
+ 1
0
Apache Spark

3K
3.5K
+ 1
140
Add tool

Apache Spark vs CDAP: What are the differences?

Introduction

Apache Spark and CDAP (Cask Data Application Platform) are both powerful tools for big data processing and analytics. While they have similar goals, they have some key differences in their architecture and functionality.

  1. Data Processing Framework: Apache Spark is a general-purpose distributed data processing framework, designed for processing large-scale data analytics workloads. It provides a unified computing model and supports multiple programming languages, including Python, Java, and Scala. On the other hand, CDAP is a unified data integration and application development platform, focused on building data applications on any underlying data infrastructure. It offers data pipelines, metadata management, and application framework for developing data-centric applications.

  2. Data Integration Capabilities: Apache Spark mainly focuses on data processing and analytics, providing powerful batch processing, interactive queries, and real-time stream processing capabilities. It offers native integrations with various data sources and supports complex transformations and aggregations. In contrast, CDAP goes beyond data processing and includes data integration capabilities as a core component. It provides connectors to various data sources, such as databases, Hadoop cluster, and cloud storage systems, enabling seamless data ingestion, transformation, and synchronization across different systems.

  3. Application Development Paradigm: Apache Spark has a more general-purpose computation model that allows developers to write custom code for complex analytics applications. It provides a flexible API for coding batch, interactive, and stream processing applications. On the other hand, CDAP offers a higher-level application development paradigm with an extendable set of plugins and frameworks. Developers can utilize built-in plugins for common use cases, such as ETL (Extract, Transform, Load) and data validation, without writing extensive code.

  4. Data Governance and Metadata: CDAP emphasizes data governance and provides advanced metadata management capabilities. It allows users to define data schema, track lineage, and manage access control policies for data assets. CDAP's metadata layer enables users to discover and explore datasets and understand their lineage and relationships. In contrast, Apache Spark has limited built-in data governance features and relies mostly on external tools or frameworks for managing metadata and data lineage.

  5. Ecosystem and Integration: Apache Spark has a vast ecosystem with a wide range of libraries and tools for various data processing and analytics tasks. It integrates well with other big data technologies, such as Hadoop, Hive, and HBase. In comparison, CDAP provides a more integrated platform with built-in capabilities for data integration, data pipelines, and application development. CDAP's integration capabilities extend beyond Apache Spark and cover other data processing engines, such as Apache Flink and Apache Beam.

  6. Deployment and Scalability: Apache Spark is known for its ability to scale horizontally and handle large clusters of machines efficiently. It supports various deployment modes, including standalone, Spark cluster manager, and cloud-based deployments. CDAP, on the other hand, is designed to run on top of existing data platforms, such as Apache Hadoop or Kubernetes, and leverage their scalability and resource management capabilities.

In summary, Apache Spark is a powerful general-purpose data processing framework focused on large-scale analytics, while CDAP is a unified data integration and application development platform with advanced metadata management capabilities. Spark provides a more flexible programming model and a broader ecosystem of libraries, while CDAP offers higher-level abstractions and built-in integration capabilities.

Advice on CDAP and Apache Spark
Nilesh Akhade
Technical Architect at Self Employed · | 5 upvotes · 562.8K 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 · 398.5K 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 CDAP
Pros of Apache Spark
    Be the first to leave a pro
    • 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 CDAP
    Cons of Apache Spark
      Be the first to leave a con
      • 4
        Speed

      Sign up to add or upvote consMake informed product decisions

      42
      138
      982
      132
      - No public GitHub repository available -

      What is CDAP?

      Cask Data Application Platform (CDAP) is an open source application development platform for the Hadoop ecosystem that provides developers with data and application virtualization to accelerate application development, address a broader range of real-time and batch use cases, and deploy applications into production while satisfying enterprise requirements.

      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 CDAP?
      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 CDAP?
      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
      3
      2245
      MySQLKafkaApache Spark+6
      2
      2101
      Aug 28 2019 at 3:10AM

      Segment

      PythonJavaAmazon S3+16
      7
      2670
      What are some alternatives to CDAP and Apache Spark?
      Airflow
      Use Airflow to author workflows as directed acyclic graphs (DAGs) of tasks. The Airflow scheduler executes your tasks on an array of workers while following the specified dependencies. Rich command lines utilities makes performing complex surgeries on DAGs a snap. The rich user interface makes it easy to visualize pipelines running in production, monitor progress and troubleshoot issues when needed.
      Akutan
      A distributed knowledge graph store. Knowledge graphs are suitable for modeling data that is highly interconnected by many types of relationships, like encyclopedic information about the world.
      Apache NiFi
      An easy to use, powerful, and reliable system to process and distribute data. It supports powerful and scalable directed graphs of data routing, transformation, and system mediation logic.
      StreamSets
      An end-to-end data integration platform to build, run, monitor and manage smart data pipelines that deliver continuous data for DataOps.
      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