-
Notifications
You must be signed in to change notification settings - Fork 534
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
fix(services/s3): Batch max operations from config #2354
Closed
manulpatel
wants to merge
14
commits into
apache:main
from
manulpatel:batch_max_operations-from-config
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5272589
Batch max operations for s3
manulpatel 4545dcc
Merge branch 'main' into batch_max_operations-from-config
manulpatel b01a9d5
Reading batch operations from s3 config
manulpatel d64b9b2
Merge branch 'main' of https://github.com/manulpatel/incubator-openda…
manulpatel 4774e31
Merge branch 'batch_max_operations-from-config' of https://github.com…
manulpatel 2dc929c
Merge branch 'main' into batch_max_operations-from-config
manulpatel 5d91f11
Formatted code
manulpatel efb516f
Merge branch 'batch_max_operations-from-config' of https://github.com…
manulpatel 08807fd
Merge branch 'main' into batch_max_operations-from-config
manulpatel 0eee732
Added function
manulpatel ae7d9e4
Merge branch 'batch_max_operations-from-config' of https://github.com…
manulpatel 183d511
Merge branch 'main' into batch_max_operations-from-config
manulpatel 7b9ccdd
Corrections
manulpatel fd758e3
Merge branch 'main' into batch_max_operations-from-config
manulpatel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ use std::collections::HashMap; | |
use std::fmt::Debug; | ||
use std::fmt::Formatter; | ||
use std::fmt::Write; | ||
use std::string; | ||
use std::sync::Arc; | ||
|
||
use async_trait::async_trait; | ||
|
@@ -93,6 +94,8 @@ pub struct S3Builder { | |
/// the part size of s3 multipart upload, which should be 5 MiB to 5 GiB. | ||
/// There is no minimum size limit on the last part of your multipart upload | ||
write_min_size: Option<usize>, | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a new function for |
||
batch_max_opertaions: Option<usize>, | ||
} | ||
|
||
impl Debug for S3Builder { | ||
|
@@ -103,7 +106,6 @@ impl Debug for S3Builder { | |
.field("bucket", &self.bucket) | ||
.field("endpoint", &self.endpoint) | ||
.field("region", &self.region); | ||
|
||
d.finish_non_exhaustive() | ||
} | ||
} | ||
|
@@ -510,6 +512,13 @@ impl S3Builder { | |
|
||
self | ||
} | ||
|
||
/// Sets maximum batch operations. | ||
pub fn batch_max_operations(&mut self, batch_max_operations: usize) -> &mut Self { | ||
self.batch_max_opertaions = Some(batch_max_operations); | ||
|
||
self | ||
} | ||
} | ||
|
||
impl Builder for S3Builder { | ||
|
@@ -714,6 +723,7 @@ impl Builder for S3Builder { | |
loader, | ||
client, | ||
write_min_size, | ||
batch_max_operations: self.batch_max_operations, | ||
}), | ||
}) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not seeing why we need to
use std::string
here.