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
[Feature] S3 storage volume support partitioned prefix feature #41627
[Feature] S3 storage volume support partitioned prefix feature #41627
Conversation
fe/fe-core/src/main/java/com/starrocks/credential/aws/AWSCloudConfiguration.java
Show resolved
Hide resolved
4f249c9
to
95bd643
Compare
if (value != null) { | ||
try { | ||
int val = Integer.parseInt(value); | ||
if (val < 0) { |
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.
deal with 0
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.
0 is handled as if the value is not provided, which is in line 96.
this.numOfPartitionedPrefix = val; | ||
} | ||
} catch (NumberFormatException e) { | ||
throw new IllegalArgumentException( |
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.
can upper level handle this exception?
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.
yes, it can, refer to the UT.
validateStorageVolumeConstraints(); | ||
} | ||
|
||
private void validateStorageVolumeConstraints() throws DdlException { |
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.
seems not necessary?
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.
subpath is not allowed when storage volume is enabled with partitioned prefix, otherwise the meaning of subpath is confusing.
95bd643
to
20f7a84
Compare
* s3 storage volume added the following two properties to support partitioned prefix feature - aws.s3.enable_partitioned_prefix - aws.s3.num_partitioned_prefix Signed-off-by: Kevin Xiaohua Cai <caixiaohua@starrocks.com>
20f7a84
to
da704d3
Compare
Quality Gate passedIssues Measures |
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 74 / 75 (98.67%) file detail
|
@@ -164,6 +165,14 @@ public void updateStorageVolume(String name, Map<String, String> params, Optiona | |||
StorageVolume copied = new StorageVolume(sv); | |||
validateParams(copied.getType(), params); | |||
|
|||
List<String> immutableProperties = |
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.
How about making immutableProperties
as a member of StorageVolumeMgr
?
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.
yes it can. However, I am thinking about refactor the StorageVolume, derive it by S3StorageVolume/HdfsStorageVolume/AzblobStorageVolume, each storage volume can handle its own immutable properties and validation.
It's beyond this feature, so in this PR, just keep the simplest coding, refactor it in a separate PR.
} | ||
|
||
@Override | ||
public String toConfString() { | ||
// TODO: add enable_partitioned_prefix, num_partitioned_prefix output |
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.
why todo, we will use toConfString
as map's key.
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.
these two properties are specific for storage volume, won't be used for external table property configuration. So add todo here.
sent you the doc link |
@Mergifyio backport branch-3.2 |
✅ Backports have been created
|
Signed-off-by: Kevin Xiaohua Cai <caixiaohua@starrocks.com> (cherry picked from commit de98d87)
Signed-off-by: Kevin Xiaohua Cai <caixiaohua@starrocks.com> (cherry picked from commit de98d87) Signed-off-by: Kevin Xiaohua Cai <caixiaohua@starrocks.com>
…ocks#41627) Signed-off-by: Kevin Xiaohua Cai <caixiaohua@starrocks.com> Signed-off-by: Seaven <seaven_7@qq.com>
@kevincai pls notify TW Wanglichen of this change or submit a PR to update the doc |
Why I'm doing:
What I'm doing:
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: