Add additional configuration properties for FileSystemExchange#11601
Conversation
I guess we should have some (I think we are documenting other properties, right?) |
There was a problem hiding this comment.
please do not use enum from external library directly as config parameter setter, to have full control over what we can set in configuration file.
There was a problem hiding this comment.
I was also thinking about that. Here's my thoughts. I don't think they are going to remove an existing option, as it may break the compatibility. And when they add a new option we probably want it to also be available.
There was a problem hiding this comment.
Yeah. But still (I think) the common case is to either have our own enum which maps to enum from an external library. Or make setSomething consume a String and do switch...case in the setter body to map to enum fields.
Adding a new option to our mapping if AWS adds a new enum value is a minimalistic effort. And we have better control over product surface, and also config values naming.
There was a problem hiding this comment.
As a reference trino-hive uses our own enum
There was a problem hiding this comment.
There are other places in the codebase when the library enum is used directly:
The TrinoS3StorageClass might not be the best example as it does two things:
- Translates available values from lower case to upper case
- Limits the available options
The new version of the AWS libraries already uses values in upper case. I'm not sure if there's a value of limiting the available options. While it is rather unlikely that we will ever try to use GLACIER, we may still want to play around with reduced concurrency and reduced availability options. So I don't want to limit the available options just yet. Also using the library enum directly will make any new options available without any modifications and it's rather unlikely for the existing options to be removed as I'm pretty sure AWS developers won't be willing to break compatibility.
Thus I'm not sure if there's a significant practical reason of adding a proxy.
There was a problem hiding this comment.
This is the default from the library. It feels like there shouldn't be a real reason why to set it to something lower.
There was a problem hiding this comment.
Idk if there is the reason or not :) Just feels arbitrary. I would put @Min(1) here. But I do not feel strongly.
There was a problem hiding this comment.
Actually yeah, while it doesn't make sense to set it to something lower than 50 it is still a legal value. Let me change it.
There was a problem hiding this comment.
maybe just exchage.s3.async-client-concurrency?
dc7673c to
035bfcd
Compare
035bfcd to
ab68a86
Compare
Description
Improvement
File system exchange
Additional configuration properties needed for experimentation. In the future the default values might be readjusted. These properties are rather not expected to be changed by the end user.
Related issues, pull requests, and links
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
(x) No release notes entries required.
( ) Release notes entries required with the following suggested text: