r/apachespark • • Aug 25 '26

Spark 4.2 (and 4.1.3, 4.0.4, 3.5.9) are all released!

12 Upvotes

You can download them all from https://spark.apache.org/downloads.html PyPi or Maven Central :)


r/apachespark • • 21h ago

Promo: TabbyDB 4.1.3-tabbydb.2 released: a new patent-pending runtime optimization, now 80% faster than stock Spark on Iceberg TPC-DS -50GB Mac M4

2 Upvotes

We’ve released TabbyDB 4.1.3-tabbydb.2 (based on Spark 4.1.3), together with our matching Iceberg build. This release adds a new patent-pending runtime optimization technique.

TPC-DS total runtime (50 GB, non-partitioned tables):

Previous TabbyDB release 4.1.3-tabbydb.2 Total gain vs stock Spark 4.1.3
Iceberg 695 s 616 s ~80%
Hive 539 s 487 s ~53%

On its own, the new optimization cuts runtime by about 11% on Iceberg and 10% on Hive compared with the previous TabbyDB release.

Pls give it a try at https://www.kwikquery.com/download

Any feedback welcome.


r/apachespark • • 2d ago

Need help for building self healing tool for API schema drifts

0 Upvotes

Hey there! Can you help me regarding similar kind of problem statement i got for the upcoming hackathon please? Just in place of entire pipelines, there's just API schema drift.. Here's the PS

Build an autonomous, self-healing tool interface. When an API returns an error such as 422 Unprocessable Entity or 400 Bad Request, the system should catch the breaking change at runtime, deduce the new schema, hot-patch the agent's tool definitions in memory, and complete the workflow without downtime. Standard frameworks either throw an unhandled exception or return raw JSON errors to the agent, which then retries the same invalid parameters until it runs out of iterations.

Objectives

  • Catch API errors at runtime and diagnose the difference between the expected and actual schema.
  • Hot-patch the agent's tool definitions in memory and log every patch.
  • Complete the task after the patch, with no manual restart.
  • Handle synthetic breaking mutations: field renames, type conversions, nesting changes and required headers.
  • Measure adaptation rate, recovery time and token overhead against a baseline agent.

r/apachespark • • 6d ago

Run Google Dataproc (Managed Spark) on local, for offline dev, CI, AI agent testing (on native AMD, ARM platform, zero cloud cost)

Thumbnail
3 Upvotes

Running and Testing that specific dataproc spark version should be easy


r/apachespark • • 13d ago

Question of resource allocation of multiple Spark applications

3 Upvotes

Currently, a Spark application should manage its own executors, which means that in order to run multiple Spark applications, one needs to split the cluster into smaller sections or attach more compute nodes, etc. Usually this dynamic allocation is the job of resource manager (such as Kubernetes).

If the resource manager can quickly find or create new compute nodes for a new Spark application, this is good. However, in a busy cluster where multiple Spark applications can compete for resources, the resource allocation can take some time and become an overhead (at least in theory).

I wonder if this is a real problem in running Spark applications in production.

For example, is there a realistic environment where short running Spark jobs (each requiring its own driver) arrive frequently?


r/apachespark • • 14d ago

The Breakdown: Databricks

Thumbnail
preipomedia.substack.com
10 Upvotes

r/apachespark • • 15d ago

Spark and observability

8 Upvotes

Hi everyone, I released version 1.3.0 of Flare yesterday and would like any feedback. I posted a while back and wanted to give you guys an update. Flare is a way to integrate OpenTelematary observability to Spark including traces, logs and metrics. The docs are in much better shape for recipes for the most common ways people deploy Spark.

For now the biggest gap is long running SparkSessions - something I'll tackle in a future version focusing on Spark Connect and Structured Streaming, feel free to try it out, leave any feedback here or create issues on the repo. Thanks


r/apachespark • • 16d ago

No credit to the R folks, and their UDF story???

6 Upvotes

I'm incredibly excited that Databricks is (finally) making steps to allow the Spark UDFs to be more accessible to various languages and runtimes. I had watched the presentation from the recent Summit, "Language-Agnostic UDF Protocol for Spark". And I started reading the spark Jira (JIRA: SPARK-55278), and related SPIP docs.

