zhouaoe commented on code in PR #7205:
URL: https://github.com/apache/hadoop/pull/7205#discussion_r1955730180
##########
hadoop-tools/hadoop-aliyun/src/main/java/org/apache/hadoop/fs/aliyun/oss/AliyunOSSFileSystemStore.java:
##########
@@ -113,6 +114,16 @@ public void initialize(URI uri, Configuration conf, String
user,
conf.get(USER_AGENT_PREFIX, USER_AGENT_PREFIX_DEFAULT) + ", Hadoop/"
+ VersionInfo.getVersion());
+ String region = conf.get(REGION_KEY, "");
+ String signatureVersion = conf.get(SIGNATURE_VERSION_KEY,
SIGNATURE_VERSION_DEFAULT);
+ if ("V4".equalsIgnoreCase(signatureVersion)) {
+ clientConf.setSignatureVersion(SignVersion.V4);
+ if (StringUtils.isEmpty(region)) {
+ LOG.error("Signature version is V4 ,but region is empty.");
+ throw new IllegalArgumentException("SignVersion is V4 but region is
empty");
Review Comment:
Using IOException would be better. I will adjust it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]