Skip to content

feat(sdk): route LoadJob APIs to Transfer when enabled - #1467

Merged
jlon merged 1 commit into
mainfrom
feat/sdk-loadjob-transfer-compat
Aug 3, 2026
Merged

feat(sdk): route LoadJob APIs to Transfer when enabled#1467
jlon merged 1 commit into
mainfrom
feat/sdk-loadjob-transfer-compat

Conversation

@lzjqsdd

@lzjqsdd lzjqsdd commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

Route Rust JobClient / blocking LoadJob helpers (and thus Java CurvineLoadClient) to the Transfer service when transfer.enabled=true, while preserving the existing LoadJob API surface for legacy clusters.

Issue Describe / Design

No linked issue.

  • Design: config-driven dual path aligned with CLI/UnifiedFS (transfer.enabled)
  • Transfer responses mapped back to LoadJobResult / JobStatus / JobTaskState
  • Transfer path supports source/target/overwrite only; advanced LoadJob options return a clear error
  • PartialSuccess maps to Failed (same as UnifiedFS wait semantics)

Changes

Module / File Change Impact on existing behavior
crates/sdk/curvine-sdk-core/src/core/transfer_compat.rs New dual-path adapter None when transfer.enabled=false
crates/sdk/curvine-sdk-core/src/{job,core/job}.rs Delegate to adapter Behavior change only when transfer enabled
curvine-libsdk/java/.../CurvineLoadClient.java Document routing Docs only

Test verified

Test case Result Notes
make format PASS
cargo test -p curvine-sdk-core --lib transfer_compat PASS state mapping / options / response mapping
cargo check -p curvine-libsdk-java PASS

Dependencies

  • Related PRs: None
  • Related issues: None
  • Blocks / blocked by: None

Keep LoadJob/Java surfaces compatible by switching on transfer.enabled.
Copilot AI review requested due to automatic review settings August 3, 2026 04:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a config-driven compatibility layer so the Rust SDK JobClient (and the blocking helpers that Java CurvineLoadClient relies on) can route LoadJob operations to the Transfer service when transfer.enabled=true, while keeping the existing LoadJob-facing API types (LoadJobResult, JobStatus, JobTaskState) stable for callers.

Changes:

  • Introduces transfer_compat adapter to submit/status/cancel/wait via Transfer when enabled, mapping Transfer states/responses back into LoadJob models.
  • Re-routes Rust async + blocking LoadJob helpers through the adapter.
  • Adds JavaDoc describing the backend routing behavior; wires in needed Rust deps (curvine-proto, tokio, log).

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
curvine-libsdk/java/src/main/java/io/curvine/CurvineLoadClient.java Documents routing based on transfer.enabled and response mapping behavior.
crates/sdk/curvine-sdk-core/src/job.rs Routes async JobClient calls through core::transfer_compat.
crates/sdk/curvine-sdk-core/src/core/transfer_compat.rs New dual-path adapter: legacy JobMaster vs Transfer client, including state/response mapping and wait loop.
crates/sdk/curvine-sdk-core/src/core/mod.rs Exposes transfer_compat module internally.
crates/sdk/curvine-sdk-core/src/core/job.rs Routes blocking helper functions through transfer_compat.
crates/sdk/curvine-sdk-core/Cargo.toml Adds dependencies required by transfer_compat (proto types, tokio time, logging).
Cargo.lock Updates lockfile to include new SDK-core deps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +97 to +110
let input = Path::from_str(&command.source_path)?;
let (source, target) = if let Some(target_path) = &command.target_path {
(input, Path::from_str(target_path)?)
} else {
let peer = match fs.toggle_path(&input, true).await? {
Some(peer) => peer,
None => return err_box!("{} is not mounted", command.source_path),
};
if input.is_cv() {
(peer, input)
} else {
(input, peer)
}
};
@jlon
jlon merged commit 20db2d4 into main Aug 3, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants