[Migrate] Convert streampark-common from Scala to Java#4458
Open
shangeyao wants to merge 6 commits into
Open
Conversation
Migrate the common module to Java while retaining a thin Scala compatibility layer (Implicits, Workspace, FsOperator, enums) so downstream modules compile unchanged. Adds Java implementations for utilities and config with API shims for Scala interop. Co-authored-by: Cursor <cursoragent@cursor.com>
Handle InterruptedException correctly in CommandUtils and fix regex precedence in FlinkConfigurationUtils to satisfy Quality Gate. Co-authored-by: Cursor <cursoragent@cursor.com>
Convert ConfigKeys, Workspace, PropertiesUtils, and FsOperator family to Java with @JvmStatic/static APIs for Scala interop. Keep only Implicits, Logger, and Scala Enumeration enums in Scala. Fix InterruptedException handling and regex patterns to satisfy SonarCloud reliability rules. Co-authored-by: Cursor <cursoragent@cursor.com>
Remove all Scala sources from streampark-common (main and test). Move Implicits and Logger trait to new streampark-common-scala-bridge module for downstream Scala interop. Add Java enums (ApiType, PlannerType, TableMode) and LoggerSupport in common. Co-authored-by: Cursor <cursoragent@cursor.com>
Rewrite quoted -D property regex with backreferences to resolve S5850/S8786, suppress intentional ConfigKeys API smells, and clean up minor LoggerSupport/LfsOperatorTest findings. Co-authored-by: Cursor <cursoragent@cursor.com>
Defer remote Workspace initialization to match Scala lazy behavior and avoid HADOOP_HOME lookup at class load; harden Hadoop conf dir resolution when env vars are absent; fix DateUtils timezone handling for CI runners. Co-authored-by: Cursor <cursoragent@cursor.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
streampark-commoncore utilities, configuration, and enums from Scala to Java.Implicits,Workspace,FsOperator,ApiType/PlannerType/TableMode,ConfigKeys,PropertiesUtils,Logger) so existing Flink/Spark/Console modules compile without changes in this PR.Closes #4445
Test plan
./mvnw -pl streampark-common test(57 tests pass)./mvnw clean install -DskipTests(full backend compile)./mvnw -B -q -nsu checkstyle:check spotless:checkMade with Cursor