[FLINK-39152][pipeline-connector][Fluss]Fix FlussConfig Utils class is not in the correct directory and not have a private instance#4285
Closed
ThorneANN wants to merge 16 commits into
Conversation
…not have a private instance
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes two issues in the FlussConfigUtils utility class:
- The class was located in the wrong package (
sink) — it is moved to the correctutilspackage. - The class was missing a private no-arg constructor to prevent instantiation (a standard practice for utility classes).
Changes:
FlussConfigUtils.java: Corrected package declaration fromfluss.sinktofluss.utils, added a private constructor to prevent instantiation, and updated error messages inparseBucketNumber.FlussDataSinkFactory.java: Updated static imports to referenceFlussConfigUtilsfrom its newutilspackage.FlussDataSinkFactoryTest.java: Updated the expected error message in the test to match the new wording inFlussConfigUtils.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
FlussConfigUtils.java |
Moved to utils package, added private constructor, updated error messages |
FlussDataSinkFactory.java |
Updated imports to reference new package location of FlussConfigUtils |
FlussDataSinkFactoryTest.java |
Updated assertion to match new error message text |
Comments suppressed due to low confidence (1)
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-fluss/src/main/java/org/apache/flink/cdc/connectors/fluss/utils/FlussConfigUtils.java:73
- The error messages
"Invalid bucket number configuration for : "contain an extraneous space before the colon (i.e.,for :instead offor:). This results in a grammatically incorrect and awkward message shown to users. The message should read"Invalid bucket number configuration for: "(no space before the colon). This same issue appears in both thekv.length != 2branch and theNumberFormatExceptioncatch block. The test assertion inFlussDataSinkFactoryTest.javawas updated to match this incorrect phrasing, so the test would need to be updated too when fixing this.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
ci failure because of the kafka timeout。 |
…db,postgres,oracle connectors (apache#4247) Co-authored-by: Thorne <syyfffy@email> Co-authored-by: Thorne <syyfffy@163.com>
…t in a local variable to avoid calling the method twice per iteration: (apache#4288) Co-authored-by: Thorne <syyfffy@163.com>
…partition and bucket. (apache#4298) Signed-off-by: Pei Yu <125331682@qq.com>
…pache#4278) When a table is excluded from configuration after a restart from savepoint, the MySQL CDC source could get stuck in the INITIAL_ASSIGNING state. This happened because table exclusion cleanup was only performed when isAssigningFinished() was true, but the assigner couldn't finish because excluded table splits were never reported as finished. The fix separates two concerns in captureNewlyAddedTables(): - Adding new tables: should only happen when isAssigningFinished() - Removing excluded tables: must happen regardless of assigner status Added integration test TableExclusionDuringSnapshotIT that reproduces the issue by using a blocking hook to take a savepoint during INITIAL_ASSIGNING phase, then restarting with a table excluded from configuration.
…and update related documentation (apache#4252)
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.
Fix FlussConfig Utils class is not in the correct directory and does not have a private instance