[ 
https://issues.apache.org/jira/browse/HADOOP-19352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17927061#comment-17927061
 ] 

ASF GitHub Bot commented on HADOOP-19352:
-----------------------------------------

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.





> Hadoop OSS Connector adds support for V4 signatures.
> ----------------------------------------------------
>
>                 Key: HADOOP-19352
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19352
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs/oss
>            Reporter: zhouao
>            Assignee: zhouao
>            Priority: Major
>              Labels: pull-request-available
>
> AliyunOSS is about to adjust its security policy: only V4 signature requests 
> will be supported in the public cloud. Therefore, support for V4 signatures 
> is also required in Hadoop, and V4 signatures will be the default.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to