From 81022285b9aa787d531bd3f6f2bc9dd30faefd40 Mon Sep 17 00:00:00 2001 From: Todd Lipcon Date: Mon, 7 Feb 2011 22:02:16 +0000 Subject: [PATCH] HBASE-3510. Add thread name for IPC reader threads git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1068162 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 79befde24b0..2893d171a33 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -102,6 +102,7 @@ Release 0.90.1 - Unreleased HBASE-3470 Check that hbase-default.xml is loaded from within jar HBASE-3508 LruBlockCache statistics thread should have a name HBASE-3511 Allow rolling restart to apply to only RS or only masters + HBASE-3510 Add thread name for IPC reader threads Release 0.90.0 - January 19th, 2011 INCOMPATIBLE CHANGES diff --git a/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java b/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java index e40f4d1c545..f36fe6249a9 100644 --- a/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java +++ b/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java @@ -62,6 +62,7 @@ import org.apache.hadoop.util.ReflectionUtils; import org.apache.hadoop.util.StringUtils; import com.google.common.base.Function; +import com.google.common.util.concurrent.ThreadFactoryBuilder; /** An abstract IPC service. IPC calls take a single {@link Writable} as a * parameter, and return a {@link Writable} as their value. A service runs on @@ -284,7 +285,9 @@ public abstract class HBaseServer implements RpcServer { selector= Selector.open(); readers = new Reader[readThreads]; - readPool = Executors.newFixedThreadPool(readThreads); + readPool = Executors.newFixedThreadPool(readThreads, + new ThreadFactoryBuilder().setNameFormat( + "IPC Reader %d on port " + port).build()); for (int i = 0; i < readThreads; ++i) { Selector readSelector = Selector.open(); Reader reader = new Reader(readSelector);