Skip to content

Commit

Permalink
fix: Bounded IO 线程池拒绝策略修正
Browse files Browse the repository at this point in the history
修正Bounded IO 线程池在等待新任务加入被中断时,抛出 Reject 异常
  • Loading branch information
yuyang733 committed Jan 29, 2021
1 parent 5fef461 commit 078ce98
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 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>5.9.1</version>
<version>5.9.2</version>
<packaging>jar</packaging>

<name>Apache Hadoop Tencent Qcloud COS Support</name>
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/apache/hadoop/fs/CosFileSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,12 @@ public void rejectedExecution(Runnable r,
} catch (InterruptedException e) {
LOG.error("put a io task into the download " +
"thread pool occurs an exception.", e);
throw new RejectedExecutionException(
"Putting the io task failed due to the interruption", e);
}
} else {
LOG.error("The bounded io thread pool has been shutdown.");
throw new RejectedExecutionException("The bounded io thread pool has been shutdown");
}
}
}
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.9.1";
public static final String DEFAULT_USER_AGENT = "cos-hadoop-plugin-v5.9.2";

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

Expand Down

0 comments on commit 078ce98

Please sign in to comment.