Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add need_piece_content for Download message #434

Merged
merged 1 commit into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dragonfly-api"
version = "2.0.177"
version = "2.1.0"
authors = ["Gaius <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
245 changes: 128 additions & 117 deletions pkg/apis/common/v2/common.pb.go

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions pkg/apis/common/v2/common.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions pkg/apis/common/v2/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -425,20 +425,22 @@ message Download {
optional string output_path = 11 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
// Download timeout.
optional google.protobuf.Duration timeout = 12;
// Dfdaemon will disable download back-to-source by itself, if disable_back_to_source is true.
// Dfdaemon cannot download the task from the source if disable_back_to_source is true.
bool disable_back_to_source = 13;
// Scheduler will triggers peer to download back-to-source, if need_back_to_source is true.
// Scheduler needs to schedule the task downloads from the source if need_back_to_source is true.
bool need_back_to_source = 14;
// certificate_chain is the client certs with DER format for the backend client to download back-to-source.
repeated bytes certificate_chain = 15;
// Prefetch pre-downloads all pieces of the task when download task with range request.
// Prefetch pre-downloads all pieces of the task when the download task request is a range request.
bool prefetch = 16;
// Object Storage related information.
// Object storage protocol information.
optional ObjectStorage object_storage = 17;
// HDFS related information.
// HDFS protocol information.
optional HDFS hdfs = 18;
// is_prefetch is the flag to indicate whether the request is a prefetch request.
bool is_prefetch = 19;
// need_piece_content is the flag to indicate whether the response needs to return piece content.
bool need_piece_content = 20;
}

// Object Storage related information.
Expand Down
12 changes: 7 additions & 5 deletions proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -421,20 +421,22 @@ message Download {
optional string output_path = 11;
// Download timeout.
optional google.protobuf.Duration timeout = 12;
// Dfdaemon will disable download back-to-source by itself, if disable_back_to_source is true.
// Dfdaemon cannot download the task from the source if disable_back_to_source is true.
bool disable_back_to_source = 13;
// Scheduler will triggers peer to download back-to-source, if need_back_to_source is true.
// Scheduler needs to schedule the task downloads from the source if need_back_to_source is true.
bool need_back_to_source = 14;
// certificate_chain is the client certs with DER format for the backend client to download back-to-source.
repeated bytes certificate_chain = 15;
// Prefetch pre-downloads all pieces of the task when download task with range request.
// Prefetch pre-downloads all pieces of the task when the download task request is a range request.
bool prefetch = 16;
// Object Storage related information.
// Object storage protocol information.
optional ObjectStorage object_storage = 17;
// HDFS related information.
// HDFS protocol information.
optional HDFS hdfs = 18;
// is_prefetch is the flag to indicate whether the request is a prefetch request.
bool is_prefetch = 19;
// need_piece_content is the flag to indicate whether the response needs to return piece content.
bool need_piece_content = 20;
}

// Object Storage related information.
Expand Down
13 changes: 8 additions & 5 deletions src/common.v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,27 +470,30 @@ pub struct Download {
/// Download timeout.
#[prost(message, optional, tag = "12")]
pub timeout: ::core::option::Option<::prost_wkt_types::Duration>,
/// Dfdaemon will disable download back-to-source by itself, if disable_back_to_source is true.
/// Dfdaemon cannot download the task from the source if disable_back_to_source is true.
#[prost(bool, tag = "13")]
pub disable_back_to_source: bool,
/// Scheduler will triggers peer to download back-to-source, if need_back_to_source is true.
/// Scheduler needs to schedule the task downloads from the source if need_back_to_source is true.
#[prost(bool, tag = "14")]
pub need_back_to_source: bool,
/// certificate_chain is the client certs with DER format for the backend client to download back-to-source.
#[prost(bytes = "vec", repeated, tag = "15")]
pub certificate_chain: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
/// Prefetch pre-downloads all pieces of the task when download task with range request.
/// Prefetch pre-downloads all pieces of the task when the download task request is a range request.
#[prost(bool, tag = "16")]
pub prefetch: bool,
/// Object Storage related information.
/// Object storage protocol information.
#[prost(message, optional, tag = "17")]
pub object_storage: ::core::option::Option<ObjectStorage>,
/// HDFS related information.
/// HDFS protocol information.
#[prost(message, optional, tag = "18")]
pub hdfs: ::core::option::Option<Hdfs>,
/// is_prefetch is the flag to indicate whether the request is a prefetch request.
#[prost(bool, tag = "19")]
pub is_prefetch: bool,
/// need_piece_content is the flag to indicate whether the response needs to return piece content.
#[prost(bool, tag = "20")]
pub need_piece_content: bool,
}
/// Object Storage related information.
#[derive(serde::Serialize, serde::Deserialize)]
Expand Down
Binary file modified src/descriptor.bin
Binary file not shown.
Loading