You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2022/05/23 15:45:33 UTC
[hadoop] branch trunk updated: HDFS-16586. Purge FsDatasetAsyncDiskService threadgroup; it causes BP… (#4338)
This is an automated email from the ASF dual-hosted git repository.
stack pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 5ab747222bf HDFS-16586. Purge FsDatasetAsyncDiskService threadgroup; it causes BP… (#4338)
5ab747222bf is described below
commit 5ab747222bf406ad883a15100d81944f879bd3a6
Author: Michael Stack <sa...@users.noreply.github.com>
AuthorDate: Mon May 23 08:45:08 2022 -0700
HDFS-16586. Purge FsDatasetAsyncDiskService threadgroup; it causes BP… (#4338)
* HDFS-16586. Purge FsDatasetAsyncDiskService threadgroup; it causes BPServiceActor IllegalThreadStateException 'fatal exception and exit'
Remove the ThreadGroup used by executor factories; they are unused
and ThreadGroups auto-destroy when their Thread-member count goes to zero.
This behavior is incompatible with the configuration we have on the per-volume
executor which is set to let all threads die if no use inside the
keepalive time.
Signed-off-by: Hexiaoqiao <he...@apache.org>
---
.../server/datanode/fsdataset/impl/FsDatasetAsyncDiskService.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetAsyncDiskService.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetAsyncDiskService.java
index db4987e25ac..25760bb5ac0 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetAsyncDiskService.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetAsyncDiskService.java
@@ -73,7 +73,6 @@ class FsDatasetAsyncDiskService {
private final DataNode datanode;
private final FsDatasetImpl fsdatasetImpl;
- private final ThreadGroup threadGroup;
private Map<String, ThreadPoolExecutor> executors
= new HashMap<String, ThreadPoolExecutor>();
private Map<String, Set<Long>> deletedBlockIds
@@ -91,7 +90,6 @@ class FsDatasetAsyncDiskService {
FsDatasetAsyncDiskService(DataNode datanode, FsDatasetImpl fsdatasetImpl) {
this.datanode = datanode;
this.fsdatasetImpl = fsdatasetImpl;
- this.threadGroup = new ThreadGroup(getClass().getSimpleName());
maxNumThreadsPerVolume = datanode.getConf().getInt(
DFSConfigKeys.DFS_DATANODE_FSDATASETASYNCDISK_MAX_THREADS_PER_VOLUME_KEY,
DFSConfigKeys.DFS_DATANODE_FSDATASETASYNCDISK_MAX_THREADS_PER_VOLUME_DEFAULT);
@@ -110,7 +108,7 @@ class FsDatasetAsyncDiskService {
synchronized (this) {
thisIndex = counter++;
}
- Thread t = new Thread(threadGroup, r);
+ Thread t = new Thread(r);
t.setName("Async disk worker #" + thisIndex +
" for volume " + volume);
return t;
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org