build-setup
Set up build environment and test fixtures for COBOL-to-Java migrations. Creates compilation infrastructure for both languages…
Upgrade Apache Spark applications between major versions (2.x→3.x, 3.x→4.x). Covers build files, deprecated APIs, configuration changes, SQL/DataFrame updates, and test validation.
$ npx -y skills add openhands/extensions --skill spark-version-upgrade --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/spark-version-upgradeContext preview
The summary Claude sees to decide when to auto-load this skill.
Upgrade Apache Spark applications between major versions (2.x→3.x, 3.x→4.x). Covers build files, deprecated APIs, configuration changes, SQL/DataFrame updates, and test validation.
name: spark-version-upgrade description: Upgrade Apache Spark applications between major versions (2.x→3.x, 3.x→4.x). Covers build files, deprecated APIs, configuration changes, SQL/DataFrame updates, and test validation. license: MIT compatibility: Requires Java 8+/11+/17+, Scala 2.12/2.13, Maven/Gradle/SBT, Apache Spark triggers: - spark upgrade - spark migration - spark version - upgrade spark - spark 3 - spark 4 - pyspark upgrade
Upgrade Apache Spark applications between major versions with a structured, phase-by-phase workflow.
1. **Inventory & Impact Analysis** — Scan the codebase and assess scope 2. **Build File Updates** — Bump Spark/Scala/Java dependencies 3. **API Migration** — Replace deprecated and removed APIs 4. **Configuration Migration** — Update Spark config properties 5. **SQL & DataFrame Migration** — Fix query-level breaking changes 6. **Test Validation** — Compile, run tests, verify results
---
Before changing any code, assess what needs to change. Read the official Apache Spark migration guide for the target version — it documents every API removal, config rename, and behavioral change per release: https://spark.apache.org/docs/latest/migration-guide.html
spark_upgrade_impact.md # Summary of affected files, APIs, and configs
---
Update dependency versions and resolve compilation.
<!-- Update Spark version property --> <spark.version>3.5.1</spark.version> <!-- or 4.0.0 --> <scala.version>2.13.12</scala.version> <!-- Spark 3.x: 2.12/2.13; Spark 4.x: 2.13 --> <!-- Update artifact IDs if Scala cross-version changed --> <artifactId>spark-core_2.13</artifactId> <artifactId>spark-sql_2.13</artifactId>
val sparkVersion = "3.5.1" // or "4.0.0" scalaVersion := "2.13.12" libraryDependencies += "org.apache.spark" %% "spark-core" % sparkVersion libraryDependencies += "org.apache.spark" %% "spark-sql" % sparkVersion
ext {
sparkVersion = '3.5.1' // or '4.0.0'
}
dependencies {
implementation "org.apache.spark:spark-core_2.13:${sparkVersion}"
implementation "org.apache.spark:spark-sql_2.13:${sparkVersion}"
}pyspark==3.5.1 # or 4.0.0
---
Replace removed and deprecated APIs. Work through compiler errors systematically.
Consult the official Apache Spark migration guide for the complete list of changes for each version: https://spark.apache.org/docs/latest/migration-guide.html
// BEFORE (Spark 1.x/2.x) val sc = new SparkContext(conf) val sqlContext = new SQLContext(sc) // AFTER (Spark 2.x+/3.x) val spark = SparkSession.builder() .config(conf) .enableHiveSupport() // if needed .getOrCreate() val sc = spark.sparkContext
// BEFORE rdd.toDF() // implicit from SQLContext // AFTER import spark.implicits._ rdd.toDF() // implicit from SparkSession
// BEFORE
val acc = sc.accumulator(0)
// AFTER
val acc = sc.longAccumulator("name")---
Spark renames and removes configuration properties between versions. The official migration guide documents every renamed and removed property per release: https://spark.apache.org/docs/latest/migration-guide.html
This repository is the public extensions registry for OpenHands. It contains reusable, shareable skills, plugins, and Agent Canvas Apps that customize agent behavior and interfaces. Skills overview docs: SDK skill guide:
Set up build environment and test fixtures for COBOL-to-Java migrations. Creates compilation infrastructure for both languages…
End-to-end COBOL to Java migration workflow. Handles build setup, mainframe dependency removal, and code migration with test…
Create a transformation guide for replacing mainframe-specific COBOL constructs with standard COBOL equivalents. Use when…
Apply mainframe dependency transformations to COBOL code using a pre-generated transformation guide. Converts CICS/VSAM…
Migrate COBOL code to idiomatic Java, preserving business logic while following Java best practices. Use for COBOL modernization…
A test skill that responds to the magic word "alakazam" with a specific phrase