Skip to content

[Spark] Migrate streampark-spark from Scala to Java #4453

Description

@shangeyao

Summary

Parent epic: #4408
Spark migration (post Stage 2)

Migrate streampark-spark from Scala to Java with no behavior changes, and keep Console Spark submit/cancel/SQL validation working against the new Java APIs.

Module role

Remaining Spark runtime modules after #4432 removed user-facing dev traits (SparkStreaming, SparkBatch) and connector wrappers:

Submodule Scala files Role
streampark-spark-core 4 SQL utilities — SparkSqlExecutor, SqlCommandParser, SparkSqlValidator, SQLContextUtil
streampark-spark-client-api 7 Public client API — SparkClient, request/response beans, SparkConfiguration, SparkShimsProxy
streampark-spark-client-core 3 Deploy implementations — SparkClientTrait, YarnClient, SparkClientEndpoint
streampark-spark-sqlclient 1 Spark SQL CLI entry — SqlClient

Total: 15 .scala files under src/main (no test Scala today).

Downstream compatibility (must not break)

Console (streampark-console-service) depends on these packages today:

  • org.apache.streampark.spark.client.SparkClient + submit/cancel beans — SparkApplicationActionServiceImpl
  • org.apache.streampark.spark.client.proxy.SparkShimsProxySparkSqlServiceImpl
  • org.apache.streampark.spark.core.util.SparkSqlValidationResult / SparkSqlValidator (reflection) — SparkSqlController, SparkSqlServiceImpl

Keep package paths and public method signatures stable where possible; update Console imports only when unavoidable.

Note: Spark K8s pod template models (SparkK8sPodTemplates) already live in streampark-flink-kubernetes (Java) — out of scope for this issue.

Dependencies

Do not start until #4452 is merged. Follow the same sequential PR workflow as Flink Stage 2.

Constraints

Acceptance

  • No .scala under streampark-spark (src/main and src/test)
  • -Pspark module builds and tests pass
  • streampark-console-service compiles and Spark integration paths work (submit/cancel, SQL validate)
  • Remove Scala-only build deps from Spark POMs where no longer needed (enumeratum, scala-maven-plugin config, etc.)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions