Skip to content

Commit

Permalink
feat: add delegation_token for ObjectStorage (#413)
Browse files Browse the repository at this point in the history
Signed-off-by: BruceAko <[email protected]>
  • Loading branch information
BruceAko authored Nov 14, 2024
1 parent e491cd9 commit 50fde09
Show file tree
Hide file tree
Showing 8 changed files with 407 additions and 147 deletions.
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.169"
version = "2.0.170"
authors = ["Gaius <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
372 changes: 227 additions & 145 deletions pkg/apis/common/v2/common.pb.go

Large diffs are not rendered by default.

150 changes: 150 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.

8 changes: 8 additions & 0 deletions pkg/apis/common/v2/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ message Download {
bool prefetch = 16;
// Object Storage related information.
optional ObjectStorage object_storage = 17;
// HDFS related information.
optional HDFS hdfs = 18;
}

// Object Storage related information.
Expand All @@ -451,6 +453,12 @@ message ObjectStorage {
optional string predefined_acl = 7 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
}

// HDFS related information.
message HDFS {
// Delegation token for Web HDFS operator.
optional string delegation_token = 1 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
}

// Range represents download range.
message Range {
// Start of range.
Expand Down
8 changes: 8 additions & 0 deletions proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ message Download {
bool prefetch = 16;
// Object Storage related information.
optional ObjectStorage object_storage = 17;
// HDFS related information.
optional HDFS hdfs = 18;
}

// Object Storage related information.
Expand All @@ -447,6 +449,12 @@ message ObjectStorage {
optional string predefined_acl = 7;
}

// HDFS related information.
message HDFS {
// Delegation token for Web HDFS operator.
optional string delegation_token = 1;
}

// Range represents download range.
message Range {
// Start of range.
Expand Down
12 changes: 12 additions & 0 deletions src/common.v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,9 @@ pub struct Download {
/// Object Storage related information.
#[prost(message, optional, tag = "17")]
pub object_storage: ::core::option::Option<ObjectStorage>,
/// HDFS related information.
#[prost(message, optional, tag = "18")]
pub hdfs: ::core::option::Option<Hdfs>,
}
/// Object Storage related information.
#[derive(serde::Serialize, serde::Deserialize)]
Expand Down Expand Up @@ -507,6 +510,15 @@ pub struct ObjectStorage {
#[prost(string, optional, tag = "7")]
pub predefined_acl: ::core::option::Option<::prost::alloc::string::String>,
}
/// HDFS related information.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hdfs {
/// Delegation token for Web HDFS operator.
#[prost(string, optional, tag = "1")]
pub delegation_token: ::core::option::Option<::prost::alloc::string::String>,
}
/// Range represents download range.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
Binary file modified src/descriptor.bin
Binary file not shown.

0 comments on commit 50fde09

Please sign in to comment.