@@ -63,8 +63,9 @@ public class BootStrapContext implements AutoCloseable {
6363 private final DrillConfig config ;
6464 private final CaseInsensitiveMap <OptionDefinition > definitions ;
6565 private final AuthenticatorProvider authProvider ;
66- private final EventLoopGroup loop ;
67- private final EventLoopGroup loop2 ;
66+ private final EventLoopGroup controlLoopGroup ;
67+ private final EventLoopGroup dataClientLoopGroup ;
68+ private final EventLoopGroup dataServerLoopGroup ;
6869 private final MetricRegistry metrics ;
6970 private final BufferAllocator allocator ;
7071 private final ScanResult classpathScan ;
@@ -81,8 +82,9 @@ public BootStrapContext(DrillConfig config, CaseInsensitiveMap<OptionDefinition>
8182 this .hostName = getCanonicalHostName ();
8283 login (config );
8384 this .authProvider = new AuthenticatorProviderImpl (config , classpathScan );
84- this .loop = TransportCheck .createEventLoopGroup (config .getInt (ExecConstants .BIT_SERVER_RPC_THREADS ), "BitServer-" );
85- this .loop2 = TransportCheck .createEventLoopGroup (config .getInt (ExecConstants .BIT_SERVER_RPC_THREADS ), "BitClient-" );
85+ this .controlLoopGroup = TransportCheck .createEventLoopGroup (config .getInt (ExecConstants .BIT_SERVER_RPC_THREADS ), "Control-" );
86+ this .dataClientLoopGroup = TransportCheck .createEventLoopGroup (config .getInt (ExecConstants .BIT_SERVER_RPC_THREADS ), "DataClient-" );
87+ this .dataServerLoopGroup = TransportCheck .createEventLoopGroup (config .getInt (ExecConstants .BIT_SERVER_RPC_THREADS ), "DataServer-" );
8688 // Note that metrics are stored in a static instance
8789 this .metrics = DrillMetrics .getRegistry ();
8890 this .allocator = RootAllocatorFactory .newRoot (config );
@@ -195,12 +197,16 @@ public CaseInsensitiveMap<OptionDefinition> getDefinitions() {
195197 return definitions ;
196198 }
197199
198- public EventLoopGroup getBitLoopGroup () {
199- return loop ;
200+ public EventLoopGroup getControlLoopGroup () {
201+ return controlLoopGroup ;
200202 }
201203
202- public EventLoopGroup getBitClientLoopGroup () {
203- return loop2 ;
204+ public EventLoopGroup getDataClientLoopGroup () {
205+ return dataClientLoopGroup ;
206+ }
207+
208+ public EventLoopGroup getDataServerLoopGroup () {
209+ return dataClientLoopGroup ;
204210 }
205211
206212 public MetricRegistry getMetrics () {
@@ -258,9 +264,9 @@ public void close() {
258264
259265 try {
260266 AutoCloseables .close (allocator , authProvider );
261- shutdown (loop );
262- shutdown (loop2 );
263-
267+ shutdown (controlLoopGroup );
268+ shutdown (dataClientLoopGroup );
269+ shutdown ( dataServerLoopGroup );
264270 } catch (final Exception e ) {
265271 logger .error ("Error while closing" , e );
266272 }
0 commit comments