HADOOP-11648. Set DomainSocketWatcher thread name explicitly. Contributed by Liang Xie.
This commit is contained in:
parent
348208014b
commit
74a4754d1c
@ -647,6 +647,9 @@ Release 2.7.0 - UNRELEASED
|
||||
HADOOP-11658. Externalize io.compression.codecs property.
|
||||
(Kai Zheng via aajisaka)
|
||||
|
||||
HADOOP-11648. Set DomainSocketWatcher thread name explicitly.
|
||||
(Liang Xie via ozawa)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HADOOP-11323. WritableComparator#compare keeps reference to byte array.
|
||||
|
@ -238,7 +238,8 @@ private static class FdSet {
|
||||
*/
|
||||
private boolean kicked = false;
|
||||
|
||||
public DomainSocketWatcher(int interruptCheckPeriodMs) throws IOException {
|
||||
public DomainSocketWatcher(int interruptCheckPeriodMs, String src)
|
||||
throws IOException {
|
||||
if (loadingFailureReason != null) {
|
||||
throw new UnsupportedOperationException(loadingFailureReason);
|
||||
}
|
||||
@ -246,8 +247,9 @@ public DomainSocketWatcher(int interruptCheckPeriodMs) throws IOException {
|
||||
this.interruptCheckPeriodMs = interruptCheckPeriodMs;
|
||||
notificationSockets = DomainSocket.socketpair();
|
||||
watcherThread.setDaemon(true);
|
||||
watcherThread.setUncaughtExceptionHandler(
|
||||
new Thread.UncaughtExceptionHandler() {
|
||||
watcherThread.setName(src + " DomainSocketWatcher");
|
||||
watcherThread
|
||||
.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
|
||||
@Override
|
||||
public void uncaughtException(Thread thread, Throwable t) {
|
||||
LOG.error(thread + " terminating on unexpected exception", t);
|
||||
|
@ -195,7 +195,7 @@ public void run() {
|
||||
private DomainSocketWatcher newDomainSocketWatcher(int interruptCheckPeriodMs)
|
||||
throws Exception {
|
||||
DomainSocketWatcher watcher = new DomainSocketWatcher(
|
||||
interruptCheckPeriodMs);
|
||||
interruptCheckPeriodMs, getClass().getSimpleName());
|
||||
watcher.watcherThread.setUncaughtExceptionHandler(
|
||||
new Thread.UncaughtExceptionHandler() {
|
||||
@Override
|
||||
|
@ -712,6 +712,9 @@ Release 2.7.0 - UNRELEASED
|
||||
HDFS-7746. Add a test randomly mixing append, truncate and snapshot
|
||||
operations. (szetszwo)
|
||||
|
||||
HADOOP-11648. Set DomainSocketWatcher thread name explicitly.
|
||||
(Liang Xie via ozawa)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-7454. Reduce memory footprint for AclEntries in NameNode.
|
||||
|
@ -176,7 +176,7 @@ public ShortCircuitRegistry(Configuration conf) throws IOException {
|
||||
if (dswLoadingFailure != null) {
|
||||
throw new IOException(dswLoadingFailure);
|
||||
}
|
||||
watcher = new DomainSocketWatcher(interruptCheck);
|
||||
watcher = new DomainSocketWatcher(interruptCheck, "datanode");
|
||||
enabled = true;
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("created new ShortCircuitRegistry with interruptCheck=" +
|
||||
|
@ -412,7 +412,8 @@ final void shutdown(DfsClientShm shm) {
|
||||
private final DomainSocketWatcher domainSocketWatcher;
|
||||
|
||||
DfsClientShmManager(int interruptCheckPeriodMs) throws IOException {
|
||||
this.domainSocketWatcher = new DomainSocketWatcher(interruptCheckPeriodMs);
|
||||
this.domainSocketWatcher = new DomainSocketWatcher(interruptCheckPeriodMs,
|
||||
"client");
|
||||
}
|
||||
|
||||
public Slot allocSlot(DatanodeInfo datanode, DomainPeer peer,
|
||||
|
Loading…
Reference in New Issue
Block a user