@@ -83,7 +83,6 @@ public class QueryBatcherImpl extends BatcherImpl implements QueryBatcher {
83
83
private int docToUriBatchRatio ;
84
84
private int defaultDocBatchSize ;
85
85
private int maxUriBatchSize ;
86
- private int threadThrottleFactor ;
87
86
88
87
QueryBatcherImpl (
89
88
SearchQueryDefinition originalQuery , DataMovementManager moveMgr , ForestConfiguration forestConfig ,
@@ -324,7 +323,6 @@ public QueryBatcher withBatchSize(int docBatchSize) {
324
323
if (this .docToUriBatchRatio == 0 ) {
325
324
this .docToUriBatchRatio = 1 ;
326
325
}
327
- this .threadThrottleFactor = 0 ;
328
326
return this ;
329
327
}
330
328
@@ -344,30 +342,11 @@ public QueryBatcher withBatchSize(int docBatchSize, int docToUriBatchRatio) {
344
342
return this ;
345
343
}
346
344
347
- /* @Override
348
- public QueryBatcher withBatchSize(int docBatchSize, int docToUriBatchRatio, int threadThrottleFactor) {
349
- if (threadThrottleFactor < 0 || threadThrottleFactor > this.maxDocToUriBatchRatio) {
350
- throw new IllegalArgumentException("threadThrottleFactor is less than 0 or " +
351
- "threadThrottleFactor is larger than maxDocToUriBatchRatio");
352
- }
353
- if (threadThrottleFactor >= docToUriBatchRatio) {
354
- throw new IllegalArgumentException("threadThrottleFactor must be less than docToUriBatchRatio");
355
- }
356
- withBatchSize(docBatchSize, docToUriBatchRatio);
357
- this.threadThrottleFactor = threadThrottleFactor;
358
- return this;
359
- }*/
360
-
361
345
@ Override
362
346
public int getDocToUriBatchRatio () {
363
347
return this .docToUriBatchRatio ;
364
348
}
365
349
366
- // @Override
367
- public int getThreadThrottleFactor () {
368
- return this .threadThrottleFactor ;
369
- }
370
-
371
350
@ Override
372
351
public int getDefaultDocBatchSize () {
373
352
return this .defaultDocBatchSize ;
@@ -473,7 +452,7 @@ private synchronized void initialize() {
473
452
if ( threadCountSet == false ) {
474
453
if ( query != null ) {
475
454
logger .warn ("threadCount not set--defaulting to number of forests ({})" , forests .length );
476
- withThreadCount (forests .length * ( docToUriBatchRatio - threadThrottleFactor ) );
455
+ withThreadCount (forests .length * docToUriBatchRatio );
477
456
} else {
478
457
int hostCount = clientList .get ().size ();
479
458
logger .warn ("threadCount not set--defaulting to number of hosts ({})" , hostCount );
@@ -488,9 +467,9 @@ private synchronized void initialize() {
488
467
if (getThreadCount () == 1 ) {
489
468
isSingleThreaded = true ;
490
469
}
491
- logger .info ("Starting job forest length={}, docBatchSize={}, docToUriBatchRatio={}, threadThrottleFactor= {}, " +
470
+ logger .info ("Starting job forest length={}, docBatchSize={}, docToUriBatchRatio={}, " +
492
471
"threadCount={}, onUrisReady listeners={}, failure listeners={}" ,
493
- forests .length , getBatchSize (), getDocToUriBatchRatio (), getThreadThrottleFactor (), getThreadCount (),
472
+ forests .length , getBatchSize (), getDocToUriBatchRatio (), getThreadCount (),
494
473
urisReadyListeners .size (), failureListeners .size ());
495
474
threadPool = new QueryThreadPoolExecutor (getThreadCount (), forests .length , getDocToUriBatchRatio (), this );
496
475
}
0 commit comments