Commit c7d8d0a 1 parent 99ea15b commit c7d8d0a Copy full SHA for c7d8d0a
File tree 2 files changed +11
-10
lines changed
presto-main/src/main/java/com/facebook/presto
2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public class QueryManagerConfig
70
70
private int queryManagerExecutorPoolSize = 5 ;
71
71
72
72
private Duration remoteTaskMaxErrorDuration = new Duration (5 , TimeUnit .MINUTES );
73
- private int remoteTaskMaxCallbackThreads = 1000 ;
73
+ private int remoteTaskMaxCallbackThreads = Runtime . getRuntime (). availableProcessors () ;
74
74
75
75
private String queryExecutionPolicy = "all-at-once" ;
76
76
private Duration queryMaxRunTime = new Duration (100 , TimeUnit .DAYS );
Original file line number Diff line number Diff line change @@ -94,15 +94,7 @@ public class HttpRemoteTaskFactory
94
94
private final MetadataManager metadataManager ;
95
95
private final QueryManager queryManager ;
96
96
private final DecayCounter taskUpdateRequestSize ;
97
- private final EventLoopGroup eventLoopGroup = new DefaultEventLoopGroup (Runtime .getRuntime ().availableProcessors (),
98
- new ThreadFactoryBuilder ().setNameFormat ("task-event-loop-%s" ).setDaemon (true ).build ())
99
- {
100
- @ Override
101
- protected EventLoop newChild (Executor executor , Object ... args )
102
- {
103
- return new SafeEventLoop (this , executor );
104
- }
105
- };
97
+ private final EventLoopGroup eventLoopGroup ;
106
98
107
99
@ Inject
108
100
public HttpRemoteTaskFactory (
@@ -180,6 +172,15 @@ else if (binaryTransportEnabled) {
180
172
this .queryManager = queryManager ;
181
173
182
174
this .taskUpdateRequestSize = new DecayCounter (ExponentialDecay .oneMinute ());
175
+ this .eventLoopGroup = new DefaultEventLoopGroup (config .getRemoteTaskMaxCallbackThreads (),
176
+ new ThreadFactoryBuilder ().setNameFormat ("task-event-loop-%s" ).setDaemon (true ).build ())
177
+ {
178
+ @ Override
179
+ protected EventLoop newChild (Executor executor , Object ... args )
180
+ {
181
+ return new SafeEventLoop (this , executor );
182
+ }
183
+ };
183
184
}
184
185
185
186
@ Managed
You can’t perform that action at this time.
0 commit comments