Skip to content

Commit

Permalink
feat: 更新SDK的依赖版本
Browse files Browse the repository at this point in the history
1. 更新SDK的依赖版本;
2. 统一SDK的重试配置到COSN中
  • Loading branch information
yuyang733 committed Oct 13, 2020
1 parent 2f36d88 commit ae8790c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.qcloud.cos</groupId>
<artifactId>hadoop-cos</artifactId>
<version>3.1.0-5.8.5</version>
<version>3.1.0-5.8.6</version>
<packaging>jar</packaging>

<name>Apache Hadoop Tencent Qcloud COS Support</name>
Expand All @@ -20,7 +20,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<hadoop.version>3.1.0</hadoop.version>
<cos_api.version>5.6.19</cos_api.version>
<cos_api.version>5.6.29</cos_api.version>
<google.guava.version>24.1.1-jre</google.guava.version>
<commons_lang3.version>3.1</commons_lang3.version>
<junit.version>4.8</junit.version>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/apache/hadoop/fs/CosNConfigKeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@InterfaceStability.Unstable
public class CosNConfigKeys extends CommonConfigurationKeys {
public static final String USER_AGENT = "fs.cosn.user.agent";
public static final String DEFAULT_USER_AGENT = "cos-hadoop-plugin-v5.8.5";
public static final String DEFAULT_USER_AGENT = "cos-hadoop-plugin-v5.8.6";

public static final String TENCENT_EMR_VERSION_KEY = "fs.emr.version";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ private void initCOSClient(URI uri, Configuration conf) throws IOException {
boolean useHttps = conf.getBoolean(
CosNConfigKeys.COSN_USE_HTTPS_KEY,
CosNConfigKeys.DEFAULT_USE_HTTPS);

if (useHttps) {
config.setHttpProtocol(HttpProtocol.https);
}
Expand Down Expand Up @@ -133,6 +132,9 @@ private void initCOSClient(URI uri, Configuration conf) throws IOException {
CosNConfigKeys.COSN_MAX_RETRIES_KEY,
CosNConfigKeys.DEFAULT_MAX_RETRIES);

// 设置cosn的最大重试次数跟COS SDK的保持一致
config.setMaxErrorRetry(this.maxRetryTimes);

// 设置连接池的最大连接数目
config.setMaxConnectionsCount(
conf.getInt(
Expand All @@ -141,7 +143,6 @@ private void initCOSClient(URI uri, Configuration conf) throws IOException {
)
);


// 设置是否进行服务器端加密
String ServerSideEncryptionAlgorithm = conf.get(CosNConfigKeys.COSN_SERVER_SIDE_ENCRYPTION_ALGORITHM, "");
CosEncryptionMethods CosSSE = CosEncryptionMethods.getMethod(
Expand Down

0 comments on commit ae8790c

Please sign in to comment.