Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,12 @@ private synchronized static void initializeAddReplicaPool(Configuration conf,
VOLUMES_REPLICA_ADD_THREADPOOL_SIZE);
// Default pool sizes is max of (volume * number of bp_service) and
// number of processor.
addReplicaThreadPool = new ForkJoinPool(conf.getInt(
DFSConfigKeys.DFS_DATANODE_VOLUMES_REPLICA_ADD_THREADPOOL_SIZE_KEY,
poolsize));
int addReplicaThreadPoolSize = conf.getInt(
DFSConfigKeys.DFS_DATANODE_VOLUMES_REPLICA_ADD_THREADPOOL_SIZE_KEY, poolsize);
Preconditions.checkArgument(addReplicaThreadPoolSize > 0,
"%s should be a positive integer.",
DFSConfigKeys.DFS_DATANODE_VOLUMES_REPLICA_ADD_THREADPOOL_SIZE_KEY);
addReplicaThreadPool = new ForkJoinPool(addReplicaThreadPoolSize);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1472,6 +1472,7 @@
<description>Specifies the maximum number of threads to use for
adding block in volume. Default value for this configuration is
max of (volume * number of bp_service, number of processor).
The value should be greater than 0.
</description>
</property>

Expand Down