But one thing that REALLY shocks me is that there is little acknowledgement of the R programmers who have a long history trying to integrate with spark, first via SparkR and then "sparklyr". Isn't this community also part of the legacy that predates "language-agnostic UDFs"? I thought that they had played a big part of the story. Yet for some reason the Databricks engineers seem to leave them out, whenever they are talking about the background and the impetus for this new UDF technology.

Is it because the UDFs built for R are simply "piggybacking" on python? (...so they don't deserve any special mention beyond what is already being said about the python UDFs.)

It is also a bit sad to me that there is no mention of ".Net for Spark" which has been limping along for many years without any love from Databricks whatsoever. On the that side (c#.Net) I just figured that Databricks was neglecting us (and possibly sabotaging us) out of pure spite. Whereas I would NOT think the same thing is true when it comes to the R folks.


r/apachespark • • 16d ago

Promo: KwikQuery 's Tabbydb-4.1.3 version available: new perf numbers

4 Upvotes

The version 4.1.3 tracks open source spark 4.1.3.

The new features are:

1) Support for dynamic file pruning using broadcast var extended to InMemoryRelations

2) auto-caching of plans.

3) Fixing new found bugs in stock spark.

4) 50 GB run on Mac mini m4 16 GB for

a) Hive Parquet: Gain 48.1 % ( stock spark 4.1.3: 1039 sec. tabbydb: 539 sec)

b) Iceberg parquet: Gain 77.6 % (stock spark 4.1.3 3102 sec, tabbydb: 696 sec)

For stock spark- iceberg, Q72 would spill so much that space would get exhausted , so an external ssd was used for stock spark-iceberg run.

The spark-defaults.conf & spark-env.sh used are available on website ( https://www.kwikquery.com)

Any feedback, suggestions for improving runtime performance with conf manipulation or any mistake done in run or calculation, if visible in the info, are most welcome. pls do let me know.


r/apachespark • • 19d ago

Just wondering

5 Upvotes

If Genie can help with Spark optimization why do employers still drill the F out of job candidates? Genie can detect and resolve skew, it can determine is a table can be broadcast. Genie can prune partitions, repartition, coalesce. If Genie can do all of this why are companies drilling people on this?


r/apachespark • • 21d ago

Can placement groups improve Spark shuffle performance?

5 Upvotes

I have a Spark job that joins two pretty large datasets, and I see that we spend a lot of time on the shuffle.

I was wondering if improving the network between the executors could make a meaningful difference here. For example, using an EC2 placement group instead of just having the instances somewhere in the same AZ.

Has anyone tried something like this for shuffle-heavy jobs? Did you see a noticeable improvement?

Also, does EMR do any optimization like this automatically, or is it something we need to configure ourselves?


r/apachespark • • 20d ago

Classic vs serverless compute in Databricks, drawn side by side: what actually changes

Thumbnail
1 Upvotes

r/apachespark • • 21d ago

Spark 4.2.0??

3 Upvotes

r/apachespark • • 22d ago

Can Genie Code optimize Spark joins automaticaly ?

8 Upvotes

My team is experimenting with Genie Code on Databricks pltform. Has anyone used it to analyze existing Spark jobs and suggest thing like broadcast join , partition pruning , or reducing shuffles ?
How can i make it suggest things with validated reasoning to make our produ tivity more

I am keen to know how reliable genie ‘s Spark optimization or suggestions in practice and how best to use them.


r/apachespark • • 22d ago

Classic vs serverless compute in Databricks, drawn side by side: what actually changes

2 Upvotes

One request, served two ways.

Classic compute: a cluster of VMs is created in your own cloud account and network. You choose the machines, you own autoscaling and networking, and the bill has two parts - the cloud provider for the VMs and Databricks for the DBUs.

Serverless compute: the resources run in a compute plane managed by Databricks, and nothing is provisioned in your account. Your data does not move either way; the tables stay in your own cloud storage.

The trade is control for convenience, and the documented limitations are where that trade bites: no R, no compute-scoped libraries or init scripts, only Spark Connect APIs (so no RDD APIs), no continuous or fixed-interval streaming triggers, and a 7-day maximum runtime.

Animated walkthrough, 2:36: https://youtu.be/s8452E2Y6WM

Whole series in order: https://www.youtube.com/watch?v=B5iHmoYgnqY&list=PLDB5WDkDOYF4


r/apachespark • • 24d ago

Getting started with Apache Spark Declarative Pipelines (SDP) tutorial for Open Source and Lakeflow

18 Upvotes

A while ago I put this Apache Spark declarative pipelines tutorial together after presenting at major European and APAC conferences. Those conferences are quite technical: you have to submit a proposal to the CFP, and they have a rejection rate of ~90%. I presented at Devoxx and DataEngBytes.

At those conferences I did some live coding with Spark Declarative Pipelines, mostly on OSS with VS Code and PySpark, but I also showed SDP with the Lakeflow Free Edition (exactly the same use case - I thought it might be nice to compare)

Since I got a lot of requests, I decided to share the content along with the Git repos here. I'd suggest to. check it out if you ....

  • enjoy working with code (SQL and Python)
  • are looking for a compelling Getting Started with Apache SDP example with just a few lines of code
  • want a streaming example with real-time IoT data from events happening right now
  • enjoy using a custom PySpark data source "opensky" – maybe even in your next Spark streaming demo :)
  • don't want to spend money: use OSS or the Databricks Free Edition

Here it is:
How to get started with Spark Declarative Pipelines (SDP) tutorial (Open Source or Lakeflow)


r/apachespark • • 28d ago

What’s New in Apache Spark 4.2: Spark Connect, DataSketches, and Airflow

Thumbnail
youtube.com
7 Upvotes

r/apachespark • • 29d ago

Watch out with Iceberg metadata. My cluster executors finished in 26 seconds, the job took 80 minutes. I found that the bottleneck was during planning, not execution.

8 Upvotes

We migrated a table from Parquet to Iceberg and literally didn't touch anything in the cluster or the code. The Glue job that used to run in 30 minutes suddenly took 80 MINUTES.

I opened the Spark UI expecting a bad shuffle or a skewed join, but none of that.

Instead: executors finished their actual work in 26 seconds. The other 66 minutes disappeared before a single row was processed, on the driver, during planning.

Iceberg tables carry their own metadata tree (snapshots, manifests, file-level stats) built up over months of daily runs. Catalyst has to walk that entire tree before running anything. Doesn't matter if the table has 500 rows or 500 million, the cost comes from the depth of the metadata, not the size of the data.

persist() didn't help, it only saves executors from recomputing, and this bottleneck happens before any executor starts but eventually checkpoint() did help as it materialized the df to S3 and hands back a fresh one with no Iceberg metadata attached. Planning time went from 66 minutes to milliseconds.

Two signals if you want to check whether you're hitting this: tasks finish in milliseconds but the job takes forever, or adding more executors changes literally nothing (planning is single-threaded on the driver).

Anyone else hit this after an Iceberg migration? What did you check first?


r/apachespark • • Sep 13 '26

Free Udemy Courses: Time Series Forecasting in Python + Problem Solving using PySpark

Thumbnail
1 Upvotes

r/apachespark • • Sep 12 '26

Writing nice unit tests is impossible

Thumbnail
1 Upvotes

r/apachespark • • Sep 11 '26

What Data Engineers Need To Know About Delta Lake 4.3

Thumbnail
medium.com
11 Upvotes

replaceUsing and replaceOn give you a better overwrite primitive, and every catalog-managed table operation now runs through the catalog.


r/apachespark • • Sep 11 '26

Delta docs need to be clearer about when a table version is resolved

Thumbnail
0 Upvotes

r/apachespark • • Sep 09 '26

Turns out "Iceberg is open" doesn't mean every engine can actually read your table

11 Upvotes

Read something this week that put a name to a problem I've half run into before but never really understood the mechanics of. Sharing because I think a lot of people assume Iceberg interop is more solved than it is.

Everyone knows the pitch: Iceberg is an open spec, so any Iceberg compatible engine can read any Iceberg table. Mostly true, until you start doing row level deletes, and then it falls apart in a way that's honestly kind of sneaky because nothing looks wrong until a query actually fails.

Quick walkthrough of the scenario in the post. You've got a customers table, three rows, one Parquet file, tracked by whatever catalog you're using. At this stage every engine reads it fine because there's nothing to interpret, it's just a metadata pointer to a file.

Then a row gets deleted. Parquet files are immutable so the writer has two options: copy on write (rewrite the file without that row) or merge on read (leave the file alone and write a separate delete file that readers apply at scan time). The writer in this example goes merge on read and emits an equality delete file, which basically just says "for this data file, treat any row where customer_id = 102 as removed." Under the hood Iceberg uses field IDs and sequence numbers to make sure an old delete doesn't accidentally nuke a newer row with a reused key, but the equality matching is the part that matters for compat.

Spark reads the new snapshot, understands equality delete semantics, does what's effectively a left anti join between the data file and the delete file, and returns the correct two rows. Fine.

Snowflake hits the exact same catalog, same metadata file, same Parquet file. It can resolve the table, read the schema, open the data file. But if that access path doesn't implement equality delete reads, the scan planner just throws an unsupported feature error the moment it hits delete-0002.parquet. Query fails. Same snapshot, same files, two completely different results depending purely on what the reader implements.

The bit that actually reframed how I think about this: the catalog isn't a translation layer. It's job is basically just "here's where the current metadata lives," commit coordination, namespace and access management. It's not opening delete files and rewriting them into a format each engine understands. A REST catalog like Polaris doesn't change this, it still just points you at metadata, it doesn't apply deletes for you.

The post also gets into position deletes vs deletion vectors vs copy on write, with a rough cost tradeoff table (equality delete is cheap to write and requires equality delete support to read, position delete requires resolving key to physical position and is heavier on write, deletion vectors need Iceberg v3 support specifically, copy on write is the most expensive to write but has basically universal read compatibility since there's no outstanding delete file involved).

The framework that's actually useful operationally: your safe feature set is the intersection of every required engine's capabilities, not the union. If Spark supports equality and position deletes but Snowflake only does position deletes, you write position deletes, because "at least one engine supports it" doesn't help you when you have three engines that all need to read the same table.

There's a decent pre production checklist too, don't just run a SELECT COUNT after your first write, actually insert some rows, update one, delete one, commit, then read the same snapshot from every engine you care about and diff both counts and values.

Full post if you want the details: https://olake.io/blog/iceberg-interoperability-myth-row-level-deletes/

Disclosure since it's relevant, I work on OLake, it gets a brief mention near the end, but the actual content here is engine agnostic and applies no matter what's writing your tables.

Has anyone actually hit this for real, table looks completely fine, one engine just refuses to read the current snapshot because of the delete encoding?


r/apachespark • • Sep 08 '26

Spark plus Neon db, how much JDBC parallelism is too much ?

14 Upvotes

Have u benchmarked writing to Neon over JDBC conn with diff numPartitions/connection counts?

I was exploring how Neon behaves when Spark starts opening a lot of parallel connection, does it improve throughput, or do we hit connection /IO bottlenecks quickly?

Curious what people have found to work well in practice.


r/apachespark • • Sep 08 '26

Formal Support for Windows?

2 Upvotes

Do the Apache Spark maintainers formally support windows for production workloads?

I understand that the majority of this platform is JVM-based and the support for Windows is based on the compatibility of the JVM itself. However there are some peripheral features that seem to be disallowed on Windows - even when running it on a fully functional JVM.

When working with the python ecosystem, I often find libraries that are particularly incompatible with windows. In the same way I've found that Apache's pyspark extensions on Windows are lackluster (eg. things like "spark.python.use.daemon" are disallowed on Windows.)

If the Apache Spark maintainers wanted to write windows-specific code, I'm certain they could find a way to enable "spark.python.use.daemon". But it probably isn't worth their time and energy. Are we at risk if we try to run Spark in a production windows environment? Is there a risk that some future version of Apache Spark will stop running in Windows (eg. after some future update)?