HDFS-11900. Hedged reads thread pool creation not synchronized. Contributed by John Zhuge.
This commit is contained in:
parent
268c29a5f5
commit
f738d75a86
|
@ -2910,7 +2910,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
|
|||
* @param num Number of threads for hedged reads thread pool.
|
||||
* If zero, skip hedged reads thread pool creation.
|
||||
*/
|
||||
private synchronized void initThreadsNumForHedgedReads(int num) {
|
||||
private static synchronized void initThreadsNumForHedgedReads(int num) {
|
||||
if (num <= 0 || HEDGED_READ_THREAD_POOL != null) return;
|
||||
HEDGED_READ_THREAD_POOL = new ThreadPoolExecutor(1, num, 60,
|
||||
TimeUnit.SECONDS, new SynchronousQueue<Runnable>(),
|
||||
|
|
Loading…
Reference in New Issue