@@ -83,7 +83,6 @@ public class QueryBatcherImpl extends BatcherImpl implements QueryBatcher {
8383 private int docToUriBatchRatio ;
8484 private int defaultDocBatchSize ;
8585 private int maxUriBatchSize ;
86- private int threadThrottleFactor ;
8786
8887 QueryBatcherImpl (
8988 SearchQueryDefinition originalQuery , DataMovementManager moveMgr , ForestConfiguration forestConfig ,
@@ -324,7 +323,6 @@ public QueryBatcher withBatchSize(int docBatchSize) {
324323 if (this .docToUriBatchRatio == 0 ) {
325324 this .docToUriBatchRatio = 1 ;
326325 }
327- this .threadThrottleFactor = 0 ;
328326 return this ;
329327 }
330328
@@ -344,30 +342,11 @@ public QueryBatcher withBatchSize(int docBatchSize, int docToUriBatchRatio) {
344342 return this ;
345343 }
346344
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-
361345 @ Override
362346 public int getDocToUriBatchRatio () {
363347 return this .docToUriBatchRatio ;
364348 }
365349
366- // @Override
367- public int getThreadThrottleFactor () {
368- return this .threadThrottleFactor ;
369- }
370-
371350 @ Override
372351 public int getDefaultDocBatchSize () {
373352 return this .defaultDocBatchSize ;
@@ -473,7 +452,7 @@ private synchronized void initialize() {
473452 if ( threadCountSet == false ) {
474453 if ( query != null ) {
475454 logger .warn ("threadCount not set--defaulting to number of forests ({})" , forests .length );
476- withThreadCount (forests .length * ( docToUriBatchRatio - threadThrottleFactor ) );
455+ withThreadCount (forests .length * docToUriBatchRatio );
477456 } else {
478457 int hostCount = clientList .get ().size ();
479458 logger .warn ("threadCount not set--defaulting to number of hosts ({})" , hostCount );
@@ -488,9 +467,9 @@ private synchronized void initialize() {
488467 if (getThreadCount () == 1 ) {
489468 isSingleThreaded = true ;
490469 }
491- logger .info ("Starting job forest length={}, docBatchSize={}, docToUriBatchRatio={}, threadThrottleFactor= {}, " +
470+ logger .info ("Starting job forest length={}, docBatchSize={}, docToUriBatchRatio={}, " +
492471 "threadCount={}, onUrisReady listeners={}, failure listeners={}" ,
493- forests .length , getBatchSize (), getDocToUriBatchRatio (), getThreadThrottleFactor (), getThreadCount (),
472+ forests .length , getBatchSize (), getDocToUriBatchRatio (), getThreadCount (),
494473 urisReadyListeners .size (), failureListeners .size ());
495474 threadPool = new QueryThreadPoolExecutor (getThreadCount (), forests .length , getDocToUriBatchRatio (), this );
496475 }
0 commit comments