Skip to content

Commit af929d0

Browse files
authored
feat: add need_piece_content for Download message (#434)
Signed-off-by: Gaius <[email protected]>
1 parent c3487f9 commit af929d0

File tree

8 files changed

+154
-134
lines changed

8 files changed

+154
-134
lines changed

Diff for: Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dragonfly-api"
3-
version = "2.0.177"
3+
version = "2.1.0"
44
authors = ["Gaius <[email protected]>"]
55
edition = "2021"
66
license = "Apache-2.0"

Diff for: pkg/apis/common/v2/common.pb.go

+128-117
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: pkg/apis/common/v2/common.pb.validate.go

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: pkg/apis/common/v2/common.proto

+7-5
Original file line numberDiff line numberDiff line change
@@ -425,20 +425,22 @@ message Download {
425425
optional string output_path = 11 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
426426
// Download timeout.
427427
optional google.protobuf.Duration timeout = 12;
428-
// Dfdaemon will disable download back-to-source by itself, if disable_back_to_source is true.
428+
// Dfdaemon cannot download the task from the source if disable_back_to_source is true.
429429
bool disable_back_to_source = 13;
430-
// Scheduler will triggers peer to download back-to-source, if need_back_to_source is true.
430+
// Scheduler needs to schedule the task downloads from the source if need_back_to_source is true.
431431
bool need_back_to_source = 14;
432432
// certificate_chain is the client certs with DER format for the backend client to download back-to-source.
433433
repeated bytes certificate_chain = 15;
434-
// Prefetch pre-downloads all pieces of the task when download task with range request.
434+
// Prefetch pre-downloads all pieces of the task when the download task request is a range request.
435435
bool prefetch = 16;
436-
// Object Storage related information.
436+
// Object storage protocol information.
437437
optional ObjectStorage object_storage = 17;
438-
// HDFS related information.
438+
// HDFS protocol information.
439439
optional HDFS hdfs = 18;
440440
// is_prefetch is the flag to indicate whether the request is a prefetch request.
441441
bool is_prefetch = 19;
442+
// need_piece_content is the flag to indicate whether the response needs to return piece content.
443+
bool need_piece_content = 20;
442444
}
443445

444446
// Object Storage related information.

Diff for: proto/common.proto

+7-5
Original file line numberDiff line numberDiff line change
@@ -421,20 +421,22 @@ message Download {
421421
optional string output_path = 11;
422422
// Download timeout.
423423
optional google.protobuf.Duration timeout = 12;
424-
// Dfdaemon will disable download back-to-source by itself, if disable_back_to_source is true.
424+
// Dfdaemon cannot download the task from the source if disable_back_to_source is true.
425425
bool disable_back_to_source = 13;
426-
// Scheduler will triggers peer to download back-to-source, if need_back_to_source is true.
426+
// Scheduler needs to schedule the task downloads from the source if need_back_to_source is true.
427427
bool need_back_to_source = 14;
428428
// certificate_chain is the client certs with DER format for the backend client to download back-to-source.
429429
repeated bytes certificate_chain = 15;
430-
// Prefetch pre-downloads all pieces of the task when download task with range request.
430+
// Prefetch pre-downloads all pieces of the task when the download task request is a range request.
431431
bool prefetch = 16;
432-
// Object Storage related information.
432+
// Object storage protocol information.
433433
optional ObjectStorage object_storage = 17;
434-
// HDFS related information.
434+
// HDFS protocol information.
435435
optional HDFS hdfs = 18;
436436
// is_prefetch is the flag to indicate whether the request is a prefetch request.
437437
bool is_prefetch = 19;
438+
// need_piece_content is the flag to indicate whether the response needs to return piece content.
439+
bool need_piece_content = 20;
438440
}
439441

440442
// Object Storage related information.

Diff for: src/common.v2.rs

+8-5
Original file line numberDiff line numberDiff line change
@@ -470,27 +470,30 @@ pub struct Download {
470470
/// Download timeout.
471471
#[prost(message, optional, tag = "12")]
472472
pub timeout: ::core::option::Option<::prost_wkt_types::Duration>,
473-
/// Dfdaemon will disable download back-to-source by itself, if disable_back_to_source is true.
473+
/// Dfdaemon cannot download the task from the source if disable_back_to_source is true.
474474
#[prost(bool, tag = "13")]
475475
pub disable_back_to_source: bool,
476-
/// Scheduler will triggers peer to download back-to-source, if need_back_to_source is true.
476+
/// Scheduler needs to schedule the task downloads from the source if need_back_to_source is true.
477477
#[prost(bool, tag = "14")]
478478
pub need_back_to_source: bool,
479479
/// certificate_chain is the client certs with DER format for the backend client to download back-to-source.
480480
#[prost(bytes = "vec", repeated, tag = "15")]
481481
pub certificate_chain: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
482-
/// Prefetch pre-downloads all pieces of the task when download task with range request.
482+
/// Prefetch pre-downloads all pieces of the task when the download task request is a range request.
483483
#[prost(bool, tag = "16")]
484484
pub prefetch: bool,
485-
/// Object Storage related information.
485+
/// Object storage protocol information.
486486
#[prost(message, optional, tag = "17")]
487487
pub object_storage: ::core::option::Option<ObjectStorage>,
488-
/// HDFS related information.
488+
/// HDFS protocol information.
489489
#[prost(message, optional, tag = "18")]
490490
pub hdfs: ::core::option::Option<Hdfs>,
491491
/// is_prefetch is the flag to indicate whether the request is a prefetch request.
492492
#[prost(bool, tag = "19")]
493493
pub is_prefetch: bool,
494+
/// need_piece_content is the flag to indicate whether the response needs to return piece content.
495+
#[prost(bool, tag = "20")]
496+
pub need_piece_content: bool,
494497
}
495498
/// Object Storage related information.
496499
#[derive(serde::Serialize, serde::Deserialize)]

Diff for: src/descriptor.bin

216 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)