mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
arthas thread with name
This commit is contained in:
@@ -55,6 +55,7 @@ import com.taobao.arthas.core.util.LogUtil;
|
||||
import com.taobao.arthas.core.util.UserStatUtil;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.nio.NioEventLoopGroup;
|
||||
import io.netty.util.concurrent.DefaultThreadFactory;
|
||||
import io.netty.util.concurrent.EventExecutorGroup;
|
||||
|
||||
|
||||
@@ -314,7 +315,7 @@ public class ArthasBootstrap {
|
||||
resolvers.add(builtinCommands);
|
||||
|
||||
//worker group
|
||||
workerGroup = new NioEventLoopGroup(8);
|
||||
workerGroup = new NioEventLoopGroup(new DefaultThreadFactory("arthas-TermServer", true));
|
||||
|
||||
// TODO: discover user provided command resolver
|
||||
if (configure.getTelnetPort() > 0) {
|
||||
|
||||
+2
-1
@@ -10,6 +10,7 @@ import io.netty.channel.nio.NioEventLoopGroup;
|
||||
import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||
import io.netty.handler.logging.LogLevel;
|
||||
import io.netty.handler.logging.LoggingHandler;
|
||||
import io.netty.util.concurrent.DefaultThreadFactory;
|
||||
import io.netty.util.concurrent.EventExecutorGroup;
|
||||
import io.netty.util.concurrent.Future;
|
||||
import io.netty.util.concurrent.GenericFutureListener;
|
||||
@@ -58,7 +59,7 @@ public class NettyWebsocketTtyBootstrap {
|
||||
}
|
||||
|
||||
public void start(Consumer<TtyConnection> handler, final Consumer<Throwable> doneHandler) {
|
||||
group = new NioEventLoopGroup();
|
||||
group = new NioEventLoopGroup(new DefaultThreadFactory("arthas-NettyWebsocketTtyBootstrap", true));
|
||||
|
||||
ServerBootstrap b = new ServerBootstrap();
|
||||
b.group(group).channel(NioServerSocketChannel.class).handler(new LoggingHandler(LogLevel.INFO))
|
||||
|
||||
+2
-1
@@ -11,6 +11,7 @@ import io.netty.channel.socket.SocketChannel;
|
||||
import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||
import io.netty.handler.logging.LogLevel;
|
||||
import io.netty.handler.logging.LoggingHandler;
|
||||
import io.netty.util.concurrent.DefaultThreadFactory;
|
||||
import io.netty.util.concurrent.EventExecutorGroup;
|
||||
import io.netty.util.concurrent.Future;
|
||||
import io.netty.util.concurrent.GenericFutureListener;
|
||||
@@ -33,7 +34,7 @@ public class NettyHttpTelnetBootstrap extends TelnetBootstrap {
|
||||
|
||||
public NettyHttpTelnetBootstrap(EventExecutorGroup workerGroup) {
|
||||
this.workerGroup = workerGroup;
|
||||
this.group = new NioEventLoopGroup();
|
||||
this.group = new NioEventLoopGroup(new DefaultThreadFactory("arthas-NettyHttpTelnetBootstrap", true));
|
||||
this.channelGroup = new DefaultChannelGroup(ImmediateEventExecutor.INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user