Skip to content

feat(loader): migrate CDC to Flink 2.2 on Java 17 - #786

Merged
imbajin merged 6 commits into
apache:masterfrom
hugegraph:java17-flink-final
Oct 9, 2026
Merged

imbajin merged 6 commits into
apache:masterfrom
hugegraph:java17-flink-final

Conversation

@imbajin

@imbajin imbajin commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

The CDC Loader moves from the legacy Flink integration to Java 17 and Sink V2. Snapshot, same-identity updates and deletes retain ordered processing through Loader builders; identity-changing UPDATE events now fail before any mapping writes or deletes graph data.

Core versions: Java 17, Flink 2.2.1, and Flink CDC 3.6.

CDC UPDATE identity preflight: reject changed identity before writing

Before → after: validate every active mapping for an UPDATE before starting graph mutations, replacing the earlier delete-before-create behavior. A change to a vertex ID or an edge endpoint/sort key is rejected explicitly, preserving the old elements and incident edges. Safe identity migration is tracked in #793. Source DELETE and CREATE records remain independent operations, with no cross-event atomicity guarantee.

The migration packages the SDK-required Guava namespace alongside Flink, verifies class loading, preserves nullable-value handling and repeated-delivery behavior, and rejects unsupported parallelism before submission. Candidate SDK dependencies use a fixed ASF source baseline; Server 1.7 compatibility uses its official release with pinned checksums. Existing required/advisory separation and coverage policy remain intact.

Validation: packaged MySQL snapshot/restart/recovery, API integration and class-loading checks passed on the prior head. Updated identity-preservation tests use the existing test suites and CI; latest-head validation is pending. No local runtime tests were run. These checks do not establish HStore engine qualification or atomic identity migration.

The branch is rebased onto current ASF master as a single Flink CDC change. Already merged SDK/image prerequisites are excluded from the PR diff, and Spark implementation changes remain in #785. The current combined merge with #785 is conflict-free. Launcher checks and Checkstyle passed after history cleanup; updated-head CI is pending.

CI identity repair: ordinary PRs with an older event base now validate the current GitHub merge SHA, canonical target branch and both merge parents before preparing tests. Wrong heads, changed targets and stale checkouts remain rejected; native-stack verification remains intact. Local CI policy regressions and independent review passed. New-head CI is pending.

Upstream compatibility now follows the version of the verified same-source SDK for every Maven consumer build and test, including packaging provenance validation. This fixes the Server master version bump selecting a released SDK by mistake; fixed-baseline jobs retain their existing version. Local regressions, real Maven coordinate selection and workflow lint passed. Updated-head CI is pending.

@github-actions github-actions Bot added hubble hugegraph-hubble loader hugegraph-loader client hugegraph-client tools hugegraph-tools spark labels Oct 5, 2026
@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 64.67391% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.61%. Comparing base (d49fc5f) to head (5255fd8).

Files with missing lines Patch % Lines
.../hugegraph/loader/flink/HugeGraphOutputFormat.java 58.33% 44 Missing and 11 partials ⚠️
...g/apache/hugegraph/loader/builder/EdgeBuilder.java 0.00% 7 Missing ⚠️
...ugegraph/loader/flink/HugeGraphFlinkCDCLoader.java 66.66% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #786      +/-   ##
============================================
+ Coverage     46.19%   46.61%   +0.42%     
- Complexity     4373     4441      +68     
============================================
  Files           602      602              
  Lines         29087    29229     +142     
  Branches       3381     3419      +38     
============================================
+ Hits          13436    13625     +189     
+ Misses        14388    14328      -60     
- Partials       1263     1276      +13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

MrJs133
MrJs133 previously approved these changes Oct 5, 2026
@github-actions github-actions Bot added client hugegraph-client hubble hugegraph-hubble and removed hubble hugegraph-hubble client hugegraph-client tools hugegraph-tools spark labels Oct 6, 2026
imbajin added a commit to hugegraph/hugegraph-toolchain that referenced this pull request Oct 7, 2026
Reject unsupported CSV and TEXT headers before Spark initialization.
Cover driver preflight ordering and supported mappings in the existing suite.
Document unique cluster mapping basenames and native localization errors.
Record the merge dependency on the shared parser fixes in PR apache#786.
zyxxoo
zyxxoo previously approved these changes Oct 8, 2026
Pengzna
Pengzna previously approved these changes Oct 8, 2026
- adapt CDC loading to Sink V2 on Java 17
- preserve same-identity updates and reject identity changes
- retain packaged recovery and class-loading validation
- include Flink runtime packaging and license inventory
@imbajin
imbajin dismissed stale reviews from Pengzna and zyxxoo via 193843a October 8, 2026 12:14
@imbajin
imbajin force-pushed the java17-flink-final branch from 20f016d to 193843a Compare October 8, 2026 12:14
@github-actions github-actions Bot removed hubble hugegraph-hubble client hugegraph-client labels Oct 8, 2026
- recover stale event bases using the current PR merge
- verify canonical branch, merge parents and source head
- preserve native stack checks and final gate freshness
- cover ordinary snapshots and rejected stale inputs
imbajin and others added 3 commits October 9, 2026 00:30
- select floating consumer coordinates from the SDK manifest
- preserve source, hash and local-install checks for packaging
- retain the fixed candidate version outside compatibility CI
- verify Maven version selection and separate CLI operations
- check missing shared options through the Spark launcher
- remove the replaced legacy CDC parser assertion
- verify native Flink exit status propagation
@imbajin
imbajin merged commit 2c943c6 into apache:master Oct 9, 2026
33 checks passed
@imbajin
imbajin deleted the java17-flink-final branch October 10, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

loader hugegraph-loader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants