Deterministic rules engine for Spark job analysis
Project description
spark-advisor-rules
Deterministic rules engine for Apache Spark job analysis. Part of the spark-advisor ecosystem.
Install
pip install spark-advisor-rules
What it detects
17 rules that identify common Spark performance problems:
| Rule | Detects |
|---|---|
| DataSkewRule | Task duration skew (max/median > 5x) |
| SpillToDiskRule | Disk spill indicating insufficient memory |
| GCPressureRule | GC time > 20% of task time |
| ShufflePartitionsRule | Partition count far from optimal (128MB target) |
| ExecutorIdleRule | Slot utilization < 40% (CRITICAL if <20%) |
| TaskFailureRule | Failed tasks (CRITICAL if >=10, WARNING if >0) |
| SmallFileRule | Avg input bytes per task < 10MB (CRITICAL if <1MB) |
| BroadcastJoinThresholdRule | Broadcast join disabled or too low |
| SerializerChoiceRule | Java serializer used with shuffle stages |
| DynamicAllocationRule | Missing min/max bounds or disabled |
| ExecutorMemoryOverheadRule | High GC + high memory utilization |
All thresholds are configurable via Thresholds model.
Usage
from spark_advisor_rules.static_analysis import StaticAnalysisService
service = StaticAnalysisService()
results = service.analyze(job_analysis)
Links
License
Apache 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spark_advisor_rules-0.1.18.tar.gz.
File metadata
- Download URL: spark_advisor_rules-0.1.18.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8abfe82b251202e3526c914f5adcd5052e4174c79ae721fc89a55135a8de3063
|
|
| MD5 |
fdf42387057356412bdafd052e10adb8
|
|
| BLAKE2b-256 |
a2dc0b145ed9c39d19b70d18f067931cc6e731318f20187fd0e66b56a51fbf8d
|
File details
Details for the file spark_advisor_rules-0.1.18-py3-none-any.whl.
File metadata
- Download URL: spark_advisor_rules-0.1.18-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a179b7e0f8dafce14c579b9b7aed44125e8e8c65583f5a5b98d6ae999f894c1e
|
|
| MD5 |
65b11ad88fc6d5ac99b4c595e2801aa0
|
|
| BLAKE2b-256 |
fea23e086b10f18493b64560e5fb0fb6424da2e547f1a0dcee1b0766cff37d4a
|