File tree Expand file tree Collapse file tree
common/network-common/src/main/java/org/apache/spark/network Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ public class TransportContext {
8888 // Separate thread pool for handling ChunkFetchRequest. This helps to enable throttling
8989 // max number of TransportServer worker threads that are blocked on writing response
9090 // of ChunkFetchRequest message back to the client via the underlying channel.
91- private EventLoopGroup chunkFetchWorkers ;
91+ private final EventLoopGroup chunkFetchWorkers ;
9292
9393 public TransportContext (TransportConf conf , RpcHandler rpcHandler ) {
9494 this (conf , rpcHandler , false , false );
@@ -122,14 +122,15 @@ public TransportContext(
122122 this .closeIdleConnections = closeIdleConnections ;
123123 this .isClientOnly = isClientOnly ;
124124
125- if (chunkFetchWorkers == null &&
126- conf .getModuleName () != null &&
125+ if (conf .getModuleName () != null &&
127126 conf .getModuleName ().equalsIgnoreCase ("shuffle" ) &&
128127 !isClientOnly ) {
129128 chunkFetchWorkers = NettyUtils .createEventLoop (
130129 IOMode .valueOf (conf .ioMode ()),
131130 conf .chunkFetchHandlerThreads (),
132131 "shuffle-chunk-fetch-handler" );
132+ } else {
133+ chunkFetchWorkers = null ;
133134 }
134135 }
135136
You can’t perform that action at this time.
0 commit comments