-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDFS-17565. EC: dfs.datanode.ec.reconstruction.threads should support… #6928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
14911e8
68d39fd
e770648
07aeb55
ff31d28
20d6b9f
12cd104
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ | |
| */ | ||
| package org.apache.hadoop.hdfs.server.datanode.erasurecode; | ||
|
|
||
| import org.apache.hadoop.classification.VisibleForTesting; | ||
| import org.apache.hadoop.util.Preconditions; | ||
| import org.apache.hadoop.classification.InterfaceAudience; | ||
| import org.apache.hadoop.conf.Configuration; | ||
|
|
@@ -37,6 +38,9 @@ | |
| import java.util.concurrent.TimeUnit; | ||
| import java.util.concurrent.atomic.AtomicInteger; | ||
|
|
||
| import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_DATANODE_SLOW_IO_WARNING_THRESHOLD_KEY; | ||
|
||
| import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_DN_EC_RECONSTRUCTION_THREADS_KEY; | ||
|
|
||
| /** | ||
| * ErasureCodingWorker handles the erasure coding reconstruction work commands. | ||
| * These commands would be issued from Namenode as part of Datanode's heart beat | ||
|
|
@@ -172,4 +176,19 @@ public void shutDown() { | |
| public float getXmitWeight() { | ||
| return xmitWeight; | ||
| } | ||
|
|
||
| public void setStripedReconstructionPoolSize(int size) { | ||
| Preconditions.checkArgument(size > 0, | ||
| DFS_DN_EC_RECONSTRUCTION_THREADS_KEY + " should be greater than 0"); | ||
| this.stripedReconstructionPool.setCorePoolSize(size); | ||
| this.stripedReconstructionPool.setMaximumPoolSize(size); | ||
| } | ||
|
|
||
| @VisibleForTesting | ||
| public int getStripedReconstructionPoolSize() { | ||
| int poolSize = this.stripedReconstructionPool.getCorePoolSize(); | ||
| Preconditions.checkArgument(poolSize == this.stripedReconstructionPool.getMaximumPoolSize(), | ||
| "The maximum pool size should be equal to core pool size"); | ||
|
||
| return poolSize; | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.