-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Aliyun: align property names with AWS module #3659
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
|
Hi Jack, Regarding the name style of access key, I agree with you that the best way is to line up them between aws and aliyun module。however, considering legacy reason for user behavior, we decided to keep it as it is. it looks good to me to rename |
|
I would like to see this rename, although I know there is pushback because some people have started using the unreleased feature. I don't like potentially setting a precedent that people using unreleased features can affect code that gets eventually released, but I don't think it matters that much here. |
|
@openinx any thoughts? |
|
I can accept the refactor names if others really don't like the original nested names which does not match the apache iceberg name styles (I wish the we can have a more clear document about how to define the names, then maybe I could avoid this name confusion when I developed the original version.). |
| * https://www.alibabacloud.com/help/doc-detail/53045.htm | ||
| */ | ||
| public static final String ACCESS_KEY_SECRET = "access.key.secret"; | ||
| public static final String CLIENT_SECRET_ACCESS_KEY = "client.secret-access-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.
In alibaba cloud, we often say the access key pair is composed by a key and a secret. The key is similar to the username, and the secret is similar to the password. You can see the document [1] and [2].
So in my view, a better way is to rename it as client.access-key-secret to match the alibaba cloud document. About the OSS Java SDK, although they use a different way to name the variable but I think the document is more suitable & readable for most of the aliyun people.
[1]. https://www.alibabacloud.com/help/doc-detail/63482.htm
[2]. https://www.alibabacloud.com/help/doc-detail/53045.htm
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.
that makes sense, I will update the PR
Thanks, I added #3678 to track this |
| } | ||
| public static AliyunClientFactory from(Map<String, String> properties) { | ||
| String factoryImpl = PropertyUtil.propertyAsString( | ||
| properties, AliyunProperties.CLIENT_FACTORY, DefaultAliyunClientFactory.class.getName()); |
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 think the previous version has a small bug, because the DefaultAliyunClientFactory forget to initialize the aliyun properties in the constructors. This PR unified the default aliyun client factory and customized client factory, it's great to avoid the the properties initialization !
openinx
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 overall !
@openinx @xingbowu
I was writing #3658 and I noticed that there is some inconsistency between Aliyun and AWS module. I suggest making the following changes:
client.access-key-idandclient.secret-access-keyas property names,.is used to build hierarchy to config names, butaccess.key.iddoes not have any hierarchy in it. Also I checked Aliyun doc, the name is secret access key, not access key secret, as shown in the builder method:I made
clientas the prefix because it seems like your credentials config will affect all the clients. In AWS module, I made the configs3.access-key-idbecause it would only affects3.AliyunClientFactories.loadtoAliyunClientFactories.fromto be consistent withAwsClientFactories.from. It also seems to me that the default client did not initialize and load the properties, so I also fixed the method and added tests.