-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[feat](storage vault) Add object storage op check when creating resource #48073
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
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 31827 ms |
TPC-DS: Total hot run time: 184819 ms |
ClickBench: Total hot run time: 30.26 s |
afb02c3 to
cd22372
Compare
|
run buildall |
TPC-H: Total hot run time: 31446 ms |
TPC-DS: Total hot run time: 191453 ms |
ClickBench: Total hot run time: 31.98 s |
|
run feut |
cd22372 to
009fd31
Compare
|
run buildall |
TPC-H: Total hot run time: 31586 ms |
TPC-DS: Total hot run time: 190038 ms |
ClickBench: Total hot run time: 30.6 s |
|
run buildall |
TPC-H: Total hot run time: 31212 ms |
TPC-DS: Total hot run time: 184657 ms |
ClickBench: Total hot run time: 30.79 s |
376a385 to
684f1f5
Compare
|
run buildall |
TPC-H: Total hot run time: 31537 ms |
TPC-DS: Total hot run time: 189343 ms |
ClickBench: Total hot run time: 30.74 s |
| * @param <C> cloud SDK Client | ||
| */ | ||
| public interface ObjStorage<C> { | ||
| public static final int CHUNK_SIZE = 5 * 1024 * 1024; |
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.
add comment what is chunk_size and what it is for
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.
add comment what is chunk_size and what it is for
done
| } | ||
| } | ||
|
|
||
| public Status multiPartPutObject(String remotePath, @Nullable InputStream inputStream, long totalBytes) { |
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.
what about abort?
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.
what about abort?
done
| Status status = azureObjStorage.putObject(testFile, new ByteArrayInputStream(contentData), contentData.length); | ||
| if (!Status.OK.equals(status)) { | ||
| throw new DdlException( | ||
| "ping azure failed(put), status: " + status + ", properties: " + new PrintableMap<>( |
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.
we may need to convert the raw message to what user can understand.
e.g.
if status is 403, return "failed try to test to put object, lack of permission of PUT"
if status is connection refused, return "failed to connect to azure, please check your connection or endpoint"
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.
we may need to convert the raw message to what user can understand. e.g. if status is 403, return "failed try to test to put object, lack of permission of PUT" if status is connection refused, return "failed to connect to azure, please check your connection or endpoint"
it is not necessary, keep the same as before
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.
we may need to convert the raw message to what user can understand. e.g. if status is 403, return "failed try to test to put object, lack of permission of PUT" if status is connection refused, return "failed to connect to azure, please check your connection or endpoint"
it is not necessary, keep the same as before
Can you show me the code, what you expect to deal with
| newProperties, "=", true, false, true, false)); | ||
| } | ||
|
|
||
| status = azureObjStorage.multiPartPutObject(testFile, |
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.
abort should be also considered
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.
abort should be also considered
done
| LOG.info("remoteObjects: {}", remoteObjects); | ||
| Preconditions.checkArgument(remoteObjects.getObjectList().size() == 1, "remoteObjects.size() must equal 1"); | ||
|
|
||
| status = s3ObjStorage.multiPartPutObject(testObj, new ByteArrayInputStream(contentData), contentData.length); |
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.
abort should be also considered
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.
abort should be also considered
done
| return; | ||
|
|
||
| String testFile = "azure://" + bucketName + "/" + rootPath + "/" | ||
| + UUID.randomUUID().toString() + "/test-object-valid.txt"; |
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.
use timestamp in milliseconds instead
e.g. doris-test-object-valid-${timstamp}.txt
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.
use timestamp in milliseconds instead e.g. doris-test-object-valid-${timstamp}.txt
done
| String content = "doris will be better"; | ||
| if (FeConstants.runningUnitTest) { | ||
| return; | ||
| protected static void pingS3(String bucketName, String rootPath, Map<String, String> newProperties) |
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.
same comments to this section like AzureResource.java
684f1f5 to
bbe0fe8
Compare
|
run buildall |
dataroaring
left a comment
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.
LGTM
* When creating `S3Resource/AzureResource`, we will check if it can be accessed with `put/multiPartPut/list/head/delete` operator
8cf74e7 to
e690cdf
Compare
|
run buildall |
TPC-H: Total hot run time: 32680 ms |
TPC-DS: Total hot run time: 192343 ms |
ClickBench: Total hot run time: 30.71 s |
|
run cloud_p0 |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
…rce (#48073) * When creating `S3Resource/AzureResource`, we will check if it can be accessed with `put/multiPartPut/list/head/delete` operator
…rce (apache#48073) * When creating `S3Resource/AzureResource`, we will check if it can be accessed with `put/multiPartPut/list/head/delete` operator
S3Resource/AzureResource, we will check if it can be accessed withput/multiPartPut/list/head/deleteoperatorWhat problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)