Skip to main content

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

11 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spark_advisor_rules-0.1.16.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spark_advisor_rules-0.1.16-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file spark_advisor_rules-0.1.16.tar.gz.

File metadata

  • Download URL: spark_advisor_rules-0.1.16.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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

Hashes for spark_advisor_rules-0.1.16.tar.gz
Algorithm Hash digest
SHA256 a5c4a72bb9801d3533606238ebf4d43c37d70b489ad8ef62fd6103a8a92fa289
MD5 a619050e5db30dda05988a37fc764bbd
BLAKE2b-256 ba086fa764f9f1f0a7bc09ea6b87c937b8f9ed9de2d78a4e4e3cdecfa1770331

See more details on using hashes here.

File details

Details for the file spark_advisor_rules-0.1.16-py3-none-any.whl.

File metadata

  • Download URL: spark_advisor_rules-0.1.16-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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

Hashes for spark_advisor_rules-0.1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 c5b13d3022bd835091e7a37637918fa8a354f8bcb9c1d4cffc78ff6a8640a167
MD5 74ae030a6bf3f8dfa28cb7383fd8746e
BLAKE2b-256 3eb2f1ea4515767683bb899a4443e37f904749da6b32277a5946cdcd7af8154e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page