vivekpandey532/spark-finops-agent ? reverse-engineered prompt

Reverse engineered prompt

Build me a Scala library for Spark that listens to a running job and წერს a JSON report about wasted compute and memory.

I want it to hook into Spark events, collect stage and task metrics as the app runs, then analyze each stage at the end and flag problems like low executor memory use, skewed tasks, and disk spill. For each issue, generate a clear recommendation in plain language, plus enough detail to explain why it was flagged. Save the final report to a JSON file path that can be configured, with a sensible default under tmp.

Please make it feel production ready, with thread safe metric collection, clean model classes, a pure recommendation engine, and tests for the detection logic and report writing. Also include a simple way to attach it to spark submit and build it with Maven into a fat jar. If anything is unclear, look up current Spark docs online and follow the usual listener pattern.

Are you gonna build this?

make sure you review the code using arcumet

Try freeSponsored — opens Arcumet in a new tab