HDFS-14934. [SBN Read] Standby NN throws many InterruptedExceptions when dfs.ha.tail-edits.period is 0. Contributed by Ayush Saxena.
This commit is contained in:
parent
926d0b48f0
commit
dc32f583af
|
@ -28,6 +28,7 @@ import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
|
import java.util.concurrent.ThreadPoolExecutor;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.apache.hadoop.classification.InterfaceAudience;
|
import org.apache.hadoop.classification.InterfaceAudience;
|
||||||
|
@ -55,7 +56,6 @@ import org.apache.hadoop.ipc.ProtobufRpcEngine;
|
||||||
import org.apache.hadoop.ipc.RPC;
|
import org.apache.hadoop.ipc.RPC;
|
||||||
import org.apache.hadoop.security.SecurityUtil;
|
import org.apache.hadoop.security.SecurityUtil;
|
||||||
import org.apache.hadoop.util.StopWatch;
|
import org.apache.hadoop.util.StopWatch;
|
||||||
import org.apache.hadoop.util.concurrent.HadoopThreadPoolExecutor;
|
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
|
@ -275,8 +275,8 @@ public class IPCLoggerChannel implements AsyncLogger {
|
||||||
int numThreads =
|
int numThreads =
|
||||||
conf.getInt(DFSConfigKeys.DFS_QJOURNAL_PARALLEL_READ_NUM_THREADS_KEY,
|
conf.getInt(DFSConfigKeys.DFS_QJOURNAL_PARALLEL_READ_NUM_THREADS_KEY,
|
||||||
DFSConfigKeys.DFS_QJOURNAL_PARALLEL_READ_NUM_THREADS_DEFAULT);
|
DFSConfigKeys.DFS_QJOURNAL_PARALLEL_READ_NUM_THREADS_DEFAULT);
|
||||||
return new HadoopThreadPoolExecutor(1, numThreads, 60L,
|
return new ThreadPoolExecutor(1, numThreads, 60L, TimeUnit.SECONDS,
|
||||||
TimeUnit.SECONDS, new LinkedBlockingQueue<>(),
|
new LinkedBlockingQueue<>(),
|
||||||
new ThreadFactoryBuilder().setDaemon(true)
|
new ThreadFactoryBuilder().setDaemon(true)
|
||||||
.setNameFormat("Logger channel (from parallel executor) to " + addr)
|
.setNameFormat("Logger channel (from parallel executor) to " + addr)
|
||||||
.setUncaughtExceptionHandler(UncaughtExceptionHandlers.systemExit())
|
.setUncaughtExceptionHandler(UncaughtExceptionHandlers.systemExit())
|
||||||
|
|
Loading…
Reference in New Issue