This is an automated email from the ASF dual-hosted git repository.
lidongdai pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new dcdd7de Modify the AWS S3 request encryption method to V4. (#3182)
dcdd7de is described below
commit dcdd7dedd06454ed468eae86881b75177261c9e2
Author: rockxsj <[email protected]>
AuthorDate: Sat Jul 11 08:56:38 2020 +0800
Modify the AWS S3 request encryption method to V4. (#3182)
Co-authored-by: rockxsj <[email protected]>
---
.../src/main/java/org/apache/dolphinscheduler/common/Constants.java | 4 ++++
.../java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java | 1 +
2 files changed, 5 insertions(+)
diff --git
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
index a2634bf..2432b7e 100644
---
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
+++
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
@@ -786,6 +786,10 @@ public final class Constants {
*/
public static final String HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE =
"hadoop.security.authentication.startup.state";
+ /**
+ * com.amazonaws.services.s3.enableV4
+ */
+ public static final String AWS_S3_V4 =
"com.amazonaws.services.s3.enableV4";
/**
* loginUserFromKeytab user
diff --git
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
index a628c6a..4111ef9 100644
---
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
+++
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
@@ -159,6 +159,7 @@ public class HadoopUtils implements Closeable {
}
}
} else if (resUploadType == ResUploadType.S3) {
+ System.setProperty(Constants.AWS_S3_V4, Constants.STRING_TRUE);
configuration.set(Constants.FS_DEFAULTFS,
PropertyUtils.getString(Constants.FS_DEFAULTFS));
configuration.set(Constants.FS_S3A_ENDPOINT,
PropertyUtils.getString(Constants.FS_S3A_ENDPOINT));
configuration.set(Constants.FS_S3A_ACCESS_KEY,
PropertyUtils.getString(Constants.FS_S3A_ACCESS_KEY));