more to ABQ from LBQ is relevant places
This commit is contained in:
parent
dee1addc17
commit
9f427010bf
|
@ -183,7 +183,7 @@ public class ThreadPool extends AbstractComponent {
|
|||
logger.debug("creating thread_pool [{}], type [{}], size [{}], queue_size [{}], reject_policy [{}]", name, type, size, queueSize, rejectSetting);
|
||||
return new ThreadPoolExecutor(size, size,
|
||||
0L, TimeUnit.MILLISECONDS,
|
||||
queueSize <= 0 ? new LinkedTransferQueue<Runnable>() : new LinkedBlockingQueue<Runnable>(queueSize),
|
||||
queueSize <= 0 ? new LinkedTransferQueue<Runnable>() : new ArrayBlockingQueue<Runnable>(queueSize),
|
||||
threadFactory, rejectedExecutionHandler);
|
||||
} else if ("scaling".equals(type)) {
|
||||
TimeValue keepAlive = settings.getAsTime("keep_alive", defaultSettings.getAsTime("keep_alive", timeValueMinutes(5)));
|
||||
|
|
|
@ -53,8 +53,8 @@ import java.net.HttpURLConnection;
|
|||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ArrayBlockingQueue;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.elasticsearch.client.Requests.*;
|
||||
|
@ -164,7 +164,7 @@ public class CouchdbRiver extends AbstractRiverComponent implements River {
|
|||
if (throttleSize == -1) {
|
||||
stream = new LinkedTransferQueue<String>();
|
||||
} else {
|
||||
stream = new LinkedBlockingQueue<String>(throttleSize);
|
||||
stream = new ArrayBlockingQueue<String>(throttleSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue