This episode covers the operational readiness of Spark pipelines: writing runbooks for job failures, retries, and recovery, incident response for cluster issues and data corruption, backing up configuration and artifacts, and chaos testing to verify pipeline resilience.

A pipeline that runs without problems for months must still be ready for failure. Episode 19 covers operational readiness: what to do before, during, and after something breaks. This is the difference between a team that panics when a job fails and a team that handles failures calmly and systematically.
Failures in data engineering are rarely a single explosion. They're usually layered: jobs retry endlessly, data gets corrupted in the middle of the night, the cluster runs out of disk, or a schema change makes a pipeline silently produce wrong output. Without runbooks and procedures, every incident turns into a long improvised investigation.
This episode covers four topics: writing runbooks for job failure and recovery, incident response for clusters and data corruption, backing up configuration and artifacts, and chaos testing on Spark pipelines.
A runbook is a step-by-step document used when a system is having problems. Every good runbook has sections:
1. Symptoms → SparkJobFailed alert, application status failed
2. Check → driver logs, Spark UI, cluster resources
3. Diagnose → is it a transient retry (OOM, network) or a code bug
4. Action → restart with more resources / fix code and redeploy
5. Escalate → data platform oncall if longer than 30 minutesFailed batch jobs should be rescheduled with retry with backoff, not unlimited manual restarts. On Kubernetes this can be set through Job retry policies; in schedulers like Airflow, through the retries and retry_delay parameters. Cap the maximum retries so permanent failures don't consume resources.
When the cluster is unhealthy, follow the triage sequence:
kubectl top nodes
kubectl top pods -n spark-jobskubectl top nodes shows resource usage — a fast starting point to see if the cluster is short on CPU or memory.
Corrupted data is more dangerous because it isn't always visible. The right actions:
It's not just data that needs protecting:
spark-defaults.conf, spark-env.sh → configuration
event logs / metastore dump → metadata
library jars + image digests → artifacts
notebooks & pipeline code → source of truthChaos testing deliberately introduces failures into a system to find weaknesses before the failure happens on its own. For Spark, this can mean:
kubectl delete pod spark-executor-xxx --grace-period=1kubectl delete pod ... --grace-period=1 forces an executor to die suddenly. Spark should restart the affected tasks and the job should still finish — if not, that's a finding to fix.
Safe practices:
Warning
Chaos testing isn't about breaking systems, it's about finding wrong assumptions. If you're confident "Spark will auto-recover from a dead executor," test that belief in staging — better to fail there than in production at midnight.
Episode 19 rounds out operational readiness: runbooks give clear steps when a job fails, incident response handles clusters and data corruption systematically, backups protect configuration and artifacts, and chaos testing tests assumptions about resilience before production proves otherwise.
Key takeaways:
In the next episode, episode 20, we'll discuss real-world use cases and patterns — example ETL pipelines, real-time analytics, and recommendation systems, design patterns for pipeline reliability, monitoring business metrics and data quality, and end-to-end architectures for batch and streaming.